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 "si.h"
#include "messages.h"
#include "ld_addrs.h"
#endif

View File

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

View File

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

View File

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

View File

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

View File

@ -1,4 +1,5 @@
#include "dgb_01.h"
#include "ld_addrs.h"
ApiStatus func_80240000_BFD880(void) {
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;
if (playerStatus->actionState == 4 || playerStatus->actionState == 8) {
if (playerStatus->actionState == ActionState_BOUNCE ||
playerStatus->actionState == ActionState_FALLING) {
return ApiStatus_DONE2;
}