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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 83 additions and 69 deletions

View File

@ -1,65 +1,69 @@
<Root>
<!-- Assets for most of the West Clock Town Market (the section with the shops and the bank) -->
<File Name="object_market_obj" Segment="6">
<Texture Name="object_market_obj_TLUT_000000" OutName="tlut_000000" Format="rgba16" Width="4" Height="4" Offset="0x0" />
<Texture Name="object_market_obj_TLUT_000020" OutName="tlut_000020" Format="rgba16" Width="4" Height="4" Offset="0x20" />
<Texture Name="object_market_obj_TLUT_000040" OutName="tlut_000040" Format="rgba16" Width="4" Height="4" Offset="0x40" />
<Texture Name="object_market_obj_TLUT_000060" OutName="tlut_000060" Format="rgba16" Width="4" Height="4" Offset="0x60" />
<Texture Name="object_market_obj_TLUT_000080" OutName="tlut_000080" Format="rgba16" Width="4" Height="4" Offset="0x80" />
<Texture Name="object_market_obj_TLUT_0000A0" OutName="tlut_0000A0" Format="rgba16" Width="4" Height="4" Offset="0xA0" />
<Texture Name="object_market_obj_TLUT_0000C0" OutName="tlut_0000C0" Format="rgba16" Width="4" Height="4" Offset="0xC0" />
<Texture Name="object_market_obj_TLUT_0000E0" OutName="tlut_0000E0" Format="rgba16" Width="4" Height="4" Offset="0xE0" />
<Texture Name="object_market_obj_TLUT_000100" OutName="tlut_000100" Format="rgba16" Width="4" Height="4" Offset="0x100" />
<Texture Name="object_market_obj_TLUT_000120" OutName="tlut_000120" Format="rgba16" Width="4" Height="4" Offset="0x120" />
<Texture Name="object_market_obj_TLUT_000140" OutName="tlut_000140" Format="rgba16" Width="4" Height="4" Offset="0x140" />
<Texture Name="object_market_obj_TLUT_000160" OutName="tlut_000160" Format="rgba16" Width="4" Height="4" Offset="0x160" />
<Texture Name="object_market_obj_TLUT_000180" OutName="tlut_000180" Format="rgba16" Width="4" Height="4" Offset="0x180" />
<Texture Name="object_market_obj_TLUT_0001A0" OutName="tlut_0001A0" Format="rgba16" Width="4" Height="4" Offset="0x1A0" />
<Texture Name="object_market_obj_TLUT_0001C0" OutName="tlut_0001C0" Format="rgba16" Width="4" Height="4" Offset="0x1C0" />
<Texture Name="object_market_obj_TLUT_0001E0" OutName="tlut_0001E0" Format="rgba16" Width="4" Height="4" Offset="0x1E0" />
<Texture Name="object_market_obj_TLUT_000200" OutName="tlut_000200" Format="rgba16" Width="4" Height="4" Offset="0x200" />
<Texture Name="object_market_obj_TLUT_000220" OutName="tlut_000220" Format="rgba16" Width="16" Height="16" Offset="0x220" />
<Texture Name="object_market_obj_Tex_000420" OutName="tex_000420" Format="rgba16" Width="32" Height="64" Offset="0x420" />
<Texture Name="object_market_obj_Tex_001420" OutName="tex_001420" Format="rgba16" Width="32" Height="64" Offset="0x1420" />
<Texture Name="object_market_obj_Tex_002420" OutName="tex_002420" Format="ci4" Width="64" Height="64" Offset="0x2420" />
<Texture Name="object_market_obj_Tex_002C20" OutName="tex_002C20" Format="rgba16" Width="32" Height="63" Offset="0x2C20" />
<Texture Name="object_market_obj_Tex_003BE0" OutName="tex_003BE0" Format="rgba16" Width="32" Height="64" Offset="0x3BE0" />
<Texture Name="object_market_obj_Tex_004BE0" OutName="tex_004BE0" Format="ci4" Width="64" Height="64" Offset="0x4BE0" />
<Texture Name="object_market_obj_Tex_0053E0" OutName="tex_0053E0" Format="ci4" Width="64" Height="64" Offset="0x53E0" />
<Texture Name="object_market_obj_Tex_005BE0" OutName="tex_005BE0" Format="rgba16" Width="32" Height="32" Offset="0x5BE0" />
<Texture Name="object_market_obj_Tex_0063E0" OutName="tex_0063E0" Format="rgba16" Width="32" Height="32" Offset="0x63E0" />
<Texture Name="object_market_obj_Tex_006BE0" OutName="tex_006BE0" Format="rgba16" Width="64" Height="32" Offset="0x6BE0" />
<Texture Name="object_market_obj_Tex_007BE0" OutName="tex_007BE0" Format="ci4" Width="64" Height="64" Offset="0x7BE0" />
<Texture Name="object_market_obj_Tex_0083E0" OutName="tex_0083E0" Format="rgba16" Width="64" Height="32" Offset="0x83E0" />
<Texture Name="object_market_obj_Tex_0093E0" OutName="tex_0093E0" Format="rgba16" Width="64" Height="32" Offset="0x93E0" />
<Texture Name="object_market_obj_Tex_00A3E0" OutName="tex_00A3E0" Format="ci4" Width="64" Height="32" Offset="0xA3E0" />
<Texture Name="object_market_obj_Tex_00A7E0" OutName="tex_00A7E0" Format="i4" Width="32" Height="32" Offset="0xA7E0" />
<Texture Name="object_market_obj_Tex_00A9E0" OutName="tex_00A9E0" Format="ci4" Width="32" Height="64" Offset="0xA9E0" />
<Texture Name="object_market_obj_Tex_00ADE0" OutName="tex_00ADE0" Format="ci4" Width="64" Height="64" Offset="0xADE0" />
<Texture Name="object_market_obj_Tex_00B5E0" OutName="tex_00B5E0" Format="ci4" Width="64" Height="64" Offset="0xB5E0" />
<Texture Name="object_market_obj_Tex_00BDE0" OutName="tex_00BDE0" Format="ci4" Width="64" Height="64" Offset="0xBDE0" />
<Texture Name="object_market_obj_Tex_00C5E0" OutName="tex_00C5E0" Format="ci4" Width="64" Height="64" Offset="0xC5E0" />
<Texture Name="object_market_obj_Tex_00CDE0" OutName="tex_00CDE0" Format="ci4" Width="64" Height="64" Offset="0xCDE0" />
<Texture Name="object_market_obj_Tex_00D5E0" OutName="tex_00D5E0" Format="ci4" Width="64" Height="64" Offset="0xD5E0" />
<Texture Name="object_market_obj_Tex_00DDE0" OutName="tex_00DDE0" Format="ci4" Width="64" Height="64" Offset="0xDDE0" />
<Texture Name="object_market_obj_Tex_00E5E0" OutName="tex_00E5E0" Format="ci4" Width="64" Height="64" Offset="0xE5E0" />
<Texture Name="object_market_obj_Tex_00EDE0" OutName="tex_00EDE0" Format="ci4" Width="64" Height="64" Offset="0xEDE0" />
<Texture Name="object_market_obj_Tex_00F5E0" OutName="tex_00F5E0" Format="ci4" Width="64" Height="64" Offset="0xF5E0" />
<Texture Name="object_market_obj_Tex_00FDE0" OutName="tex_00FDE0" Format="ci4" Width="64" Height="64" Offset="0xFDE0" />
<Texture Name="object_market_obj_Tex_0105E0" OutName="tex_0105E0" Format="rgba16" Width="32" Height="16" Offset="0x105E0" />
<Texture Name="object_market_obj_Tex_0109E0" OutName="tex_0109E0" Format="rgba16" Width="32" Height="64" Offset="0x109E0" />
<Texture Name="object_market_obj_Tex_0119E0" OutName="tex_0119E0" Format="rgba16" Width="32" Height="16" Offset="0x119E0" />
<Texture Name="object_market_obj_Tex_011DE0" OutName="tex_011DE0" Format="rgba16" Width="32" Height="32" Offset="0x11DE0" />
<Texture Name="object_market_obj_Tex_0125E0" OutName="tex_0125E0" Format="rgba16" Width="32" Height="32" Offset="0x125E0" />
<Texture Name="object_market_obj_Tex_012DE0" OutName="tex_012DE0" Format="rgba16" Width="32" Height="32" Offset="0x12DE0" />
<Texture Name="object_market_obj_Tex_0135E0" OutName="tex_0135E0" Format="rgba16" Width="64" Height="16" Offset="0x135E0" />
<Texture Name="object_market_obj_Tex_013DE0" OutName="tex_013DE0" Format="ia8" Width="32" Height="32" Offset="0x13DE0" />
<Texture Name="object_market_obj_Tex_0141E0" OutName="tex_0141E0" Format="ci8" Width="8" Height="8" Offset="0x141E0" />
<Texture Name="object_market_obj_Tex_014220" OutName="tex_014220" Format="i8" Width="8" Height="8" Offset="0x14220" />
<Texture Name="object_market_obj_Tex_014260" OutName="tex_014260" Format="i4" Width="64" Height="32" Offset="0x14260" />
<Texture Name="object_market_obj_Tex_014660" OutName="tex_014660" Format="rgba16" Width="16" Height="16" Offset="0x14660" />
<DList Name="object_market_obj_DL_018C60" Offset="0x18C60" />
<DList Name="object_market_obj_DL_018DA0" Offset="0x18DA0" />
<DList Name="object_market_obj_DL_01EF10" Offset="0x1EF10" />
<DList Name="object_market_obj_DL_01F050" Offset="0x1F050" />
<!-- West Clock Town Market Textures -->
<Texture Name="gWestClockTownMarketWhitePlasterTLUT" OutName="west_clock_town_market_white_plaster_tlut" Format="rgba16" Width="4" Height="4" Offset="0x0" />
<Texture Name="gWestClockTownMarketYellowPlasterTLUT" OutName="west_clock_town_market_yellow_plaster_tlut" Format="rgba16" Width="4" Height="4" Offset="0x20" />
<Texture Name="gWestClockTownMarketBrownPlasterTLUT" OutName="west_clock_town_market_brown_plaster_tlut" Format="rgba16" Width="4" Height="4" Offset="0x40" />
<Texture Name="gWestClockTownMarketStrawTLUT" OutName="west_clock_town_market_straw_tlut" Format="rgba16" Width="4" Height="4" Offset="0x60" />
<Texture Name="gWestClockTownMarketStrawFringeTLUT" OutName="west_clock_town_market_straw_fringe_tlut" Format="rgba16" Width="4" Height="4" Offset="0x80" />
<Texture Name="gWestClockTownMarketBrownPatternedPlasterTLUT" OutName="west_clock_town_market_brown_patterned_plaster_tlut" Format="rgba16" Width="4" Height="4" Offset="0xA0" />
<Texture Name="gWestClockTownMarketYellowPatternedPlaster1TLUT" OutName="west_clock_town_market_yellow_patterned_plaster_1_tlut" Format="rgba16" Width="4" Height="4" Offset="0xC0" />
<Texture Name="gWestClockTownMarketYellowPatternedPlaster2TLUT" OutName="west_clock_town_market_yellow_patterned_plaster_2_tlut" Format="rgba16" Width="4" Height="4" Offset="0xE0" />
<Texture Name="gWestClockTownMarketWhitePatternedPlaster1TLUT" OutName="west_clock_town_market_white_patterned_plaster_1_tlut" Format="rgba16" Width="4" Height="4" Offset="0x100" />
<Texture Name="gWestClockTownMarketWhitePatternedPlaster2TLUT" OutName="west_clock_town_market_white_patterned_plaster_2_tlut" Format="rgba16" Width="4" Height="4" Offset="0x120" />
<Texture Name="gWestClockTownMarketYellowPatternedPlaster3TLUT" OutName="west_clock_town_market_yellow_patterned_plaster_3_tlut" Format="rgba16" Width="4" Height="4" Offset="0x140" />
<Texture Name="gWestClockTownMarketYellowPatternedPlaster4TLUT" OutName="west_clock_town_market_yellow_patterned_plaster_4_tlut" Format="rgba16" Width="4" Height="4" Offset="0x160" />
<Texture Name="gWestClockTownMarketYellowPatternedPlaster5TLUT" OutName="west_clock_town_market_yellow_patterned_plaster_5_tlut" Format="rgba16" Width="4" Height="4" Offset="0x180" />
<Texture Name="gWestClockTownMarketWhitePatternedPlaster3TLUT" OutName="west_clock_town_market_white_patterned_plaster_3_tlut" Format="rgba16" Width="4" Height="4" Offset="0x1A0" />
<Texture Name="gWestClockTownMarketWhitePatternedPlaster4TLUT" OutName="west_clock_town_market_white_patterned_plaster_4_tlut" Format="rgba16" Width="4" Height="4" Offset="0x1C0" />
<Texture Name="gWestClockTownMarketWhitePatternedPlaster5TLUT" OutName="west_clock_town_market_white_patterned_plaster_5_tlut" Format="rgba16" Width="4" Height="4" Offset="0x1E0" />
<Texture Name="gWestClockTownMarketWhitePatternedPlaster6TLUT" OutName="west_clock_town_market_white_patterned_plaster_6_tlut" Format="rgba16" Width="4" Height="4" Offset="0x200" />
<Texture Name="gWestClockTownMarketCowFrontTLUT" OutName="west_clock_town_market_cow_front_tlut" Format="rgba16" Width="16" Height="16" Offset="0x220" />
<Texture Name="gWestClockTownMarketCuriosityShopSignTex" OutName="west_clock_town_market_curiosity_shop_sign" Format="rgba16" Width="32" Height="64" Offset="0x420" />
<Texture Name="gWestClockTownMarketBombShopSignTex" OutName="west_clock_town_market_bomb_shop_sign" Format="rgba16" Width="32" Height="64" Offset="0x1420" />
<Texture Name="gWestClockTownMarketWhitePlasterTex" OutName="west_clock_town_market_white_plaster" Format="ci4" Width="64" Height="64" Offset="0x2420" />
<Texture Name="gWestClockTownMarketClockTownBankSignTex" OutName="west_clock_town_market_clock_town_bank_sign" Format="rgba16" Width="32" Height="63" Offset="0x2C20" />
<Texture Name="gWestClockTownMarketTradingPostSignTex" OutName="west_clock_town_market_trading_post_sign" Format="rgba16" Width="32" Height="64" Offset="0x3BE0" />
<Texture Name="gWestClockTownMarketYellowPlasterTex" OutName="west_clock_town_market_yellow_plaster" Format="ci4" Width="64" Height="64" Offset="0x4BE0" />
<Texture Name="gWestClockTownMarketBrownPlasterTex" OutName="west_clock_town_market_brown_plaster" Format="ci4" Width="64" Height="64" Offset="0x53E0" />
<Texture Name="gWestClockTownMarketBankAndDoorFrameTex" OutName="west_clock_town_market_bank_and_door_frame" Format="rgba16" Width="32" Height="32" Offset="0x5BE0" />
<Texture Name="gWestClockTownMarketGroundTex" OutName="west_clock_town_market_ground" Format="rgba16" Width="32" Height="32" Offset="0x63E0" />
<Texture Name="gWestClockTownBrickBelowWhitePlasterTex" OutName="west_clock_town_market_brick_below_white_plaster" Format="rgba16" Width="64" Height="32" Offset="0x6BE0" />
<Texture Name="gWestClockTownMarketStrawTex" OutName="west_clock_town_market_straw" Format="ci4" Width="64" Height="64" Offset="0x7BE0" />
<Texture Name="gWestClockTownBrickBelowYellowPlasterTex" OutName="west_clock_town_market_brick_below_yellow_plaster" Format="rgba16" Width="64" Height="32" Offset="0x83E0" />
<Texture Name="gWestClockTownBrickBelowBrownPlasterTex" OutName="west_clock_town_market_brick_below_brown_plaster" Format="rgba16" Width="64" Height="32" Offset="0x93E0" />
<Texture Name="gWestClockTownMarketStrawFringeTex" OutName="west_clock_town_market_straw_fringe" Format="ci4" Width="64" Height="32" Offset="0xA3E0" />
<Texture Name="gWestClockTownMarketBankDoorTex" OutName="west_clock_town_market_bank_door" Format="i4" Width="32" Height="32" Offset="0xA7E0" />
<Texture Name="gWestClockTownMarketBrownPatternedPlasterTex" OutName="west_clock_town_market_brown_patterned_plaster" Format="ci4" Width="32" Height="64" Offset="0xA9E0" />
<Texture Name="gWestClockTownMarketYellowPatternedPlaster1Tex" OutName="west_clock_town_market_yellow_patterned_plaster_1" Format="ci4" Width="64" Height="64" Offset="0xADE0" />
<Texture Name="gWestClockTownMarketYellowPatternedPlaster2Tex" OutName="west_clock_town_market_yellow_patterned_plaster_2" Format="ci4" Width="64" Height="64" Offset="0xB5E0" />
<Texture Name="gWestClockTownMarketWhitePatternedPlaster1Tex" OutName="west_clock_town_market_white_patterned_plaster_1" Format="ci4" Width="64" Height="64" Offset="0xBDE0" />
<Texture Name="gWestClockTownMarketWhitePatternedPlaster2Tex" OutName="west_clock_town_market_white_patterned_plaster_2" Format="ci4" Width="64" Height="64" Offset="0xC5E0" />
<Texture Name="gWestClockTownMarketYellowPatternedPlaster3Tex" OutName="west_clock_town_market_yellow_patterned_plaster_3" Format="ci4" Width="64" Height="64" Offset="0xCDE0" />
<Texture Name="gWestClockTownMarketYellowPatternedPlaster4Tex" OutName="west_clock_town_market_yellow_patterned_plaster_4" Format="ci4" Width="64" Height="64" Offset="0xD5E0" />
<Texture Name="gWestClockTownMarketYellowPatternedPlaster5Tex" OutName="west_clock_town_market_yellow_patterned_plaster_5" Format="ci4" Width="64" Height="64" Offset="0xDDE0" />
<Texture Name="gWestClockTownMarketWhitePatternedPlaster3Tex" OutName="west_clock_town_market_white_patterned_plaster_3" Format="ci4" Width="64" Height="64" Offset="0xE5E0" />
<Texture Name="gWestClockTownMarketWhitePatternedPlaster4Tex" OutName="west_clock_town_market_white_patterned_plaster_4" Format="ci4" Width="64" Height="64" Offset="0xEDE0" />
<Texture Name="gWestClockTownMarketWhitePatternedPlaster5Tex" OutName="west_clock_town_market_white_patterned_plaster_5" Format="ci4" Width="64" Height="64" Offset="0xF5E0" />
<Texture Name="gWestClockTownMarketWhitePatternedPlaster6Tex" OutName="west_clock_town_market_white_patterned_plaster_6" Format="ci4" Width="64" Height="64" Offset="0xFDE0" />
<Texture Name="gWestClockTownMarketPoleTex" OutName="west_clock_town_market_pole" Format="rgba16" Width="32" Height="16" Offset="0x105E0" />
<Texture Name="gWestClockTownMarketBrickEdgedGroundTex" OutName="west_clock_town_market_brick_edged_ground" Format="rgba16" Width="32" Height="64" Offset="0x109E0" />
<Texture Name="gWestClockTownMarketStairRiserTex" OutName="west_clock_town_market_stair_riser" Format="rgba16" Width="32" Height="16" Offset="0x119E0" />
<Texture Name="gWestClockTownMarketFlowerBedTopTex" OutName="west_clock_town_market_flower_bed_top" Format="rgba16" Width="32" Height="32" Offset="0x11DE0" />
<Texture Name="gWestClockTownMarketFlowerBedSidesTex" OutName="west_clock_town_market_flower_bed_sides" Format="rgba16" Width="32" Height="32" Offset="0x125E0" />
<Texture Name="gWestClockTownMarketSafeTex" OutName="west_clock_town_market_safe" Format="rgba16" Width="32" Height="32" Offset="0x12DE0" />
<Texture Name="gWestClockTownMarketRugTex" OutName="west_clock_town_market_rug" Format="rgba16" Width="64" Height="16" Offset="0x135E0" />
<Texture Name="gWestClockTownMarketBankCurtainTex" OutName="west_clock_town_market_bank_curtain" Format="ia8" Width="32" Height="32" Offset="0x13DE0" />
<Texture Name="gWestClockTownMarketCowFrontTex" OutName="west_clock_town_market_cow_front" Format="ci8" Width="8" Height="8" Offset="0x141E0" />
<Texture Name="gWestClockTownMarketCowBodyTex" OutName="west_clock_town_market_cow_body" Format="i8" Width="8" Height="8" Offset="0x14220" />
<Texture Name="gWestClockTownMarketBankAdvertisementsTex" OutName="west_clock_town_market_bank_advertisements" Format="i4" Width="64" Height="32" Offset="0x14260" />
<Texture Name="gWestClockTownMarketSafeWheelAndHandleTex" OutName="west_clock_town_market_safe_wheel_and_handle" Format="rgba16" Width="16" Height="16" Offset="0x14660" />
<!-- West Clock Town Market DisplayLists -->
<DList Name="gWestClockTownMarketBankAdvertisementsAndDoorNightDL" Offset="0x18C60" /> <!-- The door is not interactive, and it's not visible in-game. -->
<DList Name="gWestClockTownMarketNightDL" Offset="0x18DA0" />
<DList Name="gWestClockTownMarketBankAdvertisementsAndDoorDayDL" Offset="0x1EF10" /> <!-- The door is not interactive, and it's not visible in-game. -->
<DList Name="gWestClockTownMarketDayDL" Offset="0x1F050" />
</File>
</Root>

View File

@ -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]);
}

View File

@ -3,6 +3,8 @@
#include "global.h"
#define BG_MARKET_STEP_GET_TIME_OF_DAY(thisx) ((thisx)->params & 1)
struct BgMarketStep;
typedef struct BgMarketStep {

View File

@ -13328,8 +13328,8 @@
0x80AF0050:("D_80AF0050","UNK_TYPE1","",0x1),
0x80AF00F0:("Bg_Market_Step_InitVars","UNK_TYPE1","",0x1),
0x80AF0110:("D_80AF0110","UNK_TYPE1","",0x1),
0x80AF0120:("D_80AF0120","UNK_TYPE1","",0x1),
0x80AF0128:("D_80AF0128","UNK_TYPE1","",0x1),
0x80AF0120:("sMarketDLs","UNK_TYPE1","",0x1),
0x80AF0128:("sBankAdvertisementsAndFakeDoorDLs","UNK_TYPE1","",0x1),
0x80AF0720:("Obj_Lupygamelift_InitVars","UNK_TYPE1","",0x1),
0x80AF0740:("D_80AF0740","UNK_TYPE1","",0x1),
0x80AF0750:("D_80AF0750","f32","",0x4),