DCDecomp
A decompilation of Dark Cloud for the PlayStation 2
Loading...
Searching...
No Matches
editground.hpp
1#pragma once
2
3#include "common.h"
4
5#include <libvu0.h>
6
7#include "mapparts.hpp"
8#include "water.hpp"
9
13// clang-format off
14enum Town {
15 TOWN_NORUNE = 0,
16 TOWN_MATATAKI = 1,
17 TOWN_QUEENS = 2,
18 TOWN_MUSKA_LACKA = 3,
19 TOWN_YELLOW_DROPS = 4,
20 TOWN_COUNT = 5,
21};
22
23// clang-format on
24
25// Forward declarations for the types these declarations name. The skeleton
26// headers are generated from the retail symbol table, which knows the type
27// names but not where they live.
28class CCameraFollow;
29class CEditArea;
30class CEditPartsInfo;
31class CRect_i_;
32struct EPARTS_FUNC_DATA;
33class CSaveData;
34
39 float row;
40 float column;
41 float range;
42 float power;
43};
44
49public:
50 char name[32];
51 s32 draw;
52 s32 follow[3];
53 s32 unk_030;
55 u8 unk_038[8];
56 sceVu0FVECTOR offset;
59};
60
61STATIC_ASSERT(sizeof(CGroundWater) == 0x3B0);
62
67 s16 count;
68 s16 size;
69 s16 offset;
70 s16 unk_06;
71};
72
77public:
78 s32 area;
79 float unit_size;
89 void Draw(float *position, int width, int height);
90};
91
96public:
97 s32 map_no;
99 s32 area_visible[4];
100 u8 unk_00024[0xC];
103 u8 unk_15034[0xC];
111 u8 unk_15f18[8];
112 sceVu0FVECTOR clip_plane;
116 u8 unk_15f3c[4];
118 s32 spare_words[1];
131 int SetMapParts(int parts_no, float x, float y, float z, int rot_y);
132
141 int SetRiverParts(float x, float y, float z, int column_step, int row_step);
142
150 int SetRoadParts(float x, float y, float z, int column_step, int row_step);
151
159 int DeleteMapParts(int *out_parts_no, int *out_rot_y, float x, float y, float z);
160
168 int GetAreaCode(float x, float y, float z);
169
177 float GetAlt(float x, float y, float z);
178
186 int GetAlt_i(float x, float y, float z);
187
195 CMapParts *GetPartsObject(int parts_no);
196
204 int GetPartsID(float x, float y, float z);
205
213 CMapParts *GetParts(float x, float y, float z);
214
222 int CheckEffect();
223
231 void SetBuildEffect(int parts_id);
232
240 void EffectTask();
241
249 int SetFocusParts(float x, float y, float z);
250
258 void EditAreaClip(CCamera *camera, float range);
259
268 int GetRandomPlanePos(sceVu0FVECTOR out_position, sceVu0FVECTOR avoid[], int avoid_count, sceVu0FVECTOR bounds);
269
277 int GetNearParts(CMapParts **out_parts, int limit, CBoxVu0 *box, CBoxVu0 *fixed_box);
278
286 void MakePartsBox();
287
295 void GetPartsBox(CBoxVu0 *out_box, float x, float y, float z);
296
304 EPARTS_FUNC_DATA *GetPeoplePos(int villager, float *out_position);
305
313 void DrawBaseGround();
314
322 void Draw(float time, int pass, int lowest, int highest, int fixed_lowest, int fixed_highest);
323
331 void StepWater();
332
340 void DrawWaterSurface(CCamera *camera);
341
349 void DrawWater(int pass);
350
358 void DrawRipple(int pass);
359
367 void DrawShadow(int pass, float near_distance, float far_distance);
368
377 void DrawPartsCursor(int plot, float *position, float *model_pos, int rot_y, float *rotation, int area_no);
378
386 void DrawEffect(CCameraFollow *camera, float time, CEffectGroup *effects);
387
395 void Save(char *path);
396
404 void Load(char *data);
405
413 void Save(int town, CSaveData *save);
414
422 void Load(int town, CSaveData *save);
423
431 int PickUpPoly(CCPoly *polygons, float x, float y, float z);
432
440 int PickUpPoly(CCPoly *out_polygons, CBoxVu0 box, int flags);
441
449 int PickUpEditAreaPoly(CCPoly *polygons, float x, float y, float z);
450
458 int PickUpCameraPoly(CCPoly *out_polygons, CBoxVu0 &box, int flags);
459
467 void Clear();
468
476 void Initialize();
477
485 void RemakeGrid();
486
494 CEditGround();
495
504 void RequestCheck();
505
513 int CheckPartsRect(int parts_no, int area_no, CRect_i_ &rect);
514
522 void GetRectParts(CRect_i_ *rect, CMapParts *target, int margin);
523
531 void GetRectParts(CRect_i_ *rect, CMapParts *target, int column, int row);
532
541 void GetRectDirParts(CRect_i_ *rect, CMapParts *target, int direction, int depth);
542
550 void NornRequest(CMapParts *(*placed)[64]);
551
559 void MatatagiRequest(CMapParts *(*placed)[64]);
560
568 void QueensRequest(CMapParts *(*placed)[64]);
569
577 void MuskaRequest(CMapParts *(*placed)[64]);
578
587 void YellowRequest(CMapParts *(*placed)[64]);
588};
589
590STATIC_ASSERT(sizeof(CEditGround) == 0x20960);
s32 spare_words[1]
int CheckPartsRect(int parts_no, int area_no, CRect_i_ &rect)
void SetBuildEffect(int parts_id)
int PickUpCameraPoly(CCPoly *out_polygons, CBoxVu0 &box, int flags)
void DrawPartsCursor(int plot, float *position, float *model_pos, int rot_y, float *rotation, int area_no)
void DrawRipple(int pass)
CMapParts * river_parts
int SetRiverParts(float x, float y, float z, int column_step, int row_step)
int SetMapParts(int parts_no, float x, float y, float z, int rot_y)
void Draw(float time, int pass, int lowest, int highest, int fixed_lowest, int fixed_highest)
void RequestCheck()
float GetAlt(float x, float y, float z)
CMapParts * road_parts
CEditArea * areas[4]
int GetAreaCode(float x, float y, float z)
CMapParts * GetParts(float x, float y, float z)
void MuskaRequest(CMapParts *(*placed)[64])
void DrawWaterSurface(CCamera *camera)
void GetRectParts(CRect_i_ *rect, CMapParts *target, int margin)
void NornRequest(CMapParts *(*placed)[64])
void EditAreaClip(CCamera *camera, float range)
void DrawBaseGround()
int CheckEffect()
void EffectTask()
EPARTS_FUNC_DATA * people[128]
void Initialize()
int SetFocusParts(float x, float y, float z)
void Save(char *path)
void GetPartsBox(CBoxVu0 *out_box, float x, float y, float z)
int SetRoadParts(float x, float y, float z, int column_step, int row_step)
CMapParts * plot_parts
int GetAlt_i(float x, float y, float z)
int GetPartsID(float x, float y, float z)
s32 area_visible[4]
sceVu0FVECTOR clip_plane
int PickUpPoly(CCPoly *polygons, float x, float y, float z)
void YellowRequest(CMapParts *(*placed)[64])
void Load(char *data)
void GetRectDirParts(CRect_i_ *rect, CMapParts *target, int direction, int depth)
void DrawWater(int pass)
CMapParts * GetPartsObject(int parts_no)
int GetRandomPlanePos(sceVu0FVECTOR out_position, sceVu0FVECTOR avoid[], int avoid_count, sceVu0FVECTOR bounds)
CGroundWater water_surfaces[4]
CEditPartsInfo * parts_info
CMapParts fixed_parts[64]
void MatatagiRequest(CMapParts *(*placed)[64])
void QueensRequest(CMapParts *(*placed)[64])
float effect_target_alt
float effect_step
EPARTS_FUNC_DATA * GetPeoplePos(int villager, float *out_position)
void DrawEffect(CCameraFollow *camera, float time, CEffectGroup *effects)
void DrawShadow(int pass, float near_distance, float far_distance)
CPartsCursor cursor
CMapParts parts[128]
void MakePartsBox()
int GetNearParts(CMapParts **out_parts, int limit, CBoxVu0 *box, CBoxVu0 *fixed_box)
int DeleteMapParts(int *out_parts_no, int *out_rot_y, float x, float y, float z)
int PickUpEditAreaPoly(CCPoly *polygons, float x, float y, float z)
void RemakeGrid()
char name[32]
GROUND_WATER_RIPPLE ripples[4]
sceVu0FVECTOR offset
void Draw(float *position, int width, int height)
CFrame * pieces[3]