Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
GetDefeatedEnemyCount.inc.c
Go to the documentation of this file.
1#include "common.h"
2
3API_CALLABLE(N(GetDefeatedEnemyCount)) {
4 Bytecode* args = script->ptrReadPos;
6 s32 enemyCount = 0;
7 s32 i, j;
8
9 for (i = 0; i < encounterStatus->numEncounters; i++) {
10 Encounter* temp = encounterStatus->encounterList[i];
11 if (temp == NULL) {
12 continue;
13 }
14 for (j = 0; j < temp->count; j++) {
15 if (temp->enemy[j] != NULL) {
16 enemyCount++;
17 }
18 }
19 }
20
22 return ApiStatus_DONE2;
23}
BSS s32 PopupMenu_SelectedIndex
#define ApiStatus_DONE2
Definition evt.h:118
s32 Bytecode
Definition evt.h:7
s32 evt_set_variable(Evt *script, Bytecode var, s32 value)
Definition evt.c:1846
EncounterStatus gCurrentEncounter
Definition encounter.c:176