DCDecomp
A decompilation of Dark Cloud for the PlayStation 2
Loading...
Searching...
No Matches
editarea.hpp
1#pragma once
2
3#include "common.h"
4
5#include "collision.hpp"
6
7// Forward declarations for the types these declarations name. The skeleton
8// headers are generated from the retail symbol table, which knows the type
9// names but not where they live.
10class CFrameVu1;
11class CMapParts;
12class CRect_i_;
13class CVector3_f_;
14class CVector3_i_;
15
20public:
23 int spare;
25 int code;
28};
29
30STATIC_ASSERT(sizeof(CEditAreaCell) == 0x1C);
31
35class CEditArea {
36public:
37 int area_id;
38 int map_no;
39 int width;
40 int height;
41 float offset_x;
42 float offset_y;
43 float offset_z;
44 int unk_1c;
45 float unit_size;
46 float unit_alt;
48 int chain_work[16][16];
50 int unk_202c;
62 void SetSize(int width, int height, float unit_size, float unit_alt);
63
71 void GetPos(CVector3_i_ *position, float x, float y, float z);
72
80 void GetPos(CVector3_f_ *position, int x, int y, int z);
81
89 void SetPartsNo(int x, int y, int parts_no);
90
98 void SetPartsID(int x, int y, int parts_id);
99
107 void SetPartsExtra(int x, int y, int parts_extra);
108
116 void SetCode(int x, int y, int code);
117
125 int GetPartsID(int x, int y);
126
134 int GetCode(int x, int y);
135
143 void SetAlt(int x, int y, int altitude);
144
152 int GetAlt_i(int x, int y);
153
161 float GetAlt(int x, int y);
162
170 float GetAlt(float x, float y, float z);
171
179 int GetAlt_i(float x, float y, float z);
180
188 int GetPartsExtra(int x, int y);
189
197 int SetMapParts(int parts_id, CMapParts *parts, float x, float y, float z, int rot_y);
198
206 int DeleteMapParts(int parts_no, CMapParts *parts, float x, float y, float z);
207
215 int SetRiverParts(int x, int y);
216
224 int SetRoadParts(int x, int y);
225
233 int SearchPartsID(float x, float y, float z);
234
242 int SearchPartsExtra(float x, float y, float z);
243
251 void GetGrid(CVector3_f_ *snapped, float x, float y, float z);
252
260 void RemakeGrid();
261
269 void GetPartsBox(CBoxVu0 *box);
270
278 void MakePartsBox();
279
287 int CheckArea(float x, float y, float z);
288
296 int CheckAreaRect(float x, float y, float z, int rect_width, int rect_height);
297
305 int CheckParts(CMapParts *parts, float x, float y, float z, int rotation);
306
314 int PickUpPoly(CCPoly *polygons, float x, float y, float z);
315
323 int PickUpPoly(CCPoly *polygons, CRect_i_ rect);
324
332 int PickUpPoly(CCPoly *polygons, CBoxVu0 box);
333
341 int GetPartsRect(CRect_i_ &rect, int *parts_ids, int capacity);
342
350 void ChainWorkClear();
351
359 int CheckRiverChain(int x, int y, int target_x, int target_y);
360
368 void DrawGrid();
369
377 void Clear();
378
386 void Initialize();
387
395 void SetMapInfo(int map_no, int area_id);
396
404 int GetMapNo();
405
413 int GetAreaID();
414
422 void SetGridFrame(CFrameVu1 *frame);
423
432
440 void SetOffset(float x, float y, float z);
441
449 void GetOffset(float *offset);
450
458 int GetWidth();
459
467 int GetHeight();
468
476 void AddAlt(int x, int y, int altitude_delta);
477
485 float GetUnitSize();
486
494 float GetUnitAlt();
495
503 CEditArea();
504};
505
506STATIC_ASSERT(sizeof(CEditArea) == 0x2060);
void SetCode(int x, int y, int code)
Definition editarea.cpp:114
int GetMapNo()
void SetAlt(int x, int y, int altitude)
Definition editarea.cpp:150
void SetMapInfo(int map_no, int area_id)
int SearchPartsID(float x, float y, float z)
Definition editarea.cpp:586
void GetOffset(float *offset)
void Clear()
float GetAlt(int x, int y)
Definition editarea.cpp:182
void GetPartsBox(CBoxVu0 *box)
Definition editarea.cpp:648
void SetOffset(float x, float y, float z)
void DrawGrid()
float unit_alt
Definition editarea.hpp:46
void SetGridFrame(CFrameVu1 *frame)
void ChainWorkClear()
Definition editarea.cpp:962
int GetAlt_i(int x, int y)
Definition editarea.cpp:170
int DeleteMapParts(int parts_no, CMapParts *parts, float x, float y, float z)
Definition editarea.cpp:290
CFrameVu1 * GetGridFrame()
CFrameVu1 * grid_frame
Definition editarea.hpp:49
void RemakeGrid()
Definition editarea.cpp:604
int GetPartsExtra(int x, int y)
Definition editarea.cpp:206
void MakePartsBox()
Definition editarea.cpp:652
int GetHeight()
void SetSize(int width, int height, float unit_size, float unit_alt)
Definition editarea.cpp:54
int CheckAreaRect(float x, float y, float z, int rect_width, int rect_height)
Definition editarea.cpp:713
void SetPartsExtra(int x, int y, int parts_extra)
Definition editarea.cpp:102
int GetWidth()
int SearchPartsExtra(float x, float y, float z)
Definition editarea.cpp:592
int grid_redraw
Definition editarea.hpp:52
int PickUpPoly(CCPoly *polygons, float x, float y, float z)
Definition editarea.cpp:849
int chain_work[16][16]
Definition editarea.hpp:48
float GetUnitAlt()
int CheckRiverChain(int x, int y, int target_x, int target_y)
Definition editarea.cpp:970
int SetRiverParts(int x, int y)
Definition editarea.cpp:336
float unit_size
Definition editarea.hpp:45
CBoxVu0 parts_box
Definition editarea.hpp:51
int GetCode(int x, int y)
Definition editarea.cpp:138
float GetUnitSize()
int GetPartsID(int x, int y)
Definition editarea.cpp:126
void Initialize()
int SetMapParts(int parts_id, CMapParts *parts, float x, float y, float z, int rot_y)
Definition editarea.cpp:254
void SetPartsNo(int x, int y, int parts_no)
Definition editarea.cpp:78
float offset_y
Definition editarea.hpp:42
int GetPartsRect(CRect_i_ &rect, int *parts_ids, int capacity)
Definition editarea.cpp:927
int GetAreaID()
CEditAreaCell grid[16][16]
Definition editarea.hpp:47
void SetPartsID(int x, int y, int parts_id)
Definition editarea.cpp:90
float offset_x
Definition editarea.hpp:41
int CheckArea(float x, float y, float z)
Definition editarea.cpp:693
int grid_redraw_count
Definition editarea.hpp:53
void GetPos(CVector3_i_ *position, float x, float y, float z)
Definition editarea.cpp:61
void GetGrid(CVector3_f_ *snapped, float x, float y, float z)
Definition editarea.cpp:598
int CheckParts(CMapParts *parts, float x, float y, float z, int rotation)
Definition editarea.cpp:738
float offset_z
Definition editarea.hpp:43
int area_id
Definition editarea.hpp:37
int SetRoadParts(int x, int y)
Definition editarea.cpp:466
void AddAlt(int x, int y, int altitude_delta)