Skip to content

Commit

Permalink
Christmas Decorations base actor
Browse files Browse the repository at this point in the history
  • Loading branch information
aMannus committed Nov 15, 2023
1 parent 7064ac9 commit ebaac0b
Show file tree
Hide file tree
Showing 15 changed files with 266 additions and 1 deletion.
Binary file not shown.
Binary file not shown.
16 changes: 16 additions & 0 deletions soh/assets/custom/objects/object_kakariko_decor/gFrontGateDecorDL
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<DisplayList Version="0">
<ClearGeometryMode G_LIGHTING="1" />
<LoadVertices Path="objects/object_kakariko_decor/gFrontGateDecorDL_vtx_cull" VertexBufferIndex="0" VertexOffset="0" Count="8"/>
<CullDisplayList Start="0" End="7"/>
<CallDisplayList Path="objects/object_kakariko_decor/mat_gFrontGateDecorDL_f3dlite_StringGRGR"/>
<CallDisplayList Path="objects/object_kakariko_decor/gFrontGateDecorDL_tri_0"/>
<CallDisplayList Path="objects/object_kakariko_decor/mat_gFrontGateDecorDL_f3dlite_SnowBuildup"/>
<CallDisplayList Path="objects/object_kakariko_decor/gFrontGateDecorDL_tri_1"/>
<PipeSync/>
<SetGeometryMode G_LIGHTING="1" />
<ClearGeometryMode G_TEXTURE_GEN="1" />
<SetCombineLERP A0="G_CCMUX_0" B0="G_CCMUX_0" C0="G_CCMUX_0" D0="G_CCMUX_SHADE" Aa0="G_ACMUX_0" Ab0="G_ACMUX_0" Ac0="G_ACMUX_0" Ad0="G_ACMUX_ENVIRONMENT" A1="G_CCMUX_0" B1="G_CCMUX_0" C1="G_CCMUX_0" D1="G_CCMUX_SHADE" Aa1="G_ACMUX_0" Ab1="G_ACMUX_0" Ac1="G_ACMUX_0" Ad1="G_ACMUX_ENVIRONMENT"/>
<Texture S="65535" T="65535" Level="0" Tile="0" On="0"/>
<EndDisplayList/>
</DisplayList>

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<DisplayList Version="0">
<LoadVertices Path="objects/object_kakariko_decor/gFrontGateDecorDL_vtx_0" VertexBufferIndex="0" VertexOffset="0" Count="20"/>
<Triangles2 V00="0" V01="1" V02="2" Flag0="0" V10="0" V11="2" V12="3" Flag1="0"/>
<Triangles2 V00="4" V01="5" V02="6" Flag0="0" V10="4" V11="6" V12="7" Flag1="0"/>
<Triangles2 V00="8" V01="9" V02="10" Flag0="0" V10="8" V11="10" V12="11" Flag1="0"/>
<Triangles2 V00="12" V01="13" V02="14" Flag0="0" V10="12" V11="14" V12="15" Flag1="0"/>
<Triangles2 V00="16" V01="17" V02="18" Flag0="0" V10="16" V11="18" V12="19" Flag1="0"/>
<EndDisplayList/>
</DisplayList>

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<DisplayList Version="0">
<LoadVertices Path="objects/object_kakariko_decor/gFrontGateDecorDL_vtx_1" VertexBufferIndex="0" VertexOffset="0" Count="32"/>
<Triangles2 V00="0" V01="1" V02="2" Flag0="0" V10="0" V11="2" V12="3" Flag1="0"/>
<Triangles2 V00="4" V01="5" V02="6" Flag0="0" V10="4" V11="6" V12="7" Flag1="0"/>
<Triangles2 V00="8" V01="9" V02="10" Flag0="0" V10="8" V11="10" V12="11" Flag1="0"/>
<Triangles2 V00="12" V01="13" V02="14" Flag0="0" V10="12" V11="14" V12="15" Flag1="0"/>
<Triangles2 V00="16" V01="17" V02="18" Flag0="0" V10="16" V11="18" V12="19" Flag1="0"/>
<Triangles2 V00="20" V01="21" V02="22" Flag0="0" V10="20" V11="22" V12="23" Flag1="0"/>
<Triangles2 V00="24" V01="25" V02="26" Flag0="0" V10="24" V11="26" V12="27" Flag1="0"/>
<Triangles2 V00="28" V01="29" V02="30" Flag0="0" V10="28" V11="30" V12="31" Flag1="0"/>
<LoadVertices Path="objects/object_kakariko_decor/gFrontGateDecorDL_vtx_1" VertexBufferIndex="0" VertexOffset="32" Count="20"/>
<Triangles2 V00="0" V01="1" V02="2" Flag0="0" V10="0" V11="2" V12="3" Flag1="0"/>
<Triangles2 V00="4" V01="5" V02="6" Flag0="0" V10="4" V11="6" V12="7" Flag1="0"/>
<Triangles2 V00="8" V01="9" V02="10" Flag0="0" V10="8" V11="10" V12="11" Flag1="0"/>
<Triangles2 V00="12" V01="13" V02="14" Flag0="0" V10="12" V11="14" V12="15" Flag1="0"/>
<Triangles2 V00="16" V01="17" V02="18" Flag0="0" V10="16" V11="18" V12="19" Flag1="0"/>
<EndDisplayList/>
</DisplayList>

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Vertex Version="0">
<Vtx X="-21478" Y="2252" Z="9790" S="3052" T="1008" R="129" G="0" B="0" A="255"/>
<Vtx X="-21478" Y="2647" Z="9790" S="3052" T="-16" R="129" G="0" B="0" A="255"/>
<Vtx X="-21478" Y="2647" Z="8605" S="-16" T="-16" R="129" G="0" B="0" A="255"/>
<Vtx X="-21478" Y="2252" Z="8605" S="-16" T="1008" R="129" G="0" B="0" A="255"/>
<Vtx X="-21351" Y="2124" Z="10186" S="4077" T="1008" R="135" G="0" B="39" A="255"/>
<Vtx X="-21351" Y="2519" Z="10186" S="4077" T="-16" R="135" G="0" B="39" A="255"/>
<Vtx X="-21478" Y="2647" Z="9790" S="3052" T="-16" R="135" G="0" B="39" A="255"/>
<Vtx X="-21478" Y="2252" Z="9790" S="3052" T="1008" R="135" G="0" B="39" A="255"/>
<Vtx X="-21478" Y="2252" Z="12559" S="10224" T="1008" R="129" G="0" B="0" A="255"/>
<Vtx X="-21478" Y="2647" Z="12559" S="10224" T="-16" R="129" G="0" B="0" A="255"/>
<Vtx X="-21478" Y="2647" Z="11390" S="7196" T="-16" R="129" G="0" B="0" A="255"/>
<Vtx X="-21478" Y="2252" Z="11390" S="7196" T="1008" R="129" G="0" B="0" A="255"/>
<Vtx X="-21478" Y="2252" Z="11390" S="7196" T="1008" R="134" G="0" B="219" A="255"/>
<Vtx X="-21478" Y="2647" Z="11390" S="7196" T="-16" R="134" G="0" B="219" A="255"/>
<Vtx X="-21351" Y="2519" Z="10979" S="6131" T="-16" R="134" G="0" B="219" A="255"/>
<Vtx X="-21351" Y="2124" Z="10979" S="6131" T="1008" R="134" G="0" B="219" A="255"/>
<Vtx X="-21351" Y="2519" Z="10979" S="6131" T="-16" R="129" G="0" B="0" A="255"/>
<Vtx X="-21351" Y="2519" Z="10186" S="4077" T="-16" R="129" G="0" B="0" A="255"/>
<Vtx X="-21351" Y="2124" Z="10186" S="4077" T="1008" R="129" G="0" B="0" A="255"/>
<Vtx X="-21351" Y="2124" Z="10979" S="6131" T="1008" R="129" G="0" B="0" A="255"/>
</Vertex>
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<Vertex Version="0">
<Vtx X="-21474" Y="2594" Z="12599" S="3056" T="1008" R="129" G="0" B="0" A="255"/>
<Vtx X="-21474" Y="2994" Z="12599" S="3056" T="-16" R="129" G="0" B="0" A="255"/>
<Vtx X="-21474" Y="2994" Z="11380" S="-16" T="-16" R="129" G="0" B="0" A="255"/>
<Vtx X="-21474" Y="2594" Z="11399" S="-16" T="1008" R="129" G="0" B="0" A="255"/>
<Vtx X="-21243" Y="2594" Z="12599" S="3056" T="1008" R="129" G="0" B="0" A="255"/>
<Vtx X="-21243" Y="2994" Z="12599" S="3056" T="-16" R="129" G="0" B="0" A="255"/>
<Vtx X="-21243" Y="2994" Z="11380" S="-16" T="-16" R="129" G="0" B="0" A="255"/>
<Vtx X="-21243" Y="2594" Z="11380" S="-16" T="1008" R="129" G="0" B="0" A="255"/>
<Vtx X="-21474" Y="2594" Z="11399" S="-16" T="1008" R="251" G="253" B="129" A="255"/>
<Vtx X="-21474" Y="2994" Z="11380" S="-16" T="-16" R="251" G="253" B="129" A="255"/>
<Vtx X="-21243" Y="2994" Z="11380" S="-16" T="-16" R="251" G="253" B="129" A="255"/>
<Vtx X="-21243" Y="2594" Z="11380" S="-16" T="1008" R="251" G="253" B="129" A="255"/>
<Vtx X="-21474" Y="2994" Z="11380" S="-16" T="-16" R="0" G="127" B="0" A="255"/>
<Vtx X="-21474" Y="2994" Z="12599" S="3056" T="-16" R="0" G="127" B="0" A="255"/>
<Vtx X="-21243" Y="2994" Z="12599" S="3056" T="-16" R="0" G="127" B="0" A="255"/>
<Vtx X="-21243" Y="2994" Z="11380" S="-16" T="-16" R="0" G="127" B="0" A="255"/>
<Vtx X="-21371" Y="2734" Z="11171" S="2858" T="1008" R="129" G="0" B="0" A="255"/>
<Vtx X="-21371" Y="2940" Z="11171" S="2858" T="-16" R="129" G="0" B="0" A="255"/>
<Vtx X="-21371" Y="2940" Z="10008" S="-1866" T="-16" R="129" G="0" B="0" A="255"/>
<Vtx X="-21371" Y="2734" Z="10008" S="-1866" T="1008" R="129" G="0" B="0" A="255"/>
<Vtx X="-21371" Y="2734" Z="10008" S="-1866" T="1008" R="0" G="0" B="129" A="255"/>
<Vtx X="-21371" Y="2940" Z="10008" S="-1866" T="-16" R="0" G="0" B="129" A="255"/>
<Vtx X="-21340" Y="2940" Z="10008" S="-1866" T="-16" R="0" G="0" B="129" A="255"/>
<Vtx X="-21340" Y="2734" Z="10008" S="-1866" T="1008" R="0" G="0" B="129" A="255"/>
<Vtx X="-21371" Y="2940" Z="10008" S="-1866" T="-16" R="0" G="127" B="0" A="255"/>
<Vtx X="-21371" Y="2940" Z="11171" S="2858" T="-16" R="0" G="127" B="0" A="255"/>
<Vtx X="-21340" Y="2940" Z="11171" S="2858" T="-16" R="0" G="127" B="0" A="255"/>
<Vtx X="-21340" Y="2940" Z="10008" S="-1866" T="-16" R="0" G="127" B="0" A="255"/>
<Vtx X="-21371" Y="2940" Z="11171" S="2858" T="-16" R="0" G="0" B="127" A="255"/>
<Vtx X="-21371" Y="2734" Z="11171" S="2858" T="1008" R="0" G="0" B="127" A="255"/>
<Vtx X="-21340" Y="2734" Z="11171" S="2858" T="1008" R="0" G="0" B="127" A="255"/>
<Vtx X="-21340" Y="2940" Z="11171" S="2858" T="-16" R="0" G="0" B="127" A="255"/>
<Vtx X="-21340" Y="2734" Z="11171" S="2858" T="1008" R="129" G="0" B="0" A="255"/>
<Vtx X="-21340" Y="2940" Z="11171" S="2858" T="-16" R="129" G="0" B="0" A="255"/>
<Vtx X="-21340" Y="2940" Z="10008" S="-1866" T="-16" R="129" G="0" B="0" A="255"/>
<Vtx X="-21340" Y="2734" Z="10008" S="-1866" T="1008" R="129" G="0" B="0" A="255"/>
<Vtx X="-21238" Y="2594" Z="9796" S="3056" T="1008" R="129" G="0" B="0" A="255"/>
<Vtx X="-21238" Y="2994" Z="9796" S="3056" T="-16" R="129" G="0" B="0" A="255"/>
<Vtx X="-21238" Y="2994" Z="8512" S="-16" T="-16" R="129" G="0" B="0" A="255"/>
<Vtx X="-21238" Y="2594" Z="8512" S="-16" T="1008" R="129" G="0" B="0" A="255"/>
<Vtx X="-21474" Y="2594" Z="9785" S="3056" T="1008" R="129" G="0" B="0" A="255"/>
<Vtx X="-21474" Y="2994" Z="9796" S="3056" T="-16" R="129" G="0" B="0" A="255"/>
<Vtx X="-21474" Y="2994" Z="8585" S="-16" T="-16" R="129" G="0" B="0" A="255"/>
<Vtx X="-21474" Y="2594" Z="8585" S="-16" T="1008" R="129" G="0" B="0" A="255"/>
<Vtx X="-21474" Y="2994" Z="8585" S="-16" T="-16" R="0" G="127" B="0" A="255"/>
<Vtx X="-21474" Y="2994" Z="9796" S="3056" T="-16" R="0" G="127" B="0" A="255"/>
<Vtx X="-21238" Y="2994" Z="9796" S="3056" T="-16" R="0" G="127" B="0" A="255"/>
<Vtx X="-21238" Y="2994" Z="8512" S="-16" T="-16" R="0" G="127" B="0" A="255"/>
<Vtx X="-21474" Y="2994" Z="9796" S="3056" T="-16" R="254" G="255" B="127" A="255"/>
<Vtx X="-21474" Y="2594" Z="9785" S="3056" T="1008" R="254" G="255" B="127" A="255"/>
<Vtx X="-21238" Y="2594" Z="9796" S="3056" T="1008" R="254" G="255" B="127" A="255"/>
<Vtx X="-21238" Y="2994" Z="9796" S="3056" T="-16" R="254" G="255" B="127" A="255"/>
</Vertex>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Vertex Version="0">
<Vtx X="-21478" Y="2124" Z="8512" S="-16" T="-16" R="0" G="0" B="0" A="0"/>
<Vtx X="-21478" Y="2124" Z="12599" S="-16" T="-16" R="0" G="0" B="0" A="0"/>
<Vtx X="-21478" Y="2994" Z="12599" S="-16" T="-16" R="0" G="0" B="0" A="0"/>
<Vtx X="-21478" Y="2994" Z="8512" S="-16" T="-16" R="0" G="0" B="0" A="0"/>
<Vtx X="-21238" Y="2124" Z="8512" S="-16" T="-16" R="0" G="0" B="0" A="0"/>
<Vtx X="-21238" Y="2124" Z="12599" S="-16" T="-16" R="0" G="0" B="0" A="0"/>
<Vtx X="-21238" Y="2994" Z="12599" S="-16" T="-16" R="0" G="0" B="0" A="0"/>
<Vtx X="-21238" Y="2994" Z="8512" S="-16" T="-16" R="0" G="0" B="0" A="0"/>
</Vertex>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<DisplayList Version="0">
<PipeSync/>
<SetCombineLERP A0="G_CCMUX_TEXEL0" B0="G_CCMUX_0" C0="G_CCMUX_SHADE" D0="G_CCMUX_0" Aa0="G_ACMUX_0" Ab0="G_ACMUX_0" Ac0="G_ACMUX_0" Ad0="G_ACMUX_TEXEL0" A1="G_CCMUX_COMBINED" B1="G_CCMUX_0" C1="G_CCMUX_PRIMITIVE" D1="G_CCMUX_0" Aa1="G_ACMUX_0" Ab1="G_ACMUX_0" Ac1="G_ACMUX_0" Ad1="G_ACMUX_COMBINED"/>
<SetGeometryMode G_ZBUFFER="1" G_SHADE="1" G_FOG="1" G_LIGHTING="1" G_SHADING_SMOOTH="1" />

<SetOtherMode Cmd="G_SETOTHERMODE_H" Sft="4" Length="20" G_AD_NOISE="1" G_CD_MAGICSQ="1" G_CK_NONE="1" G_TC_FILT="1" G_TF_BILERP="1" G_TL_TILE="1" G_TD_CLAMP="1" G_TP_PERSP="1" G_CYC_2CYCLE="1" G_PM_NPRIMITIVE="1" />
<SetOtherMode Cmd="G_SETOTHERMODE_L" Sft="0" Length="32" G_AC_NONE="1" G_ZS_PIXEL="1" G_RM_FOG_SHADE_A="1" G_RM_AA_ZB_TEX_EDGE2="1" />
<Texture S="65535" T="65535" Level="0" Tile="0" On="1"/>
<SetTextureLUT Mode="G_TT_NONE"/>
<TileSync/>
<SetTextureImage Path="objects/object_kakariko_decor/SnowBuildup_32" Format="G_IM_FMT_RGBA" Size="G_IM_SIZ_16b_LOAD_BLOCK" Width="1"/>
<SetTile Format="G_IM_FMT_RGBA" Size="G_IM_SIZ_16b_LOAD_BLOCK" Line="0" TMem="0" Tile="7" Palette="0" Cms0="G_TX_WRAP" Cms1="G_TX_NOMIRROR" Cmt0="G_TX_CLAMP" Cmt1="G_TX_NOMIRROR" MaskS="5" ShiftS="0" MaskT="5" ShiftT="0"/>
<LoadSync/>
<LoadBlock Tile="7" Uls="0" Ult="0" Lrs="1023" Dxt="256"/>
<PipeSync/>
<SetTile Format="G_IM_FMT_RGBA" Size="G_IM_SIZ_16b" Line="8" TMem="0" Tile="0" Palette="0" Cms0="G_TX_WRAP" Cms1="G_TX_NOMIRROR" Cmt0="G_TX_CLAMP" Cmt1="G_TX_NOMIRROR" MaskS="5" ShiftS="0" MaskT="5" ShiftT="0"/>
<SetTileSize T="0" Uls="0" Ult="0" Lrs="124" Lrt="124"/>
<SetPrimColor M="0" L="0" R="255" G="255" B="255" A="255"/>
<EndDisplayList/>
</DisplayList>

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<DisplayList Version="0">
<PipeSync/>
<SetCombineLERP A0="G_CCMUX_TEXEL0" B0="G_CCMUX_0" C0="G_CCMUX_SHADE" D0="G_CCMUX_0" Aa0="G_ACMUX_0" Ab0="G_ACMUX_0" Ac0="G_ACMUX_0" Ad0="G_ACMUX_TEXEL0" A1="G_CCMUX_COMBINED" B1="G_CCMUX_0" C1="G_CCMUX_PRIMITIVE" D1="G_CCMUX_0" Aa1="G_ACMUX_0" Ab1="G_ACMUX_0" Ac1="G_ACMUX_0" Ad1="G_ACMUX_COMBINED"/>
<SetGeometryMode G_ZBUFFER="1" G_SHADE="1" G_FOG="1" G_LIGHTING="1" G_SHADING_SMOOTH="1" />

<SetOtherMode Cmd="G_SETOTHERMODE_H" Sft="4" Length="20" G_AD_NOISE="1" G_CD_MAGICSQ="1" G_CK_NONE="1" G_TC_FILT="1" G_TF_BILERP="1" G_TL_TILE="1" G_TD_CLAMP="1" G_TP_PERSP="1" G_CYC_2CYCLE="1" G_PM_NPRIMITIVE="1" />
<SetOtherMode Cmd="G_SETOTHERMODE_L" Sft="0" Length="32" G_AC_NONE="1" G_ZS_PIXEL="1" G_RM_FOG_SHADE_A="1" G_RM_AA_ZB_TEX_EDGE2="1" />
<Texture S="65535" T="65535" Level="0" Tile="0" On="1"/>
<SetTextureLUT Mode="G_TT_NONE"/>
<TileSync/>
<SetTextureImage Path="objects/object_kakariko_decor/String_GRGR_32" Format="G_IM_FMT_RGBA" Size="G_IM_SIZ_16b_LOAD_BLOCK" Width="1"/>
<SetTile Format="G_IM_FMT_RGBA" Size="G_IM_SIZ_16b_LOAD_BLOCK" Line="0" TMem="0" Tile="7" Palette="0" Cms0="G_TX_WRAP" Cms1="G_TX_MIRROR" Cmt0="G_TX_CLAMP" Cmt1="G_TX_NOMIRROR" MaskS="5" ShiftS="0" MaskT="5" ShiftT="0"/>
<LoadSync/>
<LoadBlock Tile="7" Uls="0" Ult="0" Lrs="1023" Dxt="256"/>
<PipeSync/>
<SetTile Format="G_IM_FMT_RGBA" Size="G_IM_SIZ_16b" Line="8" TMem="0" Tile="0" Palette="0" Cms0="G_TX_WRAP" Cms1="G_TX_MIRROR" Cmt0="G_TX_CLAMP" Cmt1="G_TX_NOMIRROR" MaskS="5" ShiftS="0" MaskT="5" ShiftT="0"/>
<SetTileSize T="0" Uls="0" Ult="0" Lrs="124" Lrt="124"/>
<SetPrimColor M="0" L="0" R="255" G="255" B="255" A="255"/>
<EndDisplayList/>
</DisplayList>

3 changes: 3 additions & 0 deletions soh/assets/soh_assets.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ static const ALIGN_ASSET(2) char gXmasDecor100DL[] = dgXmasDecor100DL;
#define dgXmasStarDL "__OTR__objects/object_xmas_tree/gXmasStarDL"
static const ALIGN_ASSET(2) char gXmasStarDL[] = dgXmasStarDL;

#define dgFrontGateDecorDL "__OTR__objects/object_kakariko_decor/gFrontGateDecorDL"
static const ALIGN_ASSET(2) char gFrontGateDecorDL[] = dgFrontGateDecorDL;

// overlays
#define dgOptionsDividerChangeLangVtx "__OTR__overlays/ovl_file_choose/gOptionsDividerChangeLangVtx"
static const ALIGN_ASSET(2) char gOptionsDividerChangeLangVtx[] = dgOptionsDividerChangeLangVtx;
Expand Down
17 changes: 17 additions & 0 deletions soh/soh/ActorDB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -620,9 +620,26 @@ static ActorDBInit EnChristmasTreeInit = {
};
extern "C" s16 gEnChristmasTreeId;

#include "src/overlays/actors/ovl_En_ChristmasDeco/z_en_christmasdeco.h"
static ActorDBInit EnChristmasDecoInit = {
"En_ChristmasDeco",
"Christmas Decos",
ACTORCAT_PROP,
(ACTOR_FLAG_DRAW_WHILE_CULLED),
OBJECT_GAMEPLAY_KEEP,
sizeof(EnChristmasDeco),
(ActorFunc)EnChristmasDeco_Init,
(ActorFunc)EnChristmasDeco_Destroy,
(ActorFunc)EnChristmasDeco_Update,
(ActorFunc)EnChristmasDeco_Draw,
nullptr,
};
extern "C" s16 gEnChristmasDecoId;

void ActorDB::AddBuiltInCustomActors() {
gEnPartnerId = ActorDB::Instance->AddEntry(EnPartnerInit).entry.id;
gEnChristmasTreeId = ActorDB::Instance->AddEntry(EnChristmasTreeInit).entry.id;
gEnChristmasDecoId = ActorDB::Instance->AddEntry(EnChristmasDecoInit).entry.id;
}

extern "C" ActorDBEntry* ActorDB_Retrieve(const int id) {
Expand Down
5 changes: 4 additions & 1 deletion soh/src/code/z_play.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ PlayState* gPlayState;

s16 gEnPartnerId;
s16 gEnChristmasTreeId;
s16 gEnChristmasDecoId;

void OTRPlay_SpawnScene(PlayState* play, s32 sceneNum, s32 spawn);

Expand Down Expand Up @@ -762,8 +763,10 @@ void Play_Init(GameState* thisx) {
}

if (play->sceneNum == SCENE_KAKARIKO_VILLAGE && Randomizer_GetSettingValue(RSK_TRIFORCE_HUNT)) {
Actor_Spawn(&play->actorCtx, play, gEnChristmasTreeId, -734, 0, 420, 0, 0, 0, 1, true);
Actor_Spawn(&play->actorCtx, play, gEnChristmasTreeId, -734, 0, 420, 0, 0, 0, 0, true);
}

Actor_Spawn(&play->actorCtx, play, gEnChristmasDecoId, 0, 0, 0, 0, 0, 0, 0, true);
}

