PR comments

This commit is contained in:
Ethan Roseman 2020-11-08 17:38:16 -05:00
parent 47f464a17e
commit a4bdc90eac
7 changed files with 12 additions and 11 deletions

View File

@ -10,6 +10,5 @@
#include "enums.h" #include "enums.h"
#include "si.h" #include "si.h"
#include "messages.h" #include "messages.h"
#include "ld_addrs.h"
#endif #endif

View File

@ -944,7 +944,7 @@ typedef struct GameStatus {
} GameStatus; // size = 0x178 } GameStatus; // size = 0x178
typedef struct PartnerAnimations { typedef struct PartnerAnimations {
/* 0x00 */ UNK_PTR standard; // should be "default" but that's a keyword /* 0x00 */ UNK_PTR still;
/* 0x04 */ UNK_PTR walk; /* 0x04 */ UNK_PTR walk;
/* 0x08 */ UNK_PTR jump; /* 0x08 */ UNK_PTR jump;
/* 0x0C */ UNK_PTR fall; /* 0x0C */ UNK_PTR fall;

View File

@ -135,10 +135,10 @@ ApiStatus SetTexPanner(ScriptInstance* script, s32 isInitialCall) {
ApiStatus SetModelFlag10(ScriptInstance* script, s32 isInitialCall) { ApiStatus SetModelFlag10(ScriptInstance* script, s32 isInitialCall) {
Bytecode* thisPos = script->ptrReadPos; Bytecode* thisPos = script->ptrReadPos;
Bytecode treeIndex = get_variable(script, *thisPos++); Bytecode treeIndex = get_variable(script, *thisPos++);
Bytecode var2 = get_variable(script, *thisPos++); Bytecode enable = get_variable(script, *thisPos++);
Model* model = get_model_from_list_index(get_model_list_index_from_tree_index(treeIndex)); Model* model = get_model_from_list_index(get_model_list_index_from_tree_index(treeIndex));
if (var2 != 0) { if (enable) {
model->flags |= 0x10; model->flags |= 0x10;
} else { } else {
model->flags &= ~0x10; model->flags &= ~0x10;
@ -254,10 +254,10 @@ ApiStatus SetModelFlags(ScriptInstance* script, s32 isInitialCall) {
s32 treeIndex = get_variable(script, *args++); s32 treeIndex = get_variable(script, *args++);
s32 listIndex = get_model_list_index_from_tree_index(treeIndex); s32 listIndex = get_model_list_index_from_tree_index(treeIndex);
s32 a1 = *args++; s32 a1 = *args++;
s32 var2 = get_variable(script, *args++); s32 enable = get_variable(script, *args++);
Model* model = get_model_from_list_index(listIndex); Model* model = get_model_from_list_index(listIndex);
if (var2) { if (enable) {
model->flags |= a1; model->flags |= a1;
} else { } else {
model->flags &= ~a1; model->flags &= ~a1;

View File

@ -673,10 +673,10 @@ ApiStatus func_802CD418(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 index = get_variable(script, *args++); s32 index = get_variable(script, *args++);
s32 a1 = *args++; s32 a1 = *args++;
s32 var2 = get_variable(script, *args++); s32 enable = get_variable(script, *args++);
AnimatedMesh* animMesh = get_anim_mesh((*gCurrentMeshAnimationListPtr)[index]->animModelID); AnimatedMesh* animMesh = get_anim_mesh((*gCurrentMeshAnimationListPtr)[index]->animModelID);
if (var2) { if (enable) {
animMesh->flags |= a1; animMesh->flags |= a1;
} else { } else {
animMesh->flags &= ~a1; animMesh->flags &= ~a1;

View File

@ -246,14 +246,14 @@ ApiStatus SetNpcFlagBits(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
NpcId npcID = get_variable(script, *args++); NpcId npcID = get_variable(script, *args++);
s32 flagBits = *args++; s32 flagBits = *args++;
s32 var1 = get_variable(script, *args++); s32 enable = get_variable(script, *args++);
Npc* npc = resolve_npc(script, npcID); Npc* npc = resolve_npc(script, npcID);
if (npc == NULL) { if (npc == NULL) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
if (var1) { if (enable) {
npc->flags |= flagBits; npc->flags |= flagBits;
} else { } else {
npc->flags &= ~flagBits; npc->flags &= ~flagBits;

View File

@ -1,4 +1,5 @@
#include "dgb_01.h" #include "dgb_01.h"
#include "ld_addrs.h"
ApiStatus func_80240000_BFD880(void) { ApiStatus func_80240000_BFD880(void) {
dma_copy(&data_C20F40_ROM_START, &data_C20F40_ROM_END, &gBackgroundImage); dma_copy(&data_C20F40_ROM_START, &data_C20F40_ROM_END, &gBackgroundImage);

View File

@ -17,7 +17,8 @@ ApiStatus func_802803C8(ScriptInstance* script, s32 isInitialCall) {
script->varTable[2] = FALSE; script->varTable[2] = FALSE;
if (playerStatus->actionState == 4 || playerStatus->actionState == 8) { if (playerStatus->actionState == ActionState_BOUNCE ||
playerStatus->actionState == ActionState_FALLING) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }