Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Great Marsh lookout documentation #345

Merged
merged 9 commits into from
Jan 22, 2025
Prev Previous commit
Next Next commit
Great Marsh PR cleanup 2
TheSylphIsIn committed Jan 22, 2025
commit ab7a07acb0831c00128162c74a7ac3ea4a26645d
2 changes: 1 addition & 1 deletion asm/macros/scrcmd.inc
Original file line number Diff line number Diff line change
@@ -2797,7 +2797,7 @@
.short 517
.endm

.macro DoGreatMarshLookoutScene
.macro StartGreatMarshLookout
.short 518
.endm

Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ _003E:
PlayFanfare SEQ_SE_DP_REGI
WaitFanfare SEQ_SE_DP_REGI
ScrCmd_073
DoGreatMarshLookoutScene
StartGreatMarshLookout
ReleaseAll
End

6 changes: 4 additions & 2 deletions src/great_marsh_lookout.c
Original file line number Diff line number Diff line change
@@ -3,6 +3,8 @@
#include <nitro.h>
#include <string.h>

#include "consts/sdat.h"

#include "struct_decls/struct_02061AB4_decl.h"

#include "field/field_system.h"
@@ -95,7 +97,7 @@ static BOOL Task_GreatMarshLookout(FieldTask *taskMan)
GreatMarshLookout_CreateLookoutMonSprite(lookout->spriteResources, species);
ov6_022427F4(lookout->spriteResources);
lookout->timer = 0;
Sound_PlayEffect(1657); // binoculars switch
Sound_PlayEffect(SEQ_SE_DP_KASYA); // binoculars switch
sub_02056B30(taskMan, 3, 17, 0xffff, 0x0, 6, 1, HEAP_ID_FIELDMAP);
lookout->state = 5;
} else {
@@ -110,7 +112,7 @@ static BOOL Task_GreatMarshLookout(FieldTask *taskMan)
if ((lookout->timer >= 60) || (gCoreSys.pressedKeys & PAD_BUTTON_A)) {
GreatMarshBinoculars_SetNextLocationWithCoords(lookout->numCycles, lookout->binocularsData);
lookout->nextLocation = GreatMarshBinoculars_GetLocation(lookout->binocularsData);
Sound_PlayEffect(1657);
Sound_PlayEffect(SEQ_SE_DP_KASYA);
sub_02056B30(taskMan, 3, 16, 0xffff, 0x0, 6, 1, HEAP_ID_FIELDMAP);
lookout->state = 6;
}
6 changes: 3 additions & 3 deletions src/scrcmd.c
Original file line number Diff line number Diff line change
@@ -590,7 +590,7 @@ static BOOL ScrCmd_203(ScriptContext *ctx);
static BOOL ScrCmd_204(ScriptContext *ctx);
static BOOL ScrCmd_205(ScriptContext *ctx);
static BOOL ScrCmd_310(ScriptContext *ctx);
static BOOL ScrCmd_DoGreatMarshLookoutScene(ScriptContext *ctx);
static BOOL ScrCmd_StartGreatMarshLookout(ScriptContext *ctx);
static BOOL ScrCmd_20C(ScriptContext *ctx);
static BOOL ScrCmd_20D(ScriptContext *ctx);
static BOOL ScrCmd_20E(ScriptContext *ctx);
@@ -1284,7 +1284,7 @@ const ScrCmdFunc Unk_020EAC58[] = {
ScrCmd_203,
ScrCmd_204,
ScrCmd_205,
ScrCmd_DoGreatMarshLookoutScene,
ScrCmd_StartGreatMarshLookout,
ScrCmd_207,
ScrCmd_208,
ScrCmd_209,
@@ -6406,7 +6406,7 @@ static BOOL ScrCmd_202(ScriptContext *ctx)
return FALSE;
}

static BOOL ScrCmd_DoGreatMarshLookoutScene(ScriptContext *ctx)
static BOOL ScrCmd_StartGreatMarshLookout(ScriptContext *ctx)
{
GreatMarshLookout_Init(ctx->fieldSystem);
return TRUE;