DCDecomp
A decompilation of Dark Cloud for the PlayStation 2
Loading...
Searching...
No Matches
dungeonparts.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "common.h"
4
5// Forward declarations for the types these declarations name. The skeleton
6// headers are generated from the retail symbol table, which knows the type
7// names but not where they live.
8class CFrame;
9struct MAPPARTS;
10
24// clang-format off
34 MAP_PARTS_ROOM_WALL_NORTH = 5,
35 MAP_PARTS_ROOM_WALL_EAST = 6,
36 MAP_PARTS_ROOM_WALL_SOUTH = 7,
37 MAP_PARTS_ROOM_WALL_WEST = 8,
38
40 MAP_PARTS_ROOM_DOOR_EAST = 10,
41 MAP_PARTS_ROOM_DOOR_SOUTH = 11,
42 MAP_PARTS_ROOM_DOOR_WEST = 12,
43
44 MAP_PARTS_ROOM_CORNER_NORTH_WEST = 13,
45 MAP_PARTS_ROOM_CORNER_NORTH_EAST = 14,
46 MAP_PARTS_ROOM_CORNER_SOUTH_EAST = 15,
47 MAP_PARTS_ROOM_CORNER_SOUTH_WEST = 16,
48
52 MAP_PARTS_DIVIDE_END_EAST = 19,
53 MAP_PARTS_DIVIDE_END_SOUTH = 20,
54 MAP_PARTS_DIVIDE_END_WEST = 21,
55
57 MAP_PARTS_DIVIDE_DOOR_EAST = 23,
58 MAP_PARTS_DIVIDE_DOOR_SOUTH = 24,
59 MAP_PARTS_DIVIDE_DOOR_WEST = 25,
60
62 MAP_PARTS_DIVIDE_WALL_EAST = 27,
63 MAP_PARTS_DIVIDE_WALL_SOUTH = 28,
64 MAP_PARTS_DIVIDE_WALL_WEST = 29,
65
70 MAP_PARTS_HEAL_SPRING_EAST = 33,
71 MAP_PARTS_HEAL_SPRING_SOUTH = 34,
72 MAP_PARTS_HEAL_SPRING_WEST = 35,
73
75 MAP_PARTS_ROOM_GATE_EAST = 37,
76 MAP_PARTS_ROOM_GATE_SOUTH = 38,
77 MAP_PARTS_ROOM_GATE_WEST = 39,
78
80 MAP_PARTS_URA_ENTRANCE_EAST = 41,
81 MAP_PARTS_URA_ENTRANCE_SOUTH = 42,
82 MAP_PARTS_URA_ENTRANCE_WEST = 43,
83
87 MAP_PARTS_PILLAR_2 = 46,
88
89 /* Two more sets of room door, which the floor builder does not select. */
90 MAP_PARTS_ROOM_DOOR_B_NORTH = 47,
91 MAP_PARTS_ROOM_DOOR_B_EAST = 48,
92 MAP_PARTS_ROOM_DOOR_B_SOUTH = 49,
93 MAP_PARTS_ROOM_DOOR_B_WEST = 50,
94 MAP_PARTS_ROOM_DOOR_C_NORTH = 51,
95 MAP_PARTS_ROOM_DOOR_C_EAST = 52,
96 MAP_PARTS_ROOM_DOOR_C_SOUTH = 53,
97 MAP_PARTS_ROOM_DOOR_C_WEST = 54,
98
100 MAP_PARTS_KEY_DOOR_XIAO_EAST = 56,
101 MAP_PARTS_KEY_DOOR_XIAO_SOUTH = 57,
102 MAP_PARTS_KEY_DOOR_XIAO_WEST = 58,
103
107 MAP_PARTS_KEY_DOOR_GORO_EAST = 61,
108 MAP_PARTS_KEY_DOOR_GORO_SOUTH = 62,
109 MAP_PARTS_KEY_DOOR_GORO_WEST = 63,
110
112 MAP_PARTS_KEY_DOOR_RUBY_EAST = 65,
113 MAP_PARTS_KEY_DOOR_RUBY_SOUTH = 66,
114 MAP_PARTS_KEY_DOOR_RUBY_WEST = 67,
115
118};
119
120// clang-format on
121
126 s32 used;
127 u8 unk_04[12];
128 float vertex[4][4];
129 s32 red;
130 s32 green;
131 s32 blue;
133};
134
139public:
141 s16 unk_002;
144 s16 unk_00A;
148 u8 unk_014[12];
149 float fire_pos[6][4];
150 s8 fire_param[16];
152 float pos[4];
154 s16 unk_102;
155 u8 unk_104[12];
156 float frame_offset[5][4];
158 u8 unk_164[0xC];
159 float frame_turn[6];
160 u8 unk_188[8];
161 float heal_pos[4];
165 s32 unk_1AC;
167 u8 unk_1C8[8];
168
169public:
177 CFrame *GetSearchFrame(char *name);
178
186 void SetHealZone(float *position, float width, float depth);
187
195 void Draw();
196
204 void DrawCalc(int x, int z, int turn, int map_type);
205
213 void initalize();
214};
215
216STATIC_ASSERT(sizeof(PARTS_WATER) == 0x60);
217STATIC_ASSERT(sizeof(CDungeonParts) == 0x1D0);
218
223 int count[2];
224 int item[2][64];
225};
226
227STATIC_ASSERT(sizeof(PIERO_ITEM_SET) == 0x208);
228
234
239 int floor;
241 int item[128];
242};
243
244STATIC_ASSERT(sizeof(ITEM_PUT_SET) == 0x208);
245
250extern ITEM_PUT_SET *ItemPutListPtr[14];
251
259void GetPieroItem(int map_no, int ura_dungeon, int *item0, int *item1);
260
268int PresetSmallItemNo_Get(int map_no, int floor_no, int special, int small);
269
275 float x0;
276 float y0;
277 float z0;
278 float x1;
279 float y1;
280 float z1;
281};
282
290 s8 unk_03;
292};
293
294STATIC_ASSERT(sizeof(ITEM_FREE_RECT) == 0x18);
295STATIC_ASSERT(sizeof(ITEM_FREE_AREA) == 0x64);
296
299
308int SearchiDoPutArea(MAPPARTS *cells, int x, int y, int width, int height, float *pos);
309
317int BtAtraFloorCyoice(int map_no, int floor_no, int *atra_no);
318
319class CDungeonMap;
320class CCPoly;
321
329int setCollisionData(CDungeonMap *map, CCPoly *poly, float *position, float radius, float height);
330
333
338extern s8 ItemPutListTbl12_bytes[];
339
343extern char info_cfg_literal[];
void SetHealZone(float *position, float width, float depth)
float fire_pos[6][4]
CFrame * camera_collision
float frame_offset[5][4]
float frame_turn[6]
CFrame * GetSearchFrame(char *name)
PARTS_WATER water
CFrame * frame[6]
void DrawCalc(int x, int z, int turn, int map_type)
s8 ItemPutListTbl12_bytes[]
int setCollisionData(CDungeonMap *map, CCPoly *poly, float *position, float radius, float height)
ITEM_FREE_AREA * ItemFreeAreaAll[7]
void GetPieroItem(int map_no, int ura_dungeon, int *item0, int *item1)
MapPartsNo
@ MAP_PARTS_STAIR_UP
@ MAP_PARTS_PILLAR_1
@ MAP_PARTS_DIVIDE_WALL_NORTH
@ MAP_PARTS_STAIR_DOWN
@ MAP_PARTS_ROOM_GATE_NORTH
@ MAP_PARTS_KEY_OSMOND
@ MAP_PARTS_KEY_UNGAGA
@ MAP_PARTS_KEY_DOOR_RUBY_NORTH
@ MAP_PARTS_KEY_DOOR_GORO_NORTH
@ MAP_PARTS_ROOM_DOOR_NORTH
@ MAP_PARTS_ROAD_CROSS
@ MAP_PARTS_URA_ROAD
@ MAP_PARTS_DIVIDE_END_NORTH
@ MAP_PARTS_KEY_XIAO
@ MAP_PARTS_ROAD_DEAD_END
@ MAP_PARTS_ROAD_STRAIGHT
@ MAP_PARTS_ROAD_TEE
@ MAP_PARTS_NONE
@ MAP_PARTS_ROAD_CORNER
@ MAP_PARTS_URA_ENTRANCE_NORTH
@ MAP_PARTS_ROOM_FLOOR
@ MAP_PARTS_KEY_DOOR_XIAO_NORTH
@ MAP_PARTS_HEAL_SPRING_NORTH
@ MAP_PARTS_DIVIDE_DOOR_NORTH
ITEM_PUT_SET * ItemPutListPtr[14]
int PresetSmallItemNo_Get(int map_no, int floor_no, int special, int small)
int BtAtraFloorCyoice(int map_no, int floor_no, int *atra_no)
ITEM_PUT_SET ItemPutListTbl12[3]
char info_cfg_literal[]
int SearchiDoPutArea(MAPPARTS *cells, int x, int y, int width, int height, float *pos)
PIERO_ITEM_SET * PieroItemListPtr[14]
ITEM_FREE_RECT rect[4]
float vertex[4][4]