DCDecomp
A decompilation of Dark Cloud for the PlayStation 2
Loading...
Searching...
No Matches
menu_draw.hpp
1#pragma once
2
3#include "common.h"
4
5#include "itemdata.hpp"
6#include "shop.hpp"
7
11// clang-format off
12enum PersonalBoardPage {
13 BOARD_PAGE_NONE = -1,
14 BOARD_PAGE_ITEM = 0,
15 BOARD_PAGE_WEAPON = 1,
16 BOARD_PAGE_ATTACH = 2,
17 BOARD_PAGE_ATLA_VILLAGE = 3,
18};
19
20// clang-format on
21
25// clang-format off
26enum PersonalBoardArea {
27 PERSONAL_BOARD_AREA_CELLS = 1,
28 PERSONAL_BOARD_AREA_TRASH = 2,
29};
30
31// clang-format on
32
36// clang-format off
37enum PersonalBoardKind {
38 PERSONAL_BOARD_ITEM = 0,
39 PERSONAL_BOARD_WEAPON_ATTACH = 1,
40 PERSONAL_BOARD_ATLA = 2,
41};
42
43// clang-format on
44
48// clang-format off
49enum MenuMesSet {
50 MENU_MES_SET_ALLMENU = 0,
51 MENU_MES_SET_EVENT_ITEM = 1,
52 MENU_MES_SET_SHOP = 2,
53 MENU_MES_SET_NAME_ENTRY = 3,
54 MENU_MES_SET_ATLA_NAME = 4,
55 MENU_MES_SET_WORLD_MAP = 5,
56 MENU_MES_SET_DUNGEON_ENTER = 7,
57};
58
59// clang-format on
60
64// clang-format off
65enum DunEnterMenuState {
66 DUN_ENTER_SELECT = 0,
67 DUN_ENTER_FADE_IN = 1,
68 DUN_ENTER_FADE_OUT = 2,
69 DUN_ENTER_DIRECT = 3,
70};
71
72// clang-format on
73
74// Forward declarations for the types these declarations name. The skeleton
75// headers are generated from the retail symbol table, which knows the type
76// names but not where they live.
77struct DNG_CONSUMABLE;
78class CCamera;
79class CRect_i_;
80class CTexture;
81class CUserStatus;
82class CDngStatusData;
83class ClsMes;
84struct SAVEDATA_INFO;
85struct spRGBA;
86
95 float list_y;
102 s8 max_atra[100];
104 u8 unk_0D9;
105 s16 kills[100];
106 u8 unk_1A2[2];
107 s16 state;
108 u8 unk_1A6[2];
110};
111
112STATIC_ASSERT(sizeof(DUN_ENTER_MENU) == 0x1AC);
113
136
137STATIC_ASSERT(sizeof(PERSONAL_BOARD) == 0x160);
138
143 s16 id;
144 s16 unk_02;
147 s32 u;
148 s32 v;
154 s16 unk_26;
155};
156
157STATIC_ASSERT(sizeof(MENU_ICON_INFO) == 0x28);
158
160extern DUN_ENTER_MENU DEnterMenu;
161
163extern CDngStatusData *DEnterStatusPt;
164
166extern int MenuEtcErrCnt;
167
169extern char MenuGrobalDir[64];
170
172extern int MenuShadowReadBlock;
173
175extern s16 MenuCharaWeaponMax[];
176
178extern int BtlMenuReadBlock;
179
181extern int BtlMenuBGMvol;
182
184extern int MenuExTextureReadFlag;
185
187extern MENU_ICON_INFO MenuIcon[7][14];
188
196char *GetMenuTextureDir();
197
205int GetMenuLangFlag();
206
214char *GetNowSelectLanguage(int language);
215
223void GetPathReadDifferntLang(char *path);
224
232int LoadFileBGMenuData(char *name, u_long128 *buffer);
233
241int LoadFileMenuData(char *name, unsigned int *buffer);
242
250u_long128 *BtlMenuBufferSet(int mode);
251
259u_long128 *MenuCalcBufAlignment(u_long128 *buffer);
260
268int GetAtoraMaxVillage();
269
277int GetNowMapTransAtraMap(int map_no);
278
286void MenuWorldTrans(CCamera *camera);
287
295void MenuPolygonDraw(int ambient_alpha, void (*draw)());
296
304void Get3DPosTo2DPos(CFrame *frame, int *screen);
305
313int GetMenuCommonFontW(int language, int style);
314
322int GetMenuCommonPutXY(ClsMes *mes, int x);
323
331void InitMenuMesSet(int mode, short *messages);
332
340void DrawMenuClsMes(ClsMes *message, int x, int y);
341
345enum MenuSound {
346 MENU_SOUND_CURSOR = 0,
347 MENU_SOUND_CONFIRM = 1,
348 MENU_SOUND_REFUSE = 2,
349};
350
358void ComMenuSePlay(int sound);
359
367void DrawMenu2DSprite(CTexture *texture, CRect_i_ screen, CRect_i_ texel, int alpha);
368
376void DrawMenu2DSprite(CTexture *texture, CRect_i_ screen, CRect_i_ texel, unsigned char r, unsigned char g, unsigned char b, int alpha);
377
385void DrawMenu2DSprite(CTexture *texture, CRect_i_ screen, CRect_i_ texel, spRGBA *top_left, spRGBA *top_right, spRGBA *bottom_left, spRGBA *bottom_right);
386
394void MenuTextureReload(int block);
395
403void MenuTextureDelete(int *blocks);
404
412void AllFillBoxForMenu(unsigned char r, unsigned char g, unsigned char b, unsigned char alpha);
413
421void AllFadeForMenu(int alpha);
422
430void FrameImageDraw(int brightness, int alpha);
431
439void DrawMenuColorGradation(CRect_i_ &rect, spRGBA *top_left, spRGBA *top_right, spRGBA *bottom_left, spRGBA *bottom_right);
440
448void DrawMenuSideGradation(CRect_i_ &rect, spRGBA *left, spRGBA *right);
449
457void DrawIconParts(int item_no, int x, int y, int top, int bottom, int alpha, int number);
458
466void DrawAttachNumberOrWeapon(int x, int y, int top, int bottom, int item_no, int value, int alpha, int vibe);
467
475void FadeTexX(int left_x, int left_width, int right_x, int right_width, char *name, int dim);
476
484CTexture *RetCTex(short item_no, int &u, int &v);
485
493void MenuTextureClip(int &position, int &source, int &length, int minimum, int maximum);
494
502int GetNumberKeta(int value);
503
511MENU_ICON_INFO *GetMenuIconInfo(int icon);
512
520void DrawMainMenuIcon(int x, int y, int icon, int selected, int bright, int alpha);
521
529void DrawMenuVibeItem(int x, int y, int offset_x, int offset_y, int alpha);
530
538int GetMainMenuRightHelpWinLangOffset(float &x, float &y, float &width, float &height);
539
547int GetMainMenuRightHelpMsgLangOffset(int &x, int &y);
548
556void InitHaveData(IHAVEITEM *item);
557
565void InitHaveWep(WEAPON_HAVE *weapon);
566
574void InitHaveAttach(ATTACH_LIST *attachment);
575
583void MenuDataSwap(s16 *first, s16 *second);
584
592void MenuDataSwap(int *first, int *second);
593
601void MenuDataSwap(WEAPON_HAVE *first, WEAPON_HAVE *second);
602
610void MenuDataSwap(ATTACH_LIST *first, ATTACH_LIST *second);
611
619void SetMenuTrushMark(ITEM_PACK *items);
620
628void DeleteMenuTrushMark();
629
637void InitPersonalBoardMode(CUserStatus *status, PERSONAL_BOARD *board, int mode, int page);
638
646int BoardModeChangeKey();
647
655void PersonalBoardLimmitCheck();
656
664int PersonalBoardKeySub();
665
673int PersonalBoardKey();
674
682int PersonalBoardItemPush(IHAVEITEM *item, int board_pos);
683
691int GetAttachKind(int item_no);
692
696extern CTexture *PerBoardTex;
s8 collected_atra[100]
WEAPON_HAVE weapon
DNG_CONSUMABLE * consumables
ITEM_PACK * item_pack
ATTACH_LIST held_attach
IHAVEITEM held_item