Fix macOS compile errors and warnings [build]

This commit is contained in:
Agent X 2025-05-22 08:48:05 -04:00
parent bf4bef435a
commit 318c8a4995
10 changed files with 13 additions and 44 deletions

View file

@ -3189,7 +3189,7 @@ const BehaviorScript bhvUnusedFakeStar[] = {
};
// What is this?
static const BehaviorScript unused_1[] = {
UNUSED static const BehaviorScript unused_1[] = {
BREAK(),
BREAK(),
BREAK(),

File diff suppressed because one or more lines are too long

View file

@ -414,7 +414,7 @@ static void handle_tab_completion(void) {
}
}
static bool djui_chat_box_input_on_key_down(struct DjuiBase* base, int scancode) {
static bool djui_chat_box_input_on_key_down(UNUSED struct DjuiBase* base, int scancode) {
sent_history_init(&sentHistory);
if (gDjuiChatBox == NULL) { return false; }
@ -469,12 +469,13 @@ static bool djui_chat_box_input_on_key_down(struct DjuiBase* base, int scancode)
sent_history_reset_navigation(&sentHistory);
djui_chat_box_input_escape(gDjuiChatBox->chatInput);
break;
default:
default: {
bool returnValueOnOtherKeyDown = djui_inputbox_on_key_down(base, scancode);
if (strcmp(previousText, gDjuiChatBox->chatInput->buffer) != 0) {
reset_tab_completion_all();
}
return returnValueOnOtherKeyDown;
}
}
if (!gDjuiConsole->scrolling) {

View file

@ -24,9 +24,6 @@
#else
# define FRAMERATE 30
#endif
// time between consequtive game frames
static const f64 sFrameTime = 1.0 / ((double)FRAMERATE);
static f64 sFrameTargetTime = 0;
static void sleep_ms(int milliseconds) { // cross-platform sleep function
// from StackOverflow user Bernardo Ramos: https://stackoverflow.com/a/28827188
@ -54,9 +51,6 @@ static void gfx_dummy_wm_set_keyboard_callbacks(UNUSED kb_callback_t on_key_down
static void gfx_dummy_wm_set_scroll_callback(UNUSED void (*on_scroll)(float, float)) {
}
static void gfx_dummy_wm_set_fullscreen_changed_callback(UNUSED void (*on_fullscreen_changed)(bool is_now_fullscreen)) {
}
static void gfx_dummy_wm_set_fullscreen(UNUSED bool enable) {
}

View file

@ -154,9 +154,9 @@ void ext_gfx_run_dl(Gfx* cmd);
//////////////////////////////////
static unsigned long get_time(void) {
/*static unsigned long get_time(void) {
return 0;
}
}*/
static void gfx_flush(void) {
if (buf_vbo_len > 0) {
@ -2046,10 +2046,10 @@ static void OPTIMIZE_O3 djui_gfx_dp_set_override(void* texture, uint32_t w, uint
sDjuiOverride = (texture != NULL);
}
static void OPTIMIZE_O3 djui_gfx_sp_simple_vertex(size_t n_vertices, size_t dest_index, const Vtx *vertices) {
/*static void OPTIMIZE_O3 djui_gfx_sp_simple_vertex(size_t n_vertices, size_t dest_index, const Vtx *vertices) {
gfx_sp_vertex(n_vertices, dest_index, vertices, false);
return;
}
}*/
static void OPTIMIZE_O3 djui_gfx_sp_simple_tri1(uint8_t vtx1_idx, uint8_t vtx2_idx, uint8_t vtx3_idx) {
gfx_sp_tri1(vtx1_idx, vtx2_idx, vtx3_idx);

View file

@ -54,9 +54,6 @@
#else
# define FRAMERATE 30
#endif
// time between consequtive game frames
static const f64 sFrameTime = 1.0 / ((double)FRAMERATE);
static f64 sFrameTargetTime = 0;
static SDL_Window *wnd;
static SDL_GLContext ctx = NULL;

View file

@ -127,7 +127,7 @@ static const char* LuaHookedEventTypeName[] = {
"HOOK_ON_INTERACTIONS",
"HOOK_ALLOW_FORCE_WATER_ACTION",
"HOOK_BEFORE_WARP",
"HOOK_ON_INSTANT_WARP"
"HOOK_ON_INSTANT_WARP",
"HOOK_MAX"
};

View file

@ -25,7 +25,6 @@ struct SyncObjectForgetEntry {
struct SyncObjectForgetEntry* sForgetList = NULL;
static u32 sNextSyncId = SYNC_ID_BLOCK_SIZE / 2;
static bool sFreeingAll = false;
////////////
// system //
@ -35,18 +34,6 @@ void sync_objects_init_system(void) {
sSoMap = hmap_create(true);
}
static bool sync_objects_forget_list_contains(struct SyncObject* so) {
struct SyncObjectForgetEntry* entry = sForgetList;
while (entry) {
struct SyncObjectForgetEntry* next = entry->next;
if (entry->so == so) {
return true;
}
entry = next;
}
return false;
}
void sync_objects_update(void) {
struct SyncObjectForgetEntry* prev = NULL;
struct SyncObjectForgetEntry* entry = sForgetList;

View file

@ -3,7 +3,6 @@
#include "types.h"
static char sVersionString[MAX_VERSION_LENGTH] = { 0 };
static char sOnlineVersionString[MAX_VERSION_LENGTH] = { 0 };
const char* get_version(void) {
#if defined(VERSION_US)

View file

@ -26,15 +26,6 @@ static u32 sCurrentPhysicalSize = 0;
static u8* sCurrentSegmentMemory = NULL;
static u32 sCurrentSegmentSize = 0;
static s32 READ32(struct RomAsset* asset) {
s64 index = (asset->segmentedAddress + asset->cursor);
if (index < 0 || index >= sCurrentSegmentSize) { return 0; }
u8* ptr = &sCurrentSegmentMemory[index];
s32 value = BSWAP32(*((s32*)ptr));
asset->cursor += sizeof(s32);
return value;
}
static s16 READ16(struct RomAsset* asset) {
s64 index = (asset->segmentedAddress + asset->cursor);
if (index < 0 || index >= sCurrentSegmentSize) { return 0; }