Fixed pragma-packing

This commit is contained in:
MysterD 2022-02-05 12:22:41 -08:00
parent 132a942df4
commit 5ca457d4cd
26 changed files with 9 additions and 29 deletions

View file

@ -144,7 +144,11 @@ function update()
end end
-- check if local player is camping -- check if local player is camping
if gGlobalSyncTable.roundEnded == 0 then
camping_detection(gMarioStates[0]) camping_detection(gMarioStates[0])
else
sDistanceTimer = 0
end
-- update sLastSeekerTimer -- update sLastSeekerTimer
if gGlobalSyncTable.roundEnded == 0 then if gGlobalSyncTable.roundEnded == 0 then

View file

@ -1,7 +1,6 @@
#pragma once #pragma once
#include "djui.h" #include "djui.h"
#pragma pack(1)
struct DjuiBaseRect { struct DjuiBaseRect {
f32 x; f32 x;
f32 y; f32 y;
@ -9,13 +8,11 @@ struct DjuiBaseRect {
f32 height; f32 height;
}; };
#pragma pack(1)
struct DjuiBaseChild { struct DjuiBaseChild {
struct DjuiBase* base; struct DjuiBase* base;
struct DjuiBaseChild* next; struct DjuiBaseChild* next;
}; };
#pragma pack(1)
struct DjuiBasePadding { struct DjuiBasePadding {
struct DjuiScreenValue top; struct DjuiScreenValue top;
struct DjuiScreenValue right; struct DjuiScreenValue right;
@ -23,7 +20,6 @@ struct DjuiBasePadding {
struct DjuiScreenValue left; struct DjuiScreenValue left;
}; };
#pragma pack(1)
struct DjuiBase { struct DjuiBase {
struct DjuiBase* parent; struct DjuiBase* parent;
struct DjuiBaseChild* child; struct DjuiBaseChild* child;

View file

@ -2,7 +2,6 @@
#include "djui.h" #include "djui.h"
#include "src/pc/configfile.h" #include "src/pc/configfile.h"
#pragma pack(1)
struct DjuiBind { struct DjuiBind {
struct DjuiBase base; struct DjuiBase base;
struct DjuiText* text; struct DjuiText* text;

View file

@ -1,7 +1,6 @@
#pragma once #pragma once
#include "djui.h" #include "djui.h"
#pragma pack(1)
struct DjuiButton { struct DjuiButton {
struct DjuiBase base; struct DjuiBase base;
struct DjuiRect* rect; struct DjuiRect* rect;

View file

@ -1,7 +1,6 @@
#pragma once #pragma once
#include "djui.h" #include "djui.h"
#pragma pack(1)
struct DjuiChatBox { struct DjuiChatBox {
struct DjuiBase base; struct DjuiBase base;
struct DjuiRect* chatContainer; struct DjuiRect* chatContainer;

View file

@ -1,7 +1,6 @@
#pragma once #pragma once
#include "djui.h" #include "djui.h"
#pragma pack(1)
struct DjuiChatMessage { struct DjuiChatMessage {
struct DjuiBase base; struct DjuiBase base;
struct DjuiText* message; struct DjuiText* message;

View file

@ -1,7 +1,6 @@
#pragma once #pragma once
#include "djui.h" #include "djui.h"
#pragma pack(1)
struct DjuiCheckbox { struct DjuiCheckbox {
struct DjuiBase base; struct DjuiBase base;
struct DjuiRect* rect; struct DjuiRect* rect;

View file

@ -1,7 +1,6 @@
#pragma once #pragma once
#include "djui.h" #include "djui.h"
#pragma pack(1)
struct DjuiFlowLayout { struct DjuiFlowLayout {
struct DjuiBase base; struct DjuiBase base;
enum DjuiFlowDirection flowDirection; enum DjuiFlowDirection flowDirection;

View file

@ -1,7 +1,6 @@
#pragma once #pragma once
#include "djui.h" #include "djui.h"
#pragma pack(1)
struct DjuiFont { struct DjuiFont {
f32 charWidth; f32 charWidth;
f32 charHeight; f32 charHeight;

View file

@ -1,7 +1,6 @@
#pragma once #pragma once
#include "djui.h" #include "djui.h"
#pragma pack(1)
struct DjuiImage { struct DjuiImage {
struct DjuiBase base; struct DjuiBase base;
const u8* texture; const u8* texture;

View file

@ -1,7 +1,6 @@
#pragma once #pragma once
#include "djui.h" #include "djui.h"
#pragma pack(1)
struct DjuiInputbox { struct DjuiInputbox {
struct DjuiBase base; struct DjuiBase base;
char* buffer; char* buffer;

View file

@ -20,7 +20,6 @@
#define SCANCODE_SPACE 57 #define SCANCODE_SPACE 57
#define SCANCODE_ESCAPE 1 #define SCANCODE_ESCAPE 1
#pragma pack(1)
struct DjuiInteractable { struct DjuiInteractable {
bool enabled; bool enabled;
void (*update_style)(struct DjuiBase*); void (*update_style)(struct DjuiBase*);

View file

@ -1,7 +1,6 @@
#pragma once #pragma once
#include "djui.h" #include "djui.h"
#pragma pack(1)
struct DjuiPopup { struct DjuiPopup {
struct DjuiBase base; struct DjuiBase base;
struct DjuiText* text; struct DjuiText* text;

View file

@ -1,7 +1,6 @@
#pragma once #pragma once
#include "djui.h" #include "djui.h"
#pragma pack(1)
struct DjuiProgressBar { struct DjuiProgressBar {
struct DjuiBase base; struct DjuiBase base;
struct DjuiRect* rect; struct DjuiRect* rect;

View file

@ -1,7 +1,6 @@
#pragma once #pragma once
#include "djui.h" #include "djui.h"
#pragma pack(1)
struct DjuiRect { struct DjuiRect {
struct DjuiBase base; struct DjuiBase base;
}; };

View file

@ -1,7 +1,6 @@
#pragma once #pragma once
#include "djui.h" #include "djui.h"
#pragma pack(1)
struct DjuiRoot { struct DjuiRoot {
struct DjuiBase base; struct DjuiBase base;
}; };

View file

@ -1,7 +1,6 @@
#pragma once #pragma once
#include "djui.h" #include "djui.h"
#pragma pack(1)
struct DjuiSelectionbox { struct DjuiSelectionbox {
struct DjuiBase base; struct DjuiBase base;
struct DjuiText* text; struct DjuiText* text;

View file

@ -1,7 +1,6 @@
#pragma once #pragma once
#include "djui.h" #include "djui.h"
#pragma pack(1)
struct DjuiSlider { struct DjuiSlider {
struct DjuiBase base; struct DjuiBase base;
struct DjuiRect* rect; struct DjuiRect* rect;

View file

@ -1,7 +1,6 @@
#pragma once #pragma once
#include "djui.h" #include "djui.h"
#pragma pack(1)
struct DjuiText { struct DjuiText {
struct DjuiBase base; struct DjuiBase base;
char* message; char* message;

View file

@ -1,7 +1,6 @@
#pragma once #pragma once
#include "djui.h" #include "djui.h"
#pragma pack(1)
struct DjuiThreePanel { struct DjuiThreePanel {
struct DjuiBase base; struct DjuiBase base;
struct DjuiScreenValue minHeaderSize; struct DjuiScreenValue minHeaderSize;

View file

@ -1,7 +1,6 @@
#pragma once #pragma once
#include "djui.h" #include "djui.h"
#pragma pack(1)
struct DjuiColor { struct DjuiColor {
u8 r; u8 r;
u8 g; u8 g;
@ -12,7 +11,6 @@ struct DjuiColor {
enum DjuiScreenValueType { DJUI_SVT_ABSOLUTE, DJUI_SVT_RELATIVE, DJUI_SVT_ASPECT_RATIO }; 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 }; enum DjuiFlowDirection { DJUI_FLOW_DIR_DOWN, DJUI_FLOW_DIR_UP, DJUI_FLOW_DIR_RIGHT, DJUI_FLOW_DIR_LEFT };
#pragma pack(1)
struct DjuiScreenValue { struct DjuiScreenValue {
enum DjuiScreenValueType type; enum DjuiScreenValueType type;
f32 value; f32 value;

View file

@ -1,7 +1,6 @@
#include <stdio.h> #include <stdio.h>
#include "smlua.h" #include "smlua.h"
#pragma pack(1)
struct CObjectAllowListNode { struct CObjectAllowListNode {
u64 pointer; u64 pointer;
struct CObjectAllowListNode* next; struct CObjectAllowListNode* next;

View file

@ -9,7 +9,6 @@
#define MOD_PATH "./mods" #define MOD_PATH "./mods"
#pragma pack(1)
struct ModListEntry { struct ModListEntry {
char* name; char* name;
FILE* fp; FILE* fp;
@ -26,7 +25,6 @@ struct ModListEntry {
bool selectable; bool selectable;
}; };
#pragma pack(1)
struct ModTable { struct ModTable {
struct ModListEntry* entries; struct ModListEntry* entries;
u16 entryCount; u16 entryCount;

View file

@ -145,7 +145,8 @@ bool network_allow_unknown_local_index(enum PacketType packetType) {
|| (packetType == PACKET_MOD_LIST) || (packetType == PACKET_MOD_LIST)
|| (packetType == PACKET_DOWNLOAD_REQUEST) || (packetType == PACKET_DOWNLOAD_REQUEST)
|| (packetType == PACKET_DOWNLOAD) || (packetType == PACKET_DOWNLOAD)
|| (packetType == PACKET_KEEP_ALIVE); || (packetType == PACKET_KEEP_ALIVE)
|| (packetType == PACKET_DEBUG_SYNC);
} }
void network_send_to(u8 localIndex, struct Packet* p) { void network_send_to(u8 localIndex, struct Packet* p) {

View file

@ -67,6 +67,7 @@ struct PacketPlayerData {
u8 usedSyncID; u8 usedSyncID;
u8 platformSyncID; u8 platformSyncID;
}; };
#pragma pack()
static void read_packet_data(struct PacketPlayerData* data, struct MarioState* m) { static void read_packet_data(struct PacketPlayerData* data, struct MarioState* m) {
u8 heldSyncID = (m->heldObj != NULL) ? m->heldObj->oSyncID : 0; u8 heldSyncID = (m->heldObj != NULL) ? m->heldObj->oSyncID : 0;

View file

@ -21,6 +21,7 @@ struct SpawnObjectData {
s32 rawData[80]; s32 rawData[80];
u8 globalPlayerIndex; u8 globalPlayerIndex;
}; };
#pragma pack()
static u8 generate_parent_id(struct Object* objects[], u8 onIndex, bool sanitize) { static u8 generate_parent_id(struct Object* objects[], u8 onIndex, bool sanitize) {
struct Object* o = objects[onIndex]; struct Object* o = objects[onIndex];