diff --git a/src/sm_8f.c b/src/sm_8f.c index 32e6551..9f7ddc1 100644 --- a/src/sm_8f.c +++ b/src/sm_8f.c @@ -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); } @@ -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 @@ -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; @@ -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; } @@ -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; } @@ -991,4 +991,4 @@ void RoomCode_RidleyRoomShaking(void) { // 0x8FE950 reg_BG1VOFS += kRoomCode_RidleyRoomShaking_Y[v1]; reg_BG2VOFS += kRoomCode_RidleyRoomShaking_Y[v1]; } -} \ No newline at end of file +} diff --git a/src/sm_ad.c b/src/sm_ad.c index cce72d2..9857ce3 100644 --- a/src/sm_ad.c +++ b/src/sm_ad.c @@ -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; @@ -459,4 +459,4 @@ void HandleMotherBrainBodyFlickering(void) { // 0xADF41C *(uint16 *)®_TM &= ~2u; v0->properties |= kEnemyProps_Invisible; } -} \ No newline at end of file +}