Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix build on macos #29

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/sm_8f.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,8 +515,8 @@ void DoorCode_SetupElevatubeFromSouth(void) { // 0x8FE26C

void DoorCode_SetupElevatubeFromNorth(void) { // 0x8FE291
*(uint16 *)&room_main_asm_variables[4] = 256;
strcpy((uint8 *)&room_main_asm_variables[2], "@");
strcpy((uint8 *)&room_main_asm_variables[6], " ");
strcpy((char *)&room_main_asm_variables[2], "@");
strcpy((char *)&room_main_asm_variables[6], " ");
CallSomeSamusCode(0);
SpawnHardcodedPlm(&unk_8FE2B1);
}
Expand Down Expand Up @@ -637,8 +637,8 @@ void DoorCode_CeresElevatorShaft(void) { // 0x8FE4E0
reg_M7X = 128;
reg_M7Y = 1008;
irq_enable_mode7 = 1;
strcpy((uint8 *)room_main_asm_variables, "\"");
strcpy((uint8 *)&room_main_asm_variables[2], "<");
strcpy((char *)room_main_asm_variables, "\"");
strcpy((char *)&room_main_asm_variables[2], "<");
}

void DoorCode_CeresElevatorShaft_2(void) { // 0x8FE513
Expand All @@ -659,7 +659,7 @@ static const uint16 kRoomCode_SpawnCeresFallingDebris_Tab[16] = { // 0x8FE525
void RoomCode_SpawnCeresFallingDebris(void) {

if (ceres_status && (-- * (uint16 *)room_main_asm_variables, *(int16 *)room_main_asm_variables < 0)) {
strcpy((uint8 *)room_main_asm_variables, "\b");
strcpy((char *)room_main_asm_variables, "\b");
uint16 v0 = addr_stru_869734;
if (random_number & 0x8000)
v0 = addr_stru_869742;
Expand All @@ -684,7 +684,7 @@ void RoomCode_ShakeScreenHorizDiag(void) { // 0x8FE57C
earthquake_type = v0;
}
} else if (NextRandom() < 0x200u) {
strcpy((uint8 *)room_main_asm_variables, "*");
strcpy((char *)room_main_asm_variables, "*");
v0 = 23;
goto LABEL_6;
}
Expand All @@ -701,7 +701,7 @@ void RoomCode_ShakeScreenHorizDiagStrong(void) { // 0x8FE5A4
*(uint16 *)&room_main_asm_variables[2] = v0;
}
} else if (NextRandom() < 0x180u) {
strcpy((uint8 *)room_main_asm_variables, "*");
strcpy((char *)room_main_asm_variables, "*");
v0 = 26;
goto LABEL_6;
}
Expand Down Expand Up @@ -991,4 +991,4 @@ void RoomCode_RidleyRoomShaking(void) { // 0x8FE950
reg_BG1VOFS += kRoomCode_RidleyRoomShaking_Y[v1];
reg_BG2VOFS += kRoomCode_RidleyRoomShaking_Y[v1];
}
}
}
4 changes: 2 additions & 2 deletions src/sm_ad.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ void MotherBrain_CalcHdma_Down_DownRight(void) { // 0xADE216
v7 = -1;
R24_ = v7;
uint16 v8 = R26_ | v7 & 0xFF00;
if (v8 == -1)
if (v8 == 0xFFFF)
v8 = 255;
*dst++ = v8;
++mbn_var_3D;
Expand Down Expand Up @@ -459,4 +459,4 @@ void HandleMotherBrainBodyFlickering(void) { // 0xADF41C
*(uint16 *)&reg_TM &= ~2u;
v0->properties |= kEnemyProps_Invisible;
}
}
}