mirror of
https://github.com/FireEmblemUniverse/fireemblem8u.git
synced 2024-11-23 05:10:00 +00:00
review on worldmap
This commit is contained in:
parent
8812c95b0a
commit
308d75a3fa
12
asm/spline.s
12
asm/spline.s
@ -2573,8 +2573,8 @@ _0800B7D0:
|
||||
|
||||
THUMB_FUNC_END sub_800B764
|
||||
|
||||
THUMB_FUNC_START sub_800B7E0
|
||||
sub_800B7E0: @ 0x0800B7E0
|
||||
THUMB_FUNC_START _DivArm1
|
||||
_DivArm1: @ 0x0800B7E0
|
||||
push {r4, r5, r6, r7, lr}
|
||||
adds r5, r1, #0
|
||||
adds r6, r2, #0
|
||||
@ -2630,10 +2630,10 @@ _0800B846:
|
||||
pop {r1}
|
||||
bx r1
|
||||
|
||||
THUMB_FUNC_END sub_800B7E0
|
||||
THUMB_FUNC_END _DivArm1
|
||||
|
||||
THUMB_FUNC_START sub_800B84C
|
||||
sub_800B84C: @ 0x0800B84C
|
||||
THUMB_FUNC_START _DivArm2
|
||||
_DivArm2: @ 0x0800B84C
|
||||
push {r4, r5, r6, r7, lr}
|
||||
mov r7, r8
|
||||
push {r7}
|
||||
@ -2733,4 +2733,4 @@ _0800B906:
|
||||
pop {r4, r5, r6, r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
THUMB_FUNC_END sub_800B84C
|
||||
THUMB_FUNC_END _DivArm2
|
||||
|
@ -35,7 +35,7 @@ enum
|
||||
#define FACE_DISP_BLEND (1 << 10)
|
||||
#define FACE_DISP_BIT_12 (1 << 12)
|
||||
#define FACE_DISP_BIT_13 (1 << 13)
|
||||
#define FACE_DISP_BIT_14 (1 << 14)
|
||||
#define FACE_DISP_HIDDEN (1 << 14)
|
||||
|
||||
struct FaceBlinkProc;
|
||||
|
||||
@ -152,7 +152,7 @@ void sub_80066A8(struct UnkFaceProc* proc);
|
||||
void sub_80066E0(struct FaceProc* parent, int fid);
|
||||
void sub_80066FC(int offset, int fid);
|
||||
void sub_800671C(int pal, int fid);
|
||||
void sub_8006738(u16* a, u16 b, s8 c);
|
||||
void PutFaceOnBackGround(u16* a, u16 b, s8 c);
|
||||
|
||||
extern const struct FaceData portrait_data[];
|
||||
extern struct FaceProc* gFaces[];
|
||||
|
@ -103,19 +103,19 @@ struct ProcFindIterator
|
||||
enum
|
||||
{
|
||||
PROC_MARK_0 = 0x00,
|
||||
PROC_MARK_1 = 0x01,
|
||||
PROC_MARK_2 = 0x02,
|
||||
PROC_MARK_3 = 0x03,
|
||||
PROC_MARK_MU = 0x04,
|
||||
PROC_MARK_5 = 0x05,
|
||||
PROC_MARK_6 = 0x06,
|
||||
PROC_MARK_7 = 0x07,
|
||||
PROC_MARK_8 = 0x08,
|
||||
|
||||
PROC_MARK_A = 0x0A,
|
||||
PROC_MARK_B = 0x0B,
|
||||
PROC_MARK_C = 0x0C,
|
||||
PROC_MARK_D = 0x0D,
|
||||
PROC_MARK_DISP,
|
||||
PROC_MARK_MAIN,
|
||||
PROC_MARK_3,
|
||||
PROC_MARK_MU,
|
||||
PROC_MARK_TALK,
|
||||
PROC_MARK_EVENT,
|
||||
PROC_MARK_EVENT_ANIM,
|
||||
PROC_MARK_WMSTUFF,
|
||||
PROC_MARK_9,
|
||||
PROC_MARK_EFX_BGCOL,
|
||||
PROC_MARK_GAMECTRL,
|
||||
PROC_MARK_SAVEDRAW,
|
||||
PROC_MARK_D,
|
||||
};
|
||||
|
||||
#define PROC_TREE_VSYNC ((ProcPtr) 0)
|
||||
|
@ -33,7 +33,7 @@ void sub_800A950(struct Struct02003BE8 *, int, int *);
|
||||
// ??? sub_800B388(???);
|
||||
// ??? sub_800B574(???);
|
||||
// ??? sub_800B764(???);
|
||||
int sub_800B7E0(int, int, int);
|
||||
int sub_800B84C(int, int, int);
|
||||
int _DivArm1(int, int, int);
|
||||
int _DivArm2(int, int, int);
|
||||
|
||||
#endif // GUARD_SPLINE_H
|
@ -48,8 +48,8 @@ enum {
|
||||
// extern ??? gGameOptions
|
||||
// extern ??? gProcScr_RedrawConfigHelpText
|
||||
// extern ??? gProcScr_DrawConfigUiSprites
|
||||
extern struct ProcCmd CONST_DATA gProcScr_Config1[];
|
||||
extern struct ProcCmd CONST_DATA gProcScr_Config2[];
|
||||
extern struct ProcCmd CONST_DATA gProcScr_Config3[];
|
||||
extern struct ProcCmd CONST_DATA ProcScr_Config1[];
|
||||
extern struct ProcCmd CONST_DATA ProcScr_Config2[];
|
||||
extern struct ProcCmd CONST_DATA ProcScr_Config3[];
|
||||
|
||||
#endif // GUARD_UI_CONFIG_H
|
||||
|
@ -109,7 +109,7 @@ struct GmNodeIconDisplayProc
|
||||
/* 30 */ u8 pal;
|
||||
/* 31 */ u8 unk_31;
|
||||
/* 32 */ u8 skip : 1;
|
||||
/* 32 */ u8 unk_32_1 : 1;
|
||||
/* 32 */ u8 merge_next_node : 1;
|
||||
/* 33 */ u8 nodeId;
|
||||
/* 34 */ u32 unk_34[1];
|
||||
/* 38 */ struct APHandle * ap;
|
||||
@ -144,7 +144,7 @@ struct GMapUnitProc
|
||||
struct GMapUnitContainerProc
|
||||
{
|
||||
/* 00 */ PROC_HEADER;
|
||||
/* 2C */ int unk_2c;
|
||||
/* 2C */ int layer;
|
||||
/* 30 */ u8 unk_30;
|
||||
/* 34 */ struct GMapUnitProc * pMapUnitProcs[7];
|
||||
};
|
||||
@ -274,9 +274,9 @@ struct WorldMapMainProc
|
||||
/* 29 */ u8 flags_6 : 1;
|
||||
/* 29 */ u8 flags_7 : 1;
|
||||
|
||||
/* 2A */ s8 unk_2a;
|
||||
/* 2A */ s8 delay_timer;
|
||||
/* 2C */ int timer;
|
||||
/* 30 */ int unk_30;
|
||||
/* 30 */ int scrolling;
|
||||
/* 34 */ STRUCT_PAD(0x34, 0x3a);
|
||||
|
||||
/* 3A */ u16 unk_3a;
|
||||
@ -286,19 +286,19 @@ struct WorldMapMainProc
|
||||
/* 40 */ s8 unk_40;
|
||||
/* 41 */ s8 unk_41;
|
||||
/* 44 */ struct GmScreenProc * gm_screen; // GmapScreen
|
||||
/* 48 */ struct GmNodeIconDisplayProc * unk_48; // GmNodeIconDisplay
|
||||
/* 4C */ struct GMapUnitContainerProc * unk_4c; // Gmap Unit Container
|
||||
/* 50 */ struct GmapCursorProc * unk_50; // Gmap Cursor
|
||||
/* 54 */ ProcPtr unk_54; // Gmap MU
|
||||
/* 48 */ struct GmNodeIconDisplayProc * gm_icon; // GmNodeIconDisplay
|
||||
/* 4C */ struct GMapUnitContainerProc * gm_unitc; // Gmap Unit Container
|
||||
/* 50 */ struct GmapCursorProc * gm_cursor; // Gmap Cursor
|
||||
/* 54 */ ProcPtr gm_mu; // Gmap MU
|
||||
};
|
||||
|
||||
#define GM_MAIN ((struct WorldMapMainProc *)Proc_Find(ProcScr_WorldMapMain))
|
||||
|
||||
#define GM_SCREEN (GM_MAIN->gm_screen)
|
||||
#define GM_ICON (GM_MAIN->unk_48)
|
||||
#define GM_UNITC (GM_MAIN->unk_4c)
|
||||
#define GM_CURSOR (GM_MAIN->unk_50)
|
||||
#define GM_MU (GM_MAIN->unk_54)
|
||||
#define GM_ICON (GM_MAIN->gm_icon)
|
||||
#define GM_UNITC (GM_MAIN->gm_unitc)
|
||||
#define GM_CURSOR (GM_MAIN->gm_cursor)
|
||||
#define GM_MU (GM_MAIN->gm_mu)
|
||||
|
||||
struct GMapMovementPathData
|
||||
{
|
||||
@ -431,11 +431,22 @@ union GMStateBits {
|
||||
u8 state_2 : 1;
|
||||
u8 state_3 : 1;
|
||||
u8 state_4_5 : 2;
|
||||
u8 state_6 : 1;
|
||||
u8 state_7 : 1;
|
||||
u8 skip_wm : 1;
|
||||
u8 no_fade : 1;
|
||||
} __attribute__((packed)) bits;
|
||||
} __attribute__((packed));
|
||||
|
||||
enum gm_state_bits {
|
||||
GM_STATE_0 = 1 << 0,
|
||||
GM_STATE_MONSGEN = 1 << 1,
|
||||
GM_STATE_2 = 1 << 2,
|
||||
GM_STATE_3 = 1 << 3,
|
||||
GM_STATE_4 = 1 << 4,
|
||||
GM_STATE_5 = 1 << 5,
|
||||
GM_STATE_SKIPPED = 1 << 6,
|
||||
GM_STATE_NOFADE = 1 << 7,
|
||||
};
|
||||
|
||||
struct OpenPaths {
|
||||
s8 openPaths[0x20];
|
||||
s8 openPathsLength;
|
||||
@ -444,7 +455,7 @@ struct OpenPaths {
|
||||
struct GMapData
|
||||
{
|
||||
/* 00 */ union GMStateBits state;
|
||||
/* 01 */ u8 unk01;
|
||||
/* 01 */ u8 sprite_disp;
|
||||
/* 02 */ short xCamera, yCamera;
|
||||
/* 08 */ int ix, iy;
|
||||
/* 10 */ struct GMUnit units[8];
|
||||
@ -534,14 +545,38 @@ bool GmapSugoAdvance(s16 x, s16 y, s16 * outx, s16 * outy);
|
||||
void NewGmapSogu(int, int);
|
||||
bool GmapSoguExists(void);
|
||||
|
||||
// ??? WorldMapFaceHolder_Init(???);
|
||||
struct WMFaceWrapper {
|
||||
/* 00 */ s16 x, y;
|
||||
/* 04 */ struct FaceProc * faceProc;
|
||||
/* 08 */ u16 faceId;
|
||||
/* 0A */ s8 unk_0a; // possibly "fade direction" (+1 for fade in, -1 for fade out?)
|
||||
};
|
||||
|
||||
struct WMFaceHolderProc {
|
||||
/* 00 */ PROC_HEADER;
|
||||
/* 2C */ struct WMFaceWrapper faceWrapper[2];
|
||||
};
|
||||
|
||||
struct WMFaceCtrlProc {
|
||||
/* 00 */ PROC_HEADER;
|
||||
|
||||
/* 2A */ u16 timer; // some index into an array, functionality appears to be unused
|
||||
/* 2C */ struct WMFaceHolderProc * faceHolderProc;
|
||||
/* 30 */ s8 increment;
|
||||
/* 31 */ u8 blendAmt;
|
||||
/* 32 */ u8 unk_32; // unreferenced
|
||||
/* 33 */ u8 unk_33; // initialized to 0 and unused
|
||||
/* 34 */ u8 unk_34; // initialized to 0 and unused
|
||||
};
|
||||
|
||||
void WorldMapFaceHolder_Init(struct WMFaceHolderProc * proc);
|
||||
// ??? WMFaceCtrl_Init(???);
|
||||
// ??? sub_80B826C(???);
|
||||
// ??? GetWMFaceBg(???);
|
||||
// ??? GetWMFaceVramOffset(???);
|
||||
// ??? sub_80B82C8(???);
|
||||
// ??? HandleWMFaceFade(???);
|
||||
// ??? sub_80B843C(???);
|
||||
// ??? WMFaceCtrl_LoopExt(???);
|
||||
// ??? WMFaceCtrl_Loop(???);
|
||||
// ??? nullsub_57(???);
|
||||
ProcPtr StartWMFaceCtrl(ProcPtr parent);
|
||||
@ -549,7 +584,7 @@ void EndWMFaceCtrl(void);
|
||||
int GetWMFaceBlendAmt(void);
|
||||
void WmDrawFace(int faceSlot, int faceId, u16 config);
|
||||
void WmClearFace(int faceSlot, u16 config);
|
||||
void sub_80B895C(void);
|
||||
void HideWmFace(void);
|
||||
void WorldMap_Destruct(struct WorldMapMainProc * proc);
|
||||
void sub_80B8A7C(struct WorldMapMainProc * proc);
|
||||
void sub_80B8B3C(struct WorldMapMainProc * proc);
|
||||
@ -565,21 +600,21 @@ void sub_80B8FD4(void);
|
||||
// ??? sub_80B9028(???);
|
||||
// ??? sub_80B90CC(???);
|
||||
// ??? sub_80B9114(???);
|
||||
void sub_80B9154(struct WorldMapMainProc * proc);
|
||||
void sub_80B9218(ProcPtr);
|
||||
void WorldMap_Init(struct WorldMapMainProc * proc);
|
||||
void WmMain_MoveCamera(ProcPtr);
|
||||
s8 sub_80B92D0(struct WorldMapMainProc *, int);
|
||||
void sub_80B93E0(struct WorldMapMainProc *);
|
||||
void WmMain_MoveCursor(struct WorldMapMainProc *);
|
||||
// ??? sub_80B955C(???);
|
||||
int sub_80B95B0(void);
|
||||
// ??? sub_80B961C(???);
|
||||
void sub_80B96DC(ProcPtr proc);
|
||||
// ??? sub_80B96F8(???);
|
||||
// ??? WorldMap_LoopExt(???);
|
||||
void sub_80B97F8(void);
|
||||
void sub_80B9804(ProcPtr proc);
|
||||
void WorldMap_Loop(ProcPtr proc);
|
||||
void sub_80B9810(ProcPtr);
|
||||
void sub_80B9820(ProcPtr proc);
|
||||
void sub_80B982C(struct WorldMapMainProc * proc);
|
||||
s8 sub_80B987C(ProcPtr proc);
|
||||
s8 WorldMap_CallGuide(ProcPtr proc);
|
||||
void sub_80B989C(void);
|
||||
void sub_80B98A8(struct WorldMapMainProc * proc);
|
||||
s8 sub_80B98F8(ProcPtr proc);
|
||||
@ -595,8 +630,8 @@ void sub_80B9A58(struct WorldMapMainProc * proc);
|
||||
void Worldmap_WaitForSkirmishAnim(ProcPtr proc);
|
||||
void sub_80B9AB0(void);
|
||||
void sub_80B9AEC(struct WorldMapMainProc * proc);
|
||||
void WorldMap_InitChapterTransition(struct WorldMapMainProc * proc);
|
||||
void sub_80B9BA4(struct WorldMapMainProc * proc);
|
||||
void WorldMap_CallIntroEvent(struct WorldMapMainProc * proc);
|
||||
void WorldMap_PostBeginningEvent(struct WorldMapMainProc * proc);
|
||||
void WorldMap_WaitForChapterIntroEvents(ProcPtr proc);
|
||||
void WorldMap_SetMonsterMergedState(void);
|
||||
void WorldMap_GenerateRandomMonsters(ProcPtr proc);
|
||||
@ -624,7 +659,7 @@ void WmMergeFace(int timerMaybe, u8 b, int faceSlot, int fid, int e, int f, int
|
||||
// ??? sub_80BA1F4(???);
|
||||
// ??? sub_80BA288(???);
|
||||
// ??? NewWorldMap(???);
|
||||
void WorldMap_SetupChapterStuff(struct WorldMapMainProc * proc);
|
||||
void WorldMap_CallBeginningEvent(struct WorldMapMainProc * proc);
|
||||
void CallChapterWMIntroEvents(ProcPtr);
|
||||
void sub_80BA424(void); // gmap something
|
||||
// ??? sub_80BA458(???);
|
||||
@ -701,7 +736,7 @@ void UnskipGmNodeIconDisplay(struct GmNodeIconDisplayProc * proc);
|
||||
// ??? GmapScreen2_Init(???);
|
||||
// ??? sub_80BB744(???);
|
||||
// ??? GmapScreen2_Loop(???);
|
||||
ProcPtr sub_80BB9A4(ProcPtr, int, int, int, ProcPtr);
|
||||
ProcPtr StartGmNodeIconDisplay(ProcPtr, int, int, int, ProcPtr);
|
||||
const char* GetWorldMapNodeName(u32);
|
||||
int sub_80BBA4C(int nodeId);
|
||||
// ??? nullsub_59(???);
|
||||
@ -877,19 +912,58 @@ void sub_80BE5B4(int, int);
|
||||
// ??? StartWorldMapPlayerInterface(???);
|
||||
ProcPtr sub_80BF13C(ProcPtr);
|
||||
void sub_80BF15C(void);
|
||||
// ??? GmMoveCursor_OnEnd(???);
|
||||
// ??? GmMoveCursor_OnInit(???);
|
||||
// ??? GmMoveCursor_OnLoop(???);
|
||||
|
||||
struct GMapMoveCursorProc {
|
||||
PROC_HEADER;
|
||||
|
||||
/* 2A */ s16 duration;
|
||||
/* 2C */ s16 timer;
|
||||
/* 30 */ int xsrc, ysrc;
|
||||
/* 38 */ int xdst, ydst;
|
||||
/* 40 */ u8 move_type;
|
||||
|
||||
STRUCT_PAD(0x41, 0x44);
|
||||
|
||||
/* 44 */ int xmove, ymove;
|
||||
};
|
||||
|
||||
struct GmScrollInfo {
|
||||
/* 00 */ int * flags;
|
||||
/* 04 */ int lock;
|
||||
/* 08 */ s16 move_type;
|
||||
/* 0A */ s16 xsrc, ysrc;
|
||||
/* 0E */ s16 xdst, ydst;
|
||||
/* 14 */ int duration;
|
||||
/* 18 */ s16 delay;
|
||||
};
|
||||
|
||||
void GmMoveCursor_OnEnd(struct GMapMoveCursorProc * proc);
|
||||
void GmMoveCursor_OnInit(struct GMapMoveCursorProc * proc);
|
||||
void GmMoveCursor_OnLoop(struct GMapMoveCursorProc * proc);
|
||||
ProcPtr StartGmMoveCursor(struct Vec2 * posA, struct Vec2 * posB, int c, int d, ProcPtr parent);
|
||||
s8 GmMoveCursorExists(void);
|
||||
// ??? GmScrollManage_OnEnd(???);
|
||||
// ??? GmScrollManage_OnInit(???);
|
||||
// ??? GmScrollManage_OnLoop(???);
|
||||
// ??? StartGmScrollManage(???);
|
||||
// s8 FindGmScrollManage(void);
|
||||
|
||||
struct GMapScrollManageProc {
|
||||
PROC_HEADER;
|
||||
|
||||
/* 2C */ int * wm_flag;
|
||||
/* 30 */ int lock;
|
||||
/* 34 */ s16 move_type;
|
||||
/* 36 */ s16 xsrc, ysrc;
|
||||
/* 3A */ s16 xdst, ydst;
|
||||
/* 40 */ int duration;
|
||||
/* 44 */ int timer;
|
||||
/* 48 */ s16 delay;
|
||||
};
|
||||
void GmScrollManage_OnEnd(struct GMapScrollManageProc * proc);
|
||||
void GmScrollManage_OnInit(struct GMapScrollManageProc * proc);
|
||||
void GmScrollManage_OnLoop(struct GMapScrollManageProc * proc);
|
||||
ProcPtr StartGmScrollManage(struct GmScrollInfo * input, ProcPtr parent);
|
||||
// ProcPtr GmScrollManageExist(void);
|
||||
void StartGmScroll(s16 xStart, s16 yStart, s16 xEnd, s16 yEnd, s16 speed, s16 delay);
|
||||
// ??? sub_80BF490(???);
|
||||
bool CheckGmScrolling(void);
|
||||
void EndGmScroll(void);
|
||||
|
||||
void SetGmClassUnit(int, int, int, int);
|
||||
void SetGmCharUnit(int, int, int, int);
|
||||
void RemoveGmUnit(int);
|
||||
@ -1290,22 +1364,22 @@ extern u8 gUnknown_0201C5D0;
|
||||
extern u8 gUnknown_0201C5D1;
|
||||
// extern ??? gUnknown_0201C5D4
|
||||
|
||||
// extern ??? gProcScr_WorldMapFaceHolder
|
||||
// extern ??? gProcScr_WorldMapFaceCtrl
|
||||
extern struct ProcCmd CONST_DATA ProcScr_WorldMapFaceHolder[];
|
||||
// extern ??? ProcScr_WorldMapFaceCtrl
|
||||
// extern ??? gUnknown_08A3D728
|
||||
// extern ??? ProcScr_WorldMapMain
|
||||
// extern ??? gProcScr_08A3DD08
|
||||
// extern ??? gProcScr_08A3DD20
|
||||
// extern ??? gProcScr_08A3DD38
|
||||
// extern ??? ProcScr_08A3DD08
|
||||
// extern ??? ProcScr_08A3DD20
|
||||
// extern ??? ProcScr_08A3DD38
|
||||
// extern ??? gWMSongTable
|
||||
// extern ??? gProcScr_GMapScreenVSync
|
||||
// extern ??? gProcScr_GMapScreen
|
||||
// extern ??? gProcScr_GmapUnit
|
||||
// extern ??? gProcScr_GmapUnitContainer
|
||||
// extern ??? gProcScr_GmapUnitFade
|
||||
extern struct ProcCmd gProcScr_GmNodeIconDisplay[];
|
||||
// extern ??? gProcScr_GmapCursor
|
||||
// extern ??? gProcScr_GMapRoute
|
||||
// extern ??? ProcScr_GMapScreenVSync
|
||||
// extern ??? ProcScr_GMapScreen
|
||||
// extern ??? ProcScr_GmapUnit
|
||||
// extern ??? ProcScr_GmapUnitContainer
|
||||
// extern ??? ProcScr_GmapUnitFade
|
||||
extern struct ProcCmd ProcScr_GmNodeIconDisplay[];
|
||||
// extern ??? ProcScr_GmapCursor
|
||||
// extern ??? ProcScr_GMapRoute
|
||||
// extern ??? gMenu_WMGeneralMenu
|
||||
// extern ??? gMenuRect_WMGeneralMenuRect
|
||||
// extern ??? gMenu_WMNodeMenu
|
||||
@ -1313,8 +1387,8 @@ extern struct ProcCmd gProcScr_GmNodeIconDisplay[];
|
||||
// extern ??? gMenuRect_WMNodeMenuRectB
|
||||
// extern ??? gUnknown_08A3E22C
|
||||
// extern ??? gUnknown_08A3E23C
|
||||
// extern ??? gProcScr_GMapMuPrim
|
||||
// extern ??? gProcScr_GMapMu
|
||||
// extern ??? ProcScr_GMapMuPrim
|
||||
// extern ??? ProcScr_GMapMu
|
||||
// extern ??? gGMapMuSpriteLayerLut
|
||||
// extern ??? gUnknown_08A3E2F8
|
||||
// extern ??? gUnknown_08A3E31C
|
||||
@ -1324,20 +1398,20 @@ extern struct ProcCmd gProcScr_GmNodeIconDisplay[];
|
||||
// extern ??? gUnknown_08A3E412
|
||||
// extern ??? gUnknown_08A3E448
|
||||
// extern ??? gUnknown_08A3E4D4
|
||||
// extern ??? gProcScr_GmMoveCursor
|
||||
// extern ??? gProcScr_GmScrollManage
|
||||
// extern ??? gProcScr_GmapPalFade
|
||||
// extern ??? gProcScr_GmapBaseEntry
|
||||
// extern ??? gProcScr_GmapMuEntry1
|
||||
// extern ??? gProcScr_GmapMuEntry2
|
||||
// extern ??? gProcScr_GmapLineFade
|
||||
// extern ??? gProcScr_GmapTmConfront
|
||||
// extern ??? ProcScr_GmMoveCursor
|
||||
// extern ??? ProcScr_GmScrollManage
|
||||
// extern ??? ProcScr_GmapPalFade
|
||||
// extern ??? ProcScr_GmapBaseEntry
|
||||
// extern ??? ProcScr_GmapMuEntry1
|
||||
// extern ??? ProcScr_GmapMuEntry2
|
||||
// extern ??? ProcScr_GmapLineFade
|
||||
// extern ??? ProcScr_GmapTmConfront
|
||||
// extern ??? gHelpInfo_WorldmapStatus
|
||||
// extern ??? gBgConfig_WorldmapStatus
|
||||
extern struct ProcCmd gProcScr_WorldmapStatusUi[];
|
||||
extern struct ProcCmd ProcScr_WorldmapStatusUi[];
|
||||
// extern ??? gUnknown_08A3E9A0
|
||||
extern struct ProcCmd gProcScr_GmapEffectPal[];
|
||||
extern struct ProcCmd gProcScr_GmapEffect[];
|
||||
extern struct ProcCmd ProcScr_GmapEffectPal[];
|
||||
extern struct ProcCmd ProcScr_GmapEffect[];
|
||||
extern struct ProcCmd ProcScr_GmapSogu[];
|
||||
extern struct ProcCmd ProcScr_GmapTimeMons[];
|
||||
extern struct ProcCmd ProcScr_GmapRmUpdateDirect[];
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
CONST_DATA struct ProcCmd ProcScr_efxFlashBG[] = {
|
||||
PROC_NAME("efxFlashBG"),
|
||||
PROC_MARK(PROC_MARK_A),
|
||||
PROC_MARK(PROC_MARK_EFX_BGCOL),
|
||||
PROC_REPEAT(EfxFlashBgMain),
|
||||
PROC_REPEAT(EfxFlashRestorePalSync),
|
||||
PROC_END
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
CONST_DATA struct ProcCmd ProcScr_efxWeaponIcon[] = {
|
||||
PROC_NAME("efxWeaponIcon"),
|
||||
PROC_MARK(0xA),
|
||||
PROC_MARK(PROC_MARK_EFX_BGCOL),
|
||||
PROC_SET_END_CB(sub_8054F78),
|
||||
PROC_REPEAT(sub_8054F10),
|
||||
PROC_END
|
||||
@ -114,7 +114,7 @@ void sub_8054F78(struct ProcEfxWeaponIcon *proc)
|
||||
|
||||
CONST_DATA struct ProcCmd ProcScr_efxSpellCast[] = {
|
||||
PROC_NAME("efxSpellCast"),
|
||||
PROC_MARK(0xA),
|
||||
PROC_MARK(PROC_MARK_EFX_BGCOL),
|
||||
PROC_REPEAT(sub_8055038),
|
||||
PROC_REPEAT(sub_805509C),
|
||||
PROC_REPEAT(sub_80550DC),
|
||||
|
@ -12,7 +12,7 @@
|
||||
// TODO: move elsewhere
|
||||
CONST_DATA struct ProcCmd ProcScr_efxFlashHPBar[] = {
|
||||
PROC_NAME("efxFlashHPBar"),
|
||||
PROC_MARK(PROC_MARK_A),
|
||||
PROC_MARK(PROC_MARK_EFX_BGCOL),
|
||||
PROC_REPEAT(EfxFlashHPBarDelay),
|
||||
PROC_REPEAT(EfxFlashHPBarMain1),
|
||||
PROC_REPEAT(EfxFlashHPBarRestorePal),
|
||||
@ -90,7 +90,7 @@ void EfxFlashHPBarRestorePal(struct ProcEfxFlashing * proc)
|
||||
|
||||
CONST_DATA struct ProcCmd ProcScr_efxHPBarColorChange[] = {
|
||||
PROC_NAME("efxHPBarColorChange"),
|
||||
PROC_MARK(PROC_MARK_A),
|
||||
PROC_MARK(PROC_MARK_EFX_BGCOL),
|
||||
PROC_REPEAT(EfxHPBarColorChangeMain),
|
||||
PROC_END
|
||||
};
|
||||
@ -241,7 +241,7 @@ void EfxHPBarColorChangeMain(struct ProcEfxHpBarColorChange * proc)
|
||||
|
||||
CONST_DATA struct ProcCmd ProcScr_efxFlashUnit[] = {
|
||||
PROC_NAME("efxFlashUnit"),
|
||||
PROC_MARK(PROC_MARK_A),
|
||||
PROC_MARK(PROC_MARK_EFX_BGCOL),
|
||||
PROC_REPEAT(EfxFlashUnitMain),
|
||||
PROC_REPEAT(EfxFlashUnitRestorePal),
|
||||
PROC_END
|
||||
@ -298,7 +298,7 @@ void EfxFlashUnitRestorePal(struct ProcEfxFlashing * proc)
|
||||
|
||||
CONST_DATA struct ProcCmd ProcScr_efxFlashUnitEffectEnd[] = {
|
||||
PROC_NAME("efxFlashUnitEffectEnd"),
|
||||
PROC_MARK(PROC_MARK_A),
|
||||
PROC_MARK(PROC_MARK_EFX_BGCOL),
|
||||
PROC_REPEAT(EfxFlashUnitEffectMain),
|
||||
PROC_REPEAT(EfxFlashUnitEffectRestorePal),
|
||||
PROC_END
|
||||
|
@ -148,7 +148,7 @@ void efxCriricalEffectBGMain(struct ProcEfxBG * proc)
|
||||
|
||||
CONST_DATA struct ProcCmd ProcScr_efxCriricalEffectBGCOL[] = {
|
||||
PROC_NAME("efxCriticalEffectBGCOL"),
|
||||
PROC_MARK(0xA),
|
||||
PROC_MARK(PROC_MARK_EFX_BGCOL),
|
||||
PROC_REPEAT(efxCriricalEffectBGCOLMain),
|
||||
PROC_END
|
||||
};
|
||||
@ -379,7 +379,7 @@ void efxPierceCriticalEffectBGMain(struct ProcEfxBG * proc)
|
||||
|
||||
CONST_DATA struct ProcCmd ProcScr_efxPierceCriticalEffectBGCOL[] = {
|
||||
PROC_NAME("efxPierceCriticalEffectBGCOL"),
|
||||
PROC_MARK(0xA),
|
||||
PROC_MARK(PROC_MARK_EFX_BGCOL),
|
||||
PROC_REPEAT(efxPierceCriticalEffectBGCOLMain),
|
||||
PROC_END
|
||||
};
|
||||
|
@ -609,7 +609,7 @@ const s16 gEfxNoDmgBgShakeOff[] = {
|
||||
|
||||
CONST_DATA struct ProcCmd ProcScr_efxStatusCHG[] = {
|
||||
PROC_NAME("efxStatusCHG"),
|
||||
PROC_MARK(0xA),
|
||||
PROC_MARK(PROC_MARK_EFX_BGCOL),
|
||||
PROC_REPEAT(EfxStatusCHGMain),
|
||||
PROC_REPEAT(EfxHpBar_MoveCameraOnEnd),
|
||||
PROC_REPEAT(EfxHpBar_WaitCameraMove),
|
||||
|
@ -173,7 +173,7 @@ void efxAlacaliburBG_Loop(struct ProcEfxBG * proc)
|
||||
struct ProcCmd CONST_DATA gProcScr_efxAlacaliburBGCOL[] =
|
||||
{
|
||||
PROC_NAME("efxAlacaliburBGCOL"),
|
||||
PROC_MARK(PROC_MARK_A),
|
||||
PROC_MARK(PROC_MARK_EFX_BGCOL),
|
||||
|
||||
PROC_REPEAT(efxAlacaliburBGCOL_Loop),
|
||||
|
||||
|
@ -421,7 +421,7 @@ void efxOuraBG2_Loop(struct ProcEfxBG * proc)
|
||||
struct ProcCmd CONST_DATA ProcScr_efxOuraBGCOL[] =
|
||||
{
|
||||
PROC_NAME("efxOuraBGCOL"),
|
||||
PROC_MARK(PROC_MARK_A),
|
||||
PROC_MARK(PROC_MARK_EFX_BGCOL),
|
||||
PROC_REPEAT(efxOuraBGCOL_Loop),
|
||||
PROC_END,
|
||||
};
|
||||
|
@ -231,7 +231,7 @@ void efxFirebreathBG_Loop(struct ProcEfxBG * proc)
|
||||
struct ProcCmd CONST_DATA ProcScr_efxFirebreathBGCOL[] =
|
||||
{
|
||||
PROC_NAME("efxFirebreathBGCOL"),
|
||||
PROC_MARK(PROC_MARK_A),
|
||||
PROC_MARK(PROC_MARK_EFX_BGCOL),
|
||||
|
||||
PROC_REPEAT(efxFirebreathBGCOL_Loop),
|
||||
|
||||
@ -645,7 +645,7 @@ void efxDarkbreathBG_Loop(struct ProcEfxBG * proc)
|
||||
struct ProcCmd CONST_DATA ProcScr_efxDarkbreathBGCOL[] =
|
||||
{
|
||||
PROC_NAME("efxDarkbreathBGCOL"),
|
||||
PROC_MARK(PROC_MARK_A),
|
||||
PROC_MARK(PROC_MARK_EFX_BGCOL),
|
||||
|
||||
PROC_REPEAT(efxDarkbreathBGCOL_Loop),
|
||||
|
||||
|
@ -241,7 +241,7 @@ void efxExcaliburBG_Loop_C(struct ProcEfxBG * proc)
|
||||
struct ProcCmd CONST_DATA ProcScr_efxExcaliburBGCOL[] =
|
||||
{
|
||||
PROC_NAME("efxExcaliburBGCOL"),
|
||||
PROC_MARK(PROC_MARK_A),
|
||||
PROC_MARK(PROC_MARK_EFX_BGCOL),
|
||||
|
||||
PROC_SET_END_CB(efxExcaliburBGCOL_OnEnd),
|
||||
PROC_REPEAT(efxExcaliburBGCOL_Loop),
|
||||
@ -524,7 +524,7 @@ void efxExcaliburBG2_Loop(struct ProcEfxBG * proc)
|
||||
struct ProcCmd CONST_DATA ProcScr_efxExcaliburBGCOL2[] =
|
||||
{
|
||||
PROC_NAME("efxExcaliburBGCOL2"),
|
||||
PROC_MARK(PROC_MARK_A),
|
||||
PROC_MARK(PROC_MARK_EFX_BGCOL),
|
||||
|
||||
PROC_REPEAT(efxExcaliburBGCOL2_Loop),
|
||||
|
||||
@ -670,7 +670,7 @@ void efxExcaliburBG3_Loop(struct ProcEfxBG * proc)
|
||||
struct ProcCmd CONST_DATA ProcScr_efxExcaliburBGCOL3[] =
|
||||
{
|
||||
PROC_NAME("efxExcaliburBGCOL3"),
|
||||
PROC_MARK(PROC_MARK_A),
|
||||
PROC_MARK(PROC_MARK_EFX_BGCOL),
|
||||
|
||||
PROC_REPEAT(efxExcaliburBGCOL3_Loop),
|
||||
|
||||
|
@ -209,7 +209,7 @@ void efxFenrirBG_Loop(struct ProcEfxBG * proc)
|
||||
struct ProcCmd CONST_DATA ProcScr_efxFenrirBGCOL[] =
|
||||
{
|
||||
PROC_NAME("efxFenrirBGCOL"),
|
||||
PROC_MARK(PROC_MARK_A),
|
||||
PROC_MARK(PROC_MARK_EFX_BGCOL),
|
||||
|
||||
PROC_SET_END_CB(efxFenrirBGCOL_OnEnd),
|
||||
PROC_REPEAT(efxFenrirBGCOL_Loop),
|
||||
|
@ -87,7 +87,7 @@ void efxGespenstBG4_Loop(struct ProcEfxBG * proc)
|
||||
struct ProcCmd CONST_DATA ProcScr_efxGespenstBGCOL2[] =
|
||||
{
|
||||
PROC_NAME("efxGespenstBGCOL2"),
|
||||
PROC_MARK(PROC_MARK_A),
|
||||
PROC_MARK(PROC_MARK_EFX_BGCOL),
|
||||
|
||||
PROC_REPEAT(efxGespenstBGCOL2_Loop),
|
||||
|
||||
|
@ -556,7 +556,7 @@ void efxLiveBG_Loop(struct ProcEfxBG * proc)
|
||||
struct ProcCmd CONST_DATA ProcScr_efxLiveBGCOL[] =
|
||||
{
|
||||
PROC_NAME("efxLiveBGCOL"),
|
||||
PROC_MARK(PROC_MARK_A),
|
||||
PROC_MARK(PROC_MARK_EFX_BGCOL),
|
||||
PROC_REPEAT(efxLiveBGCOL_Loop),
|
||||
PROC_END,
|
||||
};
|
||||
@ -1234,7 +1234,7 @@ void efxReserveBG_Loop(struct ProcEfxBG * proc)
|
||||
struct ProcCmd CONST_DATA ProcScr_efxReserveBGCOL[] =
|
||||
{
|
||||
PROC_NAME("efxReserveBGCOL"),
|
||||
PROC_MARK(PROC_MARK_A),
|
||||
PROC_MARK(PROC_MARK_EFX_BGCOL),
|
||||
PROC_REPEAT(efxReserveBGCOL_Loop),
|
||||
PROC_END,
|
||||
};
|
||||
@ -1485,7 +1485,7 @@ void efxReserveBG2_Loop(struct ProcEfxBG * proc)
|
||||
struct ProcCmd CONST_DATA ProcScr_efxReserveBGCOL2[] =
|
||||
{
|
||||
PROC_NAME("efxReserveBGCOL2"),
|
||||
PROC_MARK(PROC_MARK_A),
|
||||
PROC_MARK(PROC_MARK_EFX_BGCOL),
|
||||
PROC_REPEAT(efxReserveBGCOL2_Loop),
|
||||
PROC_END,
|
||||
};
|
||||
|
@ -404,7 +404,7 @@ void efxLunaBG2_Loop(struct ProcEfxBG * proc)
|
||||
struct ProcCmd CONST_DATA ProcScr_efxLunaBGCOL[] =
|
||||
{
|
||||
PROC_NAME("efxLunaBGCOL"),
|
||||
PROC_MARK(PROC_MARK_A),
|
||||
PROC_MARK(PROC_MARK_EFX_BGCOL),
|
||||
|
||||
PROC_SET_END_CB(efxLunaBGCOL_OnEnd),
|
||||
|
||||
|
@ -291,7 +291,7 @@ void efxShineBG2_Loop(struct ProcEfxBG * proc)
|
||||
struct ProcCmd CONST_DATA ProcScr_efxShineBGCOL[] =
|
||||
{
|
||||
PROC_NAME("efxShineBGCOL"),
|
||||
PROC_MARK(PROC_MARK_A),
|
||||
PROC_MARK(PROC_MARK_EFX_BGCOL),
|
||||
PROC_REPEAT(efxShineBGCOL_Loop),
|
||||
PROC_END,
|
||||
};
|
||||
|
@ -221,7 +221,7 @@ void efxDrzDrakbreathBG_Loop(struct ProcEfxBG * proc)
|
||||
struct ProcCmd CONST_DATA ProcScr_efxDrzDrakbreathBGCOL[] =
|
||||
{
|
||||
PROC_NAME("efxDrzDrakbreathBGCOL"),
|
||||
PROC_MARK(PROC_MARK_A),
|
||||
PROC_MARK(PROC_MARK_EFX_BGCOL),
|
||||
|
||||
PROC_REPEAT(efxDrzDrakbreathBGCOL_Loop),
|
||||
|
||||
|
@ -1429,7 +1429,7 @@ void EfxChillEffectBGMain(struct ProcEfxBG * proc)
|
||||
|
||||
struct ProcCmd CONST_DATA ProcScr_efxChillEffectBGCOL[] = {
|
||||
PROC_NAME("efxChillEffectBGCOL"),
|
||||
PROC_MARK(10),
|
||||
PROC_MARK(PROC_MARK_EFX_BGCOL),
|
||||
PROC_REPEAT(EfxChillEffectBGCOL_Loop),
|
||||
PROC_END,
|
||||
};
|
||||
|
@ -560,7 +560,7 @@ void efxopThunderBG_Loop(struct ProcEfxBG * proc)
|
||||
struct ProcCmd CONST_DATA ProcScr_efxopThunderBGCOL[] =
|
||||
{
|
||||
PROC_NAME("efxopThunderBGCOL"),
|
||||
PROC_MARK(PROC_MARK_A),
|
||||
PROC_MARK(PROC_MARK_EFX_BGCOL),
|
||||
|
||||
PROC_REPEAT(efxopThunderBGCOL_Loop),
|
||||
|
||||
@ -810,7 +810,7 @@ void efxopLiveBG_Loop(struct ProcEfxBG * proc)
|
||||
struct ProcCmd CONST_DATA ProcScr_efxopLiveBGCOL[] =
|
||||
{
|
||||
PROC_NAME("efxopLiveBGCOL"),
|
||||
PROC_MARK(PROC_MARK_A),
|
||||
PROC_MARK(PROC_MARK_EFX_BGCOL),
|
||||
|
||||
PROC_REPEAT(efxopLiveBGCOL_Loop),
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
CONST_DATA struct ProcCmd ProcScr_efxStatusUnit[] = {
|
||||
PROC_NAME("efxStatusUnit"),
|
||||
PROC_MARK(0xA),
|
||||
PROC_MARK(PROC_MARK_EFX_BGCOL),
|
||||
PROC_SET_END_CB(EfxStatusUnitEnd),
|
||||
PROC_REPEAT(EfxStatusUnitMain),
|
||||
PROC_END
|
||||
|
2
src/bm.c
2
src/bm.c
@ -84,7 +84,7 @@ struct ProcCmd CONST_DATA gProc_BMapMain[] = {
|
||||
|
||||
PROC_NAME("E_BMAPMAIN"),
|
||||
PROC_15,
|
||||
PROC_MARK(2),
|
||||
PROC_MARK(PROC_MARK_MAIN),
|
||||
|
||||
PROC_SLEEP(0),
|
||||
|
||||
|
@ -119,7 +119,7 @@ EWRAM_OVERLAY(0) union WeatherEffectData sWeatherEffect = {};
|
||||
EWRAM_OVERLAY(0) union GradientEffectData sGradientEffect = {};
|
||||
|
||||
static CONST_DATA struct ProcCmd sProc_BMVSync[] = { // gProc_VBlankHandler
|
||||
PROC_MARK(PROC_MARK_1),
|
||||
PROC_MARK(PROC_MARK_DISP),
|
||||
PROC_SET_END_CB(BMapVSync_OnEnd),
|
||||
|
||||
PROC_SLEEP(0),
|
||||
@ -139,7 +139,7 @@ PROC_LABEL(0),
|
||||
CONST_DATA struct ProcCmd gProc_MapTask[] = { // gProc_MapTask
|
||||
PROC_NAME("MAPTASK"),
|
||||
PROC_END_DUPLICATES,
|
||||
PROC_MARK(PROC_MARK_1),
|
||||
PROC_MARK(PROC_MARK_DISP),
|
||||
|
||||
PROC_SLEEP(0),
|
||||
|
||||
@ -1203,7 +1203,7 @@ struct BMapMainProc* StartBMapMain(struct GameCtrlProc* gameCtrl) {
|
||||
void EndBMapMain(void) {
|
||||
struct BMapMainProc* mapMain;
|
||||
|
||||
Proc_EndEachMarked(PROC_MARK_1);
|
||||
Proc_EndEachMarked(PROC_MARK_DISP);
|
||||
|
||||
mapMain = Proc_Find(gProc_BMapMain);
|
||||
mapMain->gameCtrl->proc_lockCnt--;
|
||||
|
@ -802,7 +802,7 @@ void PalFade_OnLoop(struct PalFadeProc *proc);
|
||||
|
||||
struct ProcCmd CONST_DATA ProcScr_PalFade[] =
|
||||
{
|
||||
PROC_MARK(0xA),
|
||||
PROC_MARK(PROC_MARK_EFX_BGCOL),
|
||||
PROC_REPEAT(PalFade_OnLoop),
|
||||
|
||||
PROC_END,
|
||||
@ -1288,7 +1288,7 @@ struct FadeKindEnt const gUnknown_080D7964[] =
|
||||
};
|
||||
|
||||
struct ProcCmd CONST_DATA ProcScr_FadeCore[] = {
|
||||
PROC_MARK(10),
|
||||
PROC_MARK(PROC_MARK_EFX_BGCOL),
|
||||
PROC_CALL(FadeCore_Init),
|
||||
PROC_YIELD,
|
||||
PROC_CALL(FadeCore_Tick),
|
||||
|
@ -117,7 +117,7 @@ u8 MapMenu_UnitCommand(struct MenuProc* menu, struct MenuItemProc* menuItem) {
|
||||
}
|
||||
|
||||
u8 MapMenu_OptionsCommand(struct MenuProc* menu, struct MenuItemProc* menuItem) {
|
||||
Proc_Start(gProcScr_Config1, PROC_TREE_3);
|
||||
Proc_Start(ProcScr_Config1, PROC_TREE_3);
|
||||
|
||||
return MENU_ACT_SKIPCURSOR | MENU_ACT_END | MENU_ACT_SND6A | MENU_ACT_CLEAR;
|
||||
}
|
||||
|
@ -163,9 +163,9 @@ void PromoTrainee_Talk1(struct ProcPromoTraineeEvent *proc)
|
||||
b = gFaces[1];
|
||||
c = gFaces[2];
|
||||
d = gFaces[3];
|
||||
d->displayBits = FACE_DISP_BIT_14;
|
||||
c->displayBits = FACE_DISP_BIT_14;
|
||||
b->displayBits = FACE_DISP_BIT_14;
|
||||
d->displayBits = FACE_DISP_HIDDEN;
|
||||
c->displayBits = FACE_DISP_HIDDEN;
|
||||
b->displayBits = FACE_DISP_HIDDEN;
|
||||
|
||||
gUnknown_03005398 = -1;
|
||||
}
|
||||
|
@ -606,7 +606,7 @@ void DrawDifficultyMenuCursorMaybe(struct DifficultyMenuSpritesProc * proc)
|
||||
|
||||
if (proc->unk_3c < 4)
|
||||
{
|
||||
int unk = sub_800B84C(proc->unk_3c, 4, 0);
|
||||
int unk = _DivArm2(proc->unk_3c, 4, 0);
|
||||
|
||||
proc->unk_2c = proc->unk_30 + DivArm(0x1000, proc->unk_38 * unk);
|
||||
proc->unk_2e = proc->unk_32 + DivArm(0x1000, proc->unk_3a * unk);
|
||||
|
@ -86,7 +86,7 @@ void CreditsBlendCG_80C40B8(struct CreditsSubProc * proc)
|
||||
|
||||
if (proc->unk_30 < 120)
|
||||
{
|
||||
int tmp = sub_800B84C(119 - proc->unk_30, 120, 1);
|
||||
int tmp = _DivArm2(119 - proc->unk_30, 120, 1);
|
||||
int bldAmt = DivArm(0x1000, (0x1000 - tmp) * 16);
|
||||
SetBlendAlpha(16 - bldAmt, bldAmt);
|
||||
}
|
||||
@ -150,7 +150,7 @@ void CreditsBlendCG_80C4184(struct CreditsSubProc * proc)
|
||||
|
||||
if (proc->unk_30 < 120)
|
||||
{
|
||||
int tmp = sub_800B84C(119 - proc->unk_30, 120, 1);
|
||||
int tmp = _DivArm2(119 - proc->unk_30, 120, 1);
|
||||
int bldAmt = DivArm(0x1000, (0x1000 - tmp) * 16);
|
||||
SetBlendAlpha(bldAmt, 16 - bldAmt);
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
||||
int gUnknown_08591AB4[3] = { 0, 0, 0 };
|
||||
|
||||
CONST_DATA struct ProcCmd ProcScr_StdEventEngine[] = {
|
||||
PROC_MARK(PROC_MARK_6),
|
||||
PROC_MARK(PROC_MARK_EVENT),
|
||||
PROC_SET_END_CB(EventEngine_OnEnd),
|
||||
PROC_YIELD,
|
||||
PROC_CALL(_FreezeMenu),
|
||||
@ -33,7 +33,7 @@ CONST_DATA struct ProcCmd ProcScr_StdEventEngine[] = {
|
||||
};
|
||||
|
||||
CONST_DATA struct ProcCmd ProcScr_BattleEventEngine[] = {
|
||||
PROC_MARK(PROC_MARK_6),
|
||||
PROC_MARK(PROC_MARK_EVENT),
|
||||
PROC_SET_END_CB(EventEngine_OnEnd),
|
||||
PROC_YIELD,
|
||||
PROC_REPEAT(EventEngine_OnUpdate),
|
||||
@ -46,7 +46,7 @@ CONST_DATA EventFuncType gEventLoCmdTable[] = {
|
||||
};
|
||||
|
||||
CONST_DATA struct ProcCmd ProcScr_SomeEventDeamon[] = {
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
PROC_YIELD,
|
||||
PROC_CALL(nop_800CCE8),
|
||||
PROC_REPEAT(nullsub_32),
|
||||
@ -54,7 +54,7 @@ CONST_DATA struct ProcCmd ProcScr_SomeEventDeamon[] = {
|
||||
};
|
||||
|
||||
CONST_DATA struct ProcCmd ProcScr_EventFaceDeamon[] = {
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
PROC_SET_END_CB(EventFaceDeamonDelete),
|
||||
PROC_YIELD,
|
||||
PROC_CALL(nop_800CD38),
|
||||
|
@ -3929,7 +3929,7 @@ void ScriptBattleDeamon(struct ScriptedBattleProc * proc)
|
||||
if (proc->lock == GetGameLock())
|
||||
{
|
||||
EventBattleReloadBmStatus();
|
||||
Proc_SetMark(proc->evtproc, PROC_MARK_6);
|
||||
Proc_SetMark(proc->evtproc, PROC_MARK_EVENT);
|
||||
Proc_Break(proc);
|
||||
}
|
||||
}
|
||||
@ -3982,7 +3982,7 @@ u8 Event3F_ScriptBattle(struct EventEngineProc * proc)
|
||||
childProc = Proc_StartBlocking(ProcScr_ScriptBattleDeamon, proc);
|
||||
childProc->evtproc = proc;
|
||||
childProc->lock = GetGameLock();
|
||||
Proc_SetMark(proc, PROC_MARK_7);
|
||||
Proc_SetMark(proc, PROC_MARK_EVENT_ANIM);
|
||||
}
|
||||
|
||||
StartEventBattle(unitA, unitB, isBallista, scriptted, weaponId, hits, -subcmd || subcmd);
|
||||
@ -4016,7 +4016,7 @@ void WaitEventPromoteDone(struct ProcEventPromote * proc)
|
||||
if (proc->lock == GetGameLock())
|
||||
{
|
||||
sub_8012324();
|
||||
Proc_SetMark(proc->event_engine, PROC_MARK_6);
|
||||
Proc_SetMark(proc->event_engine, PROC_MARK_EVENT);
|
||||
Proc_Break(proc);
|
||||
}
|
||||
|
||||
@ -4043,7 +4043,7 @@ u8 Event40_PromoteUnit(struct EventEngineProc * proc)
|
||||
childProc->event_engine = proc;
|
||||
childProc->lock = GetGameLock();
|
||||
|
||||
Proc_SetMark(proc, PROC_MARK_7);
|
||||
Proc_SetMark(proc, PROC_MARK_EVENT_ANIM);
|
||||
|
||||
unit = GetUnitStructFromEventParameter(pid);
|
||||
SetUnitStatus(unit, 0);
|
||||
|
@ -14,7 +14,7 @@
|
||||
void GetWMCenteredCameraPosition(s16, s16, s16 *, s16 *);
|
||||
|
||||
// TODO: In "worldmap_scrollmanage.c", the signature returns a ProcPtr instead of s8/bool
|
||||
s8 FindGmScrollManage(void);
|
||||
s8 GmScrollManageExist(void);
|
||||
int IsWmPlaceDotActiveAtIndex(int); // implicit?
|
||||
|
||||
//! FE8U = 0x0800BDCC
|
||||
@ -182,7 +182,7 @@ u8 Event89_WmScrollWait(struct EventEngineProc * proc)
|
||||
{
|
||||
if (EVENT_IS_SKIPPING(proc))
|
||||
{
|
||||
if (FindGmScrollManage())
|
||||
if (GmScrollManageExist())
|
||||
{
|
||||
EndGmScroll();
|
||||
}
|
||||
@ -190,7 +190,7 @@ u8 Event89_WmScrollWait(struct EventEngineProc * proc)
|
||||
return EVC_ADVANCE_CONTINUE;
|
||||
}
|
||||
|
||||
if (!FindGmScrollManage())
|
||||
if (!GmScrollManageExist())
|
||||
{
|
||||
return EVC_ADVANCE_YIELD;
|
||||
}
|
||||
@ -201,14 +201,14 @@ u8 Event89_WmScrollWait(struct EventEngineProc * proc)
|
||||
//! FE8U = 0x0800C0B8
|
||||
u8 Event8A_WmShowCursor_Unsure(struct EventEngineProc * proc)
|
||||
{
|
||||
gGMData.unk01 = 1;
|
||||
gGMData.sprite_disp = 1;
|
||||
return EVC_ADVANCE_CONTINUE;
|
||||
}
|
||||
|
||||
//! FE8U = 0x0800C0C8
|
||||
void Event8B_WmHideCursor_Unsure(void)
|
||||
{
|
||||
gGMData.unk01 = 0;
|
||||
gGMData.sprite_disp = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -389,7 +389,7 @@ u8 Event97_WmInitNextStoryNode(struct EventEngineProc * proc)
|
||||
gGMData.nodes[nodeId].state |= 2;
|
||||
|
||||
GM_ICON->nodeId = nodeId;
|
||||
GM_ICON->unk_32_1 = 1;
|
||||
GM_ICON->merge_next_node = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -433,7 +433,7 @@ u8 Event98_WmSetNextStoryNodePath(struct EventEngineProc * proc)
|
||||
gGMData.nodes[nodeId].state |= 2;
|
||||
|
||||
GM_ICON->nodeId = nodeId;
|
||||
GM_ICON->unk_32_1 = 1;
|
||||
GM_ICON->merge_next_node = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -476,7 +476,7 @@ u8 Event9A_WmSetStoryNodeSilent(struct EventEngineProc * proc)
|
||||
gGMData.nodes[nodeId].state |= 2;
|
||||
|
||||
GM_ICON->nodeId = nodeId;
|
||||
GM_ICON->unk_32_1 = 1;
|
||||
GM_ICON->merge_next_node = true;
|
||||
|
||||
if (EVENT_IS_SKIPPING(proc))
|
||||
{
|
||||
@ -1103,21 +1103,21 @@ u8 EventBF_(struct EventEngineProc * proc)
|
||||
//! FE8U = 0x0800CBD8
|
||||
u8 EventC0_(struct EventEngineProc * proc)
|
||||
{
|
||||
sub_80B9154(GM_MAIN);
|
||||
WorldMap_Init(GM_MAIN);
|
||||
return EVC_ADVANCE_YIELD;
|
||||
}
|
||||
|
||||
//! FE8U = 0x0800CBF0
|
||||
u8 EventC1_SKIPWM(struct EventEngineProc * proc)
|
||||
{
|
||||
gGMData.state.bits.state_6 = 1;
|
||||
gGMData.state.bits.skip_wm = 1;
|
||||
return EVC_ADVANCE_CONTINUE;
|
||||
}
|
||||
|
||||
//! FE8U = 0x0800CC04
|
||||
u8 EventC2_WmNoFade(struct EventEngineProc * proc)
|
||||
{
|
||||
gGMData.state.bits.state_7 = 1;
|
||||
gGMData.state.bits.no_fade = 1;
|
||||
return EVC_ADVANCE_CONTINUE;
|
||||
}
|
||||
|
||||
|
@ -334,7 +334,7 @@ void Face_OnInit(struct FaceProc* proc) {
|
||||
void Face_OnIdle(struct FaceProc* proc) {
|
||||
int oam0;
|
||||
|
||||
if (GetFaceDisplayBits(proc) & FACE_DISP_BIT_14) {
|
||||
if (GetFaceDisplayBits(proc) & FACE_DISP_HIDDEN) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1474,7 +1474,7 @@ u16 const gUnknown_080D77FC[] =
|
||||
};
|
||||
|
||||
//! FE8U = 0x08006738
|
||||
void sub_8006738(u16* a, u16 b, s8 c) {
|
||||
void PutFaceOnBackGround(u16* a, u16 b, s8 c) {
|
||||
int i;
|
||||
int j;
|
||||
const u16* src = gUnknown_080D77FC;
|
||||
|
@ -27,7 +27,7 @@ extern u16 EventScr_EphraimModeGameEnd[];
|
||||
|
||||
extern struct ProcCmd CONST_DATA ProcScr_GameEarlyStartUI[]; // pre-intro cutscene
|
||||
extern struct ProcCmd CONST_DATA ProcScr_OpAnim[]; // intro cutscene
|
||||
extern struct ProcCmd CONST_DATA gProcScr_WorldMapWrapper[];
|
||||
extern struct ProcCmd CONST_DATA ProcScr_WorldMapWrapper[];
|
||||
|
||||
struct ProcCmd CONST_DATA gUnused_085916BC[] =
|
||||
{
|
||||
@ -40,7 +40,7 @@ struct ProcCmd CONST_DATA gUnused_085916BC[] =
|
||||
struct ProcCmd CONST_DATA gProcScr_GameControl[] =
|
||||
{
|
||||
PROC_NAME("GAMECTRL"),
|
||||
PROC_MARK(PROC_MARK_B),
|
||||
PROC_MARK(PROC_MARK_GAMECTRL),
|
||||
|
||||
PROC_15,
|
||||
PROC_CALL(GameControl_CallEraseSaveEventWithKeyCombo),
|
||||
@ -116,7 +116,7 @@ PROC_LABEL(LGAMECTRL_EXEC_BM),
|
||||
PROC_CALL(GameControl_RememberChapterId),
|
||||
PROC_CALL(GameCtrlStartIntroMonologue),
|
||||
PROC_YIELD,
|
||||
PROC_START_CHILD_BLOCKING(gProcScr_WorldMapWrapper),
|
||||
PROC_START_CHILD_BLOCKING(ProcScr_WorldMapWrapper),
|
||||
PROC_CALL(EndWM),
|
||||
PROC_CALL(sub_8009E28),
|
||||
PROC_YIELD,
|
||||
@ -370,7 +370,7 @@ void GameControl_8009A60_Null(ProcPtr proc)
|
||||
|
||||
void EndProcIfNotMarkedB(ProcPtr proc)
|
||||
{
|
||||
if (((struct Proc*)proc)->proc_mark != PROC_MARK_B)
|
||||
if (((struct Proc*)proc)->proc_mark != PROC_MARK_GAMECTRL)
|
||||
Proc_End(proc);
|
||||
}
|
||||
|
||||
|
@ -369,7 +369,7 @@ void sub_80C4DA0(struct OpSubtitleProc* proc) {
|
||||
proc->timer_2c++;
|
||||
|
||||
if (proc->timer_2c < 80) {
|
||||
int coeff = sub_800B7E0(proc->timer_2c, 80, 0);
|
||||
int coeff = _DivArm1(proc->timer_2c, 80, 0);
|
||||
|
||||
sub_80C4BB4(
|
||||
gPal_OpSubtitle,
|
||||
@ -399,7 +399,7 @@ void sub_80C4E18(struct OpSubtitleProc* proc) {
|
||||
proc->timer_2c++;
|
||||
|
||||
if (proc->timer_2c < 80) {
|
||||
int coeff = 0x1000 - sub_800B7E0(proc->timer_2c, 80, 0);
|
||||
int coeff = 0x1000 - _DivArm1(proc->timer_2c, 80, 0);
|
||||
|
||||
sub_80C4BB4(
|
||||
gPal_OpSubtitle,
|
||||
@ -441,7 +441,7 @@ void sub_80C4EC4(struct OpSubtitleProc* proc) {
|
||||
proc->timer_2c++;
|
||||
|
||||
if (proc->timer_2c < 80) {
|
||||
int coeff = 0x1000 - sub_800B7E0(proc->timer_2c, 80, 0);
|
||||
int coeff = 0x1000 - _DivArm1(proc->timer_2c, 80, 0);
|
||||
|
||||
sub_80C4BB4(
|
||||
gPal_OpSubtitle,
|
||||
@ -480,7 +480,7 @@ void sub_80C4F60(struct OpSubtitleProc* proc) {
|
||||
proc->timer_2c++;
|
||||
|
||||
if (proc->timer_2c < 80) {
|
||||
int coeff = sub_800B7E0(proc->timer_2c, 80, 0);
|
||||
int coeff = _DivArm1(proc->timer_2c, 80, 0);
|
||||
s16 var = DivArm(0x1000, coeff << 4);
|
||||
|
||||
SetBlendConfig(1, 0x10 - var, var, 0);
|
||||
@ -512,7 +512,7 @@ void sub_80C501C(struct OpSubtitleProc* proc) {
|
||||
proc->timer_2c++;
|
||||
|
||||
if (proc->timer_2c < 80) {
|
||||
int coeff = sub_800B7E0(proc->timer_2c, 80, 0);
|
||||
int coeff = _DivArm1(proc->timer_2c, 80, 0);
|
||||
s16 var = DivArm(0x1000, (0x1000 - coeff) << 4);
|
||||
|
||||
SetBlendConfig(1, 0x10 - var, var, 0);
|
||||
@ -571,7 +571,7 @@ void sub_80C5104(struct OpSubtitleProc* proc) {
|
||||
proc->timer_2c++;
|
||||
|
||||
if (proc->timer_2c < 46) {
|
||||
int coeff = sub_800B7E0(proc->timer_2c, 46, 0);
|
||||
int coeff = _DivArm1(proc->timer_2c, 46, 0);
|
||||
|
||||
sub_80C4BB4(
|
||||
gUnknown_08B1756C,
|
||||
@ -720,7 +720,7 @@ void sub_80C538C(struct OpSubtitleProc* proc) {
|
||||
proc->timer_2c++;
|
||||
|
||||
if (proc->timer_2c < 60) {
|
||||
int coeff = 0x1000 - sub_800B7E0(proc->timer_2c, 60, 0);
|
||||
int coeff = 0x1000 - _DivArm1(proc->timer_2c, 60, 0);
|
||||
|
||||
sub_80C4BB4(
|
||||
gUnk_OpSubtitle_0201CDD4,
|
||||
|
@ -37,7 +37,7 @@
|
||||
struct ProcCmd CONST_DATA gProcScr_PlayerPhase[] =
|
||||
{
|
||||
PROC_NAME("E_PLAYERPHASE"),
|
||||
PROC_MARK(PROC_MARK_2),
|
||||
PROC_MARK(PROC_MARK_MAIN),
|
||||
PROC_YIELD,
|
||||
|
||||
PROC_LABEL(0),
|
||||
@ -177,7 +177,7 @@ u8 * CONST_DATA gOpenLimitViewImgLut[] =
|
||||
struct ProcCmd CONST_DATA sProcScr_MoveLimitViewChange[] =
|
||||
{
|
||||
PROC_NAME("MLVCHC"),
|
||||
PROC_MARK(PROC_MARK_1),
|
||||
PROC_MARK(PROC_MARK_DISP),
|
||||
|
||||
PROC_CALL(MoveLimitViewChange_OnInit),
|
||||
PROC_REPEAT(MoveLimitViewChange_OnLoop),
|
||||
@ -188,7 +188,7 @@ struct ProcCmd CONST_DATA sProcScr_MoveLimitViewChange[] =
|
||||
struct ProcCmd CONST_DATA sProcScr_MoveLimitView[] =
|
||||
{
|
||||
PROC_NAME("E_MOVELIMITVIEW"),
|
||||
PROC_MARK(PROC_MARK_1),
|
||||
PROC_MARK(PROC_MARK_DISP),
|
||||
|
||||
PROC_SET_END_CB(MoveLimitView_OnEnd),
|
||||
|
||||
|
@ -1062,7 +1062,7 @@ void DisplayMapChangeIfFog(void)
|
||||
//! FE8U = 0x08033EC0
|
||||
void PrepScreenProc_StartConfigMenu(ProcPtr proc)
|
||||
{
|
||||
Proc_StartBlocking(gProcScr_Config2, proc);
|
||||
Proc_StartBlocking(ProcScr_Config2, proc);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -675,7 +675,7 @@ void SaveDraw_Loop_Main(struct SaveDrawProc * proc)
|
||||
struct ProcCmd CONST_DATA ProcScr_savedraw[] =
|
||||
{
|
||||
PROC_NAME("savedraw"),
|
||||
PROC_MARK(PROC_MARK_C),
|
||||
PROC_MARK(PROC_MARK_SAVEDRAW),
|
||||
PROC_SET_END_CB(SaveDraw_OnEnd),
|
||||
|
||||
PROC_CALL(SaveDraw_Init),
|
||||
|
@ -1488,7 +1488,7 @@ void SaveMenu_ReloadScreenFormDifficulty(struct SaveMenuProc * proc)
|
||||
SaveMenuPutChapterTitle(proc);
|
||||
SaveMenuInitSlotPalette(proc->sus_slot);
|
||||
|
||||
Proc_UnblockEachMarked(PROC_MARK_C);
|
||||
Proc_UnblockEachMarked(PROC_MARK_SAVEDRAW);
|
||||
Proc_UnblockEachMarked(PROC_MARK_D);
|
||||
|
||||
BG_EnableSyncByMask(3);
|
||||
|
16
src/scene.c
16
src/scene.c
@ -36,7 +36,7 @@ static struct Font sTalkFont;
|
||||
|
||||
struct ProcCmd CONST_DATA gProcScr_TalkSkipListener[] =
|
||||
{
|
||||
PROC_MARK(PROC_MARK_5),
|
||||
PROC_MARK(PROC_MARK_TALK),
|
||||
PROC_REPEAT(TalkSkipListener_OnIdle),
|
||||
|
||||
PROC_END,
|
||||
@ -44,7 +44,7 @@ struct ProcCmd CONST_DATA gProcScr_TalkSkipListener[] =
|
||||
|
||||
struct ProcCmd CONST_DATA gProcScr_Talk[] =
|
||||
{
|
||||
PROC_MARK(PROC_MARK_5),
|
||||
PROC_MARK(PROC_MARK_TALK),
|
||||
PROC_SET_END_CB(Talk_OnEnd),
|
||||
|
||||
PROC_SLEEP(1),
|
||||
@ -99,7 +99,7 @@ struct ProcCmd CONST_DATA gProcScr_TalkFaceMove[] =
|
||||
|
||||
struct ProcCmd CONST_DATA gProcScr_TalkPause[] =
|
||||
{
|
||||
PROC_MARK(PROC_MARK_5),
|
||||
PROC_MARK(PROC_MARK_TALK),
|
||||
PROC_SLEEP(1),
|
||||
|
||||
PROC_REPEAT(TalkPause_OnIdle),
|
||||
@ -109,7 +109,7 @@ struct ProcCmd CONST_DATA gProcScr_TalkPause[] =
|
||||
|
||||
struct ProcCmd CONST_DATA gProcScr_TalkWaitForInput[] =
|
||||
{
|
||||
PROC_MARK(PROC_MARK_5),
|
||||
PROC_MARK(PROC_MARK_TALK),
|
||||
PROC_SLEEP(8),
|
||||
|
||||
PROC_REPEAT(TalkWaitForInput_OnIdle),
|
||||
@ -158,7 +158,7 @@ const u16* CONST_DATA gPressKeyArrowSpriteLut[] =
|
||||
|
||||
struct ProcCmd CONST_DATA gProcScr_TalkShiftClearAll[] =
|
||||
{
|
||||
PROC_MARK(PROC_MARK_5),
|
||||
PROC_MARK(PROC_MARK_TALK),
|
||||
|
||||
PROC_CALL(TalkShiftClearAll_OnInit),
|
||||
PROC_REPEAT(TalkShiftClearAll_OnIdle),
|
||||
@ -188,7 +188,7 @@ struct ProcCmd CONST_DATA gProcScr_TalkChoice[] =
|
||||
|
||||
struct ProcCmd CONST_DATA gProcScr_TalkShiftClear[] =
|
||||
{
|
||||
PROC_MARK(PROC_MARK_5),
|
||||
PROC_MARK(PROC_MARK_TALK),
|
||||
|
||||
PROC_CALL(TalkShiftClear_OnInit),
|
||||
PROC_REPEAT(TalkShiftClear_OnIdle),
|
||||
@ -200,7 +200,7 @@ struct ProcCmd CONST_DATA gProcScr_TalkShiftClear[] =
|
||||
|
||||
struct ProcCmd CONST_DATA ProcScr_TalkSpriteShiftClear[] =
|
||||
{
|
||||
PROC_MARK(PROC_MARK_5),
|
||||
PROC_MARK(PROC_MARK_TALK),
|
||||
|
||||
PROC_CALL(sub_80080D0),
|
||||
PROC_SLEEP(0),
|
||||
@ -221,7 +221,7 @@ struct ProcCmd CONST_DATA gProcScr_TalkBubbleOpen[] =
|
||||
|
||||
struct ProcCmd CONST_DATA gProcScr_TalkOpen[] =
|
||||
{
|
||||
PROC_MARK(PROC_MARK_5),
|
||||
PROC_MARK(PROC_MARK_TALK),
|
||||
PROC_SET_END_CB(TalkOpen_OnEnd),
|
||||
|
||||
PROC_CALL(TalkOpen_InitBlend),
|
||||
|
@ -204,7 +204,7 @@ void ArenaUi_FadeOutBgm(void) {
|
||||
//! FE8U = 0x080B5AB4
|
||||
void ArenaUi_StartArenaBattle(ProcPtr proc) {
|
||||
|
||||
Proc_SetMark(proc, PROC_MARK_7);
|
||||
Proc_SetMark(proc, PROC_MARK_EVENT_ANIM);
|
||||
|
||||
ResetDialogueScreen();
|
||||
|
||||
|
@ -1072,7 +1072,7 @@ void sub_80B24C0(void) {
|
||||
return;
|
||||
}
|
||||
|
||||
struct ProcCmd CONST_DATA gProcScr_Config1[] = {
|
||||
struct ProcCmd CONST_DATA ProcScr_Config1[] = {
|
||||
PROC_NAME("E_config"),
|
||||
|
||||
PROC_CALL(LockGame),
|
||||
@ -1107,7 +1107,7 @@ PROC_LABEL(0),
|
||||
PROC_END,
|
||||
};
|
||||
|
||||
struct ProcCmd CONST_DATA gProcScr_Config2[] = {
|
||||
struct ProcCmd CONST_DATA ProcScr_Config2[] = {
|
||||
PROC_NAME("E_config"),
|
||||
|
||||
PROC_CALL(LockGame),
|
||||
@ -1134,7 +1134,7 @@ PROC_LABEL(0),
|
||||
PROC_END,
|
||||
};
|
||||
|
||||
struct ProcCmd CONST_DATA gProcScr_Config3[] = {
|
||||
struct ProcCmd CONST_DATA ProcScr_Config3[] = {
|
||||
PROC_NAME("E_config"),
|
||||
|
||||
PROC_CALL(LockGame),
|
||||
|
@ -52,7 +52,7 @@ extern u32 gUnknown_0200F15C[]; // equipped item icons
|
||||
struct ProcCmd CONST_DATA ProcScr_UnitListScreen_Field[] =
|
||||
{
|
||||
PROC_NAME("bmenu"),
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
|
||||
PROC_CALL(LockGame),
|
||||
|
||||
|
@ -34,9 +34,9 @@ struct GMapAutoMuProc
|
||||
//! FE8U = 0x080C3124
|
||||
void GmapAutoMu_OnEnd(struct GMapAutoMuProc * proc)
|
||||
{
|
||||
if (sub_80BE12C(GM_MAIN->unk_54, proc->unitId) != 0)
|
||||
if (sub_80BE12C(GM_MU, proc->unitId) != 0)
|
||||
{
|
||||
sub_80BE330(GM_MAIN->unk_54, proc->unitId);
|
||||
sub_80BE330(GM_MU, proc->unitId);
|
||||
}
|
||||
|
||||
EndGmapUnitFade();
|
||||
@ -49,7 +49,7 @@ void GmapAutoMu_OnEnd(struct GMapAutoMuProc * proc)
|
||||
break;
|
||||
|
||||
case 1:
|
||||
GmMu_SetPosition(GM_MAIN->unk_54, proc->unitId, proc->target.dst.pos.x, proc->target.dst.pos.y);
|
||||
GmMu_SetPosition(GM_MU, proc->unitId, proc->target.dst.pos.x, proc->target.dst.pos.y);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -117,7 +117,7 @@ void GmapAutoMu_80C31FC(struct GMapAutoMuProc * proc)
|
||||
//! FE8U = 0x080C3220
|
||||
void GmapAutoMu_StartFadeIn(struct GMapAutoMuProc * proc)
|
||||
{
|
||||
GmMu_StartFadeIn(GM_MAIN->unk_54, proc->unitId, 30);
|
||||
GmMu_StartFadeIn(GM_MU, proc->unitId, 30);
|
||||
ShowGmUnit(proc->unitId);
|
||||
|
||||
return;
|
||||
@ -126,7 +126,7 @@ void GmapAutoMu_StartFadeIn(struct GMapAutoMuProc * proc)
|
||||
//! FE8U = 0x080C3244
|
||||
void GmapAutoMu_StartFadeOut(struct GMapAutoMuProc * proc)
|
||||
{
|
||||
GmMu_StartFadeOut(GM_MAIN->unk_54, proc->unitId, 30);
|
||||
GmMu_StartFadeOut(GM_MU, proc->unitId, 30);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -157,7 +157,7 @@ void GmapAutoMu_80C3280(struct GMapAutoMuProc * proc)
|
||||
input.unk_03 = 0xff;
|
||||
input.unk_04 = 4;
|
||||
|
||||
sub_80BDEB4(GM_MAIN->unk_54, &input);
|
||||
sub_80BDEB4(GM_MU, &input);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -180,7 +180,7 @@ void GmapAutoMu_80C32E4(struct GMapAutoMuProc * proc)
|
||||
input.unk_04 = 0xff;
|
||||
input.unk_05 = 4;
|
||||
|
||||
sub_80BDFA4(GM_MAIN->unk_54, &input);
|
||||
sub_80BDFA4(GM_MU, &input);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -188,7 +188,7 @@ void GmapAutoMu_80C32E4(struct GMapAutoMuProc * proc)
|
||||
//! FE8U = 0x080C3350
|
||||
void GmapAutoMu_80C3350(struct GMapAutoMuProc * proc)
|
||||
{
|
||||
if (!sub_80BE12C(GM_MAIN->unk_54, proc->unitId))
|
||||
if (!sub_80BE12C(GM_MU, proc->unitId))
|
||||
{
|
||||
Proc_Break(proc);
|
||||
}
|
||||
@ -201,7 +201,7 @@ void GmapAutoMu_80C3350(struct GMapAutoMuProc * proc)
|
||||
struct ProcCmd CONST_DATA ProcScr_GmapAutoMu[] =
|
||||
{
|
||||
PROC_NAME("Gmap Auto Mu"),
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
|
||||
PROC_SET_END_CB(GmapAutoMu_OnEnd),
|
||||
PROC_YIELD,
|
||||
|
@ -119,7 +119,7 @@ void GMapBaseMenu_StartSecretShop(struct GMapBaseMenuProc * proc)
|
||||
struct ProcCmd CONST_DATA ProcScr_GmapBaseMenu[] =
|
||||
{
|
||||
PROC_NAME("Gmap Base Menu"),
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
|
||||
PROC_SET_END_CB(GMapBaseMenu_OnEnd_Null),
|
||||
|
||||
|
@ -53,7 +53,7 @@ const struct Unknown08206498 gUnknown_08206498[] =
|
||||
//! FE8U = 0x080BBAD4
|
||||
void GmapCursor_Loop(struct GmapCursorProc * proc)
|
||||
{
|
||||
proc->unk_32 = gGMData.unk01;
|
||||
proc->unk_32 = gGMData.sprite_disp;
|
||||
|
||||
proc->unk_38 = gGMData.ix;
|
||||
proc->unk_3c = gGMData.iy;
|
||||
@ -106,7 +106,7 @@ void GmapCursor_Loop(struct GmapCursorProc * proc)
|
||||
struct ProcCmd CONST_DATA gProcScr_GmapCursor[] =
|
||||
{
|
||||
PROC_NAME("GmapCursor"),
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
|
||||
PROC_SET_END_CB(nullsub_59),
|
||||
|
||||
|
@ -340,7 +340,7 @@ void GmapEffect_80C119C(struct GmapEffectProc * proc)
|
||||
struct ProcCmd CONST_DATA gProcScr_GmapEffectPal[] =
|
||||
{
|
||||
PROC_NAME("Gmap Effect Pa"),
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
|
||||
PROC_SET_END_CB(GmapEffectPal_OnEnd),
|
||||
|
||||
@ -419,7 +419,7 @@ void GmapEffect_Loop(struct GmapEffectProc * proc)
|
||||
struct ProcCmd CONST_DATA gProcScr_GmapEffect[] =
|
||||
{
|
||||
PROC_NAME("Gmap Effect"),
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
|
||||
PROC_SET_END_CB(GmapEffect_OnEnd),
|
||||
|
||||
|
@ -83,7 +83,7 @@ void GmapBaseEntry_OnEnd(struct GmapBaseEntryProc * proc)
|
||||
if ((gGMData.nodes[proc->unk_29].state & 2) != 0)
|
||||
{
|
||||
GM_ICON->nodeId = proc->unk_29;
|
||||
GM_ICON->unk_32_1 = 1;
|
||||
GM_ICON->merge_next_node = true;
|
||||
}
|
||||
|
||||
EndGmapEffect();
|
||||
@ -116,7 +116,7 @@ void GmapBaseEntry_80BF8CC(struct GmapBaseEntryProc * proc)
|
||||
if ((gGMData.nodes[proc->unk_29].state & 2) != 0)
|
||||
{
|
||||
GM_ICON->nodeId = proc->unk_29;
|
||||
GM_ICON->unk_32_1 = 1;
|
||||
GM_ICON->merge_next_node = true;
|
||||
}
|
||||
|
||||
SetBlendConfig(BLEND_EFFECT_NONE, 0, 0x10, 0);
|
||||
@ -222,7 +222,7 @@ void GmapBaseEntry_80BFA1C(struct GmapBaseEntryProc * proc)
|
||||
struct ProcCmd CONST_DATA gProcScr_GmapBaseEntry[] =
|
||||
{
|
||||
PROC_NAME("Gmap Base Entry"),
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
|
||||
PROC_SET_END_CB(GmapBaseEntry_OnEnd),
|
||||
|
||||
@ -366,7 +366,7 @@ void sub_80BFC44(struct GmapBaseEntryProc * proc)
|
||||
struct ProcCmd CONST_DATA gProcScr_GmapMuEntry1[] =
|
||||
{
|
||||
PROC_NAME("Gmap Mu Entry"),
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
|
||||
PROC_SET_END_CB(sub_80BFB4C),
|
||||
|
||||
@ -559,7 +559,7 @@ void GmMuEntry_80C0080(struct GmapMuEntryProc * proc)
|
||||
|
||||
if (proc->unk_38 < proc->unk_34)
|
||||
{
|
||||
unk = sub_800B7E0(proc->unk_38, proc->unk_34, proc->unk_30);
|
||||
unk = _DivArm1(proc->unk_38, proc->unk_34, proc->unk_30);
|
||||
|
||||
proc->unk_2a = proc->unk_2c + DivArm(0x1000, proc->unk_3c * unk);
|
||||
proc->unk_2b = proc->unk_2e + DivArm(0x1000, proc->unk_40 * unk);
|
||||
@ -592,7 +592,7 @@ void GmMuEntry_80C0144(struct GmapMuEntryProc * proc)
|
||||
|
||||
if (proc->unk_38 < proc->unk_34)
|
||||
{
|
||||
unk = sub_800B7E0(proc->unk_38, proc->unk_34, proc->unk_30);
|
||||
unk = _DivArm1(proc->unk_38, proc->unk_34, proc->unk_30);
|
||||
proc->unk_2a = proc->unk_2c + DivArm(0x1000, proc->unk_3c * unk);
|
||||
proc->unk_2b = proc->unk_2e + DivArm(0x1000, proc->unk_40 * unk);
|
||||
}
|
||||
@ -618,7 +618,7 @@ void GmMuEntry_80C0144(struct GmapMuEntryProc * proc)
|
||||
struct ProcCmd CONST_DATA gProcScr_GmapMuEntry2[] =
|
||||
{
|
||||
PROC_NAME("Gmap Mu Entry"),
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
|
||||
PROC_SET_END_CB(GmMuEntry_OnEnd_Null),
|
||||
|
||||
|
@ -4,47 +4,21 @@
|
||||
#include "hardware.h"
|
||||
#include "worldmap.h"
|
||||
|
||||
struct WMFaceWrapper {
|
||||
/* 00 */ s16 unk_00; // x?
|
||||
/* 02 */ s16 unk_02; // y?
|
||||
/* 04 */ struct FaceProc* faceProc;
|
||||
/* 08 */ u16 faceId;
|
||||
/* 0A */ s8 unk_0a; // possibly "fade direction" (+1 for fade in, -1 for fade out?)
|
||||
};
|
||||
|
||||
struct WMFaceHolderProc {
|
||||
/* 00 */ PROC_HEADER;
|
||||
/* 2C */ struct WMFaceWrapper faceWrapper[2];
|
||||
};
|
||||
|
||||
struct WMFaceCtrlProc {
|
||||
/* 00 */ PROC_HEADER;
|
||||
|
||||
/* 2A */ u16 unk_2a; // some index into an array, functionality appears to be unused
|
||||
/* 2C */ struct WMFaceHolderProc* faceHolderProc;
|
||||
/* 30 */ s8 increment;
|
||||
/* 31 */ u8 blendAmt;
|
||||
/* 32 */ u8 unk_32; // unreferenced
|
||||
/* 33 */ u8 unk_33; // initialized to 0 and unused
|
||||
/* 34 */ u8 unk_34; // initialized to 0 and unused
|
||||
};
|
||||
|
||||
//! FE8U = 0x080B820C
|
||||
void WorldMapFaceHolder_Init(struct WMFaceHolderProc* proc) {
|
||||
void WorldMapFaceHolder_Init(struct WMFaceHolderProc * proc)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
proc->faceWrapper[i].faceProc = NULL;
|
||||
proc->faceWrapper[i].unk_0a = 0;
|
||||
proc->faceWrapper[i].unk_02 = 0;
|
||||
proc->faceWrapper[i].unk_00 = 0;
|
||||
proc->faceWrapper[i].y = 0;
|
||||
proc->faceWrapper[i].x = 0;
|
||||
proc->faceWrapper[i].faceId |= 0xFFFF;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
struct ProcCmd CONST_DATA gProcScr_WorldMapFaceHolder[] = {
|
||||
struct ProcCmd CONST_DATA ProcScr_WorldMapFaceHolder[] = {
|
||||
PROC_MARK(8),
|
||||
PROC_CALL(WorldMapFaceHolder_Init),
|
||||
PROC_BLOCK,
|
||||
@ -53,15 +27,14 @@ struct ProcCmd CONST_DATA gProcScr_WorldMapFaceHolder[] = {
|
||||
};
|
||||
|
||||
//! FE8U = 0x080B823C
|
||||
void WMFaceCtrl_Init(struct WMFaceCtrlProc* proc) {
|
||||
proc->unk_2a = 0;
|
||||
proc->faceHolderProc = Proc_Start(gProcScr_WorldMapFaceHolder, proc);
|
||||
void WMFaceCtrl_Init(struct WMFaceCtrlProc * proc)
|
||||
{
|
||||
proc->timer = 0;
|
||||
proc->faceHolderProc = Proc_Start(ProcScr_WorldMapFaceHolder, proc);
|
||||
proc->increment = 0;
|
||||
proc->blendAmt = 0;
|
||||
proc->unk_33 = 0;
|
||||
proc->unk_34 = 0;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080B826C
|
||||
@ -92,7 +65,8 @@ int GetWMFaceVramOffset(void) {
|
||||
}
|
||||
|
||||
//! FE8U = 0x080B82C8
|
||||
void sub_80B82C8(int bg, u32 offset, int xIn, int yIn, u8 isFlippedMaybe) {
|
||||
void sub_80B82C8(int bg, u32 offset, int xIn, int yIn, u8 flip)
|
||||
{
|
||||
int bgX;
|
||||
u16* r0;
|
||||
int x;
|
||||
@ -105,30 +79,32 @@ void sub_80B82C8(int bg, u32 offset, int xIn, int yIn, u8 isFlippedMaybe) {
|
||||
|
||||
r0 = BG_GetMapBuffer(bg) + y * 0x20 + x;
|
||||
|
||||
sub_8006738(
|
||||
PutFaceOnBackGround(
|
||||
r0,
|
||||
(offset >> 5) + 0x4000,
|
||||
isFlippedMaybe
|
||||
flip
|
||||
);
|
||||
|
||||
BG_EnableSyncByMask(1 << (bg));
|
||||
|
||||
BG_SetPosition(bg, bgX, y_);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080B8350
|
||||
void HandleWMFaceFade(struct WMFaceCtrlProc* proc) {
|
||||
void HandleWMFaceFade(struct WMFaceCtrlProc * proc)
|
||||
{
|
||||
int i;
|
||||
|
||||
SetBlendConfig(1, proc->blendAmt >> 1, 0x10 - (proc->blendAmt >> 1), 0);
|
||||
|
||||
proc->blendAmt += proc->increment;
|
||||
|
||||
if (proc->blendAmt == 0) {
|
||||
for (i = 0; i < 2; i++) {
|
||||
if ((proc->faceHolderProc->faceWrapper[i].faceProc != NULL) && ((proc->faceHolderProc->faceWrapper[i].unk_0a == -1))) {
|
||||
if (proc->blendAmt == 0)
|
||||
{
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
if ((proc->faceHolderProc->faceWrapper[i].faceProc != NULL) && ((proc->faceHolderProc->faceWrapper[i].unk_0a == -1)))
|
||||
{
|
||||
EndFaceById(i);
|
||||
|
||||
proc->faceHolderProc->faceWrapper[i].unk_0a = 0;
|
||||
@ -139,11 +115,14 @@ void HandleWMFaceFade(struct WMFaceCtrlProc* proc) {
|
||||
proc->increment = 0;
|
||||
}
|
||||
|
||||
if (proc->blendAmt == 0x20) {
|
||||
for (i = 0; i < 2; i++) {
|
||||
struct FaceProc* faceProc = proc->faceHolderProc->faceWrapper[i].faceProc;
|
||||
if (proc->blendAmt == 0x20)
|
||||
{
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
struct FaceProc * faceProc = proc->faceHolderProc->faceWrapper[i].faceProc;
|
||||
|
||||
if (faceProc != NULL && (proc->faceHolderProc->faceWrapper[i].unk_0a == 1)) {
|
||||
if (faceProc != NULL && (proc->faceHolderProc->faceWrapper[i].unk_0a == 1))
|
||||
{
|
||||
SetFaceDisplayBits(faceProc, GetFaceDisplayBits(faceProc) & ~(FACE_DISP_BLEND));
|
||||
proc->faceHolderProc->faceWrapper[i].unk_0a = 0;
|
||||
}
|
||||
@ -151,39 +130,44 @@ void HandleWMFaceFade(struct WMFaceCtrlProc* proc) {
|
||||
|
||||
proc->increment = 0;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080B843C
|
||||
void sub_80B843C(struct WMFaceCtrlProc* proc) {
|
||||
void WMFaceCtrl_LoopExt(struct WMFaceCtrlProc * proc)
|
||||
{
|
||||
int i;
|
||||
int iVar10;
|
||||
struct WMFaceHolderProc* internalProc = proc->faceHolderProc;
|
||||
int bgMaybe = GetWMFaceBg();
|
||||
struct WMFaceHolderProc * internalProc = proc->faceHolderProc;
|
||||
int bg = GetWMFaceBg();
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
iVar10 = 0;
|
||||
|
||||
if (internalProc->faceWrapper[i].faceProc != NULL) {
|
||||
struct FaceProc* faceProc = internalProc->faceWrapper[i].faceProc;
|
||||
int x = internalProc->faceWrapper[i].unk_00;
|
||||
u16* yptrUnsigned = &internalProc->faceWrapper[i].unk_02;
|
||||
if (internalProc->faceWrapper[i].faceProc != NULL)
|
||||
{
|
||||
struct FaceProc * faceProc = internalProc->faceWrapper[i].faceProc;
|
||||
int x = internalProc->faceWrapper[i].x;
|
||||
u16 * yptrUnsigned = &internalProc->faceWrapper[i].y;
|
||||
|
||||
if (((*yptrUnsigned & 0x800) != 0) && ((*yptrUnsigned & 0xff) < 0x10)) {
|
||||
if ((*yptrUnsigned & 0x100) != 0) {
|
||||
if (((*yptrUnsigned & 0x800) != 0) && ((*yptrUnsigned & 0xff) < 0x10))
|
||||
{
|
||||
if ((*yptrUnsigned & 0x100) != 0)
|
||||
{
|
||||
faceProc->xPos = x + (((0x10 - (*yptrUnsigned & 0xff)) * 0x20 * (0x10 - (*yptrUnsigned & 0xff))) / 256);
|
||||
iVar10 = 1;
|
||||
}
|
||||
|
||||
if ((*yptrUnsigned & 0x200) != 0) {
|
||||
if ((*yptrUnsigned & 0x200) != 0)
|
||||
{
|
||||
faceProc->xPos = x - (((0x10 - (*yptrUnsigned & 0xff)) * 0x20 * (0x10 - (*yptrUnsigned & 0xff))) / 256);
|
||||
iVar10 = 1;
|
||||
}
|
||||
|
||||
(*yptrUnsigned)++;
|
||||
|
||||
if ((*yptrUnsigned & 0xff) > 0xf) {
|
||||
if ((*yptrUnsigned & 0xff) > 0xf)
|
||||
{
|
||||
iVar10 = 2;
|
||||
|
||||
SetFaceDisplayBits(faceProc, GetFaceDisplayBits(faceProc) &~ 0x4000);
|
||||
@ -191,56 +175,56 @@ void sub_80B843C(struct WMFaceCtrlProc* proc) {
|
||||
}
|
||||
}
|
||||
|
||||
if (((*yptrUnsigned & 0x1000) != 0) && ((*yptrUnsigned & 0xff) < 0x10)) {
|
||||
if ((*yptrUnsigned & 0xff) == 0) {
|
||||
if (((*yptrUnsigned & 0x1000) != 0) && ((*yptrUnsigned & 0xff) < 0x10))
|
||||
{
|
||||
if ((*yptrUnsigned & 0xff) == 0)
|
||||
SetFaceDisplayBits(faceProc, GetFaceDisplayBits(faceProc) | 0x4000);
|
||||
}
|
||||
|
||||
if ((*yptrUnsigned & 0x100) != 0) {
|
||||
if ((*yptrUnsigned & 0x100) != 0)
|
||||
{
|
||||
faceProc->xPos = ({ x - 0x20; }) + (((0x10 - (*yptrUnsigned & 0xff)) * 0x20 * (0x10 - (*yptrUnsigned & 0xff))) / 256);
|
||||
iVar10 = 1;
|
||||
}
|
||||
|
||||
if ((*yptrUnsigned & 0x200) != 0) {
|
||||
if ((*yptrUnsigned & 0x200) != 0)
|
||||
{
|
||||
faceProc->xPos = ({ x + 0x20; }) - (((0x10 - (*yptrUnsigned & 0xff)) * 0x20 * (0x10 - (*yptrUnsigned & 0xff))) / 256);
|
||||
iVar10 = 1;
|
||||
}
|
||||
|
||||
(*yptrUnsigned)++;
|
||||
|
||||
if ((*yptrUnsigned & 0xff) > 0xf) {
|
||||
if ((*yptrUnsigned & 0xff) > 0xf)
|
||||
iVar10 = 2;
|
||||
}
|
||||
}
|
||||
|
||||
switch (iVar10) {
|
||||
case 1:
|
||||
BG_Fill(BG_GetMapBuffer(bgMaybe), 0);
|
||||
sub_80B82C8(
|
||||
GetWMFaceBg(),
|
||||
GetWMFaceVramOffset(),
|
||||
faceProc->xPos,
|
||||
0x1c,
|
||||
(*yptrUnsigned >> 10) & 1
|
||||
);
|
||||
BG_EnableSyncByMask(1 << (bgMaybe));
|
||||
case 1:
|
||||
BG_Fill(BG_GetMapBuffer(bg), 0);
|
||||
sub_80B82C8(
|
||||
GetWMFaceBg(),
|
||||
GetWMFaceVramOffset(),
|
||||
faceProc->xPos,
|
||||
0x1c,
|
||||
(*yptrUnsigned >> 10) & 1
|
||||
);
|
||||
BG_EnableSyncByMask(1 << (bg));
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
BG_Fill(BG_GetMapBuffer(bgMaybe), 0);
|
||||
BG_EnableSyncByMask(1 << (bgMaybe));
|
||||
case 2:
|
||||
BG_Fill(BG_GetMapBuffer(bg), 0);
|
||||
BG_EnableSyncByMask(1 << (bg));
|
||||
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080B8630
|
||||
void WMFaceCtrl_Loop(struct WMFaceCtrlProc* proc) {
|
||||
void WMFaceCtrl_Loop(struct WMFaceCtrlProc * proc)
|
||||
{
|
||||
u8 gUnknown_08205F28[] = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 1, 1, 1, 1, 1, 1, 2, 2,
|
||||
@ -252,19 +236,15 @@ void WMFaceCtrl_Loop(struct WMFaceCtrlProc* proc) {
|
||||
-1,
|
||||
};
|
||||
|
||||
proc->unk_2a++;
|
||||
proc->timer++;
|
||||
|
||||
if (gUnknown_08205F28[proc->unk_2a] == 0xFF) {
|
||||
proc->unk_2a = 0;
|
||||
}
|
||||
if (gUnknown_08205F28[proc->timer] == (u8)-1)
|
||||
proc->timer = 0;
|
||||
|
||||
sub_80B843C(proc);
|
||||
WMFaceCtrl_LoopExt(proc);
|
||||
|
||||
if (proc->increment != 0) {
|
||||
if (proc->increment != 0)
|
||||
HandleWMFaceFade(proc);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080B867C
|
||||
@ -272,7 +252,7 @@ void nullsub_57(void) {
|
||||
return;
|
||||
}
|
||||
|
||||
struct ProcCmd CONST_DATA gProcScr_WorldMapFaceCtrl[] = {
|
||||
struct ProcCmd CONST_DATA ProcScr_WorldMapFaceCtrl[] = {
|
||||
PROC_MARK(8),
|
||||
PROC_SET_END_CB(nullsub_57),
|
||||
|
||||
@ -284,24 +264,24 @@ struct ProcCmd CONST_DATA gProcScr_WorldMapFaceCtrl[] = {
|
||||
|
||||
//! FE8U = 0x080B8680
|
||||
ProcPtr StartWMFaceCtrl(ProcPtr parent) {
|
||||
return Proc_Start(gProcScr_WorldMapFaceCtrl, parent);
|
||||
return Proc_Start(ProcScr_WorldMapFaceCtrl, parent);
|
||||
}
|
||||
|
||||
//! FE8U = 0x080B8694
|
||||
void EndWMFaceCtrl(void)
|
||||
{
|
||||
Proc_EndEach(gProcScr_WorldMapFaceCtrl);
|
||||
Proc_EndEach(ProcScr_WorldMapFaceCtrl);
|
||||
return;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080B86A4
|
||||
int GetWMFaceBlendAmt(void)
|
||||
{
|
||||
struct WMFaceCtrlProc* proc;
|
||||
struct WMFaceCtrlProc * proc;
|
||||
|
||||
Proc_Find(gProcScr_WorldMapFaceCtrl);
|
||||
Proc_Find(ProcScr_WorldMapFaceCtrl);
|
||||
|
||||
proc = Proc_Find(gProcScr_WorldMapFaceCtrl);
|
||||
proc = Proc_Find(ProcScr_WorldMapFaceCtrl);
|
||||
|
||||
if (proc) {
|
||||
return proc->blendAmt >> 1;
|
||||
@ -316,14 +296,17 @@ void WmDrawFace(int faceSlot, int faceId, u16 config)
|
||||
int bg;
|
||||
u32 offset;
|
||||
|
||||
struct WMFaceCtrlProc* proc = Proc_Find(gProcScr_WorldMapFaceCtrl);
|
||||
struct WMFaceCtrlProc * proc = Proc_Find(ProcScr_WorldMapFaceCtrl);
|
||||
|
||||
struct WMFaceWrapper* pWrapper = proc->faceHolderProc->faceWrapper + faceSlot;
|
||||
struct WMFaceWrapper * pWrapper = proc->faceHolderProc->faceWrapper + faceSlot;
|
||||
|
||||
if (gGMData.state.bits.state_3) {
|
||||
if (gGMData.state.bits.state_3)
|
||||
{
|
||||
SetBlendTargetA(0, 0, 1, 0, 0);
|
||||
SetBlendTargetB(0, 1, 0, 1, 1);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBlendTargetA(0, 1, 0, 0, 0);
|
||||
SetBlendTargetB(0, 0, 1, 1, 1);
|
||||
}
|
||||
@ -331,67 +314,65 @@ void WmDrawFace(int faceSlot, int faceId, u16 config)
|
||||
bg = GetWMFaceBg();
|
||||
offset = GetWMFaceVramOffset();
|
||||
|
||||
if (pWrapper->faceProc == NULL) {
|
||||
if (pWrapper->faceProc == NULL)
|
||||
{
|
||||
int x;
|
||||
int disp;
|
||||
struct FaceProc* faceProc;
|
||||
struct FaceProc * faceProc;
|
||||
|
||||
pWrapper->faceId = faceId;
|
||||
|
||||
pWrapper->unk_00 = config & 0x00ff;
|
||||
pWrapper->unk_02 = (config & 0xff00) + 0x800;
|
||||
pWrapper->x = config & 0x00ff;
|
||||
pWrapper->y = (config & 0xff00) + 0x800;
|
||||
|
||||
sub_80066FC(offset / CHR_SIZE, faceId);
|
||||
sub_800671C(4, faceId);
|
||||
|
||||
BG_Fill(BG_GetMapBuffer(bg), 0);
|
||||
|
||||
x = pWrapper->unk_00;
|
||||
x = pWrapper->x;
|
||||
|
||||
if (config & 0x400) {
|
||||
disp = (FACE_DISP_BIT_14 | FACE_DISP_BLEND | FACE_DISP_KIND(FACE_96x80) | FACE_DISP_HLAYER(FACE_HLAYER_1) | FACE_DISP_FLIPPED);
|
||||
} else {
|
||||
disp = (FACE_DISP_BIT_14 | FACE_DISP_BLEND | FACE_DISP_KIND(FACE_96x80) | FACE_DISP_HLAYER(FACE_HLAYER_1));
|
||||
}
|
||||
if (config & 0x400)
|
||||
disp = (FACE_DISP_HIDDEN | FACE_DISP_BLEND | FACE_DISP_KIND(FACE_96x80) | FACE_DISP_HLAYER(FACE_HLAYER_1) | FACE_DISP_FLIPPED);
|
||||
else
|
||||
disp = (FACE_DISP_HIDDEN | FACE_DISP_BLEND | FACE_DISP_KIND(FACE_96x80) | FACE_DISP_HLAYER(FACE_HLAYER_1));
|
||||
|
||||
if (config & 0x8000) {
|
||||
if (config & 0x8000)
|
||||
disp = disp | FACE_DISP_BIT_13;
|
||||
}
|
||||
|
||||
faceProc = StartFace2(faceSlot, faceId, x, 28, disp);
|
||||
|
||||
pWrapper->faceProc = faceProc;
|
||||
|
||||
if ((config & 0x6000) == 0x6000) {
|
||||
if ((config & 0x6000) == 0x6000)
|
||||
faceProc->spriteLayer = 6;
|
||||
} else if (config & 0x4000) {
|
||||
else if (config & 0x4000)
|
||||
faceProc->spriteLayer = 5;
|
||||
} else if (config & 0x2000) {
|
||||
else if (config & 0x2000)
|
||||
faceProc->spriteLayer = 4;
|
||||
} else {
|
||||
else
|
||||
faceProc->spriteLayer = 3;
|
||||
}
|
||||
|
||||
SetFaceBlinkControlById(faceSlot, 5);
|
||||
|
||||
pWrapper->unk_0a = +1;
|
||||
proc->increment = +2;
|
||||
|
||||
if (proc->blendAmt == 0x20) {
|
||||
if (proc->blendAmt == 0x20)
|
||||
{
|
||||
proc->blendAmt = 0;
|
||||
SetBlendConfig(1, 0, 0x10, 0);
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080B8844
|
||||
void WmClearFace(int faceSlot, u16 config) {
|
||||
void WmClearFace(int faceSlot, u16 config)
|
||||
{
|
||||
int bg;
|
||||
u32 offset;
|
||||
|
||||
struct WMFaceCtrlProc* proc = Proc_Find(gProcScr_WorldMapFaceCtrl);
|
||||
struct WMFaceCtrlProc * proc = Proc_Find(ProcScr_WorldMapFaceCtrl);
|
||||
|
||||
struct WMFaceWrapper* pWrapper = proc->faceHolderProc->faceWrapper + faceSlot;
|
||||
|
||||
@ -406,7 +387,7 @@ void WmClearFace(int faceSlot, u16 config) {
|
||||
bg = GetWMFaceBg();
|
||||
offset = GetWMFaceVramOffset();
|
||||
|
||||
if (pWrapper->faceProc != NULL && (pWrapper->unk_02 & 0x1000) == 0) {
|
||||
if (pWrapper->faceProc != NULL && (pWrapper->y & 0x1000) == 0) {
|
||||
int tmp;
|
||||
|
||||
sub_80066FC(offset / CHR_SIZE, (s16)pWrapper->faceId);
|
||||
@ -414,9 +395,9 @@ void WmClearFace(int faceSlot, u16 config) {
|
||||
|
||||
BG_Fill(BG_GetMapBuffer(bg), 0);
|
||||
|
||||
tmp = 0xFFFFFF00 & (u16)pWrapper->unk_02;
|
||||
tmp = 0xFFFFFF00 & (u16)pWrapper->y;
|
||||
// Seems to be required to match...
|
||||
tmp &= (u16)pWrapper->unk_02;
|
||||
tmp &= (u16)pWrapper->y;
|
||||
|
||||
if (config & 0x300) {
|
||||
tmp &= 0x0000FCFF;
|
||||
@ -427,7 +408,7 @@ void WmClearFace(int faceSlot, u16 config) {
|
||||
|
||||
tmp &= 0xff00;
|
||||
|
||||
pWrapper->unk_02 = tmp + 0x1000;
|
||||
pWrapper->y = tmp + 0x1000;
|
||||
|
||||
pWrapper->unk_0a = -1;
|
||||
proc->increment = -2;
|
||||
@ -437,39 +418,39 @@ void WmClearFace(int faceSlot, u16 config) {
|
||||
SetBlendConfig(1, 0x10, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080B895C
|
||||
void sub_80B895C(void) {
|
||||
void HideWmFace(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
struct WMFaceCtrlProc* proc = Proc_Find(gProcScr_WorldMapFaceCtrl);
|
||||
struct WMFaceCtrlProc * proc = Proc_Find(ProcScr_WorldMapFaceCtrl);
|
||||
|
||||
SetBlendTargetA(0, 0, 0, 0, 0);
|
||||
SetBlendTargetB(0, 0, 0, 1, 0);
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
struct WMFaceWrapper* pWrapper = &proc->faceHolderProc->faceWrapper[i];
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
struct WMFaceWrapper * pWrapper = &proc->faceHolderProc->faceWrapper[i];
|
||||
|
||||
struct FaceProc* faceProc = pWrapper->faceProc;
|
||||
struct FaceProc * faceProc = pWrapper->faceProc;
|
||||
|
||||
if (faceProc != NULL && (pWrapper->unk_02 & 0x1000) == 0) {
|
||||
SetFaceDisplayBits(faceProc, GetFaceDisplayBits(faceProc) | FACE_DISP_BIT_14);
|
||||
if (faceProc != NULL && (pWrapper->y & 0x1000) == 0)
|
||||
{
|
||||
SetFaceDisplayBits(faceProc, GetFaceDisplayBits(faceProc) | FACE_DISP_HIDDEN);
|
||||
|
||||
pWrapper->unk_02 &= ~0xff;
|
||||
pWrapper->unk_02 += 0x1000;
|
||||
pWrapper->y &= ~0xff;
|
||||
pWrapper->y += 0x1000;
|
||||
|
||||
pWrapper->unk_0a = -1;
|
||||
proc->increment = -2;
|
||||
|
||||
if (proc->blendAmt == 0) {
|
||||
if (proc->blendAmt == 0)
|
||||
{
|
||||
proc->blendAmt = 0x20;
|
||||
SetBlendConfig(0, 0x10, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -131,10 +131,10 @@ int GetPaletteIdForAllegience(int faction)
|
||||
|
||||
// clang-format off
|
||||
|
||||
struct ProcCmd CONST_DATA gProcScr_GmapUnit[] =
|
||||
struct ProcCmd CONST_DATA ProcScr_GmapUnit[] =
|
||||
{
|
||||
PROC_NAME("GmapUnit"),
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
|
||||
PROC_SET_END_CB(GmapUnit_Destruct),
|
||||
|
||||
@ -166,7 +166,7 @@ int NewMapUnit(struct GMapUnitContainerProc * container, u16 classId, int factio
|
||||
return -1;
|
||||
}
|
||||
|
||||
mapUnitProc = Proc_Start(gProcScr_GmapUnit, container->proc_parent);
|
||||
mapUnitProc = Proc_Start(ProcScr_GmapUnit, container->proc_parent);
|
||||
if (mapUnitProc == NULL)
|
||||
{
|
||||
return -2;
|
||||
@ -186,7 +186,7 @@ int NewMapUnit(struct GMapUnitContainerProc * container, u16 classId, int factio
|
||||
|
||||
if (ap == NULL)
|
||||
{
|
||||
Proc_End(gProcScr_GmapUnit);
|
||||
Proc_End(ProcScr_GmapUnit);
|
||||
return -3;
|
||||
}
|
||||
|
||||
@ -195,8 +195,8 @@ int NewMapUnit(struct GMapUnitContainerProc * container, u16 classId, int factio
|
||||
Decompress(MMS_GetGfx(classId), GetMapUnitMMSGfxBuffer(i));
|
||||
ap->pGraphics = GetMapUnitMMSGfxBuffer(i);
|
||||
|
||||
mapUnitProc->unk_30 = container->unk_2c;
|
||||
ap->tileBase = (i * 4) + container->unk_2c + (mapUnitProc->pal & 0xf) * 0x1000 + mapUnitProc->unk_2e;
|
||||
mapUnitProc->unk_30 = container->layer;
|
||||
ap->tileBase = (i * 4) + container->layer + (mapUnitProc->pal & 0xf) * 0x1000 + mapUnitProc->unk_2e;
|
||||
|
||||
mapUnitProc->ap = ap;
|
||||
|
||||
@ -346,7 +346,7 @@ void MapUnitC_SetFaction(struct GMapUnitContainerProc * container, int index, in
|
||||
|
||||
pal = GetPaletteIdForAllegience(mapUnitProc->faction);
|
||||
mapUnitProc->pal = pal;
|
||||
mapUnitProc->ap->tileBase = container->unk_2c + (index * 4) + (pal & 0xf) * 0x1000 + mapUnitProc->unk_2e;
|
||||
mapUnitProc->ap->tileBase = container->layer + (index * 4) + (pal & 0xf) * 0x1000 + mapUnitProc->unk_2e;
|
||||
|
||||
return;
|
||||
}
|
||||
@ -356,7 +356,7 @@ void MapUnitC_SetPalette(struct GMapUnitContainerProc * container, int index, in
|
||||
{
|
||||
struct GMapUnitProc * mapUnitProc = container->pMapUnitProcs[index];
|
||||
mapUnitProc->pal = pal;
|
||||
mapUnitProc->ap->tileBase = container->unk_2c + (index * 4) + (pal & 0xf) * 0x1000 + mapUnitProc->unk_2e;
|
||||
mapUnitProc->ap->tileBase = container->layer + (index * 4) + (pal & 0xf) * 0x1000 + mapUnitProc->unk_2e;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -417,8 +417,8 @@ s8 sub_80BB0E0(struct GMapUnitContainerProc * container, int index, int classId)
|
||||
Decompress(MMS_GetGfx(r2), GetMapUnitMMSGfxBuffer(index));
|
||||
|
||||
ap->pGraphics = GetMapUnitMMSGfxBuffer(index);
|
||||
mapUnitProc->unk_30 = container->unk_2c;
|
||||
ap->tileBase = container->unk_2c + (index * 4) + (mapUnitProc->pal & 0xf) * 0x1000 + mapUnitProc->unk_2e;
|
||||
mapUnitProc->unk_30 = container->layer;
|
||||
ap->tileBase = container->layer + (index * 4) + (mapUnitProc->pal & 0xf) * 0x1000 + mapUnitProc->unk_2e;
|
||||
mapUnitProc->ap = ap;
|
||||
}
|
||||
|
||||
@ -468,10 +468,10 @@ void GmapUnitContainer_Init(struct GMapUnitContainerProc * proc)
|
||||
|
||||
// clang-format off
|
||||
|
||||
struct ProcCmd CONST_DATA gProcScr_GmapUnitContainer[] =
|
||||
struct ProcCmd CONST_DATA ProcScr_GmapUnitContainer[] =
|
||||
{
|
||||
PROC_NAME("GmapUnit"),
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
|
||||
PROC_SET_END_CB(GmapUnitContainer_Destruct),
|
||||
|
||||
@ -486,8 +486,8 @@ struct ProcCmd CONST_DATA gProcScr_GmapUnitContainer[] =
|
||||
//! FE8U = 0x080BB1E8
|
||||
ProcPtr NewGmapUnitContainer(ProcPtr parent, int layer, int chr)
|
||||
{
|
||||
struct GMapUnitContainerProc * proc = Proc_Start(gProcScr_GmapUnitContainer, parent);
|
||||
proc->unk_2c = layer;
|
||||
struct GMapUnitContainerProc * proc = Proc_Start(ProcScr_GmapUnitContainer, parent);
|
||||
proc->layer = layer;
|
||||
proc->unk_30 = chr;
|
||||
|
||||
return proc;
|
||||
@ -588,7 +588,7 @@ void GmapUnitFade_Loop(struct GMapUnitFadeProc * proc)
|
||||
if (proc->unk_2e < proc->unk_2c)
|
||||
{
|
||||
int i;
|
||||
int var = sub_800B7E0(proc->unk_2e, proc->unk_2c, 0);
|
||||
int var = _DivArm1(proc->unk_2e, proc->unk_2c, 0);
|
||||
|
||||
for (i = 0; i < 0x10; i++)
|
||||
{
|
||||
@ -616,10 +616,10 @@ void GmapUnitFade_Loop(struct GMapUnitFadeProc * proc)
|
||||
|
||||
// clang-format off
|
||||
|
||||
struct ProcCmd CONST_DATA gProcScr_GmapUnitFade[] =
|
||||
struct ProcCmd CONST_DATA ProcScr_GmapUnitFade[] =
|
||||
{
|
||||
PROC_NAME("Gmap Unit Fade"),
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
|
||||
PROC_SET_END_CB(GmapUnitFade_Destruct),
|
||||
PROC_SLEEP(0),
|
||||
@ -639,11 +639,11 @@ ProcPtr StartGmapUnitFade(int index, int palA, int palB, int arg3, ProcPtr paren
|
||||
|
||||
if (parent)
|
||||
{
|
||||
proc = Proc_StartBlocking(gProcScr_GmapUnitFade, parent);
|
||||
proc = Proc_StartBlocking(ProcScr_GmapUnitFade, parent);
|
||||
}
|
||||
else
|
||||
{
|
||||
proc = Proc_Start(gProcScr_GmapUnitFade, PROC_TREE_3);
|
||||
proc = Proc_Start(ProcScr_GmapUnitFade, PROC_TREE_3);
|
||||
}
|
||||
|
||||
proc->unk_29 = palA;
|
||||
@ -670,14 +670,14 @@ ProcPtr StartGmapUnitFade(int index, int palA, int palB, int arg3, ProcPtr paren
|
||||
//! FE8U = 0x080BB47C
|
||||
void EndGmapUnitFade(void)
|
||||
{
|
||||
Proc_EndEach(gProcScr_GmapUnitFade);
|
||||
Proc_EndEach(ProcScr_GmapUnitFade);
|
||||
return;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080BB48C
|
||||
ProcPtr GetGmapUnitFade(void)
|
||||
{
|
||||
return Proc_Find(gProcScr_GmapUnitFade);
|
||||
return Proc_Find(ProcScr_GmapUnitFade);
|
||||
}
|
||||
|
||||
//! FE8U = 0x080BB49C
|
||||
|
@ -41,7 +41,7 @@ void GmapLineFade_80C0358(struct GmapLineFadeProc * proc)
|
||||
|
||||
u16 * buf = sub_80C1DA0(0, 1);
|
||||
|
||||
int coeff = sub_800B84C(proc->unk_2a, proc->unk_2c, 0);
|
||||
int coeff = _DivArm2(proc->unk_2a, proc->unk_2c, 0);
|
||||
s16 a = DivArm(0x1000, (coeff * -0x80)) + 0x80;
|
||||
s16 b = DivArm(0x1000, (coeff * -0x80)) + 0x50;
|
||||
|
||||
@ -56,7 +56,7 @@ void GmapLineFade_80C0358(struct GmapLineFadeProc * proc)
|
||||
if (i >= b)
|
||||
{
|
||||
s16 tmp = (i - b);
|
||||
coeff = sub_800B84C(tmp, 0x30, 0);
|
||||
coeff = _DivArm2(tmp, 0x30, 0);
|
||||
buf[i] = DivArm(0x1000, (coeff = (0x1000 - coeff)) * 0x10);
|
||||
continue;
|
||||
}
|
||||
@ -142,10 +142,10 @@ void GmapLineFade_Loop(struct GmapLineFadeProc * proc)
|
||||
|
||||
// clang-format off
|
||||
|
||||
struct ProcCmd CONST_DATA gProcScr_GmapLineFade[] =
|
||||
struct ProcCmd CONST_DATA ProcScr_GmapLineFade[] =
|
||||
{
|
||||
PROC_NAME("Gmap Line Fade"),
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
|
||||
PROC_SET_END_CB(GmapLineFade_OnEnd),
|
||||
|
||||
@ -166,11 +166,11 @@ ProcPtr StartGmapLineFade(int unk, ProcPtr parent)
|
||||
|
||||
if (parent != NULL)
|
||||
{
|
||||
proc = Proc_StartBlocking(gProcScr_GmapLineFade, parent);
|
||||
proc = Proc_StartBlocking(ProcScr_GmapLineFade, parent);
|
||||
}
|
||||
else
|
||||
{
|
||||
proc = Proc_Start(gProcScr_GmapLineFade, PROC_TREE_3);
|
||||
proc = Proc_Start(ProcScr_GmapLineFade, PROC_TREE_3);
|
||||
}
|
||||
|
||||
proc->unk_29 = unk;
|
||||
@ -181,12 +181,12 @@ ProcPtr StartGmapLineFade(int unk, ProcPtr parent)
|
||||
//! FE8U = 0x080C0520
|
||||
void EndGmapLineFade(void)
|
||||
{
|
||||
Proc_EndEach(gProcScr_GmapLineFade);
|
||||
Proc_EndEach(ProcScr_GmapLineFade);
|
||||
return;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080C0530
|
||||
bool IsGmapLineFadeActive(void)
|
||||
{
|
||||
return Proc_Find(gProcScr_GmapLineFade) ? TRUE : FALSE;
|
||||
return Proc_Find(ProcScr_GmapLineFade) ? TRUE : FALSE;
|
||||
}
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "worldmap.h"
|
||||
|
||||
// TODO: In "worldmap_scrollmanage.c", the signature returns a ProcPtr instead of s8/bool
|
||||
s8 FindGmScrollManage(void);
|
||||
s8 GmScrollManageExist(void);
|
||||
|
||||
// TODO: Implicit declaration?
|
||||
void GetWMCenteredCameraPosition(int, int, s16 *, s16 *);
|
||||
@ -64,9 +64,9 @@ struct Proc8A3DD08
|
||||
//! FE8U = 0x080B8A18
|
||||
void WorldMap_Destruct(struct WorldMapMainProc * proc)
|
||||
{
|
||||
Proc_End(proc->unk_50);
|
||||
Proc_End(proc->gm_cursor);
|
||||
Proc_End(proc->gm_screen);
|
||||
Proc_End(proc->unk_48);
|
||||
Proc_End(proc->gm_icon);
|
||||
|
||||
SetSecondaryHBlankHandler(NULL);
|
||||
|
||||
@ -83,8 +83,8 @@ void WorldMap_Destruct(struct WorldMapMainProc * proc)
|
||||
sub_80BF15C();
|
||||
EndWorldmapMinimap();
|
||||
|
||||
gGMData.state.bits.state_6 = 0;
|
||||
gGMData.state.bits.state_7 = 0;
|
||||
gGMData.state.bits.skip_wm = 0;
|
||||
gGMData.state.bits.no_fade = 0;
|
||||
gGMData.state.bits.state_0 = 0;
|
||||
|
||||
return;
|
||||
@ -104,9 +104,9 @@ void sub_80B8A7C(struct WorldMapMainProc * proc)
|
||||
|
||||
proc->flags_1 = 1;
|
||||
|
||||
gGMData.unk01 = 0;
|
||||
gGMData.sprite_disp = 0;
|
||||
|
||||
sub_80BE0A4(proc->unk_54, 0, &x1, &y1);
|
||||
sub_80BE0A4(proc->gm_mu, 0, &x1, &y1);
|
||||
GetWMCenteredCameraPosition(x1, y1 - 14, &x2, &y2);
|
||||
|
||||
unk = sub_80C0834(gGMData.xCamera, gGMData.yCamera, x2, y2, 2);
|
||||
@ -135,12 +135,10 @@ void sub_80B8A7C(struct WorldMapMainProc * proc)
|
||||
return;
|
||||
}
|
||||
|
||||
s8 sub_80BF490(void);
|
||||
|
||||
//! FE8U = 0x080B8B3C
|
||||
void sub_80B8B3C(struct WorldMapMainProc * proc)
|
||||
{
|
||||
if (sub_80BF490() == 0)
|
||||
if (CheckGmScrolling() == 0)
|
||||
{
|
||||
proc->unk_41 = 20;
|
||||
Proc_Break(proc);
|
||||
@ -180,7 +178,7 @@ void sub_80B8BA4(struct WorldMapMainProc * proc)
|
||||
{
|
||||
struct UnknownSub80BDEB4 a;
|
||||
|
||||
if (sub_80BE12C(proc->unk_54, 0) != 0)
|
||||
if (sub_80BE12C(proc->gm_mu, 0) != 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -215,7 +213,7 @@ void sub_80B8BA4(struct WorldMapMainProc * proc)
|
||||
{
|
||||
int b = sub_80BD28C(proc->unk_40);
|
||||
int c = sub_80BD28C(proc->unk_40 + 1);
|
||||
GmMu_80BE108(proc->unk_54, 0, 1);
|
||||
GmMu_80BE108(proc->gm_mu, 0, 1);
|
||||
|
||||
a.unk_00 = 0;
|
||||
a.unk_06 = b;
|
||||
@ -227,7 +225,7 @@ void sub_80B8BA4(struct WorldMapMainProc * proc)
|
||||
a.unk_03 = 0xff;
|
||||
a.unk_04 = 4;
|
||||
|
||||
sub_80BDEB4(proc->unk_54, &a);
|
||||
sub_80BDEB4(proc->gm_mu, &a);
|
||||
proc->unk_41 = 8;
|
||||
proc->unk_40++;
|
||||
}
|
||||
@ -249,7 +247,7 @@ void sub_80B8BA4(struct WorldMapMainProc * proc)
|
||||
|
||||
proc->flags_1 = 0;
|
||||
gGMData.units[0].location = sub_80BD28C(proc->unk_40);
|
||||
GmMu_80BE108(proc->unk_54, 0, 0);
|
||||
GmMu_80BE108(proc->gm_mu, 0, 0);
|
||||
|
||||
location = gGMData.units[0].location;
|
||||
if (location[gWMNodeData].placementFlag == GMAP_NODE_PLACEMENT_DUNGEON)
|
||||
@ -264,7 +262,7 @@ void sub_80B8BA4(struct WorldMapMainProc * proc)
|
||||
}
|
||||
else
|
||||
{
|
||||
gGMData.unk01 = 1;
|
||||
gGMData.sprite_disp = 1;
|
||||
Proc_Break(proc);
|
||||
}
|
||||
}
|
||||
@ -417,7 +415,6 @@ void sub_80B8FD4(void)
|
||||
{
|
||||
gGMData.state.bits.state_0 = 1;
|
||||
gGMData.state.bits.state_3 = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080B8FEC
|
||||
@ -427,12 +424,12 @@ void sub_80B8FEC(struct WorldMapMainProc * proc)
|
||||
|
||||
if (id >= 0)
|
||||
{
|
||||
proc->unk_48->nodeId = id;
|
||||
proc->unk_48->unk_32_1 = 1;
|
||||
proc->gm_icon->nodeId = id;
|
||||
proc->gm_icon->merge_next_node = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
proc->unk_48->unk_32_1 = 0;
|
||||
proc->gm_icon->merge_next_node = false;
|
||||
}
|
||||
|
||||
return;
|
||||
@ -455,11 +452,11 @@ void sub_80B9028(struct WorldMapMainProc * proc)
|
||||
|
||||
if (gGMData.units[i].state & 2)
|
||||
{
|
||||
MapMU_SetUnitClass(proc->unk_54, i, gGMData.units[i].id, -1, gGMData.units[i].location);
|
||||
MapMU_SetUnitClass(proc->gm_mu, i, gGMData.units[i].id, -1, gGMData.units[i].location);
|
||||
}
|
||||
else
|
||||
{
|
||||
MapMU_SetUnitChar(proc->unk_54, i, gGMData.units[i].id, -1, gGMData.units[i].location);
|
||||
MapMU_SetUnitChar(proc->gm_mu, i, gGMData.units[i].id, -1, gGMData.units[i].location);
|
||||
}
|
||||
|
||||
// TODO: This matches but using a Vec2 does not
|
||||
@ -468,9 +465,9 @@ void sub_80B9028(struct WorldMapMainProc * proc)
|
||||
b = &unk[1];
|
||||
*b = gGMData.units[i].location[gWMNodeData].y;
|
||||
|
||||
GmMu_SetPosition(proc->unk_54, i, *a, *b);
|
||||
GmMu_SetPosition(proc->gm_mu, i, *a, *b);
|
||||
|
||||
GmShowMuUnit(proc->unk_54, i);
|
||||
GmShowMuUnit(proc->gm_mu, i);
|
||||
}
|
||||
|
||||
return;
|
||||
@ -486,7 +483,7 @@ void sub_80B90CC(struct WorldMapMainProc * proc)
|
||||
|
||||
for (i = 4; i < 7; i++)
|
||||
{
|
||||
GmMu_RemoveUnit(proc->unk_54, i);
|
||||
GmMu_RemoveUnit(proc->gm_mu, i);
|
||||
gGMData.units[i].id = 0;
|
||||
gGMData.units[i].state &= ~2;
|
||||
gGMData.units[i].state &= ~1;
|
||||
@ -507,8 +504,8 @@ void sub_80B9114(struct WorldMapMainProc * proc)
|
||||
{
|
||||
if (gGMData.nodes[i].state & 2)
|
||||
{
|
||||
proc->unk_48->nodeId = i;
|
||||
proc->unk_48->unk_32_1 = 1;
|
||||
proc->gm_icon->nodeId = i;
|
||||
proc->gm_icon->merge_next_node = true;
|
||||
|
||||
break;
|
||||
}
|
||||
@ -518,7 +515,7 @@ void sub_80B9114(struct WorldMapMainProc * proc)
|
||||
}
|
||||
|
||||
//! FE8U = 0x080B9154
|
||||
void sub_80B9154(struct WorldMapMainProc * proc)
|
||||
void WorldMap_Init(struct WorldMapMainProc * proc)
|
||||
{
|
||||
SetupGraphicSystemsForWorldMap();
|
||||
|
||||
@ -526,10 +523,10 @@ void sub_80B9154(struct WorldMapMainProc * proc)
|
||||
DeployEveryUnit(proc);
|
||||
|
||||
proc->gm_screen = NewMapScreen(PROC_TREE_5);
|
||||
proc->unk_48 = sub_80BB9A4(PROC_TREE_5, 0, 3, 10, proc->gm_screen);
|
||||
proc->unk_4c = NewGmapUnitContainer(proc->gm_screen, 0x280, 0xc);
|
||||
proc->unk_50 = NewGmapCursor(PROC_TREE_5, 0x12c0, 4, proc->gm_screen);
|
||||
proc->unk_54 = StartGmMu(proc);
|
||||
proc->gm_icon = StartGmNodeIconDisplay(PROC_TREE_5, 0, 3, 10, proc->gm_screen);
|
||||
proc->gm_unitc = NewGmapUnitContainer(proc->gm_screen, 0x280, 0xc);
|
||||
proc->gm_cursor = NewGmapCursor(PROC_TREE_5, 0x12c0, 4, proc->gm_screen);
|
||||
proc->gm_mu = StartGmMu(proc);
|
||||
|
||||
RefreshGmNodeLinks(&gGMData);
|
||||
StartWmTextHandler(proc);
|
||||
@ -546,16 +543,14 @@ void sub_80B9154(struct WorldMapMainProc * proc)
|
||||
if (gPlaySt.chapterStateBits & PLAY_FLAG_POSTGAME)
|
||||
{
|
||||
ResetGmStoryNode();
|
||||
proc->unk_48->unk_32_1 = 0;
|
||||
proc->gm_icon->merge_next_node = false;
|
||||
}
|
||||
|
||||
proc->unk_2a = 0;
|
||||
|
||||
return;
|
||||
proc->delay_timer = 0;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080B9218
|
||||
void sub_80B9218(ProcPtr proc)
|
||||
void WmMain_MoveCamera(ProcPtr proc)
|
||||
{
|
||||
s16 a, b, c, d;
|
||||
s16 cough;
|
||||
@ -599,8 +594,6 @@ void sub_80B9218(ProcPtr proc)
|
||||
|
||||
gGMData.xCamera = c;
|
||||
gGMData.yCamera = d;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080B92D0
|
||||
@ -685,53 +678,50 @@ s8 sub_80B92D0(struct WorldMapMainProc * param_1, int param_2)
|
||||
}
|
||||
|
||||
//! FE8U = 0x080B93E0
|
||||
void sub_80B93E0(struct WorldMapMainProc * proc)
|
||||
void WmMain_MoveCursor(struct WorldMapMainProc * proc)
|
||||
{
|
||||
s16 xCursorPrev;
|
||||
s16 yCursorPrev;
|
||||
s16 xCursorNew;
|
||||
s16 yCursorNew;
|
||||
int keys;
|
||||
int speedMaybe;
|
||||
int duration;
|
||||
struct Vec2 pos;
|
||||
|
||||
if (gKeyStatusPtr->heldKeys & B_BUTTON)
|
||||
{
|
||||
speedMaybe = 2;
|
||||
proc->unk_2a = 0;
|
||||
/* If held B button, fasten cursor moving */
|
||||
duration = 2;
|
||||
proc->delay_timer = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
speedMaybe = 4;
|
||||
}
|
||||
duration = 4;
|
||||
|
||||
if (proc->unk_2a > 0)
|
||||
if (proc->delay_timer > 0)
|
||||
{
|
||||
proc->unk_2a--;
|
||||
proc->delay_timer--;
|
||||
return;
|
||||
}
|
||||
|
||||
if (GmMoveCursorExists())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
if (gKeyStatusPtr->heldKeys & B_BUTTON)
|
||||
{
|
||||
keys = gKeyStatusPtr->heldKeys & DPAD_ANY;
|
||||
proc->unk_2a = 10;
|
||||
proc->delay_timer = 10;
|
||||
}
|
||||
else if (gKeyStatusPtr->newKeys & DPAD_ANY)
|
||||
{
|
||||
proc->unk_2a = 10;
|
||||
proc->delay_timer = 10;
|
||||
keys = gKeyStatusPtr->newKeys & DPAD_ANY;
|
||||
}
|
||||
else
|
||||
{
|
||||
keys = gKeyStatusPtr->heldKeys & DPAD_ANY;
|
||||
proc->unk_2a = 0;
|
||||
proc->delay_timer = 0;
|
||||
}
|
||||
|
||||
if (keys == 0)
|
||||
@ -747,40 +737,24 @@ void sub_80B93E0(struct WorldMapMainProc * proc)
|
||||
yCursorNew = yCursorPrev;
|
||||
|
||||
if (keys & DPAD_RIGHT)
|
||||
{
|
||||
xCursorNew++;
|
||||
}
|
||||
else if (keys & DPAD_LEFT)
|
||||
{
|
||||
xCursorNew--;
|
||||
}
|
||||
|
||||
if (keys & DPAD_DOWN)
|
||||
{
|
||||
yCursorNew++;
|
||||
}
|
||||
else if (keys & DPAD_UP)
|
||||
{
|
||||
yCursorNew--;
|
||||
}
|
||||
|
||||
if (xCursorNew < 1)
|
||||
{
|
||||
xCursorNew = 1;
|
||||
}
|
||||
else if (xCursorNew > 28)
|
||||
{
|
||||
xCursorNew = 28;
|
||||
}
|
||||
|
||||
if (yCursorNew < 1)
|
||||
{
|
||||
yCursorNew = 1;
|
||||
}
|
||||
else if (yCursorNew > 18)
|
||||
{
|
||||
yCursorNew = 18;
|
||||
}
|
||||
|
||||
if ((xCursorPrev != xCursorNew) || (yCursorPrev != yCursorNew))
|
||||
{
|
||||
@ -789,10 +763,8 @@ void sub_80B93E0(struct WorldMapMainProc * proc)
|
||||
pos.x = xCursorNew * 16 + 8;
|
||||
pos.y = yCursorNew * 16 + 8;
|
||||
|
||||
StartGmMoveCursor(0, &pos, speedMaybe, 0, proc);
|
||||
StartGmMoveCursor(0, &pos, duration, 0, proc);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
@ -802,17 +774,17 @@ struct ProcCmd CONST_DATA ProcScr_WorldMapMain[] =
|
||||
PROC_SET_END_CB(WorldMap_Destruct),
|
||||
|
||||
PROC_CALL(sub_80B8FD4),
|
||||
PROC_CALL(sub_80B9154),
|
||||
PROC_CALL(WorldMap_Init),
|
||||
|
||||
PROC_CALL_ARG(_FadeBgmOut, 1),
|
||||
PROC_SLEEP(4),
|
||||
|
||||
PROC_CALL(WorldMap_SetupChapterStuff),
|
||||
PROC_CALL(WorldMap_CallBeginningEvent),
|
||||
PROC_SLEEP(1),
|
||||
|
||||
PROC_LABEL(0),
|
||||
PROC_LABEL(1),
|
||||
PROC_REPEAT(sub_80B9BA4),
|
||||
PROC_REPEAT(WorldMap_PostBeginningEvent),
|
||||
PROC_CALL(WorldMap_GenerateRandomMonsters),
|
||||
PROC_CALL(WorldMap_SetMonsterMergedState),
|
||||
|
||||
@ -840,7 +812,7 @@ PROC_LABEL(3),
|
||||
|
||||
PROC_LABEL(4),
|
||||
PROC_CALL(sub_80B97F8),
|
||||
PROC_REPEAT(sub_80B9804),
|
||||
PROC_REPEAT(WorldMap_Loop),
|
||||
|
||||
PROC_BLOCK,
|
||||
|
||||
@ -878,7 +850,7 @@ PROC_LABEL(9),
|
||||
PROC_CALL(sub_80B9810),
|
||||
PROC_CALL(sub_80B9820),
|
||||
PROC_YIELD,
|
||||
PROC_CALL(sub_80B9154),
|
||||
PROC_CALL(WorldMap_Init),
|
||||
|
||||
PROC_GOTO(23),
|
||||
|
||||
@ -886,8 +858,8 @@ PROC_LABEL(10),
|
||||
PROC_CALL(StartFastFadeToBlack),
|
||||
PROC_REPEAT(WaitForFade),
|
||||
PROC_CALL(sub_80B9810),
|
||||
PROC_CALL_2(sub_80B987C),
|
||||
PROC_CALL(sub_80B9154),
|
||||
PROC_CALL_2(WorldMap_CallGuide),
|
||||
PROC_CALL(WorldMap_Init),
|
||||
PROC_CALL(sub_80B989C),
|
||||
PROC_SLEEP(1),
|
||||
PROC_CALL(sub_80B98A8),
|
||||
@ -901,7 +873,7 @@ PROC_LABEL(11),
|
||||
PROC_REPEAT(WaitForFade),
|
||||
PROC_CALL(sub_80B9810),
|
||||
PROC_CALL_2(sub_80B98F8),
|
||||
PROC_CALL(sub_80B9154),
|
||||
PROC_CALL(WorldMap_Init),
|
||||
PROC_CALL(sub_80B9918),
|
||||
PROC_SLEEP(1),
|
||||
PROC_CALL(sub_80B9924),
|
||||
@ -915,7 +887,7 @@ PROC_LABEL(12),
|
||||
PROC_REPEAT(WaitForFade),
|
||||
PROC_CALL(sub_80B9810),
|
||||
PROC_CALL_2(StartWorldmapStatusScreen),
|
||||
PROC_CALL(sub_80B9154),
|
||||
PROC_CALL(WorldMap_Init),
|
||||
PROC_CALL(sub_80B9994),
|
||||
PROC_SLEEP(1),
|
||||
PROC_CALL(sub_80B99A0),
|
||||
@ -931,7 +903,7 @@ PROC_LABEL(13),
|
||||
PROC_CALL(sub_80B9810),
|
||||
PROC_CALL(Make6C_SaveMenuPostChapter),
|
||||
PROC_YIELD,
|
||||
PROC_CALL(sub_80B9154),
|
||||
PROC_CALL(WorldMap_Init),
|
||||
|
||||
PROC_GOTO(23),
|
||||
|
||||
@ -942,7 +914,7 @@ PROC_LABEL(14),
|
||||
// fallthrough
|
||||
|
||||
PROC_LABEL(15),
|
||||
PROC_CALL(WorldMap_InitChapterTransition),
|
||||
PROC_CALL(WorldMap_CallIntroEvent),
|
||||
PROC_REPEAT(WorldMap_WaitForChapterIntroEvents),
|
||||
PROC_CALL(WorldMap_HideEverything),
|
||||
|
||||
@ -984,7 +956,7 @@ PROC_LABEL(19),
|
||||
PROC_CALL(sub_80B9810),
|
||||
PROC_CALL(WorldMap_StartArmory),
|
||||
PROC_YIELD,
|
||||
PROC_CALL(sub_80B9154),
|
||||
PROC_CALL(WorldMap_Init),
|
||||
|
||||
PROC_GOTO(24),
|
||||
|
||||
@ -994,7 +966,7 @@ PROC_LABEL(20),
|
||||
PROC_CALL(sub_80B9810),
|
||||
PROC_CALL(WorldMap_StartVendor),
|
||||
PROC_YIELD,
|
||||
PROC_CALL(sub_80B9154),
|
||||
PROC_CALL(WorldMap_Init),
|
||||
|
||||
PROC_GOTO(24),
|
||||
|
||||
@ -1004,7 +976,7 @@ PROC_LABEL(21),
|
||||
PROC_CALL(sub_80B9810),
|
||||
PROC_CALL(WorldMap_StartSecretShop),
|
||||
PROC_YIELD,
|
||||
PROC_CALL(sub_80B9154),
|
||||
PROC_CALL(WorldMap_Init),
|
||||
|
||||
PROC_GOTO(24),
|
||||
|
||||
@ -1014,7 +986,7 @@ PROC_LABEL(22),
|
||||
PROC_CALL(sub_80B9810),
|
||||
PROC_CALL(sub_80B9F44),
|
||||
PROC_YIELD,
|
||||
PROC_CALL(sub_80B9154),
|
||||
PROC_CALL(WorldMap_Init),
|
||||
|
||||
PROC_GOTO(24),
|
||||
|
||||
@ -1037,9 +1009,7 @@ PROC_LABEL(23),
|
||||
PROC_LABEL(25),
|
||||
PROC_SLEEP(16),
|
||||
PROC_CALL(ResetWorldMapScreen),
|
||||
|
||||
PROC_CALL(NULL_080B9F08),
|
||||
|
||||
PROC_END,
|
||||
};
|
||||
|
||||
@ -1136,7 +1106,7 @@ void sub_80B961C(ProcPtr proc, int nodeId)
|
||||
|
||||
StartGmScroll(-1, -1, xOut, yOut, unk, 0);
|
||||
|
||||
gGMData.unk01 = 0;
|
||||
gGMData.sprite_disp = 0;
|
||||
|
||||
Proc_Goto(proc, 8);
|
||||
|
||||
@ -1146,7 +1116,7 @@ void sub_80B961C(ProcPtr proc, int nodeId)
|
||||
//! FE8U = 0x080B96DC
|
||||
void sub_80B96DC(ProcPtr proc)
|
||||
{
|
||||
if (!FindGmScrollManage())
|
||||
if (!GmScrollManageExist())
|
||||
{
|
||||
Proc_Break(proc);
|
||||
}
|
||||
@ -1155,7 +1125,7 @@ void sub_80B96DC(ProcPtr proc)
|
||||
}
|
||||
|
||||
//! FE8U = 0x080B96F8
|
||||
void sub_80B96F8(struct WorldMapMainProc * proc)
|
||||
void WorldMap_LoopExt(struct WorldMapMainProc * proc)
|
||||
{
|
||||
int nodeId;
|
||||
|
||||
@ -1174,7 +1144,7 @@ void sub_80B96F8(struct WorldMapMainProc * proc)
|
||||
}
|
||||
}
|
||||
|
||||
nodeId = GetNodeAtPosition(proc->unk_48, x >> 8, y >> 8, 0, 0);
|
||||
nodeId = GetNodeAtPosition(proc->gm_icon, x >> 8, y >> 8, 0, 0);
|
||||
if (nodeId >= 0)
|
||||
{
|
||||
if (gKeyStatusPtr->newKeys & A_BUTTON)
|
||||
@ -1210,10 +1180,10 @@ void sub_80B96F8(struct WorldMapMainProc * proc)
|
||||
}
|
||||
else
|
||||
{
|
||||
sub_80B93E0(proc);
|
||||
WmMain_MoveCursor(proc);
|
||||
gGMData.ix = x;
|
||||
gGMData.iy = y;
|
||||
sub_80B9218(proc);
|
||||
WmMain_MoveCamera(proc);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -1221,22 +1191,20 @@ void sub_80B96F8(struct WorldMapMainProc * proc)
|
||||
//! FE8U = 0x080B97F8
|
||||
void sub_80B97F8(void)
|
||||
{
|
||||
gGMData.unk01 = 1;
|
||||
return;
|
||||
gGMData.sprite_disp = 1;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080B9804
|
||||
void sub_80B9804(ProcPtr proc)
|
||||
void WorldMap_Loop(ProcPtr proc)
|
||||
{
|
||||
sub_80B96F8(proc);
|
||||
return;
|
||||
WorldMap_LoopExt(proc);
|
||||
}
|
||||
|
||||
//! FE8U = 0x080B9810
|
||||
void sub_80B9810(ProcPtr unused)
|
||||
{
|
||||
ClearWmHblank();
|
||||
Proc_EndEachMarked(PROC_MARK_8);
|
||||
Proc_EndEachMarked(PROC_MARK_WMSTUFF);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1257,7 +1225,7 @@ void sub_80B982C(struct WorldMapMainProc * proc)
|
||||
|
||||
pScreenProc->gmroute->flags |= 3;
|
||||
|
||||
MapUnitC_SetGfxNeedsUpdate(proc->unk_4c, -1);
|
||||
MapUnitC_SetGfxNeedsUpdate(proc->gm_unitc, -1);
|
||||
|
||||
SetDispEnable(1, 1, 1, 1, 1);
|
||||
|
||||
@ -1265,9 +1233,9 @@ void sub_80B982C(struct WorldMapMainProc * proc)
|
||||
}
|
||||
|
||||
//! FE8U = 0x080B987C
|
||||
s8 sub_80B987C(ProcPtr proc)
|
||||
s8 WorldMap_CallGuide(ProcPtr proc)
|
||||
{
|
||||
Proc_BlockEachMarked(PROC_MARK_8);
|
||||
Proc_BlockEachMarked(PROC_MARK_WMSTUFF);
|
||||
Proc_StartBlocking(ProcScr_E_Guide2, proc);
|
||||
return 0;
|
||||
}
|
||||
@ -1275,8 +1243,7 @@ s8 sub_80B987C(ProcPtr proc)
|
||||
//! FE8U = 0x080B989C
|
||||
void sub_80B989C(void)
|
||||
{
|
||||
Proc_UnblockEachMarked(PROC_MARK_8);
|
||||
return;
|
||||
Proc_UnblockEachMarked(PROC_MARK_WMSTUFF);
|
||||
}
|
||||
|
||||
//! FE8U = 0x080B98A8
|
||||
@ -1289,7 +1256,7 @@ void sub_80B98A8(struct WorldMapMainProc * proc)
|
||||
|
||||
pScreenProc->gmroute->flags |= 3;
|
||||
|
||||
MapUnitC_SetGfxNeedsUpdate(proc->unk_4c, -1);
|
||||
MapUnitC_SetGfxNeedsUpdate(proc->gm_unitc, -1);
|
||||
|
||||
SetDispEnable(1, 1, 1, 1, 1);
|
||||
|
||||
@ -1299,15 +1266,15 @@ void sub_80B98A8(struct WorldMapMainProc * proc)
|
||||
//! FE8U = 0x080B98F8
|
||||
s8 sub_80B98F8(ProcPtr proc)
|
||||
{
|
||||
Proc_BlockEachMarked(PROC_MARK_8);
|
||||
Proc_StartBlocking(gProcScr_Config3, proc);
|
||||
Proc_BlockEachMarked(PROC_MARK_WMSTUFF);
|
||||
Proc_StartBlocking(ProcScr_Config3, proc);
|
||||
return 0;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080B9918
|
||||
void sub_80B9918(void)
|
||||
{
|
||||
Proc_UnblockEachMarked(PROC_MARK_8);
|
||||
Proc_UnblockEachMarked(PROC_MARK_WMSTUFF);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1321,7 +1288,7 @@ void sub_80B9924(struct WorldMapMainProc * proc)
|
||||
|
||||
pScreenProc->gmroute->flags |= 3;
|
||||
|
||||
MapUnitC_SetGfxNeedsUpdate(proc->unk_4c, -1);
|
||||
MapUnitC_SetGfxNeedsUpdate(proc->gm_unitc, -1);
|
||||
|
||||
SetDispEnable(1, 1, 1, 1, 1);
|
||||
|
||||
@ -1331,15 +1298,15 @@ void sub_80B9924(struct WorldMapMainProc * proc)
|
||||
//! FE8U = 0x080B9974
|
||||
s8 StartWorldmapStatusScreen(ProcPtr proc)
|
||||
{
|
||||
Proc_BlockEachMarked(PROC_MARK_8);
|
||||
Proc_StartBlocking(gProcScr_WorldmapStatusUi, proc);
|
||||
Proc_BlockEachMarked(PROC_MARK_WMSTUFF);
|
||||
Proc_StartBlocking(ProcScr_WorldmapStatusUi, proc);
|
||||
return 0;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080B9994
|
||||
void sub_80B9994(void)
|
||||
{
|
||||
Proc_UnblockEachMarked(PROC_MARK_8);
|
||||
Proc_UnblockEachMarked(PROC_MARK_WMSTUFF);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1353,7 +1320,7 @@ void sub_80B99A0(struct WorldMapMainProc * proc)
|
||||
|
||||
pScreenProc->gmroute->flags |= 3;
|
||||
|
||||
MapUnitC_SetGfxNeedsUpdate(proc->unk_4c, -1);
|
||||
MapUnitC_SetGfxNeedsUpdate(proc->gm_unitc, -1);
|
||||
|
||||
SetDispEnable(1, 1, 1, 1, 1);
|
||||
|
||||
@ -1390,9 +1357,9 @@ void sub_80B9A34(struct WorldMapMainProc * proc)
|
||||
//! FE8U = 0x080B9A58
|
||||
void sub_80B9A58(struct WorldMapMainProc * proc)
|
||||
{
|
||||
GmMu_80BE108(proc->unk_54, 0, 0);
|
||||
GmMu_80BE108(proc->gm_mu, 0, 0);
|
||||
gPlaySt.chapterIndex = WMLoc_GetChapterId(gGMData.units[0].location);
|
||||
gGMData.unk01 = 0;
|
||||
gGMData.sprite_disp = 0;
|
||||
StartWorldmapSkirmishAnim(0, sub_80BCA1C(gGMData.units[0].location), proc);
|
||||
return;
|
||||
}
|
||||
@ -1413,7 +1380,7 @@ void sub_80B9AB0(void)
|
||||
{
|
||||
Sound_FadeOutBGM(4);
|
||||
SetDispEnable(0, 0, 0, 0, 0);
|
||||
sub_80B895C();
|
||||
HideWmFace();
|
||||
HideWmText();
|
||||
EndWMFaceCtrl();
|
||||
return;
|
||||
@ -1437,21 +1404,21 @@ void sub_80B9AEC(struct WorldMapMainProc * proc)
|
||||
}
|
||||
|
||||
gGMData.unk_cc = i - 4;
|
||||
GmMu_RemoveUnit(proc->unk_54, i);
|
||||
GmMu_RemoveUnit(proc->gm_mu, i);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080B9B38
|
||||
void WorldMap_InitChapterTransition(struct WorldMapMainProc * proc)
|
||||
void WorldMap_CallIntroEvent(struct WorldMapMainProc * proc)
|
||||
{
|
||||
GmMu_80BE108(proc->unk_54, 0, 0);
|
||||
GmMu_80BE108(proc->gm_mu, 0, 0);
|
||||
|
||||
if (gGMData.units[0].location[gWMNodeData].placementFlag != GMAP_NODE_PLACEMENT_DUNGEON)
|
||||
{
|
||||
gPlaySt.chapterIndex = WMLoc_GetChapterId(proc->unk_3e);
|
||||
gGMData.state.bits.monster_merged = 0;
|
||||
gGMData.state.bits.monster_merged = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1460,15 +1427,13 @@ void WorldMap_InitChapterTransition(struct WorldMapMainProc * proc)
|
||||
|
||||
CallChapterWMIntroEvents(proc);
|
||||
|
||||
gGMData.unk01 = 0;
|
||||
gGMData.sprite_disp = 0;
|
||||
|
||||
WmRemoveRandomMonsters();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080B9BA4
|
||||
void sub_80B9BA4(struct WorldMapMainProc * proc)
|
||||
void WorldMap_PostBeginningEvent(struct WorldMapMainProc * proc)
|
||||
{
|
||||
if (EventEngineExists())
|
||||
{
|
||||
@ -1476,7 +1441,7 @@ void sub_80B9BA4(struct WorldMapMainProc * proc)
|
||||
}
|
||||
|
||||
MapRoute_80BC2DC(proc->gm_screen->gmroute);
|
||||
if (!(gGMData.state.raw & 0x80))
|
||||
if (!(gGMData.state.raw & GM_STATE_NOFADE))
|
||||
{
|
||||
SetBlendConfig(0, 0, 0, 0);
|
||||
SetBlendTargetA(0, 0, 0, 0, 0);
|
||||
@ -1489,15 +1454,16 @@ void sub_80B9BA4(struct WorldMapMainProc * proc)
|
||||
SetDispEnable(0, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
sub_80B895C();
|
||||
HideWmFace();
|
||||
HideWmText();
|
||||
EndWMFaceCtrl();
|
||||
EndGmMuEntry();
|
||||
EndGmapRM();
|
||||
EndGmapRmUpdateExt();
|
||||
|
||||
if (gGMData.state.raw & 0xc0)
|
||||
if (gGMData.state.raw & (GM_STATE_SKIPPED | GM_STATE_NOFADE))
|
||||
{
|
||||
/* Here we may directly jump to intro event */
|
||||
Sound_FadeOutBGM(1);
|
||||
Sound_FadeOutSE(1);
|
||||
|
||||
@ -1523,8 +1489,6 @@ void sub_80B9BA4(struct WorldMapMainProc * proc)
|
||||
|
||||
Proc_Break(proc);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080B9CB0
|
||||
@ -1536,15 +1500,13 @@ void WorldMap_WaitForChapterIntroEvents(ProcPtr proc)
|
||||
}
|
||||
|
||||
SetDispEnable(0, 0, 0, 0, 0);
|
||||
sub_80B895C();
|
||||
HideWmFace();
|
||||
HideWmText();
|
||||
EndWMFaceCtrl();
|
||||
EndGmMuEntry();
|
||||
EndGmapRM();
|
||||
EndGmapRmUpdateExt();
|
||||
Proc_Break(proc);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080B9D04
|
||||
@ -1618,7 +1580,7 @@ void Worlmap_StartGmapSogu(struct WorldMapMainProc * proc)
|
||||
s16 x;
|
||||
s16 y;
|
||||
|
||||
GmMu_GetPosition(proc->unk_54, 0, &x, &y);
|
||||
GmMu_GetPosition(proc->gm_mu, 0, &x, &y);
|
||||
NewGmapSogu(x, y);
|
||||
|
||||
x = gGMData.units[0].location[gWMNodeData].x;
|
||||
@ -1635,7 +1597,7 @@ void Worlmap_WaitGmapSogu(ProcPtr proc)
|
||||
{
|
||||
if (!GmapSoguExists())
|
||||
{
|
||||
gGMData.unk01 = 1;
|
||||
gGMData.sprite_disp = 1;
|
||||
Proc_Break(proc);
|
||||
}
|
||||
return;
|
||||
@ -1647,7 +1609,7 @@ void sub_80B9E64(void)
|
||||
s16 x;
|
||||
s16 y;
|
||||
|
||||
sub_80B895C();
|
||||
HideWmFace();
|
||||
HideWmText();
|
||||
EndWMFaceCtrl();
|
||||
|
||||
@ -1686,28 +1648,24 @@ void NULL_080B9F08(void)
|
||||
void WorldMap_StartArmory(ProcPtr proc)
|
||||
{
|
||||
StartGMapBaseMenu(SHOP_TYPE_ARMORY, proc);
|
||||
return;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080B9F24
|
||||
void WorldMap_StartVendor(ProcPtr proc)
|
||||
{
|
||||
StartGMapBaseMenu(SHOP_TYPE_VENDOR, proc);
|
||||
return;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080B9F34
|
||||
void WorldMap_StartSecretShop(ProcPtr proc)
|
||||
{
|
||||
StartGMapBaseMenu(SHOP_TYPE_SECRET_SHOP, proc);
|
||||
return;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080B9F44
|
||||
void sub_80B9F44(ProcPtr proc)
|
||||
{
|
||||
StartGMapBaseMenu(3, proc);
|
||||
return;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080B9F54
|
||||
@ -1830,7 +1788,7 @@ void sub_80BA06C(struct Proc8A3DD08 * proc)
|
||||
|
||||
// clang-format off
|
||||
|
||||
struct ProcCmd CONST_DATA gProcScr_08A3DD08[] =
|
||||
struct ProcCmd CONST_DATA ProcScr_08A3DD08[] =
|
||||
{
|
||||
PROC_YIELD,
|
||||
PROC_REPEAT(sub_80BA06C),
|
||||
@ -1845,7 +1803,7 @@ void WmMergeFace(int timerMaybe, u8 b, int faceSlot, int fid, int e, int f, int
|
||||
{
|
||||
struct WorldMapMainProc * parent = Proc_Find(ProcScr_WorldMapMain);
|
||||
|
||||
struct Proc8A3DD08 * proc = Proc_Start(gProcScr_08A3DD08, parent);
|
||||
struct Proc8A3DD08 * proc = Proc_Start(ProcScr_08A3DD08, parent);
|
||||
proc->unk_2c = timerMaybe; // timer?
|
||||
proc->unk_30 = b;
|
||||
proc->unk_34 = faceSlot; // face slot
|
||||
@ -1888,7 +1846,7 @@ void sub_80BA100(struct Proc8A3DD30 * proc)
|
||||
|
||||
// clang-format off
|
||||
|
||||
struct ProcCmd CONST_DATA gProcScr_08A3DD20[] =
|
||||
struct ProcCmd CONST_DATA ProcScr_08A3DD20[] =
|
||||
{
|
||||
PROC_YIELD,
|
||||
PROC_REPEAT(sub_80BA100),
|
||||
@ -1904,7 +1862,7 @@ void sub_80BA198(int color)
|
||||
int i;
|
||||
|
||||
struct WorldMapMainProc * parent = Proc_Find(ProcScr_WorldMapMain);
|
||||
struct Proc8A3DD30 * proc = Proc_Start(gProcScr_08A3DD20, parent);
|
||||
struct Proc8A3DD30 * proc = Proc_Start(ProcScr_08A3DD20, parent);
|
||||
|
||||
proc->unk_30 = color & 0x1f;
|
||||
proc->unk_2c = 0;
|
||||
@ -1949,7 +1907,7 @@ void sub_80BA1F4(struct Proc8A3DD38 * proc)
|
||||
|
||||
// clang-format off
|
||||
|
||||
struct ProcCmd CONST_DATA gProcScr_08A3DD38[] =
|
||||
struct ProcCmd CONST_DATA ProcScr_08A3DD38[] =
|
||||
{
|
||||
PROC_YIELD,
|
||||
PROC_REPEAT(sub_80BA1F4),
|
||||
@ -1965,7 +1923,7 @@ void sub_80BA288(int color)
|
||||
int i;
|
||||
|
||||
struct WorldMapMainProc * parent = Proc_Find(ProcScr_WorldMapMain);
|
||||
struct Proc8A3DD38 * proc = Proc_Start(gProcScr_08A3DD38, parent);
|
||||
struct Proc8A3DD38 * proc = Proc_Start(ProcScr_08A3DD38, parent);
|
||||
|
||||
proc->unk_30 = color & 0x1f;
|
||||
proc->unk_2c = 0;
|
||||
@ -1988,25 +1946,17 @@ void NewWorldMap(void)
|
||||
proc->flags_1 = 0;
|
||||
|
||||
if (gPlaySt.chapterStateBits & PLAY_FLAG_POSTGAME)
|
||||
{
|
||||
proc->timer = 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gGMData.state.bits.monster_merged)
|
||||
{
|
||||
proc->timer = 12;
|
||||
}
|
||||
else
|
||||
{
|
||||
proc->timer = 16;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
struct ProcCmd CONST_DATA gProcScr_WorldMapWrapper[] =
|
||||
struct ProcCmd CONST_DATA ProcScr_WorldMapWrapper[] =
|
||||
{
|
||||
PROC_SLEEP(1),
|
||||
PROC_CALL(NewWorldMap),
|
||||
@ -2020,7 +1970,7 @@ struct ProcCmd CONST_DATA gProcScr_WorldMapWrapper[] =
|
||||
};
|
||||
|
||||
//! FE8U = 0x080BA334
|
||||
void WorldMap_SetupChapterStuff(struct WorldMapMainProc * proc)
|
||||
void WorldMap_CallBeginningEvent(struct WorldMapMainProc * proc)
|
||||
{
|
||||
int chIndex;
|
||||
int node_next;
|
||||
@ -2044,34 +1994,28 @@ void WorldMap_SetupChapterStuff(struct WorldMapMainProc * proc)
|
||||
|
||||
gPlaySt.chapterIndex = chIndex;
|
||||
|
||||
if (Events_WM_Beginning[GetROMChapterStruct(chIndex)->gmapEventId] == 0)
|
||||
{
|
||||
if (Events_WM_Beginning[GetROMChapterStruct(chIndex)->gmapEventId] == NULL)
|
||||
return;
|
||||
}
|
||||
|
||||
ResetGmStoryNode();
|
||||
proc->unk_48->unk_32_1 = 0;
|
||||
proc->gm_icon->merge_next_node = false;
|
||||
CallEvent(Events_WM_Beginning[GetROMChapterStruct(chIndex)->gmapEventId], 0);
|
||||
}
|
||||
}
|
||||
|
||||
StartWMFaceCtrl(proc);
|
||||
StartGmapMuEntry(NULL);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080BA3D4
|
||||
void CallChapterWMIntroEvents(ProcPtr proc)
|
||||
{
|
||||
if (Events_WM_ChapterIntro[GetROMChapterStruct(gPlaySt.chapterIndex)->gmapEventId] != 0)
|
||||
if (Events_WM_ChapterIntro[GetROMChapterStruct(gPlaySt.chapterIndex)->gmapEventId] != NULL)
|
||||
{
|
||||
CallEvent(Events_WM_ChapterIntro[GetROMChapterStruct(gPlaySt.chapterIndex)->gmapEventId], 0);
|
||||
StartWMFaceCtrl(proc);
|
||||
StartGmapMuEntry(NULL);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
struct WMSongTableEnt CONST_DATA gWMSongTable[] =
|
||||
|
@ -72,17 +72,17 @@ void MapMUPrim_MakeUnitForChar(struct GMapMuPrimProc * proc, int pid, int nodeId
|
||||
{
|
||||
if (proc->unk_2b >= 0)
|
||||
{
|
||||
MapUnitC_DeleteGmapUnit(((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b);
|
||||
MapUnitC_DeleteGmapUnit(((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b);
|
||||
proc->unk_2b = -1;
|
||||
}
|
||||
|
||||
proc->unk_2b = NewMapUnit(((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, GetCharacterClassId(pid), 0);
|
||||
proc->unk_2b = NewMapUnit(((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, GetCharacterClassId(pid), 0);
|
||||
|
||||
MapUnitC_SetPosition(
|
||||
((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b, nodeId[gWMNodeData].x,
|
||||
((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b, nodeId[gWMNodeData].x,
|
||||
nodeId[gWMNodeData].y + 6);
|
||||
MapUnitC_SetAnimId(((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b, 4);
|
||||
MapUnitC_SetGfxNeedsUpdate(((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b);
|
||||
MapUnitC_SetAnimId(((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b, 4);
|
||||
MapUnitC_SetGfxNeedsUpdate(((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -91,17 +91,17 @@ void MapMUPrim_MakeUnitForClass(struct GMapMuPrimProc * proc, int jid, int nodeI
|
||||
{
|
||||
if (proc->unk_2b >= 0)
|
||||
{
|
||||
MapUnitC_DeleteGmapUnit(((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b);
|
||||
MapUnitC_DeleteGmapUnit(((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b);
|
||||
proc->unk_2b = -1;
|
||||
}
|
||||
|
||||
proc->unk_2b = NewMapUnit(((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, jid, 0);
|
||||
proc->unk_2b = NewMapUnit(((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, jid, 0);
|
||||
|
||||
MapUnitC_SetPosition(
|
||||
((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b, nodeId[gWMNodeData].x,
|
||||
((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b, nodeId[gWMNodeData].x,
|
||||
nodeId[gWMNodeData].y + 6);
|
||||
MapUnitC_SetAnimId(((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b, 4);
|
||||
MapUnitC_SetGfxNeedsUpdate(((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b);
|
||||
MapUnitC_SetAnimId(((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b, 4);
|
||||
MapUnitC_SetGfxNeedsUpdate(((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -111,7 +111,7 @@ void MapMUPrim_RemoveLinkedMapUnit(struct GMapMuPrimProc * proc)
|
||||
{
|
||||
if (proc->unk_2b >= 0)
|
||||
{
|
||||
MapUnitC_DeleteGmapUnit(((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b);
|
||||
MapUnitC_DeleteGmapUnit(((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b);
|
||||
proc->unk_2b = -1;
|
||||
}
|
||||
|
||||
@ -151,7 +151,7 @@ void GmMuPrim_80BD444(struct GMapMuPrimProc * proc)
|
||||
|
||||
if (proc->unk_2d[gWMNodeData].shipTravelFlag & 1
|
||||
&& proc->unk_2e[gWMNodeData].shipTravelFlag & 1)
|
||||
sub_80BB0E0(((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b, 0x50);
|
||||
sub_80BB0E0(((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b, 0x50);
|
||||
|
||||
|
||||
unkSplineStruct = &gUnknown_0201B3A4[proc->unk_2a];
|
||||
@ -165,15 +165,15 @@ void GmMuPrim_80BD444(struct GMapMuPrimProc * proc)
|
||||
unkSplineStruct->unk_02 = sub_80BCE34(proc->unk_2d, proc->unk_2e, proc->unk_50, unkSplineStruct->unk_04, unkSplineStruct->unk_08, 4);
|
||||
|
||||
MapUnitC_SetPosition(
|
||||
((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b, proc->unk_2d[gWMNodeData].x,
|
||||
((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b, proc->unk_2d[gWMNodeData].x,
|
||||
proc->unk_2d[gWMNodeData].y + 6);
|
||||
|
||||
if (proc->unk_31 >= 0)
|
||||
MapUnitC_SetAnimId(((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b, proc->unk_31);
|
||||
MapUnitC_SetAnimId(((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b, proc->unk_31);
|
||||
|
||||
proc->unk_54 = 0;
|
||||
MapUnitC_GetPosition(
|
||||
((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b, &proc->unk_44, &proc->unk_46);
|
||||
((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b, &proc->unk_44, &proc->unk_46);
|
||||
proc->unk_40 = 0;
|
||||
|
||||
return;
|
||||
@ -188,7 +188,7 @@ s8 sub_80BD5B8(struct GMapMuPrimProc * proc)
|
||||
u16 x2;
|
||||
u16 y2;
|
||||
|
||||
MapUnitC_GetPosition(((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b, &x1, &y1);
|
||||
MapUnitC_GetPosition(((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b, &x1, &y1);
|
||||
|
||||
x2 = x1 - proc->unk_44;
|
||||
y2 = y1 - proc->unk_46;
|
||||
@ -287,23 +287,23 @@ void sub_80BD740(struct GMapMuPrimProc * proc)
|
||||
animId = sub_80BD6A8(proc);
|
||||
|
||||
if (((animId >= 0) &&
|
||||
(MapUnitC_GetAnimId(((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b) != animId)) &&
|
||||
(MapUnitC_GetAnimId(((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b) != animId)) &&
|
||||
(proc->flags_4))
|
||||
{
|
||||
MapUnitC_SetAnimId(((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b, animId);
|
||||
MapUnitC_SetGfxNeedsUpdate(((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b);
|
||||
MapUnitC_SetAnimId(((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b, animId);
|
||||
MapUnitC_SetGfxNeedsUpdate(((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b);
|
||||
}
|
||||
|
||||
if (proc->flags_3)
|
||||
{
|
||||
MapUnitC_GetPosition(((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b, &x1, &y1);
|
||||
MapUnitC_GetPosition(((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b, &x1, &y1);
|
||||
GetWMCenteredCameraPosition(x1, y1 - 14, &x2, &y2);
|
||||
gGMData.xCamera = x2;
|
||||
gGMData.yCamera = y2;
|
||||
}
|
||||
|
||||
MapUnitC_GetPosition(
|
||||
((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b, &proc->unk_44, &proc->unk_46);
|
||||
((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b, &proc->unk_44, &proc->unk_46);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -339,30 +339,30 @@ void GmMuPrim_80BD830(struct GMapMuPrimProc * proc)
|
||||
{
|
||||
sub_800A950(&gUnknown_0201B3A4[proc->unk_2a], proc->unk_54 * 0x1000, coord);
|
||||
MapUnitC_SetPosition(
|
||||
((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b, coord[0] >> 4, (coord[1] >> 4) + 6);
|
||||
((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b, coord[0] >> 4, (coord[1] >> 4) + 6);
|
||||
sub_80BD740(proc);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((proc->unk_2d[gWMNodeData].shipTravelFlag & 1) && (proc->unk_2e[gWMNodeData].shipTravelFlag & 1))
|
||||
{
|
||||
sub_80BB0E0(((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b, 0);
|
||||
sub_80BB0E0(((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b, 0);
|
||||
}
|
||||
|
||||
MapUnitC_SetPosition(
|
||||
((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b, proc->unk_2e[gWMNodeData].x,
|
||||
((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b, proc->unk_2e[gWMNodeData].x,
|
||||
proc->unk_2e[gWMNodeData].y + 6);
|
||||
|
||||
if ((proc->flags_4) && (proc->unk_32 >= 0))
|
||||
{
|
||||
MapUnitC_SetAnimId(((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b, proc->unk_32);
|
||||
MapUnitC_SetAnimId(((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b, proc->unk_32);
|
||||
}
|
||||
|
||||
gGMData.units[proc->unk_2a].location = proc->unk_2e;
|
||||
|
||||
if (proc->flags_3)
|
||||
{
|
||||
MapUnitC_GetPosition(((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b, &x1, &y1);
|
||||
MapUnitC_GetPosition(((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b, &x1, &y1);
|
||||
GetWMCenteredCameraPosition(x1, y1 - 14, &x2, &y2);
|
||||
gGMData.xCamera = x2;
|
||||
gGMData.yCamera = y2;
|
||||
@ -390,11 +390,11 @@ void GmMuPrim_80BD9D8(struct GMapMuPrimProc * proc)
|
||||
proc->unk_54 = 0;
|
||||
|
||||
MapUnitC_GetPosition(
|
||||
((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b, &proc->unk_44, &proc->unk_46);
|
||||
((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b, &proc->unk_44, &proc->unk_46);
|
||||
|
||||
if (proc->unk_31 >= 0)
|
||||
{
|
||||
MapUnitC_SetAnimId(((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b, proc->unk_31);
|
||||
MapUnitC_SetAnimId(((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b, proc->unk_31);
|
||||
}
|
||||
|
||||
proc->unk_40 = 0;
|
||||
@ -431,25 +431,25 @@ void GmMuPrim_80BDA78(struct GMapMuPrimProc * proc)
|
||||
|
||||
if (proc->unk_54 < proc->unk_50)
|
||||
{
|
||||
coeff = sub_800B84C(proc->unk_54, proc->unk_50, proc->unk_2f);
|
||||
coeff = _DivArm2(proc->unk_54, proc->unk_50, proc->unk_2f);
|
||||
x = proc->unk_48 + DivArm(0x1000, (proc->unk_4c - proc->unk_48) * coeff);
|
||||
y = proc->unk_4a + DivArm(0x1000, (proc->unk_4e - proc->unk_4a) * coeff);
|
||||
MapUnitC_SetPosition(((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b, x, y + 6);
|
||||
MapUnitC_SetPosition(((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b, x, y + 6);
|
||||
sub_80BD740(proc);
|
||||
}
|
||||
else
|
||||
{
|
||||
MapUnitC_SetPosition(
|
||||
((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b, proc->unk_4c, proc->unk_4e + 6);
|
||||
((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b, proc->unk_4c, proc->unk_4e + 6);
|
||||
|
||||
if ((proc->flags_4) && (proc->unk_32 >= 0))
|
||||
{
|
||||
MapUnitC_SetAnimId(((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b, proc->unk_32);
|
||||
MapUnitC_SetAnimId(((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b, proc->unk_32);
|
||||
}
|
||||
|
||||
if (proc->flags_3)
|
||||
{
|
||||
MapUnitC_GetPosition(((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b, &x, &y);
|
||||
MapUnitC_GetPosition(((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b, &x, &y);
|
||||
GetWMCenteredCameraPosition(x, y - 14, &x2, &y2);
|
||||
gGMData.xCamera = x2;
|
||||
gGMData.yCamera = y2;
|
||||
@ -470,10 +470,10 @@ void GmMu_OnEnd_Null(void)
|
||||
|
||||
// clang-format off
|
||||
|
||||
struct ProcCmd CONST_DATA gProcScr_GMapMuPrim[] =
|
||||
struct ProcCmd CONST_DATA ProcScr_GMapMuPrim[] =
|
||||
{
|
||||
PROC_NAME("Gmap MU prim"),
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
|
||||
PROC_SET_END_CB(GmMuPrim_OnEnd_Null),
|
||||
PROC_CALL(GmMuPrim_OnInit),
|
||||
@ -505,7 +505,7 @@ void GmMu_OnInit(struct GMapMuProc * proc)
|
||||
|
||||
for (i = 0; i < 7; i++)
|
||||
{
|
||||
proc->unk_2c[i] = Proc_Start(gProcScr_GMapMuPrim, proc->proc_parent);
|
||||
proc->unk_2c[i] = Proc_Start(ProcScr_GMapMuPrim, proc->proc_parent);
|
||||
}
|
||||
|
||||
return;
|
||||
@ -513,10 +513,10 @@ void GmMu_OnInit(struct GMapMuProc * proc)
|
||||
|
||||
// clang-format off
|
||||
|
||||
struct ProcCmd CONST_DATA gProcScr_GMapMu[] =
|
||||
struct ProcCmd CONST_DATA ProcScr_GMapMu[] =
|
||||
{
|
||||
PROC_NAME("Gmap MU"),
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
|
||||
PROC_SET_END_CB(GmMu_OnEnd_Null),
|
||||
PROC_CALL(GmMu_OnInit),
|
||||
@ -531,7 +531,7 @@ struct ProcCmd CONST_DATA gProcScr_GMapMu[] =
|
||||
//! FE8U = 0x080BDC28
|
||||
ProcPtr StartGmMu(ProcPtr parent)
|
||||
{
|
||||
return Proc_Start(gProcScr_GMapMu, parent);
|
||||
return Proc_Start(ProcScr_GMapMu, parent);
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
@ -575,7 +575,7 @@ void GmMu_SetUnit(struct GMapMuProc * muProc, int index, u8 useClass, int id, in
|
||||
faction = sub_80BD20C(index);
|
||||
}
|
||||
|
||||
MapUnitC_SetFaction(((struct WorldMapMainProc *)(muPrimProc->proc_parent))->unk_4c, muPrimProc->unk_2b, faction);
|
||||
MapUnitC_SetFaction(((struct WorldMapMainProc *)(muPrimProc->proc_parent))->gm_unitc, muPrimProc->unk_2b, faction);
|
||||
|
||||
muPrimProc->unk_40 = 0;
|
||||
muPrimProc->unk_2c = 0;
|
||||
@ -646,7 +646,7 @@ void GmShowMuUnit(struct GMapMuProc * muProc, int index)
|
||||
if (index >= 0)
|
||||
{
|
||||
muPrimProc = muProc->unk_2c[index];
|
||||
MapUnitC_SetDisplayEnabled(((struct WorldMapMainProc *)(muProc->proc_parent))->unk_4c, muPrimProc->unk_2b, 1);
|
||||
MapUnitC_SetDisplayEnabled(((struct WorldMapMainProc *)(muProc->proc_parent))->gm_unitc, muPrimProc->unk_2b, 1);
|
||||
gGMData.units[index].state |= 1;
|
||||
}
|
||||
else
|
||||
@ -657,7 +657,7 @@ void GmShowMuUnit(struct GMapMuProc * muProc, int index)
|
||||
if (muPrimProc->unk_2b >= 0)
|
||||
{
|
||||
MapUnitC_SetDisplayEnabled(
|
||||
((struct WorldMapMainProc *)(muProc->proc_parent))->unk_4c, muPrimProc->unk_2b, 1);
|
||||
((struct WorldMapMainProc *)(muProc->proc_parent))->gm_unitc, muPrimProc->unk_2b, 1);
|
||||
gGMData.units[i].state |= 1;
|
||||
}
|
||||
}
|
||||
@ -675,7 +675,7 @@ void GmHideMuUnit(struct GMapMuProc * muProc, int index)
|
||||
if (index >= 0)
|
||||
{
|
||||
muPrimProc = muProc->unk_2c[index];
|
||||
MapUnitC_SetDisplayEnabled(((struct WorldMapMainProc *)(muProc->proc_parent))->unk_4c, muPrimProc->unk_2b, 0);
|
||||
MapUnitC_SetDisplayEnabled(((struct WorldMapMainProc *)(muProc->proc_parent))->gm_unitc, muPrimProc->unk_2b, 0);
|
||||
gGMData.units[index].state &= ~1;
|
||||
}
|
||||
else
|
||||
@ -686,7 +686,7 @@ void GmHideMuUnit(struct GMapMuProc * muProc, int index)
|
||||
if (muPrimProc->unk_2b >= 0)
|
||||
{
|
||||
MapUnitC_SetDisplayEnabled(
|
||||
((struct WorldMapMainProc *)(muProc->proc_parent))->unk_4c, muPrimProc->unk_2b, 0);
|
||||
((struct WorldMapMainProc *)(muProc->proc_parent))->gm_unitc, muPrimProc->unk_2b, 0);
|
||||
gGMData.units[i].state &= ~1;
|
||||
}
|
||||
}
|
||||
@ -794,7 +794,7 @@ void sub_80BE080(struct GMapMuProc * muProc, int index, s8 blendEnabled)
|
||||
{
|
||||
struct GMapMuPrimProc * muPrimProc = muProc->unk_2c[index];
|
||||
MapUnitC_SetBlendEnabled(
|
||||
((struct WorldMapMainProc *)(muProc->proc_parent))->unk_4c, muPrimProc->unk_2b, blendEnabled);
|
||||
((struct WorldMapMainProc *)(muProc->proc_parent))->gm_unitc, muPrimProc->unk_2b, blendEnabled);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -802,7 +802,7 @@ void sub_80BE080(struct GMapMuProc * muProc, int index, s8 blendEnabled)
|
||||
void sub_80BE0A4(struct GMapMuProc * muProc, int index, s16 * x, s16 * y)
|
||||
{
|
||||
struct GMapMuPrimProc * muPrimProc = muProc->unk_2c[index];
|
||||
MapUnitC_GetPosition(((struct WorldMapMainProc *)(muProc->proc_parent))->unk_4c, muPrimProc->unk_2b, x, y);
|
||||
MapUnitC_GetPosition(((struct WorldMapMainProc *)(muProc->proc_parent))->gm_unitc, muPrimProc->unk_2b, x, y);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -810,14 +810,14 @@ void sub_80BE0A4(struct GMapMuProc * muProc, int index, s16 * x, s16 * y)
|
||||
int sub_80BE0C8(struct GMapMuProc * muProc, int index)
|
||||
{
|
||||
struct GMapMuPrimProc * muPrimProc = muProc->unk_2c[index];
|
||||
return MapUnitC_GetLayer(((struct WorldMapMainProc *)(muProc->proc_parent))->unk_4c, muPrimProc->unk_2b);
|
||||
return MapUnitC_GetLayer(((struct WorldMapMainProc *)(muProc->proc_parent))->gm_unitc, muPrimProc->unk_2b);
|
||||
}
|
||||
|
||||
//! FE8U = 0x080BE0E8
|
||||
void GmMu_SetSpriteLayer(struct GMapMuProc * muProc, int index, int layer)
|
||||
{
|
||||
struct GMapMuPrimProc * muPrimProc = muProc->unk_2c[index];
|
||||
MapUnitC_SetLayer(((struct WorldMapMainProc *)(muProc->proc_parent))->unk_4c, muPrimProc->unk_2b, layer);
|
||||
MapUnitC_SetLayer(((struct WorldMapMainProc *)(muProc->proc_parent))->gm_unitc, muPrimProc->unk_2b, layer);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -873,21 +873,21 @@ s8 sub_80BE194(struct GMapMuPrimProc * proc)
|
||||
case 0x01:
|
||||
if ((proc->unk_2d[gWMNodeData].shipTravelFlag & 1) && (proc->unk_2e[gWMNodeData].shipTravelFlag & 1))
|
||||
{
|
||||
sub_80BB0E0(((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b, 0);
|
||||
sub_80BB0E0(((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b, 0);
|
||||
}
|
||||
|
||||
MapUnitC_SetPosition(
|
||||
((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b, proc->unk_2e[gWMNodeData].x,
|
||||
((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b, proc->unk_2e[gWMNodeData].x,
|
||||
proc->unk_2e[gWMNodeData].y + 6);
|
||||
|
||||
MapUnitC_SetAnimId(((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b, 4);
|
||||
MapUnitC_SetAnimId(((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b, 4);
|
||||
|
||||
gGMData.units[proc->unk_2a].location = proc->unk_2e;
|
||||
|
||||
if (proc->flags_3)
|
||||
{
|
||||
MapUnitC_GetPosition(
|
||||
((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b, &x1, &y1);
|
||||
((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b, &x1, &y1);
|
||||
GetWMCenteredCameraPosition(x1, y1 - 14, &x2, &y2);
|
||||
gGMData.xCamera = x2;
|
||||
gGMData.yCamera = y2;
|
||||
@ -897,15 +897,15 @@ s8 sub_80BE194(struct GMapMuPrimProc * proc)
|
||||
|
||||
case 0x02:
|
||||
MapUnitC_SetPosition(
|
||||
((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b, proc->unk_4c,
|
||||
((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b, proc->unk_4c,
|
||||
proc->unk_4e + 6);
|
||||
|
||||
MapUnitC_SetAnimId(((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b, 4);
|
||||
MapUnitC_SetAnimId(((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b, 4);
|
||||
|
||||
if (proc->flags_3)
|
||||
{
|
||||
MapUnitC_GetPosition(
|
||||
((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b, &x1, &y1);
|
||||
((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b, &x1, &y1);
|
||||
GetWMCenteredCameraPosition(x1, y1 - 0xe, &x2, &y2);
|
||||
gGMData.xCamera = x2;
|
||||
gGMData.yCamera = y2;
|
||||
@ -951,7 +951,7 @@ void GmMu_SetPosition(struct GMapMuProc * muProc, int index, s16 xBase, s16 yBas
|
||||
s16 x = xBase;
|
||||
s16 y = yBase + 6;
|
||||
|
||||
MapUnitC_SetPosition(((struct WorldMapMainProc *)(muPrimProc->proc_parent))->unk_4c, muPrimProc->unk_2b, x, y);
|
||||
MapUnitC_SetPosition(((struct WorldMapMainProc *)(muPrimProc->proc_parent))->gm_unitc, muPrimProc->unk_2b, x, y);
|
||||
|
||||
muPrimProc->unk_44 = x;
|
||||
muPrimProc->unk_46 = y;
|
||||
@ -965,7 +965,7 @@ void GmMu_SetPosition(struct GMapMuProc * muProc, int index, s16 xBase, s16 yBas
|
||||
void GmMu_GetPosition(struct GMapMuProc * muProc, int index, s16 * x, s16 * y)
|
||||
{
|
||||
struct GMapMuPrimProc * muPrimProc = muProc->unk_2c[index];
|
||||
MapUnitC_GetPosition(((struct WorldMapMainProc *)(muPrimProc->proc_parent))->unk_4c, muPrimProc->unk_2b, x, y);
|
||||
MapUnitC_GetPosition(((struct WorldMapMainProc *)(muPrimProc->proc_parent))->gm_unitc, muPrimProc->unk_2b, x, y);
|
||||
*y -= 6;
|
||||
return;
|
||||
}
|
||||
@ -1012,7 +1012,7 @@ void sub_80BE45C(struct GMapMuPrimProc * proc)
|
||||
int hPos;
|
||||
int tmp;
|
||||
|
||||
int jid = sub_80BB194(((struct WorldMapMainProc *)(proc->proc_parent))->unk_4c, proc->unk_2b);
|
||||
int jid = sub_80BB194(((struct WorldMapMainProc *)(proc->proc_parent))->gm_unitc, proc->unk_2b);
|
||||
|
||||
if (GetClassData(jid)->attributes & 1)
|
||||
{
|
||||
|
@ -83,10 +83,10 @@ void GmPalFade_Loop(struct GmapPalFadeProc * proc)
|
||||
|
||||
// clang-format off
|
||||
|
||||
struct ProcCmd CONST_DATA gProcScr_GmapPalFade[] =
|
||||
struct ProcCmd CONST_DATA ProcScr_GmapPalFade[] =
|
||||
{
|
||||
PROC_NAME("Gmap Pal Fade"),
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
|
||||
PROC_SET_END_CB(GmPalFade_OnEnd_Null),
|
||||
PROC_YIELD,
|
||||
@ -107,11 +107,11 @@ ProcPtr StartGmPalFade(ProcPtr parent, struct GmPalFadeInput * input)
|
||||
struct GmapPalFadeProc * proc;
|
||||
if (parent)
|
||||
{
|
||||
proc = Proc_StartBlocking(gProcScr_GmapPalFade, parent);
|
||||
proc = Proc_StartBlocking(ProcScr_GmapPalFade, parent);
|
||||
}
|
||||
else
|
||||
{
|
||||
proc = Proc_Start(gProcScr_GmapPalFade, PROC_TREE_3);
|
||||
proc = Proc_Start(ProcScr_GmapPalFade, PROC_TREE_3);
|
||||
}
|
||||
|
||||
proc->unk_2c = input->unk_0c;
|
||||
@ -132,20 +132,20 @@ ProcPtr StartGmPalFade(ProcPtr parent, struct GmPalFadeInput * input)
|
||||
//! FE8U = 0x080BF730
|
||||
s8 IsGmPalFadeActive(void)
|
||||
{
|
||||
return (Proc_Find(gProcScr_GmapPalFade)) ? 1 : 0;
|
||||
return (Proc_Find(ProcScr_GmapPalFade)) ? 1 : 0;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080BF748
|
||||
void EndGmPalFade(void)
|
||||
{
|
||||
struct GmapPalFadeProc * proc = Proc_Find(gProcScr_GmapPalFade);
|
||||
struct GmapPalFadeProc * proc = Proc_Find(ProcScr_GmapPalFade);
|
||||
if (proc)
|
||||
{
|
||||
CpuCopy16(proc->unk_3c, gPaletteBuffer + proc->unk_35, proc->unk_34 * 2);
|
||||
|
||||
EnablePaletteSync();
|
||||
|
||||
Proc_EndEach(gProcScr_GmapPalFade);
|
||||
Proc_EndEach(ProcScr_GmapPalFade);
|
||||
}
|
||||
|
||||
return;
|
||||
|
@ -850,10 +850,10 @@ void MapRoute_80BC2DC(struct GmRouteProc * proc)
|
||||
|
||||
// clang-format off
|
||||
|
||||
struct ProcCmd CONST_DATA gProcScr_GMapRoute[] =
|
||||
struct ProcCmd CONST_DATA ProcScr_GMapRoute[] =
|
||||
{
|
||||
PROC_NAME("GmapRoute"),
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
|
||||
PROC_SET_END_CB(nullsub_38),
|
||||
PROC_SLEEP(0),
|
||||
@ -886,7 +886,7 @@ PROC_LABEL(2),
|
||||
//! FE8U = 0x080BC3A4
|
||||
ProcPtr StartGMapRoute(ProcPtr parent, struct OpenPaths * pPaths, int c, int d)
|
||||
{
|
||||
struct GmRouteProc * proc = Proc_Start(gProcScr_GMapRoute, parent);
|
||||
struct GmRouteProc * proc = Proc_Start(ProcScr_GMapRoute, parent);
|
||||
proc->chr = c;
|
||||
proc->pal = d;
|
||||
proc->pOpenPaths = pPaths;
|
||||
@ -966,7 +966,7 @@ extern struct MenuRect gMenuRect_WMGeneralMenuRect;
|
||||
//! FE8U = 0x080BC454
|
||||
struct MenuProc * StartWMGeneralMenu(ProcPtr parent)
|
||||
{
|
||||
gGMData.unk01 = 0;
|
||||
gGMData.sprite_disp = 0;
|
||||
InitTextFont(&gFont_0201AFC0, (void *)0x06001000, 0x80, 0);
|
||||
return StartMenuAt(&gMenu_WMGeneralMenu, gMenuRect_WMGeneralMenuRect, parent);
|
||||
}
|
||||
@ -1128,7 +1128,7 @@ struct MenuProc * StartWMNodeMenu(struct WorldMapMainProc * parent)
|
||||
{
|
||||
struct MenuProc * menuProc;
|
||||
|
||||
gGMData.unk01 = 0;
|
||||
gGMData.sprite_disp = 0;
|
||||
|
||||
InitTextFont(&gFont_0201AFC0, (void *)0x06001000, 0x80, 0);
|
||||
|
||||
@ -1853,13 +1853,8 @@ int sub_80BCE34(int nodeA, int nodeB, s16 c, u16 * d, struct Struct0859E7D4 * e,
|
||||
void ResetGmStoryNode(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < NODE_MAX; i++)
|
||||
{
|
||||
gGMData.nodes[i].state &= ~GM_NODE_STATE_CLEARED;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080BCFDC
|
||||
|
@ -782,10 +782,10 @@ void GMapPI_Init(struct GMapPIProc * proc)
|
||||
|
||||
// clang-format off
|
||||
|
||||
struct ProcCmd CONST_DATA gProcScr_GMapPlayerInterface[] =
|
||||
struct ProcCmd CONST_DATA ProcScr_GMapPlayerInterface[] =
|
||||
{
|
||||
PROC_NAME("PI"),
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
PROC_15,
|
||||
PROC_YIELD,
|
||||
|
||||
@ -832,7 +832,7 @@ void StartWorldMapPlayerInterface(struct Proc * parent)
|
||||
ApplyPalette(gPal_GMapPI_ShopIcons, 3);
|
||||
|
||||
ResetTextFont();
|
||||
Proc_Start(gProcScr_GMapPlayerInterface, parent->proc_parent);
|
||||
Proc_Start(ProcScr_GMapPlayerInterface, parent->proc_parent);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -841,7 +841,7 @@ void StartWorldMapPlayerInterface(struct Proc * parent)
|
||||
|
||||
struct ProcCmd CONST_DATA gUnknown_08A3E4D4[] =
|
||||
{
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
|
||||
PROC_WHILE(DoesBMXFADEExist),
|
||||
PROC_CALL(StartWorldMapPlayerInterface),
|
||||
@ -862,7 +862,7 @@ ProcPtr sub_80BF13C(ProcPtr parent)
|
||||
//! FE8U = 0x080BF15C
|
||||
void sub_80BF15C(void)
|
||||
{
|
||||
Proc_EndEach(gProcScr_GMapPlayerInterface);
|
||||
Proc_EndEach(ProcScr_GMapPlayerInterface);
|
||||
Proc_EndEach(gUnknown_08A3E4D4);
|
||||
|
||||
SetDefaultColorEffects();
|
||||
|
@ -82,7 +82,7 @@ void WmMinimap_PutLordIcon(struct GMapRadarProc * proc)
|
||||
return;
|
||||
}
|
||||
|
||||
GmMu_GetPosition(GM_MAIN->unk_54, 0, &xPos, &yPos);
|
||||
GmMu_GetPosition(GM_MU, 0, &xPos, &yPos);
|
||||
|
||||
x = *&xPos;
|
||||
y = *&yPos;
|
||||
@ -126,7 +126,7 @@ void WmMinimap_PutSkirmishIcons(struct GMapRadarProc * proc)
|
||||
continue;
|
||||
}
|
||||
|
||||
GmMu_GetPosition(GM_MAIN->unk_54, r9, &sp_1c, &sl);
|
||||
GmMu_GetPosition(GM_MU, r9, &sp_1c, &sl);
|
||||
|
||||
x = sp_1c;
|
||||
y = sl;
|
||||
@ -176,7 +176,7 @@ extern u16 gUnknown_08AA1950[];
|
||||
//! FE8U = 0x080C3A28
|
||||
void WmMinimap_BlinkPalette(struct GMapRadarProc * proc)
|
||||
{
|
||||
int colorIdx = GM_MAIN->unk_50->unk_34;
|
||||
int colorIdx = GM_CURSOR->unk_34;
|
||||
|
||||
u16 * pal = PAL_OBJ(9);
|
||||
|
||||
@ -264,7 +264,7 @@ void GMapRadar_80C3B40(struct GMapRadarProc * proc)
|
||||
|
||||
if ((gGMData.state.bits.state_2) != 0)
|
||||
{
|
||||
if ((s8)gGMData.unk01 < 1)
|
||||
if ((s8)gGMData.sprite_disp < 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -398,7 +398,7 @@ void GMapRadar_Init(struct GMapRadarProc * proc)
|
||||
struct ProcCmd CONST_DATA ProcScr_GmapRader[] =
|
||||
{
|
||||
PROC_NAME("Gmap Rader"),
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
|
||||
PROC_15,
|
||||
PROC_YIELD,
|
||||
@ -450,7 +450,7 @@ void StartWorldMapMinimapCore(struct Proc * proc)
|
||||
|
||||
struct ProcCmd CONST_DATA ProcScr_WorldmapMinimapWrapper[] =
|
||||
{
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
PROC_CALL(StartWorldMapMinimapCore),
|
||||
|
||||
PROC_END,
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
CONST_DATA struct ProcCmd ProcScr_GmapRmUpdateDirect[] = {
|
||||
PROC_NAME("Gmap RM update"),
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
PROC_REPEAT(GmapRmUpdateDirect_Loop),
|
||||
PROC_END
|
||||
};
|
||||
@ -27,7 +27,7 @@ void GmapRmUpdateDirect_Loop(struct Proc * proc)
|
||||
|
||||
CONST_DATA struct ProcCmd ProcScr_GmapRmUpdateExt[] = {
|
||||
PROC_NAME("Gmap RM update"),
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
PROC_SET_END_CB(GmapRmUpdateExt_End),
|
||||
PROC_YIELD,
|
||||
PROC_REPEAT(GmapRmUpdateExt_Delay),
|
||||
@ -95,7 +95,7 @@ void EndGmapRmUpdateExt(void)
|
||||
|
||||
struct ProcCmd CONST_DATA ProcScr_GmapRM[] = {
|
||||
PROC_NAME("Gmap RM"),
|
||||
PROC_MARK(8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
PROC_SET_END_CB(GmapRm_OnEnd),
|
||||
PROC_CALL(GmapRm_InitNop),
|
||||
PROC_SLEEP(1),
|
||||
@ -380,7 +380,7 @@ void GmapRm_EndAll(void)
|
||||
|
||||
struct ProcCmd CONST_DATA ProcScr_GmapRmBaPalAnim1[] = {
|
||||
PROC_NAME("Gmap RM ba pal anim"),
|
||||
PROC_MARK(8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
PROC_SET_END_CB(GmapRmBaPalAnim1_End),
|
||||
PROC_CALL(GmapRmBaPalAnim1_Init),
|
||||
PROC_SLEEP(1),
|
||||
@ -414,7 +414,7 @@ void GmapRmBaPalAnim1_Loop1(struct ProcGmapRmBaPalAnim * proc)
|
||||
{
|
||||
if (++proc->timer < 45)
|
||||
{
|
||||
u32 coeff = sub_800B84C(proc->timer, 45, 0);
|
||||
u32 coeff = _DivArm2(proc->timer, 45, 0);
|
||||
SetBlendConfig(0, DivArm(0x1000, coeff * 0x10), 0x10, 0);
|
||||
proc->flag = 0;
|
||||
}
|
||||
@ -430,7 +430,7 @@ void GmapRmBaPalAnim1_Loop2(struct ProcGmapRmBaPalAnim * proc)
|
||||
{
|
||||
if (++proc->timer < 45)
|
||||
{
|
||||
u32 coeff = sub_800B84C(proc->timer, 45, 0);
|
||||
u32 coeff = _DivArm2(proc->timer, 45, 0);
|
||||
SetBlendConfig(0, 0x10 - DivArm(0x1000, coeff * 0x10), 0x10, 0);
|
||||
}
|
||||
else
|
||||
@ -559,7 +559,7 @@ void GmapRmBorder1_NationMergeIn(struct ProcGmapRmBorder1 * proc)
|
||||
|
||||
if (++proc->timer < 22)
|
||||
{
|
||||
u32 coeff = sub_800B7E0(proc->timer, 22, 2);
|
||||
u32 coeff = _DivArm1(proc->timer, 22, 2);
|
||||
int ret = DivArm(0x1000, coeff * 0x10);
|
||||
|
||||
SetBlendConfig(0, ret, 0x10 - ret, 0);
|
||||
@ -595,7 +595,7 @@ void GmapRmBorder1_NationMergeOut(struct ProcGmapRmBorder1 * proc)
|
||||
|
||||
if (++proc->timer < 22)
|
||||
{
|
||||
u32 coeff = sub_800B7E0(proc->timer, 22, 2);
|
||||
u32 coeff = _DivArm1(proc->timer, 22, 2);
|
||||
int ret = DivArm(0x1000, coeff * 0x10);
|
||||
|
||||
SetBlendConfig(0, 0x10 - ret, ret, 0);
|
||||
@ -657,7 +657,7 @@ void GmapRmBorder1_80C2A1C(struct ProcGmapRmBorder1 * proc)
|
||||
|
||||
struct ProcCmd CONST_DATA ProcScr_GmapRmBorder1[] = {
|
||||
PROC_NAME("Gmap RM border"),
|
||||
PROC_MARK(8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
PROC_SET_END_CB(GmapRmBorder1_End),
|
||||
PROC_CALL(GmapRmBorder1_80C2750),
|
||||
PROC_REPEAT(GmapRmBorder1_NationMergeIn),
|
||||
@ -864,7 +864,7 @@ void sub_80C2C80(int a, int b, const u16 * srcA, const u16 * srcB, u16 * dst)
|
||||
{
|
||||
int i;
|
||||
|
||||
int coeff = sub_800B7E0(a, b, 0);
|
||||
int coeff = _DivArm1(a, b, 0);
|
||||
|
||||
for (i = 0; i < 0x10; i++)
|
||||
{
|
||||
@ -932,7 +932,7 @@ void WmDotPalAnim_Loop2(struct ProcGmapRmBaPalAnim * proc)
|
||||
struct ProcCmd CONST_DATA ProcScr_WmDotPalAnim[] =
|
||||
{
|
||||
PROC_NAME("Gmap RM ba pal anim"),
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
|
||||
PROC_SET_END_CB(WmDotPalAnim_OnEnd),
|
||||
|
||||
@ -1103,7 +1103,7 @@ void WmPlaceDot_Loop2(struct ProcWmPlaceDot * proc)
|
||||
struct ProcCmd CONST_DATA ProcScr_WmPlaceDot[] =
|
||||
{
|
||||
PROC_NAME("Gmap RM border"),
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
|
||||
PROC_SET_END_CB(WmPlaceDot_OnEnd),
|
||||
|
||||
|
@ -202,10 +202,10 @@ s8 sub_80BA6DC(struct GMapScreenVSyncProc * proc, int arg1, int arg2, int arg3,
|
||||
|
||||
// clang-format off
|
||||
|
||||
struct ProcCmd CONST_DATA gProcScr_GMapScreenVSync[] =
|
||||
struct ProcCmd CONST_DATA ProcScr_GMapScreenVSync[] =
|
||||
{
|
||||
PROC_NAME("GMapScreenVSync"),
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
|
||||
PROC_CALL(GMScreenVSync_Init),
|
||||
PROC_REPEAT(GMScreenVSync_Loop),
|
||||
@ -243,7 +243,7 @@ ProcPtr NewMapScreenVSync(u8 * arg0, u16 * arg1, u8 * arg2, void * arg3, void *
|
||||
{
|
||||
struct GMapScreenVSyncProc * proc;
|
||||
|
||||
proc = Proc_Start(gProcScr_GMapScreenVSync, NULL);
|
||||
proc = Proc_Start(ProcScr_GMapScreenVSync, NULL);
|
||||
if (proc == NULL)
|
||||
{
|
||||
return NULL;
|
||||
@ -471,10 +471,10 @@ void sub_80BAB0C(struct GmScreenProc * proc)
|
||||
|
||||
// clang-format off
|
||||
|
||||
struct ProcCmd CONST_DATA gProcScr_GMapScreen[] =
|
||||
struct ProcCmd CONST_DATA ProcScr_GMapScreen[] =
|
||||
{
|
||||
PROC_NAME("GmapScreen"),
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
|
||||
PROC_SET_END_CB(MapScreen_OnDelete),
|
||||
|
||||
@ -493,7 +493,7 @@ struct ProcCmd CONST_DATA gProcScr_GMapScreen[] =
|
||||
//! FE8U = 0x080BABF0
|
||||
ProcPtr NewMapScreen(ProcPtr parent)
|
||||
{
|
||||
struct GmScreenProc * proc = Proc_Start(gProcScr_GMapScreen, parent);
|
||||
struct GmScreenProc * proc = Proc_Start(ProcScr_GMapScreen, parent);
|
||||
proc->gmroute = StartGMapRoute(proc, &gGMData.openPaths, 0x5000, 0xe);
|
||||
return proc;
|
||||
}
|
||||
|
@ -219,7 +219,7 @@ void GmapScreen2_Loop(struct GmNodeIconDisplayProc * proc)
|
||||
}
|
||||
}
|
||||
|
||||
if (proc->unk_32_1)
|
||||
if (proc->merge_next_node)
|
||||
{
|
||||
node = &(proc->nodeId[gWMNodeData]);
|
||||
|
||||
@ -254,15 +254,15 @@ void GmapScreen2_Loop(struct GmNodeIconDisplayProc * proc)
|
||||
return;
|
||||
}
|
||||
|
||||
ProcPtr sub_80BB9A4(ProcPtr parent, int chr, int palId, int unk, ProcPtr pScreenProc)
|
||||
ProcPtr StartGmNodeIconDisplay(ProcPtr parent, int chr, int palId, int unk, ProcPtr pScreenProc)
|
||||
{
|
||||
struct GmNodeIconDisplayProc * proc = Proc_Start(gProcScr_GmNodeIconDisplay, parent);
|
||||
struct GmNodeIconDisplayProc * proc = Proc_Start(ProcScr_GmNodeIconDisplay, parent);
|
||||
|
||||
proc->chr = chr;
|
||||
proc->pal = palId;
|
||||
proc->unk_31 = unk;
|
||||
proc->pScreenProc = pScreenProc;
|
||||
proc->unk_32_1 = 0;
|
||||
proc->merge_next_node = false;
|
||||
proc->nodeId = 0;
|
||||
|
||||
proc->ap = AP_Create(Sprite_08A97AEC, 11);
|
||||
@ -320,10 +320,10 @@ int sub_80BBA4C(int nodeId)
|
||||
|
||||
// clang-format off
|
||||
|
||||
struct ProcCmd CONST_DATA gProcScr_GmNodeIconDisplay[] =
|
||||
struct ProcCmd CONST_DATA ProcScr_GmNodeIconDisplay[] =
|
||||
{
|
||||
PROC_NAME("GmapScreen"),
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
|
||||
PROC_SET_END_CB(GmapScreen2_Destruct),
|
||||
|
||||
|
@ -1,98 +1,43 @@
|
||||
#include "global.h"
|
||||
|
||||
#include "spline.h"
|
||||
|
||||
#include "worldmap.h"
|
||||
|
||||
struct GMapMoveCursorProc
|
||||
{
|
||||
/* 00 */ PROC_HEADER;
|
||||
/* 2A */ s16 unk_2a;
|
||||
/* 2C */ s16 unk_2c;
|
||||
/* 30 */ int unk_30;
|
||||
/* 34 */ int unk_34;
|
||||
/* 38 */ int unk_38;
|
||||
/* 3C */ int unk_3c;
|
||||
/* 40 */ u8 unk_40;
|
||||
/* 41 */ STRUCT_PAD(0x41, 0x44);
|
||||
/* 44 */ int unk_44;
|
||||
/* 48 */ int unk_48;
|
||||
};
|
||||
|
||||
struct GMapScrollManageProc
|
||||
{
|
||||
/* 00 */ PROC_HEADER;
|
||||
/* 2C */ int * unk_2c; // pointer to ?
|
||||
/* 30 */ int unk_30; // some set of bits?
|
||||
/* 34 */ s16 unk_34; // spline degree (?)
|
||||
/* 36 */ s16 unk_36; // initial camera x
|
||||
/* 38 */ s16 unk_38; // initial camera y
|
||||
/* 3A */ s16 unk_3a; // target camera x
|
||||
/* 3C */ s16 unk_3c; // target camera y
|
||||
/* 40 */ int unk_40; // duration
|
||||
/* 44 */ int unk_44; // frame counter
|
||||
/* 48 */ s16 unk_48; // start frame countdown (will only start once this reaches 0, else decrease this)
|
||||
};
|
||||
|
||||
struct GmScrollInfo
|
||||
{
|
||||
/* 00 */ int * unk_00; // pointer to ?
|
||||
/* 04 */ int unk_04; // some bits?
|
||||
/* 08 */ s16 unk_08; // spline degree (?)
|
||||
/* 0A */ s16 unk_0a; // initial camera x
|
||||
/* 0C */ s16 unk_0c; // initial camera y
|
||||
/* 0E */ s16 unk_0e; // target camera x
|
||||
/* 10 */ s16 unk_10; // target camera y
|
||||
/* 12 */ STRUCT_PAD(0x12, 0x14);
|
||||
/* 14 */ int unk_14; // duration
|
||||
/* 18 */ s16 unk_18; // delay
|
||||
};
|
||||
|
||||
//! FE8U = 0x080BF180
|
||||
void GmMoveCursor_OnEnd(struct GMapMoveCursorProc * proc)
|
||||
{
|
||||
gGMData.ix = proc->unk_38;
|
||||
gGMData.iy = proc->unk_3c;
|
||||
return;
|
||||
gGMData.ix = proc->xdst;
|
||||
gGMData.iy = proc->ydst;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080BF190
|
||||
void GmMoveCursor_OnInit(struct GMapMoveCursorProc * proc)
|
||||
{
|
||||
proc->unk_2c = 0;
|
||||
return;
|
||||
proc->timer = 0;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080BF198
|
||||
void GmMoveCursor_OnLoop(struct GMapMoveCursorProc * proc)
|
||||
{
|
||||
proc->unk_2c++;
|
||||
proc->timer++;
|
||||
|
||||
if (proc->unk_2c < proc->unk_2a)
|
||||
if (proc->timer < proc->duration)
|
||||
{
|
||||
int coeff = sub_800B7E0(proc->unk_2c, proc->unk_2a, proc->unk_40);
|
||||
int x = proc->unk_30 + DivArm(0x1000, proc->unk_44 * coeff);
|
||||
int y = proc->unk_34 + DivArm(0x1000, proc->unk_48 * coeff);
|
||||
int coeff = _DivArm1(proc->timer, proc->duration, proc->move_type);
|
||||
int x = proc->xsrc + DivArm(0x1000, proc->xmove * coeff);
|
||||
int y = proc->ysrc + DivArm(0x1000, proc->ymove * coeff);
|
||||
|
||||
gGMData.ix = x;
|
||||
gGMData.iy = y;
|
||||
}
|
||||
else
|
||||
{
|
||||
gGMData.ix = proc->unk_38;
|
||||
gGMData.iy = proc->unk_3c;
|
||||
gGMData.ix = proc->xdst;
|
||||
gGMData.iy = proc->ydst;
|
||||
Proc_End(proc);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
|
||||
struct ProcCmd CONST_DATA gProcScr_GmMoveCursor[] =
|
||||
struct ProcCmd CONST_DATA ProcScr_GmMoveCursor[] =
|
||||
{
|
||||
PROC_NAME("Gmap Move Cursor"),
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
|
||||
PROC_SET_END_CB(GmMoveCursor_OnEnd),
|
||||
|
||||
@ -103,121 +48,97 @@ struct ProcCmd CONST_DATA gProcScr_GmMoveCursor[] =
|
||||
PROC_END,
|
||||
};
|
||||
|
||||
// clang-format on
|
||||
|
||||
//! FE8U = 0x080BF210
|
||||
ProcPtr StartGmMoveCursor(struct Vec2 * posA, struct Vec2 * posB, int c, int d, ProcPtr parent)
|
||||
ProcPtr StartGmMoveCursor(struct Vec2 * src, struct Vec2 * dst, int duration, int move_type, ProcPtr parent)
|
||||
{
|
||||
struct GMapMoveCursorProc * proc;
|
||||
|
||||
if (parent)
|
||||
proc = Proc_Start(ProcScr_GmMoveCursor, parent);
|
||||
else
|
||||
proc = Proc_Start(ProcScr_GmMoveCursor, PROC_TREE_3);
|
||||
|
||||
if (src == NULL)
|
||||
{
|
||||
proc = Proc_Start(gProcScr_GmMoveCursor, parent);
|
||||
proc->xsrc = gGMData.ix;
|
||||
proc->ysrc = gGMData.iy;
|
||||
}
|
||||
else
|
||||
{
|
||||
proc = Proc_Start(gProcScr_GmMoveCursor, PROC_TREE_3);
|
||||
proc->xsrc = src->x << 8;
|
||||
proc->ysrc = src->y << 8;
|
||||
}
|
||||
|
||||
if (posA == NULL)
|
||||
if (dst == NULL)
|
||||
{
|
||||
proc->unk_30 = gGMData.ix;
|
||||
proc->unk_34 = gGMData.iy;
|
||||
proc->xdst = 0;
|
||||
proc->ydst = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
proc->unk_30 = posA->x << 8;
|
||||
proc->unk_34 = posA->y << 8;
|
||||
proc->xdst = dst->x << 8;
|
||||
proc->ydst = dst->y << 8;
|
||||
}
|
||||
|
||||
if (posB == NULL)
|
||||
{
|
||||
proc->unk_38 = 0;
|
||||
proc->unk_3c = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
proc->unk_38 = posB->x << 8;
|
||||
proc->unk_3c = posB->y << 8;
|
||||
}
|
||||
proc->xmove = proc->xdst - proc->xsrc;
|
||||
proc->ymove = proc->ydst - proc->ysrc;
|
||||
|
||||
proc->unk_44 = proc->unk_38 - proc->unk_30;
|
||||
proc->unk_48 = proc->unk_3c - proc->unk_34;
|
||||
|
||||
proc->unk_2a = c;
|
||||
proc->unk_40 = d;
|
||||
proc->duration = duration;
|
||||
proc->move_type = move_type;
|
||||
|
||||
return proc;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080BF294
|
||||
s8 GmMoveCursorExists(void)
|
||||
{
|
||||
return (Proc_Find(gProcScr_GmMoveCursor)) ? 1 : 0;
|
||||
return Proc_Exists(ProcScr_GmMoveCursor);
|
||||
}
|
||||
|
||||
//! FE8U = 0x080BF2AC
|
||||
void GmScrollManage_OnEnd(struct GMapScrollManageProc * proc)
|
||||
{
|
||||
gGMData.xCamera = proc->unk_3a;
|
||||
gGMData.yCamera = proc->unk_3c;
|
||||
gGMData.xCamera = proc->xdst;
|
||||
gGMData.yCamera = proc->ydst;
|
||||
|
||||
if (proc->unk_2c)
|
||||
{
|
||||
*proc->unk_2c |= proc->unk_30;
|
||||
}
|
||||
|
||||
return;
|
||||
if (proc->wm_flag)
|
||||
*proc->wm_flag |= proc->lock;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080BF2D0
|
||||
void GmScrollManage_OnInit(struct GMapScrollManageProc * proc)
|
||||
{
|
||||
proc->unk_44 = 0;
|
||||
return;
|
||||
proc->timer = 0;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080BF2D8
|
||||
void GmScrollManage_OnLoop(struct GMapScrollManageProc * proc)
|
||||
{
|
||||
if (proc->unk_48 > 0)
|
||||
if (proc->delay > 0)
|
||||
{
|
||||
proc->unk_48--;
|
||||
proc->delay--;
|
||||
return;
|
||||
}
|
||||
|
||||
if (*proc->unk_2c & proc->unk_30)
|
||||
{
|
||||
proc->unk_44 = proc->unk_40;
|
||||
}
|
||||
if (*proc->wm_flag & proc->lock)
|
||||
proc->timer = proc->duration;
|
||||
else
|
||||
{
|
||||
proc->unk_44 += 0x1000;
|
||||
}
|
||||
proc->timer += 0x1000;
|
||||
|
||||
if (proc->unk_44 < proc->unk_40)
|
||||
if (proc->timer < proc->duration)
|
||||
{
|
||||
int coeff = sub_800B84C(proc->unk_44, proc->unk_40, proc->unk_34);
|
||||
int x = proc->unk_36 + DivArm(0x1000, (proc->unk_3a - proc->unk_36) * coeff);
|
||||
int y = proc->unk_38 + DivArm(0x1000, (proc->unk_3c - proc->unk_38) * coeff);
|
||||
int coeff = _DivArm2(proc->timer, proc->duration, proc->move_type);
|
||||
int x = proc->xsrc + DivArm(0x1000, (proc->xdst - proc->xsrc) * coeff);
|
||||
int y = proc->ysrc + DivArm(0x1000, (proc->ydst - proc->ysrc) * coeff);
|
||||
|
||||
gGMData.xCamera = x;
|
||||
gGMData.yCamera = y;
|
||||
}
|
||||
else
|
||||
{
|
||||
Proc_Break(proc);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
|
||||
struct ProcCmd CONST_DATA gProcScr_GmScrollManage[] =
|
||||
struct ProcCmd CONST_DATA ProcScr_GmScrollManage[] =
|
||||
{
|
||||
PROC_NAME("Gmap Scroll Manage"),
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
|
||||
PROC_SET_END_CB(GmScrollManage_OnEnd),
|
||||
|
||||
@ -232,91 +153,82 @@ struct ProcCmd CONST_DATA gProcScr_GmScrollManage[] =
|
||||
//! FE8U = 0x080BF370
|
||||
ProcPtr StartGmScrollManage(struct GmScrollInfo * input, ProcPtr parent)
|
||||
{
|
||||
u16 r1;
|
||||
u16 _src;
|
||||
|
||||
struct GMapScrollManageProc * proc = Proc_Start(gProcScr_GmScrollManage, parent);
|
||||
struct GMapScrollManageProc * proc = Proc_Start(ProcScr_GmScrollManage, parent);
|
||||
|
||||
if ((input->unk_0a < 0) || (input->unk_0c < 0))
|
||||
if ((input->xsrc < 0) || (input->ysrc < 0))
|
||||
{
|
||||
input->unk_0a = gGMData.xCamera;
|
||||
input->unk_0c = gGMData.yCamera;
|
||||
input->xsrc = gGMData.xCamera;
|
||||
input->ysrc = gGMData.yCamera;
|
||||
}
|
||||
|
||||
r1 = input->unk_0a;
|
||||
proc->unk_36 = r1;
|
||||
proc->unk_38 = input->unk_0c;
|
||||
_src = input->xsrc;
|
||||
proc->xsrc = _src;
|
||||
proc->ysrc = input->ysrc;
|
||||
|
||||
gGMData.xCamera = r1;
|
||||
gGMData.yCamera = proc->unk_38;
|
||||
gGMData.xCamera = _src;
|
||||
gGMData.yCamera = proc->ysrc;
|
||||
|
||||
if (input->unk_0e < 0)
|
||||
{
|
||||
proc->unk_3a = r1;
|
||||
}
|
||||
if (input->xdst < 0)
|
||||
proc->xdst = _src;
|
||||
else
|
||||
proc->xdst = input->xdst;
|
||||
|
||||
proc->ydst = input->ydst;
|
||||
proc->move_type = input->move_type;
|
||||
proc->duration = input->duration << 0xc;
|
||||
proc->delay = input->delay;
|
||||
|
||||
proc->wm_flag = input->flags;
|
||||
|
||||
if (proc->wm_flag != 0)
|
||||
{
|
||||
proc->unk_3a = input->unk_0e;
|
||||
*proc->wm_flag &= ~input->lock;
|
||||
proc->lock = input->lock;
|
||||
}
|
||||
|
||||
proc->unk_3c = input->unk_10;
|
||||
proc->unk_34 = input->unk_08;
|
||||
proc->unk_40 = input->unk_14 << 0xc;
|
||||
proc->unk_48 = input->unk_18;
|
||||
|
||||
proc->unk_2c = input->unk_00;
|
||||
|
||||
if (proc->unk_2c != 0)
|
||||
{
|
||||
*proc->unk_2c &= ~input->unk_04;
|
||||
proc->unk_30 = input->unk_04;
|
||||
}
|
||||
|
||||
return proc;
|
||||
}
|
||||
|
||||
// TODO: definition doesn't match usage
|
||||
|
||||
//! FE8U = 0x080BF3F4
|
||||
ProcPtr FindGmScrollManage(void)
|
||||
#if BUFFIX
|
||||
bool GmScrollManageExist(void)
|
||||
#else
|
||||
ProcPtr GmScrollManageExist(void)
|
||||
#endif
|
||||
{
|
||||
return (Proc_Find(gProcScr_GmScrollManage));
|
||||
return Proc_Find(ProcScr_GmScrollManage);
|
||||
}
|
||||
|
||||
//! FE8U = 0x080BF404
|
||||
void StartGmScroll(s16 xStart, s16 yStart, s16 xEnd, s16 yEnd, s16 speed, s16 delay)
|
||||
{
|
||||
struct GmScrollInfo info;
|
||||
|
||||
struct WorldMapMainProc * worldMapProc = GM_MAIN;
|
||||
info.unk_00 = &worldMapProc->unk_30;
|
||||
info.flags = &worldMapProc->scrolling;
|
||||
|
||||
info.unk_04 = 1;
|
||||
info.unk_08 = 1;
|
||||
info.unk_0a = xStart;
|
||||
info.unk_0c = yStart;
|
||||
info.unk_0e = xEnd;
|
||||
info.unk_10 = yEnd;
|
||||
info.unk_14 = speed;
|
||||
info.unk_18 = delay;
|
||||
info.lock = 1;
|
||||
info.move_type = 1;
|
||||
info.xsrc = xStart;
|
||||
info.ysrc = yStart;
|
||||
info.xdst = xEnd;
|
||||
info.ydst = yEnd;
|
||||
info.duration = speed;
|
||||
info.delay = delay;
|
||||
|
||||
StartGmScrollManage(&info, worldMapProc);
|
||||
|
||||
GM_CURSOR->unk_32--;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080BF490
|
||||
int sub_80BF490(void)
|
||||
bool CheckGmScrolling(void)
|
||||
{
|
||||
return !(GM_MAIN->unk_30 & 1);
|
||||
return !(GM_MAIN->scrolling & 1);
|
||||
}
|
||||
|
||||
//! FE8U = 0x080BF4A8
|
||||
void EndGmScroll(void)
|
||||
{
|
||||
struct WorldMapMainProc * worldMapProc = Proc_Find(ProcScr_WorldMapMain);
|
||||
Proc_EndEach(gProcScr_GmScrollManage);
|
||||
Proc_EndEach(ProcScr_GmScrollManage);
|
||||
|
||||
worldMapProc->unk_30 |= 1;
|
||||
|
||||
return;
|
||||
worldMapProc->scrolling |= 1;
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ void GmapSogu_Loop2(struct ProcGmapSogu * proc)
|
||||
|
||||
CONST_DATA struct ProcCmd ProcScr_GmapSogu[] = {
|
||||
PROC_NAME("Gmap Sogu"),
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
PROC_SET_END_CB(GmapSogu_End),
|
||||
PROC_CALL(GmapSogu_Init),
|
||||
PROC_REPEAT(GmapSogu_Loop1),
|
||||
|
@ -144,12 +144,12 @@ struct WorldmapStatusProc
|
||||
/* 34 */ struct Text text[2];
|
||||
};
|
||||
|
||||
extern struct ProcCmd gProcScr_WorldmapStatusUi[];
|
||||
extern struct ProcCmd ProcScr_WorldmapStatusUi[];
|
||||
|
||||
//! FE8U = 0x080C0A10
|
||||
void WorldmapStatus_GetCharDescription(struct HelpBoxProc * proc)
|
||||
{
|
||||
struct WorldmapStatusProc * statusProc = Proc_Find(gProcScr_WorldmapStatusUi);
|
||||
struct WorldmapStatusProc * statusProc = Proc_Find(ProcScr_WorldmapStatusUi);
|
||||
|
||||
if (statusProc->unit->pCharacterData->descTextId)
|
||||
{
|
||||
@ -166,7 +166,7 @@ void WorldmapStatus_GetCharDescription(struct HelpBoxProc * proc)
|
||||
//! FE8U = 0x080C0A44
|
||||
void WorldmapStatus_GetClassDescription(struct HelpBoxProc * proc)
|
||||
{
|
||||
struct WorldmapStatusProc * statusProc = Proc_Find(gProcScr_WorldmapStatusUi);
|
||||
struct WorldmapStatusProc * statusProc = Proc_Find(ProcScr_WorldmapStatusUi);
|
||||
proc->mid = statusProc->unit->pClassData->descTextId;
|
||||
return;
|
||||
}
|
||||
@ -411,9 +411,9 @@ void WorldmapStatus_PutTimeAndGold(void)
|
||||
|
||||
// clang-format off
|
||||
|
||||
struct ProcCmd CONST_DATA gProcScr_WmStatus_PutTimeAndGold[] =
|
||||
struct ProcCmd CONST_DATA ProcScr_WmStatus_PutTimeAndGold[] =
|
||||
{
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
PROC_REPEAT(WorldmapStatus_PutTimeAndGold),
|
||||
|
||||
PROC_END,
|
||||
@ -457,9 +457,9 @@ void WorldmapStatus_80C0FA4(void)
|
||||
|
||||
// clang-format off
|
||||
|
||||
struct ProcCmd CONST_DATA gProcScr_WorldmapStatusUi[] =
|
||||
struct ProcCmd CONST_DATA ProcScr_WorldmapStatusUi[] =
|
||||
{
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
|
||||
PROC_SET_END_CB(WorldmapStatus_OnEnd),
|
||||
|
||||
@ -475,7 +475,7 @@ struct ProcCmd CONST_DATA gProcScr_WorldmapStatusUi[] =
|
||||
PROC_CALL(WorldmapStatus_InitDetails),
|
||||
PROC_CALL(WorldmapStatus_80C0E58),
|
||||
|
||||
PROC_START_CHILD(gProcScr_WmStatus_PutTimeAndGold),
|
||||
PROC_START_CHILD(ProcScr_WmStatus_PutTimeAndGold),
|
||||
|
||||
PROC_REPEAT(WorldmapStatus_Loop_KeyHandler),
|
||||
|
||||
|
@ -95,7 +95,7 @@ void WmText_Loop_DrawText(struct GMapTextProc * proc)
|
||||
|
||||
struct ProcCmd CONST_DATA ProcScr_WorldMapTextHandler[] =
|
||||
{
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
|
||||
PROC_CALL(WmText_Init),
|
||||
PROC_YIELD,
|
||||
|
@ -299,7 +299,7 @@ void GmapTimeMons_WaitSpriteDone(struct ProcGmapTimeMons * proc)
|
||||
|
||||
CONST_DATA struct ProcCmd ProcScr_GmapTimeMons[] = {
|
||||
PROC_NAME("Gmap Time Mons"),
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
PROC_SET_END_CB(nullsub_72),
|
||||
PROC_CALL(GmapTimeMons_Init),
|
||||
PROC_REPEAT(GmapTimeMons_ExecMonsterMergeMu),
|
||||
|
@ -109,7 +109,7 @@ void GmTmConfront_Loop_MoveUnitPositions(struct GmapTmConfrontProc * proc)
|
||||
|
||||
if (proc->unk_2a < proc->unk_2c)
|
||||
{
|
||||
int var = sub_800B7E0(proc->unk_2a, proc->unk_2c, 1);
|
||||
int var = _DivArm1(proc->unk_2a, proc->unk_2c, 1);
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
@ -185,10 +185,10 @@ void GmTmConfront_WaitForAnim(ProcPtr proc)
|
||||
|
||||
// clang-format off
|
||||
|
||||
struct ProcCmd CONST_DATA gProcScr_GmapTmConfront[] =
|
||||
struct ProcCmd CONST_DATA ProcScr_GmapTmConfront[] =
|
||||
{
|
||||
PROC_NAME("Gmap Tm Confront"),
|
||||
PROC_MARK(PROC_MARK_8),
|
||||
PROC_MARK(PROC_MARK_WMSTUFF),
|
||||
|
||||
PROC_SET_END_CB(GmTmConfront_OnEnd),
|
||||
PROC_YIELD,
|
||||
@ -227,11 +227,11 @@ ProcPtr StartWorldmapSkirmishAnim(int a, int b, ProcPtr parent)
|
||||
|
||||
if (parent != NULL)
|
||||
{
|
||||
proc = Proc_StartBlocking(gProcScr_GmapTmConfront, parent);
|
||||
proc = Proc_StartBlocking(ProcScr_GmapTmConfront, parent);
|
||||
}
|
||||
else
|
||||
{
|
||||
proc = Proc_Start(gProcScr_GmapTmConfront, PROC_TREE_3);
|
||||
proc = Proc_Start(ProcScr_GmapTmConfront, PROC_TREE_3);
|
||||
}
|
||||
|
||||
proc->unk_2e[1] = a;
|
||||
@ -245,12 +245,12 @@ ProcPtr StartWorldmapSkirmishAnim(int a, int b, ProcPtr parent)
|
||||
//! FE8U = 0x080C080C
|
||||
void EndWorldmapSkirmishAnim(void)
|
||||
{
|
||||
Proc_EndEach(gProcScr_GmapTmConfront);
|
||||
Proc_EndEach(ProcScr_GmapTmConfront);
|
||||
return;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080C081C
|
||||
bool IsWorldmapSkirmishAnimActive(void)
|
||||
{
|
||||
return Proc_Find(gProcScr_GmapTmConfront) ? TRUE : FALSE;
|
||||
return Proc_Find(ProcScr_GmapTmConfront) ? TRUE : FALSE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user