deal with gCamera being exposed incorrectly

This commit is contained in:
Isaac0-dev 2025-03-28 14:33:40 +10:00
parent ebcfd94c4c
commit 8feea0111e

View file

@ -724,17 +724,9 @@ void smlua_cobject_init_globals(void) {
lua_setglobal(L, #ptr); \
} \
#define EXPOSE_GLOBAL(lot, ptr) \
{ \
smlua_push_object(L, lot, &ptr, NULL); \
lua_setglobal(L, #ptr); \
} \
#define EXPOSE_GLOBAL_WITH_NAME(lot, ptr, name) \
{ \
smlua_push_object(L, lot, &ptr, NULL); \
lua_setglobal(L, name); \
} \
#define EXPOSE_GLOBAL(lot, ptr) smlua_push_object(L, lot, &ptr, NULL); lua_setglobal(L, #ptr);
#define EXPOSE_GLOBAL_PTR(lot, ptr) smlua_push_object(L, lot, ptr, NULL); lua_setglobal(L, #ptr);
#define EXPOSE_GLOBAL_WITH_NAME(lot, ptr, name) smlua_push_object(L, lot, ptr, NULL); lua_setglobal(L, name);
// Array structs
@ -763,9 +755,9 @@ void smlua_cobject_init_globals(void) {
// Structs
EXPOSE_GLOBAL_WITH_NAME(LOT_GLOBALTEXTURES, gGlobalTextures, "gTextures");
EXPOSE_GLOBAL_WITH_NAME(LOT_GLOBALTEXTURES, &gGlobalTextures, "gTextures");
EXPOSE_GLOBAL_WITH_NAME(LOT_GLOBALOBJECTANIMATIONS, gGlobalObjectAnimations, "gObjectAnimations");
EXPOSE_GLOBAL_WITH_NAME(LOT_GLOBALOBJECTANIMATIONS, &gGlobalObjectAnimations, "gObjectAnimations");
EXPOSE_GLOBAL(LOT_PAINTINGVALUES, gPaintingValues);
@ -783,7 +775,7 @@ void smlua_cobject_init_globals(void) {
EXPOSE_GLOBAL(LOT_NAMETAGSSETTINGS, gNametagsSettings);
EXPOSE_GLOBAL(LOT_CAMERA, gCamera);
EXPOSE_GLOBAL_PTR(LOT_CAMERA, gCamera);
}
void smlua_cobject_init_per_file_globals(const char* path) {