cleanup structures.h

This commit is contained in:
Henny022p
2025-03-09 12:01:00 +00:00
parent 3b9b1a388b
commit 46506530fc
99 changed files with 363 additions and 383 deletions
-1
View File
@@ -1,6 +1,5 @@
#include "affine.h"
#include "global.h"
#include "structures.h"
#include "main.h"
#include "room.h"
#include "screen.h"
+1 -1
View File
@@ -8,7 +8,7 @@
#include "asm.h"
#include "assets/gfx_offsets.h"
#include "common.h"
#include "structures.h"
#include "gfx.h"
#include "room.h"
void LoadBgAnimationGfx(const BgAnimationGfx*);
+1 -1
View File
@@ -17,10 +17,10 @@
#include "player.h"
#include "screen.h"
#include "scroll.h"
#include "structures.h"
#include "tiles.h"
#include "affine.h"
#include "subtask.h"
#include "ui.h"
extern void sub_0807C898(void);
extern void sub_0805BB74(s32);
+1 -1
View File
@@ -2,7 +2,7 @@
#include "entity.h"
#include "player.h"
#include "room.h"
#include "structures.h"
#include "vram.h"
const u8 gUnk_08109202[] = {
255, 8, 24, 255, 0, 4, 28, 255, 16, 12, 20, 255, 255, 255, 255, 255, 0, 0,
-1
View File
@@ -3,7 +3,6 @@
#include "common.h"
#include "enemy.h"
#include "entity.h"
#include "structures.h"
#include "global.h"
#include "item.h"
#include "object.h"
+7 -10
View File
@@ -3,15 +3,12 @@
#include "common.h"
#include "color.h"
#include "room.h"
#include "global.h"
#include "fileselect.h"
#include "main.h"
#include "physics.h"
#include "structures.h"
#include "gfx.h"
extern Palette gUnk_02001A3C;
void LoadObjPaletteAtIndex(u32 a1, u32 a2);
void LoadObjPaletteAtIndex(u32 a1, u32 paletteIndex);
void CleanUpObjPalettes();
u32 FindFreeObjPalette(u32);
void SetEntityObjPalette(Entity*, s32);
@@ -238,21 +235,21 @@ void ChangeObjPalette(Entity* entity, u32 objPaletteId) {
LoadObjPalette(entity, objPaletteId);
}
void LoadObjPaletteAtIndex(u32 objPaletteId, u32 a2) {
void LoadObjPaletteAtIndex(u32 objPaletteId, u32 paletteIndex) {
u16* buffer;
gUsedPalettes |= 1 << (a2 + 16);
USE_PALETTE(paletteIndex + 16);
if (objPaletteId > 5) {
if (objPaletteId == 0x15) {
buffer = gPaletteBuffer;
MemFill16(buffer[0x3C], buffer + (a2 + 16) * 16, 0x20);
MemFill16(buffer[0x3C], buffer + (paletteIndex + 16) * 16, 0x20);
} else if (objPaletteId < 0x15) {
LoadPalettes((u8*)(gPaletteBuffer + (objPaletteId - 6) * 16), a2 + 16, 1);
LoadPalettes((u8*)(gPaletteBuffer + (objPaletteId - 6) * 16), paletteIndex + 16, 1);
} else {
u32 offset = gUnk_08133368[(objPaletteId - 0x16)].WORD_U;
u32 numPalettes = (offset >> 0x18) & 0xf;
offset &= 0xffffff;
LoadPalettes(gGlobalGfxAndPalettes + offset, a2 + 16, numPalettes);
LoadPalettes(&gGlobalGfxAndPalettes[offset], paletteIndex + 16, numPalettes);
}
}
}
+2 -3
View File
@@ -16,7 +16,6 @@
#include "screen.h"
#include "sound.h"
#include "subtask.h"
#include "structures.h"
extern u8 gUnk_03003DE0;
extern u8 gzHeap[0x1000];
@@ -244,7 +243,7 @@ void LoadPalettes(const u8* src, s32 destPaletteNum, s32 numPalettes) {
u32 size = numPalettes * 32;
u32 usedPalettesMask = 1 << destPaletteNum;
while (--numPalettes > 0) {
usedPalettesMask |= (usedPalettesMask << 1);
usedPalettesMask |= usedPalettesMask << 1;
}
gUsedPalettes |= usedPalettesMask;
dest = &gPaletteBuffer[destPaletteNum * 16];
@@ -253,7 +252,7 @@ void LoadPalettes(const u8* src, s32 destPaletteNum, s32 numPalettes) {
void SetColor(u32 colorIndex, u32 color) {
gPaletteBuffer[colorIndex] = color;
gUsedPalettes |= 1 << (colorIndex / 16);
USE_PALETTE(colorIndex / 16);
}
void SetFillColor(u32 color, u32 disable_layers) {
-1
View File
@@ -8,7 +8,6 @@
#include "enemy.h"
#include "fade.h"
#include "fileselect.h"
#include "structures.h"
#include "game.h"
#include "main.h"
#include "menu.h"
-1
View File
@@ -13,7 +13,6 @@
#include "screen.h"
#include "sound.h"
#include "save.h"
#include "structures.h"
void sub_0805FA04(void);
void sub_0805FA98(void);
-1
View File
@@ -16,7 +16,6 @@
#include "menu.h"
#include "sound.h"
#include "affine.h"
#include "structures.h"
void sub_080A30AC(void);
void sub_080A2E40(void);
+1 -1
View File
@@ -14,7 +14,7 @@
#include "physics.h"
#include "player.h"
#include "tiles.h"
#include "structures.h"
#include "pauseMenu.h"
#ifndef EU
#include "vram.h"
#endif
+1 -1
View File
@@ -16,7 +16,7 @@
#include "physics.h"
#include "player.h"
#include "screen.h"
#include "structures.h"
#include "pauseMenu.h"
typedef struct {
union SplitHWord unk0;
-1
View File
@@ -7,7 +7,6 @@
#include "enemy.h"
#include "screenTransitions.h"
#include "script.h"
#include "structures.h"
#include "tiles.h"
#include "player.h"
#include "physics.h"
+1 -1
View File
@@ -6,7 +6,7 @@
*/
#include "enemy/octorokBoss.h"
#include "collision.h"
#include "structures.h"
#include "pauseMenu.h"
#include "game.h"
#include "object.h"
#include "asm.h"
+1 -1
View File
@@ -12,7 +12,7 @@
#include "physics.h"
#include "player.h"
#include "screen.h"
#include "structures.h"
#include "vram.h"
void sub_0802A39C(Entity*);
void sub_0802A334(Entity*);
+2 -2
View File
@@ -9,7 +9,7 @@
#include "area.h"
#include "common.h"
#include "entity.h"
#include "structures.h"
#include "beanstalkSubtask.h"
#include "game.h"
#include "main.h"
#include "object.h"
@@ -188,7 +188,7 @@ void Subtask_PortalCutscene_0(void) {
LoadPaletteGroup(ptr->paletteGroup);
LoadGfxGroup(ptr->gfxGroup);
MemCopy(gPaletteBuffer + 3 * 16, gPaletteBuffer + 21 * 16, 16 * 2);
gUsedPalettes |= 1 << 21;
USE_PALETTE(21);
EraseAllEntities();
LoadRoomEntityList(gUnk_080D4110[portalId]);
ClearEventPriority();
-1
View File
@@ -6,7 +6,6 @@
#include "npc.h"
#include "vram.h"
#include "script.h"
#include "structures.h"
#include "room.h"
#include "player.h"
#include "physics.h"
+8 -2
View File
@@ -1,6 +1,6 @@
#include "global.h"
#include "save.h"
#include "structures.h"
#include "vram.h"
#include "screen.h"
#include "common.h"
@@ -8,7 +8,13 @@ static u32 sub_080501C0(FadeControl* ctl);
static u32 sub_08050230(FadeControl* ctl);
static u32 sub_080502A4(FadeControl* ctl);
extern u32 gUsedPalettes;
typedef struct {
u8 unk0;
u8 unk1;
u16 unk2;
} struct_020354C0;
extern struct_020354C0 gUnk_020354C0[0x20];
extern u16 gPaletteBuffer[];
extern u16 gUnk_080FC3C4[];
+1 -1
View File
@@ -24,7 +24,7 @@
#include "subtask.h"
#include "ui.h"
#include "affine.h"
#include "structures.h"
#include "gfx.h"
// copy, erase, start
#define NUM_FILE_OPERATIONS 3
+1 -1
View File
@@ -12,7 +12,6 @@
#include "common.h"
#include "entity.h"
#include "fileselect.h"
#include "structures.h"
#include "main.h"
#include "manager/diggingCaveEntranceManager.h"
#include "message.h"
@@ -23,6 +22,7 @@
#include "sound.h"
#include "ui.h"
#include "beanstalkSubtask.h"
#include "pauseMenu.h"
// Game task
+2 -2
View File
@@ -23,7 +23,7 @@
#include "ui.h"
#include "subtask.h"
#include "beanstalkSubtask.h"
#include "structures.h"
#include "pauseMenu.h"
u32 StairsAreValid(void);
void ClearFlagArray(const u16*);
@@ -828,7 +828,7 @@ void sub_080533CC(void) {
*p2++ = *p1++;
*p2++ = *p1++;
*p2++ = *p1++;
gUsedPalettes |= 1 << 3;
USE_PALETTE(3);
}
void UpdateTimerCallbacks(void) {
-1
View File
@@ -10,7 +10,6 @@
#include "save.h"
#include "screen.h"
#include "sound.h"
#include "structures.h"
#include "ui.h"
#include "asm.h"
+1 -1
View File
@@ -1,4 +1,4 @@
#include "structures.h"
#include "pauseMenu.h"
#include "item.h"
#include "sound.h"
+1 -1
View File
@@ -2,7 +2,7 @@
#include "item.h"
#include "playeritem.h"
#include "sound.h"
#include "structures.h"
#include "ui.h"
#include "room.h"
u32 sub_08077F64(ItemBehavior* arg0, u32 index);
+1 -1
View File
@@ -1,6 +1,6 @@
#include "itemDefinitions.h"
#include "item.h"
#include "playeritem.h"
#include "structures.h"
const ItemDefinition gItemDefinitions[] = {
[ITEM_NONE] = { TRUE, 1, CREATE_ITEM_0, PLAYER_ITEM_NONE, 0, 0, FALSE, FALSE },
+1 -1
View File
@@ -16,7 +16,7 @@
#include "player.h"
#include "enemy.h"
#include "message.h"
#include "structures.h"
#include "ui.h"
const Wallet gWalletSizes[] = {
{ 100, 0xf060 },
-1
View File
@@ -12,7 +12,6 @@
#include "save.h"
#include "screen.h"
#include "sound.h"
#include "structures.h"
extern u32 gRand;
-1
View File
@@ -12,7 +12,6 @@
#include "scroll.h"
#include "tiles.h"
#ifndef EU
#include "structures.h"
#endif
void DiggingCaveEntranceManager_Main(DiggingCaveEntranceManager*);
+1 -1
View File
@@ -11,7 +11,7 @@
#include "game.h"
#include "message.h"
#include "screen.h"
#include "structures.h"
#include "vram.h"
const u16 gUnk_08108DE8[] = { 0, 0x70b, 0x70c, 0x70d, 0x70e, 0x70f, 0x710, 0x711, 0x712, 0x713, 0x714,
0x715, 0x716, 0x717, 0x718, 0x719, 0x71a, 0x71b, 0x71c, 0x71d, 0x71e, 0x71f,
+1 -1
View File
@@ -15,7 +15,7 @@
#include "game.h"
#include "manager/lightManager.h"
#include "assets/gfx_offsets.h"
#include "structures.h"
#include "gfx.h"
typedef enum {
HOLE_TRANSITION_ABSOLUTE,
@@ -8,7 +8,7 @@
#include "common.h"
#include "screen.h"
#include "game.h"
#include "structures.h"
#include "vram.h"
#include "room.h"
void sub_08057F20(HorizontalMinishPathBackgroundManager*);
-1
View File
@@ -12,7 +12,6 @@
#include "main.h"
#include "screen.h"
#include "game.h"
#include "structures.h"
#include "player.h"
#include "physics.h"
+1 -1
View File
@@ -8,7 +8,7 @@
#include "common.h"
#include "room.h"
#include "game.h"
#include "structures.h"
#include "vram.h"
void MinishRaftersBackgroundManager_OnEnterRoom(MinishRaftersBackgroundManager*);
void sub_08058210(MinishRaftersBackgroundManager*);
+2 -1
View File
@@ -10,7 +10,8 @@
#include "main.h"
#include "game.h"
#include "assets/gfx_offsets.h"
#include "structures.h"
#include "pauseMenu.h"
#include "gfx.h"
void MinishVillageTileSetManager_OnEnterRoom(void*);
bool32 MinishVillageTileSetManager_UpdateRoomGfxGroup(MinishVillageTileSetManager*);
+1 -1
View File
@@ -261,7 +261,7 @@ void RollingBarrelManager_OnEnterRoom(void) {
u32 tmp2;
LoadPaletteGroup(0x28);
MemCopy(gPaletteBuffer + 3 * 16, gPaletteBuffer + 21 * 16, 16 * 2);
gUsedPalettes |= 1 << 21;
USE_PALETTE(21);
LoadGfxGroup(0x16);
tmp = gScreen.lcd.displayControl;
tmp2 = 0;
-1
View File
@@ -10,7 +10,6 @@
#include "entity.h"
#include "flags.h"
#include "sound.h"
#include "structures.h"
void SecretManager_Type0_Action2(SecretManager*);
void SecretManager_Type0(SecretManager*);
+2 -1
View File
@@ -14,7 +14,8 @@
#include "screen.h"
#include "sound.h"
#include "game.h"
#include "structures.h"
#include "vram.h"
#include "pauseMenu.h"
static const u16 gUnk_081085B8[] = { 0x1008, 0x1007, 0x1006, 0x1005, 0x1006, 0x1007, 0x1008, 0x1009,
0x1008, 0x1007, 0x1006, 0x1005, 0x1006, 0x1007, 0x1008, 0x1009 };
-1
View File
@@ -7,7 +7,6 @@
#include "manager/vaati3InsideArmManager.h"
#include "screenTransitions.h"
#include "sound.h"
#include "structures.h"
void sub_0805DBF0(Vaati3InsideArmManager*);
void Vaati3InsideArmManager_Init(Vaati3InsideArmManager*);
-1
View File
@@ -15,7 +15,6 @@
#include "game.h"
#include "manager/staticBackgroundManager.h"
#include "player.h"
#include "structures.h"
void WeatherChangeManager_OnEnterRoom(WeatherChangeManager*);
void sub_08059608(WeatherChangeManager*);
+1 -1
View File
@@ -8,7 +8,6 @@
#include "common.h"
#include "flags.h"
#include "structures.h"
#include "game.h"
#include "main.h"
#include "menu.h"
@@ -23,6 +22,7 @@
#include "subtask.h"
#include "ui.h"
#include "affine.h"
#include "pauseMenu.h"
void sub_080A4DA8(u32);
void sub_080A4B44(void);
-1
View File
@@ -8,7 +8,6 @@
#include "common.h"
#include "enemy.h"
#include "flags.h"
#include "structures.h"
#include "kinstone.h"
#include "main.h"
#include "menu.h"
+1 -2
View File
@@ -17,7 +17,6 @@
#include "save.h"
#include "screen.h"
#include "sound.h"
#include "structures.h"
#include "subtask.h"
#include "ui.h"
#include "affine.h"
@@ -1074,7 +1073,7 @@ void PauseMenu_Screen_5(void) {
paletteColor = *gUnk_02017830;
MemCopy(gUnk_02017830 + 1, gUnk_02017830, 7 * 2);
gUnk_02017830[7] = paletteColor;
gUsedPalettes |= 1 << 12;
USE_PALETTE(12);
}
}
-1
View File
@@ -13,7 +13,6 @@
#include "save.h"
#include "screen.h"
#include "affine.h"
#include "structures.h"
typedef struct {
u8 unk0;
+1 -1
View File
@@ -6,7 +6,7 @@
#include "message.h"
#include "save.h"
#include "ui.h"
#include "structures.h"
#include "vram.h"
#define MESSAGE_ADVANCE_KEYS (A_BUTTON | B_BUTTON | DPAD_ANY | R_BUTTON)
#define MESSAGE_PRESS_ANY_ADVANCE_KEYS ((gInput.newKeys & MESSAGE_ADVANCE_KEYS) != 0)
-1
View File
@@ -11,7 +11,6 @@
#include "npc.h"
#include "room.h"
#include "script.h"
#include "structures.h"
typedef struct {
Rect customHitbox;
-1
View File
@@ -12,7 +12,6 @@
#include "save.h"
#include "script.h"
#include "asm.h"
#include "structures.h"
void sub_0806BFD8(Entity* this);
+1 -1
View File
@@ -10,7 +10,7 @@
#include "save.h"
#include "script.h"
#include "screen.h"
#include "structures.h"
#include "beanstalkSubtask.h"
#include "physics.h"
typedef struct {
-1
View File
@@ -13,7 +13,6 @@
#include "save.h"
#include "script.h"
#include "physics.h"
#include "structures.h"
typedef struct {
/*0x00*/ Entity base;
+1 -1
View File
@@ -8,7 +8,7 @@
#include "message.h"
#include "npc.h"
#include "player.h"
#include "structures.h"
#include "pauseMenu.h"
#include "room.h"
#include "physics.h"
-1
View File
@@ -6,7 +6,6 @@
*/
#include "entity.h"
#include "flags.h"
#include "structures.h"
#include "game.h"
#include "hitbox.h"
#include "item.h"
-1
View File
@@ -13,7 +13,6 @@
#include "asm.h"
#include "message.h"
#include "physics.h"
#include "structures.h"
typedef struct {
/*0x00*/ Entity base;
-1
View File
@@ -12,7 +12,6 @@
#include "message.h"
#include "script.h"
#include "asm.h"
#include "structures.h"
#include "room.h"
typedef struct {
-1
View File
@@ -11,7 +11,6 @@
#include "player.h"
#include "save.h"
#include "script.h"
#include "structures.h"
void SmallTownMinish(Entity* this) {
static const Hitbox gUnk_081142FC = { -2, 1, { 0, 0, 0, 0 }, 6, 6 };
-1
View File
@@ -13,7 +13,6 @@
#include "message.h"
#include "script.h"
#include "asm.h"
#include "structures.h"
typedef struct {
/*0x00*/ Entity base;
-1
View File
@@ -18,7 +18,6 @@
#include "save.h"
#include "subtask.h"
#ifndef EU
#include "structures.h"
#endif
#ifndef EU
-1
View File
@@ -14,7 +14,6 @@
#include "message.h"
#include "save.h"
#include "script.h"
#include "structures.h"
typedef struct {
/*0x00*/ Entity base;
+1 -1
View File
@@ -19,7 +19,7 @@
#include "object/cutsceneOrchestrator.h"
#include "save.h"
#include "subtask.h"
#include "structures.h"
#include "pauseMenu.h"
typedef struct {
/*0x00*/ Entity base;
-1
View File
@@ -10,7 +10,6 @@
#include "kinstone.h"
#include "message.h"
#include "vram.h"
#include "structures.h"
// typedef struct {
// Entity base;
+1 -1
View File
@@ -15,7 +15,7 @@
#include "screen.h"
#include "tiles.h"
#include "manager/lightManager.h"
#include "structures.h"
#include "pauseMenu.h"
#include "beanstalkSubtask.h"
typedef struct {
+1 -1
View File
@@ -11,7 +11,7 @@
#include "room.h"
#include "physics.h"
#include "player.h"
#include "structures.h"
#include "pauseMenu.h"
typedef struct {
/*0x00*/ Entity base;
+1 -1
View File
@@ -14,7 +14,7 @@
#include "physics.h"
#include "player.h"
#include "tiles.h"
#include "structures.h"
#include "ui.h"
typedef struct {
/*0x00*/ Entity base;
+1 -1
View File
@@ -13,7 +13,7 @@
#include "flags.h"
#include "physics.h"
#include "player.h"
#include "structures.h"
#include "gfx.h"
typedef struct {
/*0x00*/ Entity base;
+1 -1
View File
@@ -10,7 +10,7 @@
#include "message.h"
#include "scroll.h"
#include "asm.h"
#include "structures.h"
#include "ui.h"
#include "room.h"
#include "player.h"
+1 -1
View File
@@ -11,7 +11,7 @@
#include "player.h"
#include "object/linkAnimation.h"
#include "item.h"
#include "structures.h"
#include "pauseMenu.h"
typedef enum {
ITEMGET_INIT,
+1 -1
View File
@@ -9,7 +9,7 @@
#include "object.h"
#include "room.h"
#include "sound.h"
#include "structures.h"
#include "beanstalkSubtask.h"
void MacroMushroomStalk_Init(Entity*);
void MacroMushroomStalk_Action1(Entity*);
+1 -1
View File
@@ -11,7 +11,7 @@
#include "asm.h"
#include "physics.h"
#include "player.h"
#include "structures.h"
#include "beanstalkSubtask.h"
typedef struct {
Entity base;
-1
View File
@@ -10,7 +10,6 @@
#include "common.h"
#include "room.h"
#include "screen.h"
#include "structures.h"
typedef struct {
/*0x00*/ Entity base;
+1 -1
View File
@@ -14,7 +14,7 @@
#include "beanstalkSubtask.h"
#include "manager/lightManager.h"
#include "effects.h"
#include "structures.h"
#include "pauseMenu.h"
typedef struct {
/*0x00*/ Entity base;
-1
View File
@@ -6,7 +6,6 @@
*/
#include "effects.h"
#include "entity.h"
#include "structures.h"
#include "save.h"
#include "script.h"
#include "sound.h"
+1 -1
View File
@@ -5,7 +5,7 @@
#include "asm.h"
#include "effects.h"
#include "player.h"
#include "structures.h"
#include "pauseMenu.h"
#include "definitions.h"
#include "vram.h"
#include "object/linkAnimation.h"
+10 -10
View File
@@ -557,7 +557,7 @@ void sub_0806FEBC(Entity* ent, u32 param_2, Entity* param_3) {
*((u32*)ptr) = 0;
ptr->unk_04.WORD = 0;
ptr->unk_08.WORD = 0;
ptr->unk_0C = (u32)param_3;
ptr->unk_0C = param_3;
ptr->unk_00.unk0 = 1;
ptr->unk_00.unk1 = 1;
}
@@ -647,9 +647,9 @@ void sub_0807000C(Entity* this) {
}
static bool32 sub_0807007C(struct_gUnk_020000C0* this, u32 param_2) {
u8* ptr2;
u8* ptr3;
u32* spritePtr;
SpriteFrame* frames;
SpriteFrame* frame;
const SpritePtr* spritePtr;
struct_gUnk_020000C0_1* ptr1 = &this->unk_00[param_2];
if ((ptr1->unk_00.unk3) == 0)
return 0;
@@ -658,14 +658,14 @@ static bool32 sub_0807007C(struct_gUnk_020000C0* this, u32 param_2) {
if (ptr1->unk_01 == 0xff)
return 0;
spritePtr = &((u32*)gSpritePtrs)[ptr1->unk_02 * 4];
ptr2 = (u8*)(spritePtr[1]);
if (ptr2 == 0)
spritePtr = &gSpritePtrs[ptr1->unk_02];
frames = spritePtr->frames;
if (frames == 0)
return 0;
ptr3 = &ptr2[ptr1->unk_01 * 4];
ptr1->unk_08.BYTES.byte1 = *ptr3;
ptr1->unk_0C = spritePtr[2] + ((*(u16*)&ptr3[2]) << 5);
frame = &frames[ptr1->unk_01];
ptr1->unk_08.BYTES.byte1 = frame->numTiles;
ptr1->unk_0C = spritePtr->ptr + (frame->firstTileIndex << 5);
return 1;
}
+2 -1
View File
@@ -29,7 +29,8 @@
#include "scroll.h"
#include "sound.h"
#include "tiles.h"
#include "structures.h"
#include "ui.h"
#include "pauseMenu.h"
#define kGravityRate Q_8_8(32)
#define kWalkSpeedSlopeSubtractor Q_8_8(0.3125)
+1 -1
View File
@@ -8,7 +8,7 @@
#include "entity.h"
#include "save.h"
#include "sound.h"
#include "structures.h"
#include "pauseMenu.h"
#include "vram.h"
#include "asm.h"
+9 -7
View File
@@ -26,6 +26,8 @@
#include "tileMap.h"
#include "tiles.h"
#include "backgroundAnimations.h"
#include "itemDefinitions.h"
#include "ui.h"
static void sub_08077E54(ItemBehavior* this);
@@ -3817,18 +3819,18 @@ void LoadRoomTileSet(void) {
MemFill16(0xffff, gMapTop.tileTypes, 0x1000);
gMapTop.tileTypes[0] = 0;
if ((void*)gRoomControls.tileSet != (gArea.pCurrentRoomInfo)->tileSet) {
gRoomControls.tileSet = (u32)(gArea.pCurrentRoomInfo)->tileSet;
LoadMapData((gArea.pCurrentRoomInfo)->tileSet);
if ((void*)gRoomControls.tileSet != gArea.pCurrentRoomInfo->tileSet) {
gRoomControls.tileSet = (u32)gArea.pCurrentRoomInfo->tileSet;
LoadMapData(gArea.pCurrentRoomInfo->tileSet);
}
LoadMapData((gArea.pCurrentRoomInfo)->tiles);
LoadMapData(gArea.pCurrentRoomInfo->tiles);
paletteBuffer = gPaletteBuffer;
MemCopy(&paletteBuffer[0x30], &paletteBuffer[0x150], 0x20);
gUsedPalettes |= 0x200000;
USE_PALETTE(21);
if ((gArea.pCurrentRoomInfo)->bg_anim != NULL) {
LoadBgAnimations((gArea.pCurrentRoomInfo)->bg_anim);
if (gArea.pCurrentRoomInfo->bg_anim != NULL) {
LoadBgAnimations(gArea.pCurrentRoomInfo->bg_anim);
}
tileTypes = gMapBottom.tileTypes;
+1 -1
View File
@@ -19,7 +19,7 @@
#include "ui.h"
#include "save.h"
#include "subtask.h"
#include "structures.h"
#include "pauseMenu.h"
void InitScriptExecutionContext(ScriptExecutionContext* context, Script* script);
void sub_0807DE80(Entity*);
-1
View File
@@ -16,7 +16,6 @@
#include "physics.h"
#include "player.h"
#include "screen.h"
#include "structures.h"
#include "tileMap.h"
#include "tiles.h"
+17 -1
View File
@@ -15,7 +15,6 @@
#include "screen.h"
#include "subtask.h"
#include "sound.h"
#include "structures.h"
typedef struct {
/*0x00*/ Menu base;
@@ -32,6 +31,23 @@ typedef struct {
} StaffrollMenu;
#define gStaffrollMenu (*(StaffrollMenu*)&gMenu)
typedef struct {
/*0x0*/ u8 menuType;
/*0x1*/ u16 font;
/*0x3*/ u8 unk_3; // TODO padding?
/*0x4*/ u16 transitionTimer;
/*0x6*/ u16 gfxEntry;
/*0x8*/ u16 bg2XOffset;
/*0xa*/ u16 sm_unk_14;
} PACKED StaffrollEntry;
static_assert(sizeof(StaffrollEntry) == 0xc);
typedef struct {
u8 paletteGroup;
u8 gfxGroup;
} PACKED StaffrollGfxEntry;
const Font gUnk_08127280 = {
&gBG1Buffer[0x21], BG_TILE_ADDR(0x188), gTextGfxBuffer, 0, 61472, 240, 0, 0, 0, 0, 0, 5, 0, 1, 0
};
+1 -1
View File
@@ -10,7 +10,7 @@
#include "ui.h"
#include "windcrest.h"
#include "affine.h"
#include "structures.h"
#include "beanstalkSubtask.h"
extern Screen gUnk_03001020;
extern u8 gPaletteBufferBackup[];
-1
View File
@@ -6,7 +6,6 @@
#include "area.h"
#include "asm.h"
#include "common.h"
#include "structures.h"
#include "game.h"
#include "main.h"
#include "menu.h"
+1 -1
View File
@@ -12,7 +12,7 @@
#include "save.h"
#include "affine.h"
#include "asm.h"
#include "structures.h"
#include "pauseMenu.h"
extern void (*const Subtask_FastTravel_Functions[])(void);
void sub_080A6E70(void);
+1 -1
View File
@@ -12,7 +12,7 @@
#include "sound.h"
#include "common.h"
#include "affine.h"
#include "structures.h"
#include "vram.h"
void Subtask_LocalMapHint() {
extern void (*const gUnk_08128F1C[])(void);
-1
View File
@@ -1,6 +1,5 @@
#include "global.h"
#include "common.h"
#include "structures.h"
#include "asm.h"
#include "enemy.h"
#include "message.h"
-1
View File
@@ -14,7 +14,6 @@
#include "room.h"
#include "player.h"
#include "message.h"
#include "structures.h"
#include "save.h"
#include "game.h"
#include "affine.h"
+3 -1
View File
@@ -1,3 +1,4 @@
#include "ui.h"
#include "area.h"
#include "common.h"
#include "game.h"
@@ -9,6 +10,7 @@
#include "screen.h"
#include "sound.h"
#include "affine.h"
#include "vram.h"
#include "structures.h"
extern void sub_0805ECEC(u32, u32, u32, u32);
@@ -609,7 +611,7 @@ void sub_0801CAFC(UIElement* element, u32 frameIndex) {
void sub_0801CB20(UIElement* element, UIElementDefinition* definition) {
if (definition->unk_e == 0) {
SpritePtr* ptr = &gSpritePtrs[definition->spriteIndex];
const SpritePtr* ptr = &gSpritePtrs[definition->spriteIndex];
SpriteFrame* frame = &ptr->frames[element->frameIndex];
u32* firstTile = (u32*)(ptr->ptr + frame->firstTileIndex * 0x20);
u8 numTiles = frame->numTiles;
+1 -1
View File
@@ -1,7 +1,7 @@
#include "common.h"
#include "fileselect.h"
#include "vram.h"
#include "structures.h"
#include "gfx.h"
extern u32 gFixedTypeGfxData[];