mirror of
				https://github.com/coop-deluxe/sm64coopdx.git
				synced 2025-10-30 08:01:01 +00:00 
			
		
		
		
	Fixed pragma-packing
This commit is contained in:
		
							parent
							
								
									132a942df4
								
							
						
					
					
						commit
						5ca457d4cd
					
				
					 26 changed files with 9 additions and 29 deletions
				
			
		| 
						 | 
				
			
			@ -144,7 +144,11 @@ function update()
 | 
			
		|||
    end
 | 
			
		||||
 | 
			
		||||
    -- check if local player is camping
 | 
			
		||||
    if gGlobalSyncTable.roundEnded == 0 then
 | 
			
		||||
        camping_detection(gMarioStates[0])
 | 
			
		||||
    else
 | 
			
		||||
        sDistanceTimer = 0
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    -- update sLastSeekerTimer
 | 
			
		||||
    if gGlobalSyncTable.roundEnded == 0 then
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,6 @@
 | 
			
		|||
#pragma once
 | 
			
		||||
#include "djui.h"
 | 
			
		||||
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
struct DjuiBaseRect {
 | 
			
		||||
    f32 x;
 | 
			
		||||
    f32 y;
 | 
			
		||||
| 
						 | 
				
			
			@ -9,13 +8,11 @@ struct DjuiBaseRect {
 | 
			
		|||
    f32 height;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
struct DjuiBaseChild {
 | 
			
		||||
    struct DjuiBase* base;
 | 
			
		||||
    struct DjuiBaseChild* next;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
struct DjuiBasePadding {
 | 
			
		||||
    struct DjuiScreenValue top;
 | 
			
		||||
    struct DjuiScreenValue right;
 | 
			
		||||
| 
						 | 
				
			
			@ -23,7 +20,6 @@ struct DjuiBasePadding {
 | 
			
		|||
    struct DjuiScreenValue left;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
struct DjuiBase {
 | 
			
		||||
    struct DjuiBase* parent;
 | 
			
		||||
    struct DjuiBaseChild* child;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,7 +2,6 @@
 | 
			
		|||
#include "djui.h"
 | 
			
		||||
#include "src/pc/configfile.h"
 | 
			
		||||
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
struct DjuiBind {
 | 
			
		||||
    struct DjuiBase base;
 | 
			
		||||
    struct DjuiText* text;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,6 @@
 | 
			
		|||
#pragma once
 | 
			
		||||
#include "djui.h"
 | 
			
		||||
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
struct DjuiButton {
 | 
			
		||||
    struct DjuiBase base;
 | 
			
		||||
    struct DjuiRect* rect;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,6 @@
 | 
			
		|||
#pragma once
 | 
			
		||||
#include "djui.h"
 | 
			
		||||
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
struct DjuiChatBox {
 | 
			
		||||
    struct DjuiBase base;
 | 
			
		||||
    struct DjuiRect* chatContainer;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,6 @@
 | 
			
		|||
#pragma once
 | 
			
		||||
#include "djui.h"
 | 
			
		||||
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
struct DjuiChatMessage {
 | 
			
		||||
    struct DjuiBase base;
 | 
			
		||||
    struct DjuiText* message;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,6 @@
 | 
			
		|||
#pragma once
 | 
			
		||||
#include "djui.h"
 | 
			
		||||
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
struct DjuiCheckbox {
 | 
			
		||||
    struct DjuiBase base;
 | 
			
		||||
    struct DjuiRect* rect;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,6 @@
 | 
			
		|||
#pragma once
 | 
			
		||||
#include "djui.h"
 | 
			
		||||
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
struct DjuiFlowLayout {
 | 
			
		||||
    struct DjuiBase base;
 | 
			
		||||
    enum DjuiFlowDirection flowDirection;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,6 @@
 | 
			
		|||
#pragma once
 | 
			
		||||
#include "djui.h"
 | 
			
		||||
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
struct DjuiFont {
 | 
			
		||||
    f32 charWidth;
 | 
			
		||||
    f32 charHeight;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,6 @@
 | 
			
		|||
#pragma once
 | 
			
		||||
#include "djui.h"
 | 
			
		||||
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
struct DjuiImage {
 | 
			
		||||
    struct DjuiBase base;
 | 
			
		||||
    const u8* texture;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,6 @@
 | 
			
		|||
#pragma once
 | 
			
		||||
#include "djui.h"
 | 
			
		||||
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
struct DjuiInputbox {
 | 
			
		||||
    struct DjuiBase base;
 | 
			
		||||
    char* buffer;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -20,7 +20,6 @@
 | 
			
		|||
#define SCANCODE_SPACE  57
 | 
			
		||||
#define SCANCODE_ESCAPE 1
 | 
			
		||||
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
struct DjuiInteractable {
 | 
			
		||||
    bool enabled;
 | 
			
		||||
    void (*update_style)(struct DjuiBase*);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,6 @@
 | 
			
		|||
#pragma once
 | 
			
		||||
#include "djui.h"
 | 
			
		||||
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
struct DjuiPopup {
 | 
			
		||||
    struct DjuiBase base;
 | 
			
		||||
    struct DjuiText* text;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,6 @@
 | 
			
		|||
#pragma once
 | 
			
		||||
#include "djui.h"
 | 
			
		||||
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
struct DjuiProgressBar {
 | 
			
		||||
    struct DjuiBase base;
 | 
			
		||||
    struct DjuiRect* rect;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,6 @@
 | 
			
		|||
#pragma once
 | 
			
		||||
#include "djui.h"
 | 
			
		||||
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
struct DjuiRect {
 | 
			
		||||
    struct DjuiBase base;
 | 
			
		||||
};
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,6 @@
 | 
			
		|||
#pragma once
 | 
			
		||||
#include "djui.h"
 | 
			
		||||
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
struct DjuiRoot {
 | 
			
		||||
    struct DjuiBase base;
 | 
			
		||||
};
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,6 @@
 | 
			
		|||
#pragma once
 | 
			
		||||
#include "djui.h"
 | 
			
		||||
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
struct DjuiSelectionbox {
 | 
			
		||||
    struct DjuiBase base;
 | 
			
		||||
    struct DjuiText* text;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,6 @@
 | 
			
		|||
#pragma once
 | 
			
		||||
#include "djui.h"
 | 
			
		||||
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
struct DjuiSlider {
 | 
			
		||||
    struct DjuiBase base;
 | 
			
		||||
    struct DjuiRect* rect;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,6 @@
 | 
			
		|||
#pragma once
 | 
			
		||||
#include "djui.h"
 | 
			
		||||
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
struct DjuiText {
 | 
			
		||||
    struct DjuiBase base;
 | 
			
		||||
    char* message;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,6 @@
 | 
			
		|||
#pragma once
 | 
			
		||||
#include "djui.h"
 | 
			
		||||
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
struct DjuiThreePanel {
 | 
			
		||||
    struct DjuiBase base;
 | 
			
		||||
    struct DjuiScreenValue minHeaderSize;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,6 @@
 | 
			
		|||
#pragma once
 | 
			
		||||
#include "djui.h"
 | 
			
		||||
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
struct DjuiColor {
 | 
			
		||||
    u8 r;
 | 
			
		||||
    u8 g;
 | 
			
		||||
| 
						 | 
				
			
			@ -12,7 +11,6 @@ struct DjuiColor {
 | 
			
		|||
enum DjuiScreenValueType { DJUI_SVT_ABSOLUTE, DJUI_SVT_RELATIVE, DJUI_SVT_ASPECT_RATIO };
 | 
			
		||||
enum DjuiFlowDirection { DJUI_FLOW_DIR_DOWN, DJUI_FLOW_DIR_UP, DJUI_FLOW_DIR_RIGHT, DJUI_FLOW_DIR_LEFT };
 | 
			
		||||
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
struct DjuiScreenValue {
 | 
			
		||||
    enum DjuiScreenValueType type;
 | 
			
		||||
    f32 value;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,6 @@
 | 
			
		|||
#include <stdio.h>
 | 
			
		||||
#include "smlua.h"
 | 
			
		||||
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
struct CObjectAllowListNode {
 | 
			
		||||
    u64 pointer;
 | 
			
		||||
    struct CObjectAllowListNode* next;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,7 +9,6 @@
 | 
			
		|||
 | 
			
		||||
#define MOD_PATH "./mods"
 | 
			
		||||
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
struct ModListEntry {
 | 
			
		||||
    char* name;
 | 
			
		||||
    FILE* fp;
 | 
			
		||||
| 
						 | 
				
			
			@ -26,7 +25,6 @@ struct ModListEntry {
 | 
			
		|||
    bool selectable;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
struct ModTable {
 | 
			
		||||
    struct ModListEntry* entries;
 | 
			
		||||
    u16 entryCount;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -145,7 +145,8 @@ bool network_allow_unknown_local_index(enum PacketType packetType) {
 | 
			
		|||
        || (packetType == PACKET_MOD_LIST)
 | 
			
		||||
        || (packetType == PACKET_DOWNLOAD_REQUEST)
 | 
			
		||||
        || (packetType == PACKET_DOWNLOAD)
 | 
			
		||||
        || (packetType == PACKET_KEEP_ALIVE);
 | 
			
		||||
        || (packetType == PACKET_KEEP_ALIVE)
 | 
			
		||||
        || (packetType == PACKET_DEBUG_SYNC);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void network_send_to(u8 localIndex, struct Packet* p) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -67,6 +67,7 @@ struct PacketPlayerData {
 | 
			
		|||
    u8 usedSyncID;
 | 
			
		||||
    u8 platformSyncID;
 | 
			
		||||
};
 | 
			
		||||
#pragma pack()
 | 
			
		||||
 | 
			
		||||
static void read_packet_data(struct PacketPlayerData* data, struct MarioState* m) {
 | 
			
		||||
    u8 heldSyncID     = (m->heldObj != NULL)            ? m->heldObj->oSyncID            : 0;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -21,6 +21,7 @@ struct SpawnObjectData {
 | 
			
		|||
    s32 rawData[80];
 | 
			
		||||
    u8 globalPlayerIndex;
 | 
			
		||||
};
 | 
			
		||||
#pragma pack()
 | 
			
		||||
 | 
			
		||||
static u8 generate_parent_id(struct Object* objects[], u8 onIndex, bool sanitize) {
 | 
			
		||||
    struct Object* o = objects[onIndex];
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue