Document object_market_obj (West Clock Town Market) (#1074)

* Document object_market_obj (West Clock Town Market)

* Update the names of ground textures

* Respond to Elliptic's review
This commit is contained in:
Tom Overton
2022-09-24 11:40:36 -07:00
committed by GitHub
parent be121f7dd7
commit 8fa3a58b35
4 changed files with 83 additions and 69 deletions
@@ -27,17 +27,25 @@ static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 1000, ICHAIN_STOP),
};
Gfx* D_80AF0120[] = { object_market_obj_DL_01F050, object_market_obj_DL_018DA0 };
Gfx* D_80AF0128[] = { object_market_obj_DL_01EF10, object_market_obj_DL_018C60 };
Gfx* sMarketDLs[] = {
gWestClockTownMarketDayDL,
gWestClockTownMarketNightDL,
};
Gfx* sBankAdvertisementsAndDoorDLs[] = {
gWestClockTownMarketBankAdvertisementsAndDoorDayDL,
gWestClockTownMarketBankAdvertisementsAndDoorNightDL,
};
void BgMarketStep_Init(Actor* thisx, PlayState* play) {
BgMarketStep* this = THIS;
Actor_ProcessInitChain(&this->actor, sInitChain);
}
void BgMarketStep_Draw(Actor* thisx, PlayState* play) {
s32 index = thisx->params & 1;
Gfx_DrawDListOpa(play, D_80AF0120[index]);
Gfx_DrawDListOpa(play, D_80AF0128[index]);
void BgMarketStep_Draw(Actor* thisx, PlayState* play) {
s32 timeOfDay = BG_MARKET_STEP_GET_TIME_OF_DAY(thisx);
Gfx_DrawDListOpa(play, sMarketDLs[timeOfDay]);
Gfx_DrawDListOpa(play, sBankAdvertisementsAndDoorDLs[timeOfDay]);
}
@@ -3,6 +3,8 @@
#include "global.h"
#define BG_MARKET_STEP_GET_TIME_OF_DAY(thisx) ((thisx)->params & 1)
struct BgMarketStep;
typedef struct BgMarketStep {