mirror of
https://github.com/zeldaret/mm.git
synced 2026-05-25 23:35:04 -04:00
ovl_Bg_Dy_Yoseizo and related docs (#1390)
* Add ido setting to permuter * OK * Data imported & named, change spec * Some easy naming * Cleanup * More object stuff and enums * Document EnDyExtra * Document DemoGetitem * Document DemoEffect * Some work on Elforg * Elforg params macro, some more on Elfgrp * Defines for number of fairies * Tweak some flags wording * Label beam * Elfgrp: Name most of the stray fairy handling stuff * cleanup * fix typo * GreatFairyAnimation * name animations * BgDyYoseizo_TrainPlayer * Choose behaviour? * fix merge * format * self review * WEEKEVENTREG_OBTAINED_GREAT_SPIN_ATTACK * jenkins * review * Update src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * review * Update src/overlays/actors/ovl_En_Elfgrp/z_en_elfgrp.c Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Update src/overlays/actors/ovl_En_Elfgrp/z_en_elfgrp.c Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Update src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Update src/overlays/actors/ovl_En_Elfgrp/z_en_elfgrp.c * review --------- Co-authored-by: Elliptic Ellipsis <elliptic.ellipsis@gmail.com> Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
This commit is contained in:
+15
-15
@@ -725,7 +725,7 @@ void Target_Update(TargetContext* targetCtx, Player* player, Actor* lockOnActor,
|
||||
/* Start of Flags section */
|
||||
|
||||
/**
|
||||
* Tests if current scene switch flag is set.
|
||||
* Tests if a current scene switch flag is set.
|
||||
*/
|
||||
s32 Flags_GetSwitch(PlayState* play, s32 flag) {
|
||||
if ((flag >= 0) && (flag < 0x80)) {
|
||||
@@ -735,7 +735,7 @@ s32 Flags_GetSwitch(PlayState* play, s32 flag) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets current scene switch flag.
|
||||
* Sets a current scene switch flag.
|
||||
*/
|
||||
void Flags_SetSwitch(PlayState* play, s32 flag) {
|
||||
if ((flag >= 0) && (flag < 0x80)) {
|
||||
@@ -744,7 +744,7 @@ void Flags_SetSwitch(PlayState* play, s32 flag) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets current scene switch flag.
|
||||
* Unsets a current scene switch flag.
|
||||
*/
|
||||
void Flags_UnsetSwitch(PlayState* play, s32 flag) {
|
||||
if ((flag >= 0) && (flag < 0x80)) {
|
||||
@@ -753,77 +753,77 @@ void Flags_UnsetSwitch(PlayState* play, s32 flag) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests if current scene chest flag is set.
|
||||
* Tests if a current scene chest flag is set.
|
||||
*/
|
||||
s32 Flags_GetTreasure(PlayState* play, s32 flag) {
|
||||
return play->actorCtx.sceneFlags.chest & (1 << flag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets current scene chest flag.
|
||||
* Sets a current scene chest flag.
|
||||
*/
|
||||
void Flags_SetTreasure(PlayState* play, s32 flag) {
|
||||
play->actorCtx.sceneFlags.chest |= (1 << flag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides the all the chest flags.
|
||||
* Overrides all the current scene chest flags.
|
||||
*/
|
||||
void Flags_SetAllTreasure(PlayState* play, s32 flag) {
|
||||
play->actorCtx.sceneFlags.chest = flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all the chest flags.
|
||||
* Returns all the current scene chest flags.
|
||||
*/
|
||||
s32 Flags_GetAllTreasure(PlayState* play) {
|
||||
return play->actorCtx.sceneFlags.chest;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests if current scene clear flag is set.
|
||||
* Tests if a current scene clear flag is set.
|
||||
*/
|
||||
s32 Flags_GetClear(PlayState* play, s32 roomNumber) {
|
||||
return play->actorCtx.sceneFlags.clearedRoom & (1 << roomNumber);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets current scene clear flag.
|
||||
* Sets a current scene clear flag.
|
||||
*/
|
||||
void Flags_SetClear(PlayState* play, s32 roomNumber) {
|
||||
play->actorCtx.sceneFlags.clearedRoom |= (1 << roomNumber);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets current scene clear flag.
|
||||
* Unsets a current scene clear flag.
|
||||
*/
|
||||
void Flags_UnsetClear(PlayState* play, s32 roomNumber) {
|
||||
play->actorCtx.sceneFlags.clearedRoom &= ~(1 << roomNumber);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests if current scene temp clear flag is set.
|
||||
* Tests if a current scene temp clear flag is set.
|
||||
*/
|
||||
s32 Flags_GetClearTemp(PlayState* play, s32 roomNumber) {
|
||||
return play->actorCtx.sceneFlags.clearedRoomTemp & (1 << roomNumber);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets current scene temp clear flag.
|
||||
* Sets a current scene temp clear flag.
|
||||
*/
|
||||
void Flags_SetClearTemp(PlayState* play, s32 roomNumber) {
|
||||
play->actorCtx.sceneFlags.clearedRoomTemp |= (1 << roomNumber);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets current scene temp clear flag.
|
||||
* Unsets a current scene temp clear flag.
|
||||
*/
|
||||
void Flags_UnsetClearTemp(PlayState* play, s32 roomNumber) {
|
||||
play->actorCtx.sceneFlags.clearedRoomTemp &= ~(1 << roomNumber);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests if current scene collectible flag is set.
|
||||
* Tests if a current scene collectible flag is set.
|
||||
*/
|
||||
s32 Flags_GetCollectible(PlayState* play, s32 flag) {
|
||||
if ((flag > 0) && (flag < 0x80)) {
|
||||
@@ -833,7 +833,7 @@ s32 Flags_GetCollectible(PlayState* play, s32 flag) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets current scene collectible flag.
|
||||
* Sets a current scene collectible flag.
|
||||
*/
|
||||
void Flags_SetCollectible(PlayState* play, s32 flag) {
|
||||
if ((flag > 0) && (flag < 0x80)) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "overlays/actors/ovl_En_Elforg/z_en_elforg.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
#include "objects/object_gi_hearts/object_gi_hearts.h"
|
||||
#include "overlays/actors/ovl_En_Elf/z_en_elf.h"
|
||||
@@ -935,9 +936,9 @@ Actor* Item_DropCollectible(PlayState* play, Vec3f* spawnPos, u32 params) {
|
||||
SoundSource_PlaySfxAtFixedWorldPos(play, spawnPos, 40, NA_SE_EV_BUTTERFRY_TO_FAIRY);
|
||||
}
|
||||
} else {
|
||||
spawnedActor =
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ELFORG, spawnPos->x, spawnPos->y + 40.0f, spawnPos->z, 0, 0,
|
||||
0, STRAY_FAIRY_PARAMS(((param7F00 >> 8) & 0x7F), 0, STRAY_FAIRY_TYPE_COLLECTIBLE));
|
||||
spawnedActor = Actor_Spawn(
|
||||
&play->actorCtx, play, ACTOR_EN_ELFORG, spawnPos->x, spawnPos->y + 40.0f, spawnPos->z, 0, 0, 0,
|
||||
STRAY_FAIRY_PARAMS((param7F00 >> 8) & 0x7F, STRAY_FAIRY_AREA_CLOCK_TOWN, STRAY_FAIRY_TYPE_COLLECTIBLE));
|
||||
if (param20000 == 0) {
|
||||
if (!Flags_GetCollectible(play, (param7F00 >> 8) & 0x7F)) {
|
||||
SoundSource_PlaySfxAtFixedWorldPos(play, spawnPos, 40, NA_SE_EV_BUTTERFRY_TO_FAIRY);
|
||||
@@ -993,9 +994,9 @@ Actor* Item_DropCollectible2(PlayState* play, Vec3f* spawnPos, s32 params) {
|
||||
spawnedActor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ELF, spawnPos->x, spawnPos->y + 40.0f,
|
||||
spawnPos->z, 0, 0, 0, FAIRY_PARAMS(FAIRY_TYPE_2, true, param7F00 >> 8));
|
||||
} else {
|
||||
spawnedActor =
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ELFORG, spawnPos->x, spawnPos->y + 40.0f, spawnPos->z, 0, 0,
|
||||
0, STRAY_FAIRY_PARAMS(((param7F00 >> 8) & 0x7F), 0, STRAY_FAIRY_TYPE_COLLECTIBLE));
|
||||
spawnedActor = Actor_Spawn(
|
||||
&play->actorCtx, play, ACTOR_EN_ELFORG, spawnPos->x, spawnPos->y + 40.0f, spawnPos->z, 0, 0, 0,
|
||||
STRAY_FAIRY_PARAMS((param7F00 >> 8) & 0x7F, STRAY_FAIRY_AREA_CLOCK_TOWN, STRAY_FAIRY_TYPE_COLLECTIBLE));
|
||||
}
|
||||
if (Flags_GetCollectible(play, (param7F00 >> 8) & 0x7F) == 0) {
|
||||
SoundSource_PlaySfxAtFixedWorldPos(play, spawnPos, 40, NA_SE_EV_BUTTERFRY_TO_FAIRY);
|
||||
|
||||
@@ -97,7 +97,8 @@ u16 sPersistentCycleWeekEventRegs[ARRAY_COUNT(gSaveContext.save.saveInfo.weekEve
|
||||
/* 20 */ 0,
|
||||
/* 21 */ 0,
|
||||
/* 22 */ PERSISTENT_WEEKEVENTREG(WEEKEVENTREG_22_02) | PERSISTENT_WEEKEVENTREG(WEEKEVENTREG_22_80),
|
||||
/* 23 */ PERSISTENT_WEEKEVENTREG(WEEKEVENTREG_23_02) | PERSISTENT_WEEKEVENTREG(WEEKEVENTREG_23_80),
|
||||
/* 23 */ PERSISTENT_WEEKEVENTREG(WEEKEVENTREG_OBTAINED_GREAT_SPIN_ATTACK) |
|
||||
PERSISTENT_WEEKEVENTREG(WEEKEVENTREG_23_80),
|
||||
/* 24 */ PERSISTENT_WEEKEVENTREG_ALT(WEEKEVENTREG_24_02) | PERSISTENT_WEEKEVENTREG(WEEKEVENTREG_24_80),
|
||||
/* 25 */ PERSISTENT_WEEKEVENTREG(WEEKEVENTREG_25_01),
|
||||
/* 26 */ PERSISTENT_WEEKEVENTREG(WEEKEVENTREG_26_40),
|
||||
|
||||
Reference in New Issue
Block a user