summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKidFeroz <98241806+KidFeroz@users.noreply.github.com>2023-06-01 17:41:37 -0600
committerGitHub <noreply@github.com>2023-06-01 19:41:37 -0400
commite0ae4e24f7978064e8d83c88aa4d09a4687da5b3 (patch)
tree26577544e8ced3838ae4bd2e97c02a9d94e27c27 /src
parenteb24680be36616c36009e17e1e09608db17560b8 (diff)
ovl_Bg_Keikoku_Spr (#1228)
* ovl_Bg_Keikoku_Spr * format * format * Co-authored-by: Alejandro Asenjo Nitti <sonicdcer@users.noreply.github.com> * Co-authored-by: Alejandro Asenjo Nitti <sonicdcer@users.noreply.github.com>
Diffstat (limited to 'src')
-rw-r--r--src/overlays/actors/ovl_Bg_Keikoku_Spr/z_bg_keikoku_spr.c47
1 files changed, 40 insertions, 7 deletions
diff --git a/src/overlays/actors/ovl_Bg_Keikoku_Spr/z_bg_keikoku_spr.c b/src/overlays/actors/ovl_Bg_Keikoku_Spr/z_bg_keikoku_spr.c
index 8246a0298..ac9d089a4 100644
--- a/src/overlays/actors/ovl_Bg_Keikoku_Spr/z_bg_keikoku_spr.c
+++ b/src/overlays/actors/ovl_Bg_Keikoku_Spr/z_bg_keikoku_spr.c
@@ -1,3 +1,9 @@
+/*
+ * File: z_bg_keikoku_spr.c
+ * Overlay: ovl_Bg_Keikoku_Spr
+ * Description: Termina Field Fountain Water
+ */
+
#include "z_bg_keikoku_spr.h"
#include "objects/object_keikoku_obj/object_keikoku_obj.h"
@@ -10,7 +16,6 @@ void BgKeikokuSpr_Destroy(Actor* thisx, PlayState* play);
void BgKeikokuSpr_Update(Actor* thisx, PlayState* play);
void BgKeikokuSpr_Draw(Actor* thisx, PlayState* play);
-/*
const ActorInit Bg_Keikoku_Spr_InitVars = {
ACTOR_BG_KEIKOKU_SPR,
ACTORCAT_PROP,
@@ -20,14 +25,42 @@ const ActorInit Bg_Keikoku_Spr_InitVars = {
(ActorFunc)BgKeikokuSpr_Init,
(ActorFunc)BgKeikokuSpr_Destroy,
(ActorFunc)BgKeikokuSpr_Update,
- (ActorFunc)BgKeikokuSpr_Draw
+ (ActorFunc)BgKeikokuSpr_Draw,
};
-*/
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Bg_Keikoku_Spr/BgKeikokuSpr_Init.s")
+static InitChainEntry sInitChain[] = {
+ ICHAIN_F32(uncullZoneForward, 3000, ICHAIN_CONTINUE),
+ ICHAIN_F32(uncullZoneScale, 200, ICHAIN_CONTINUE),
+ ICHAIN_F32(uncullZoneDownward, 400, ICHAIN_CONTINUE),
+ ICHAIN_VEC3F_DIV1000(scale, 20, ICHAIN_STOP),
+};
+
+void BgKeikokuSpr_Init(Actor* thisx, PlayState* play) {
+ BgKeikokuSpr* this = THIS;
+
+ Actor_ProcessInitChain(&this->actor, sInitChain);
+}
+
+void BgKeikokuSpr_Destroy(Actor* thisx, PlayState* play) {
+}
+
+void BgKeikokuSpr_Update(Actor* thisx, PlayState* play) {
+}
+
+void BgKeikokuSpr_Draw(Actor* thisx, PlayState* play) {
+ s32 pad;
+
+ OPEN_DISPS(play->state.gfxCtx);
+
+ AnimatedMat_Draw(play, Lib_SegmentedToVirtual(object_keikoku_obj_Matanimheader_0001F8));
+ gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
+ gSPDisplayList(POLY_XLU_DISP++, object_keikoku_obj_DL_000100);
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Bg_Keikoku_Spr/BgKeikokuSpr_Destroy.s")
+ AnimatedMat_Draw(play, Lib_SegmentedToVirtual(object_keikoku_obj_Matanimheader_0003F8));
+ gSPDisplayList(POLY_XLU_DISP++, object_keikoku_obj_DL_000300);
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Bg_Keikoku_Spr/BgKeikokuSpr_Update.s")
+ AnimatedMat_Draw(play, Lib_SegmentedToVirtual(object_keikoku_obj_Matanimheader_0005F8));
+ gSPDisplayList(POLY_XLU_DISP++, object_keikoku_obj_DL_000500);
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Bg_Keikoku_Spr/BgKeikokuSpr_Draw.s")
+ CLOSE_DISPS(play->state.gfxCtx);
+}