Skip to content

Commit

Permalink
PlaceName: Fill out Placename enum, support 2 digit ids
Browse files Browse the repository at this point in the history
  • Loading branch information
themikelester committed Dec 12, 2024
1 parent a6fbf24 commit fcd760f
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/ZeldaWindWaker/d_place_name.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,22 @@ export const enum Placename {
OutsetIsland,
ForsakenFortress,
DragonRoost,
ForestHaven,
GreatfishIsland,
WindfallIsland,
TowerOfTheGods,
KingdomOfHyrule,
GaleIsle,
HeadstoneIsle,
FireMountain,
IceRingIsle,
FairyAtoll,
DragonRoostCavern,
ForbiddenWoods,
TowerOfTheGods2,
EarthTemple,
WindTemple,
GanonsTower,
}

export const enum PlacenameState {
Expand Down Expand Up @@ -82,7 +98,8 @@ export class d_place_name extends msg_class {
if (globals.scnPlay.placenameIndex === Placename.OutsetIsland) {
img = globals.resCtrl.getObjectRes(ResType.Bti, `PName`, 0x07)
} else {
const filename = `placename/pn_0${globals.scnPlay.placenameIndex + 1}.bti`; // @TODO: Need to support 2 digit numbers
const placenameId = (globals.scnPlay.placenameIndex + 1);
const filename = `placename/pn_${placenameId.toString().padStart(2, "0")}.bti`;
status = globals.modelCache.requestFileData(filename);
if (status !== cPhs__Status.Complete)
return status;
Expand Down

0 comments on commit fcd760f

Please sign in to comment.