papermario/src/code_dbd70_len_700.c

49 lines
1.1 KiB
C
Raw Normal View History

2020-08-04 08:49:11 +02:00
#include "common.h"
2020-08-13 07:03:47 +02:00
void default_trigger_function_handler(s32* arg0) {
arg0[0] |= 2;
}
2020-08-04 08:49:11 +02:00
INCLUDE_ASM(code_dbd70_len_700, clear_trigger_data);
2020-08-13 07:03:47 +02:00
//INCLUDE_ASM(code_dbd70_len_700, init_trigger_list);
void init_trigger_list(void) {
if ((*gGameStatusPtr)->isBattle == 0) {
2020-08-13 07:03:47 +02:00
*gCurrentTriggerListPtr = gTriggerList1;
} else {
*gCurrentTriggerListPtr = gTriggerList2;
}
gTriggerCount = 0;
}
2020-08-04 08:49:11 +02:00
INCLUDE_ASM(code_dbd70_len_700, create_trigger);
INCLUDE_ASM(code_dbd70_len_700, update_triggers);
2020-08-13 07:03:47 +02:00
void delete_trigger(trigger* toDelete) {
s32 i;
for (i = 0; i < ARRAY_COUNT(gCurrentTriggerListPtr); i++) {
if ((*gCurrentTriggerListPtr)[i] == toDelete) {
break;
}
}
if (i < ARRAY_COUNT(gCurrentTriggerListPtr)) {
heap_free((*gCurrentTriggerListPtr)[i]);
(*gCurrentTriggerListPtr)[i] = NULL;
}
}
2020-08-04 08:49:11 +02:00
INCLUDE_ASM(code_dbd70_len_700, is_trigger_bound);
2020-08-13 07:03:47 +02:00
//INCLUDE_ASM(code_dbd70_len_700, get_trigger_by_id);
trigger* get_trigger_by_id(s32 triggerID) {
return (*gCurrentTriggerListPtr)[triggerID];
}
2020-08-04 08:49:11 +02:00
INCLUDE_ASM(code_dbd70_len_700, func_80145CE8);