void Play_Update(PlayState* play) {
Expand Down
42 changes: 42 additions & 0 deletions soh/src/overlays/actors/ovl_En_ChristmasDeco/z_en_christmasdeco.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* File: z_en_christmasdeco.c
* Overlay: ovl_En_ChristmasDeco
* Description: Custom Christmas Decorations
*/

#include "z_en_christmasdeco.h"
#include "soh_assets.h"

void EnChristmasDeco_Init(Actor* thisx, PlayState* play);
void EnChristmasDeco_Destroy(Actor* thisx, PlayState* play);
void EnChristmasDeco_Update(Actor* thisx, PlayState* play);
void EnChristmasDeco_Draw(Actor* thisx, PlayState* play);

void EnChristmasDeco_Init(Actor* thisx, PlayState* play) {

}

void EnChristmasDeco_Destroy(Actor* thisx, PlayState* play) {

}

void EnChristmasDeco_Update(Actor* thisx, PlayState* play) {

}

void EnChristmasDeco_Draw(Actor* thisx, PlayState* play) {
float decoSize = 1000.0f;

OPEN_DISPS(play->state.gfxCtx);

Gfx_SetupDL_25Opa(play->state.gfxCtx);

Matrix_Scale(decoSize, decoSize, decoSize, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, (char*)__FILE__, __LINE__), G_MTX_MODELVIEW | G_MTX_LOAD);

if (play->sceneNum == SCENE_KAKARIKO_VILLAGE) {
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gFrontGateDecorDL);
}

CLOSE_DISPS(play->state.gfxCtx);
}
27 changes: 27 additions & 0 deletions soh/src/overlays/actors/ovl_En_ChristmasDeco/z_en_christmasdeco.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#ifndef Z_EN_CHRISTMASDECO_H
#define Z_EN_CHRISTMASDECO_H

#include <libultraship/libultra.h>
#include "global.h"

struct EnChristmasDeco;

typedef void (*EnChristmasDecoActionFunc)(struct EnChristmasDeco*, PlayState*);

typedef struct EnChristmasDeco {
Actor actor;
EnChristmasDecoActionFunc actionFunc;
} EnChristmasDeco;

#ifdef __cplusplus
extern "C" {
#endif
void EnChristmasDeco_Init(Actor* thisx, PlayState* play);
void EnChristmasDeco_Destroy(Actor* thisx, PlayState* play);
void EnChristmasDeco_Update(Actor* thisx, PlayState* play);
void EnChristmasDeco_Draw(Actor* thisx, PlayState* play);
#ifdef __cplusplus
}
#endif

#endif

0 comments on commit ebaac0b

Please sign in to comment.