diff --git a/src/game/game_00c490.c b/src/game/game_00c490.c index 6367ca3c1..8d859db91 100644 --- a/src/game/game_00c490.c +++ b/src/game/game_00c490.c @@ -210,11 +210,11 @@ const u32 var7f1a822c[] = {0x00000000}; GLOBAL_ASM( glabel func0f00c490 /* f00c490: 27bdffe0 */ addiu $sp,$sp,-32 -/* f00c494: 3c028007 */ lui $v0,%hi(var80069a48) +/* f00c494: 3c028007 */ lui $v0,%hi(g_Lifts) /* f00c498: 3c038007 */ lui $v1,%hi(var80069a70) /* f00c49c: afbf0014 */ sw $ra,0x14($sp) /* f00c4a0: 24639a70 */ addiu $v1,$v1,%lo(var80069a70) -/* f00c4a4: 24429a48 */ addiu $v0,$v0,%lo(var80069a48) +/* f00c4a4: 24429a48 */ addiu $v0,$v0,%lo(g_Lifts) .L0f00c4a8: /* f00c4a8: 24420004 */ addiu $v0,$v0,0x4 /* f00c4ac: 0043082b */ sltu $at,$v0,$v1 diff --git a/src/game/game_066310.c b/src/game/game_066310.c index bd92162e7..bfef84d99 100644 --- a/src/game/game_066310.c +++ b/src/game/game_066310.c @@ -13526,21 +13526,12 @@ glabel func0f070ca0 /* f070e28: 00000000 */ sll $zero,$zero,0x0 ); -GLOBAL_ASM( -glabel liftActivate -/* f070e2c: 30ae00ff */ andi $t6,$a1,0xff -/* f070e30: 19c00007 */ blez $t6,.L0f070e50 -/* f070e34: afa50004 */ sw $a1,0x4($sp) -/* f070e38: 29c1000b */ slti $at,$t6,0xb -/* f070e3c: 10200004 */ beqz $at,.L0f070e50 -/* f070e40: 000e7880 */ sll $t7,$t6,0x2 -/* f070e44: 3c018007 */ lui $at,0x8007 -/* f070e48: 002f0821 */ addu $at,$at,$t7 -/* f070e4c: ac249a44 */ sw $a0,-0x65bc($at) -.L0f070e50: -/* f070e50: 03e00008 */ jr $ra -/* f070e54: 00000000 */ sll $zero,$zero,0x0 -); +void liftActivate(struct prop *prop, u8 liftnum) +{ + if (liftnum > 0 && liftnum <= MAX_LIFTS) { + g_Lifts[liftnum - 1] = prop; + } +} GLOBAL_ASM( glabel func0f070e58 diff --git a/src/include/constants.h b/src/include/constants.h index 436f19618..9551c303e 100644 --- a/src/include/constants.h +++ b/src/include/constants.h @@ -495,6 +495,7 @@ #define MA_PUNCHING 54 #define MAX_DANGEROUSPROPS 12 +#define MAX_LIFTS 10 #define MAX_MPCHRS (4 + MAX_SIMULANTS) #define MAX_OBJECTIVES 10 #define MAX_SIMULANTS 8 diff --git a/src/include/game/game_066310.h b/src/include/game/game_066310.h index c0c75a3b4..c15ef8146 100644 --- a/src/include/game/game_066310.h +++ b/src/include/game/game_066310.h @@ -126,7 +126,7 @@ u32 func0f07092c(void); u32 func0f070a1c(void); u32 func0f070bd0(void); u32 func0f070ca0(void); -void liftActivate(struct prop *prop, u32 arg1); +void liftActivate(struct prop *prop, u8 liftnum); u32 func0f070e58(void); u32 func0f070eac(void); u32 func0f070f08(void); diff --git a/src/include/setup/setup_000000.h b/src/include/setup/setup_000000.h index fb58a5096..dc0b96ba0 100644 --- a/src/include/setup/setup_000000.h +++ b/src/include/setup/setup_000000.h @@ -464,7 +464,7 @@ extern u32 var800699e8; extern u32 var800699f4; extern u32 var800699fc; extern u32 var80069a08; -extern u32 var80069a48; +extern struct prop *g_Lifts[MAX_LIFTS]; extern u32 var80069a70; extern u32 var80069b74; extern u32 var80069b80; diff --git a/src/setup/setup_000000.c b/src/setup/setup_000000.c index bd157f821..f6a595d25 100644 --- a/src/setup/setup_000000.c +++ b/src/setup/setup_000000.c @@ -15245,16 +15245,7 @@ u32 var80069a38 = 0x00000000; u32 var80069a3c = 0x00000000; u32 var80069a40 = 0x00000000; u32 var80069a44 = 0x00000000; -u32 var80069a48 = 0x00000000; -u32 var80069a4c = 0x00000000; -u32 var80069a50 = 0x00000000; -u32 var80069a54 = 0x00000000; -u32 var80069a58 = 0x00000000; -u32 var80069a5c = 0x00000000; -u32 var80069a60 = 0x00000000; -u32 var80069a64 = 0x00000000; -u32 var80069a68 = 0x00000000; -u32 var80069a6c = 0x00000000; +struct prop *g_Lifts[MAX_LIFTS] = {NULL}; u32 var80069a70 = 0x42b40000; u32 var80069a74 = 0x3f800000; u32 var80069a78 = 0x40000000;