|
DCDecomp
A decompilation of Dark Cloud for the PlayStation 2
|
#include <editground.hpp>
Public Member Functions | |
| int | SetMapParts (int parts_no, float x, float y, float z, int rot_y) |
| int | SetRiverParts (float x, float y, float z, int column_step, int row_step) |
| int | SetRoadParts (float x, float y, float z, int column_step, int row_step) |
| int | DeleteMapParts (int *out_parts_no, int *out_rot_y, float x, float y, float z) |
| int | GetAreaCode (float x, float y, float z) |
| float | GetAlt (float x, float y, float z) |
| int | GetAlt_i (float x, float y, float z) |
| CMapParts * | GetPartsObject (int parts_no) |
| int | GetPartsID (float x, float y, float z) |
| CMapParts * | GetParts (float x, float y, float z) |
| int | CheckEffect () |
| void | SetBuildEffect (int parts_id) |
| void | EffectTask () |
| int | SetFocusParts (float x, float y, float z) |
| void | EditAreaClip (CCamera *camera, float range) |
| int | GetRandomPlanePos (sceVu0FVECTOR out_position, sceVu0FVECTOR avoid[], int avoid_count, sceVu0FVECTOR bounds) |
| int | GetNearParts (CMapParts **out_parts, int limit, CBoxVu0 *box, CBoxVu0 *fixed_box) |
| void | MakePartsBox () |
| void | GetPartsBox (CBoxVu0 *out_box, float x, float y, float z) |
| EPARTS_FUNC_DATA * | GetPeoplePos (int villager, float *out_position) |
| void | DrawBaseGround () |
| void | Draw (float time, int pass, int lowest, int highest, int fixed_lowest, int fixed_highest) |
| void | StepWater () |
| void | DrawWaterSurface (CCamera *camera) |
| void | DrawWater (int pass) |
| void | DrawRipple (int pass) |
| void | DrawShadow (int pass, float near_distance, float far_distance) |
| void | DrawPartsCursor (int plot, float *position, float *model_pos, int rot_y, float *rotation, int area_no) |
| void | DrawEffect (CCameraFollow *camera, float time, CEffectGroup *effects) |
| void | Save (char *path) |
| void | Load (char *data) |
| void | Save (int town, CSaveData *save) |
| void | Load (int town, CSaveData *save) |
| int | PickUpPoly (CCPoly *polygons, float x, float y, float z) |
| int | PickUpPoly (CCPoly *out_polygons, CBoxVu0 box, int flags) |
| int | PickUpEditAreaPoly (CCPoly *polygons, float x, float y, float z) |
| int | PickUpCameraPoly (CCPoly *out_polygons, CBoxVu0 &box, int flags) |
| void | Clear () |
| void | Initialize () |
| void | RemakeGrid () |
| CEditGround () | |
| void | RequestCheck () |
| int | CheckPartsRect (int parts_no, int area_no, CRect_i_ &rect) |
| void | GetRectParts (CRect_i_ *rect, CMapParts *target, int margin) |
| void | GetRectParts (CRect_i_ *rect, CMapParts *target, int column, int row) |
| void | GetRectDirParts (CRect_i_ *rect, CMapParts *target, int direction, int depth) |
| void | NornRequest (CMapParts *(*placed)[64]) |
| void | MatatagiRequest (CMapParts *(*placed)[64]) |
| void | QueensRequest (CMapParts *(*placed)[64]) |
| void | MuskaRequest (CMapParts *(*placed)[64]) |
| void | YellowRequest (CMapParts *(*placed)[64]) |
Public Attributes | |
| s32 | map_no |
| CEditArea * | areas [4] |
| s32 | area_visible [4] |
| u8 | unk_00024 [0xC] |
| CMapParts | parts [128] |
| CEditPartsInfo * | parts_info |
| u8 | unk_15034 [0xC] |
| CGroundWater | water_surfaces [4] |
| s32 | effect_count |
| s32 | effect_parts_id |
| float | effect_alt |
| float | effect_target_alt |
| float | effect_step |
| s32 | focus_parts_id |
| u8 | unk_15f18 [8] |
| sceVu0FVECTOR | clip_plane |
| CMapParts * | plot_parts |
| CMapParts * | river_parts |
| CMapParts * | road_parts |
| u8 | unk_15f3c [4] |
| CMapParts | fixed_parts [64] |
| s32 | spare_words [1] |
| CPartsCursor | cursor |
| EPARTS_FUNC_DATA * | people [128] |
| s32 | people_count |
| s32 | suppress_water |
Holds the editable areas of a Georama map and every part placed on them.
Definition at line 95 of file editground.hpp.
| CEditGround::CEditGround | ( | ) |
Constructs the ground's parts, water surfaces and interior parts.
Definition at line 2016 of file editground.cpp.
| int CEditGround::SetMapParts | ( | int | parts_no, |
| float | x, | ||
| float | y, | ||
| float | z, | ||
| int | rot_y | ||
| ) |
Places one part on the ground, replacing or refusing it according to what already stands there, and gives back the slot it took or -1 when it was refused.
Definition at line 26 of file editground.cpp.
| int CEditGround::SetRiverParts | ( | float | x, |
| float | y, | ||
| float | z, | ||
| int | column_step, | ||
| int | row_step | ||
| ) |
Re-chooses the river piece one cell away so the water joins up with its neighbours.
Definition at line 230 of file editground.cpp.
| int CEditGround::SetRoadParts | ( | float | x, |
| float | y, | ||
| float | z, | ||
| int | column_step, | ||
| int | row_step | ||
| ) |
Re-chooses the road piece one cell away so the road joins up with its neighbours.
Definition at line 299 of file editground.cpp.
| int CEditGround::DeleteMapParts | ( | int * | out_parts_no, |
| int * | out_rot_y, | ||
| float | x, | ||
| float | y, | ||
| float | z | ||
| ) |
Takes the part standing at a position off the ground and gives back what it was.
Definition at line 355 of file editground.cpp.
| int CEditGround::GetAreaCode | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) |
Gives the editable area a position falls in, or -1 where none does.
Definition at line 439 of file editground.cpp.
| float CEditGround::GetAlt | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) |
Gives the ground height at a position.
Definition at line 453 of file editground.cpp.
| int CEditGround::GetAlt_i | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) |
Gives the ground height at a position, snapped to the grid.
Definition at line 463 of file editground.cpp.
| CMapParts * CEditGround::GetPartsObject | ( | int | parts_no | ) |
Finds the placed part with a given plot number.
Definition at line 473 of file editground.cpp.
| int CEditGround::GetPartsID | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) |
Gives the placed part standing at a position, or -1 where none does.
Definition at line 485 of file editground.cpp.
| CMapParts * CEditGround::GetParts | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) |
Gives the part standing at a position.
Definition at line 495 of file editground.cpp.
| int CEditGround::CheckEffect | ( | ) |
Reports whether the drop-in effect is still running.
Definition at line 505 of file editground.cpp.
| void CEditGround::SetBuildEffect | ( | int | parts_id | ) |
Starts a part falling into place from above.
Definition at line 509 of file editground.cpp.
| void CEditGround::EffectTask | ( | ) |
Advances the falling part one step and settles it when it lands.
Definition at line 530 of file editground.cpp.
| int CEditGround::SetFocusParts | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) |
Marks the part at a position as the one the cursor is on.
Definition at line 553 of file editground.cpp.
| void CEditGround::EditAreaClip | ( | CCamera * | camera, |
| float | range | ||
| ) |
Clips the editable areas against the camera.
Definition at line 585 of file editground.cpp.
| int CEditGround::GetRandomPlanePos | ( | sceVu0FVECTOR | out_position, |
| sceVu0FVECTOR | avoid[], | ||
| int | avoid_count, | ||
| sceVu0FVECTOR | bounds | ||
| ) |
Picks a random flat, unbuilt cell away from the edges, inside the bounds sphere when it has a radius and outside every avoid sphere, and gives its centre.
Definition at line 791 of file editground.cpp.
| int CEditGround::GetNearParts | ( | CMapParts ** | out_parts, |
| int | limit, | ||
| CBoxVu0 * | box, | ||
| CBoxVu0 * | fixed_box | ||
| ) |
Collects the placed parts whose bounds meet a box.
Definition at line 870 of file editground.cpp.
| void CEditGround::MakePartsBox | ( | ) |
Rebuilds the bounding boxes of every editable area.
Definition at line 918 of file editground.cpp.
| void CEditGround::GetPartsBox | ( | CBoxVu0 * | out_box, |
| float | x, | ||
| float | y, | ||
| float | z | ||
| ) |
Gives the bounding box of the area a position falls in.
Definition at line 926 of file editground.cpp.
| EPARTS_FUNC_DATA * CEditGround::GetPeoplePos | ( | int | villager, |
| float * | out_position | ||
| ) |
Gives the position of one of the villagers standing on the ground, and the marker it stands at.
Definition at line 942 of file editground.cpp.
| void CEditGround::DrawBaseGround | ( | ) |
Draws the grid of every editable area.
Definition at line 984 of file editground.cpp.
| void CEditGround::Draw | ( | float | time, |
| int | pass, | ||
| int | lowest, | ||
| int | highest, | ||
| int | fixed_lowest, | ||
| int | fixed_highest | ||
| ) |
Draws every placed part, choosing the level of detail from the distance.
Definition at line 994 of file editground.cpp.
| void CEditGround::StepWater | ( | ) |
Advances the ripples of each water surface the view can reach.
Definition at line 1041 of file editground.cpp.
| void CEditGround::DrawWaterSurface | ( | CCamera * | camera | ) |
Draws the water surfaces, ordered back to front from the camera.
Definition at line 1080 of file editground.cpp.
| void CEditGround::DrawWater | ( | int | pass | ) |
Draws the water pieces of the placed parts.
Definition at line 1151 of file editground.cpp.
| void CEditGround::DrawRipple | ( | int | pass | ) |
Draws the ripples standing on the placed parts.
Definition at line 1219 of file editground.cpp.
| void CEditGround::DrawShadow | ( | int | pass, |
| float | near_distance, | ||
| float | far_distance | ||
| ) |
Drops the shadows of the placed parts onto the ground.
Definition at line 1287 of file editground.cpp.
| void CEditGround::DrawPartsCursor | ( | int | plot, |
| float * | position, | ||
| float * | model_pos, | ||
| int | rot_y, | ||
| float * | rotation, | ||
| int | area_no | ||
| ) |
Draws the cursor over the cells a part would occupy, colouring it by whether it may go there.
Definition at line 1376 of file editground.cpp.
| void CEditGround::DrawEffect | ( | CCameraFollow * | camera, |
| float | time, | ||
| CEffectGroup * | effects | ||
| ) |
Draws the effects standing on the placed parts.
Definition at line 1535 of file editground.cpp.
| void CEditGround::Save | ( | char * | path | ) |
Writes every placed part to the host debug file gdata0.edt; the argument is unused.
Definition at line 1561 of file editground.cpp.
| void CEditGround::Load | ( | char * | data | ) |
Reads placed parts back out of a buffer, clearing the ground first.
Definition at line 1609 of file editground.cpp.
| void CEditGround::Save | ( | int | town, |
| CSaveData * | save | ||
| ) |
Writes every placed part into the save file.
Definition at line 1696 of file editground.cpp.
| void CEditGround::Load | ( | int | town, |
| CSaveData * | save | ||
| ) |
Reads placed parts back out of the save file.
Definition at line 1748 of file editground.cpp.
| int CEditGround::PickUpPoly | ( | CCPoly * | polygons, |
| float | x, | ||
| float | y, | ||
| float | z | ||
| ) |
Collects the collision polygons within thirty units of a position.
Definition at line 1776 of file editground.cpp.
Collects the collision polygons meeting a box.
Definition at line 1788 of file editground.cpp.
| int CEditGround::PickUpEditAreaPoly | ( | CCPoly * | polygons, |
| float | x, | ||
| float | y, | ||
| float | z | ||
| ) |
Collects the ground polygons of the area a position falls in.
Definition at line 1852 of file editground.cpp.
Collects the polygons the camera collides against.
Definition at line 1862 of file editground.cpp.
| void CEditGround::Clear | ( | ) |
Empties every placed part and every editable area.
Definition at line 1922 of file editground.cpp.
| void CEditGround::Initialize | ( | ) |
Clears the ground's areas, parts, water and villager lists.
Definition at line 1972 of file editground.cpp.
| void CEditGround::RemakeGrid | ( | ) |
Rebuilds the grid the parts are placed on.
Definition at line 2008 of file editground.cpp.
| void CEditGround::RequestCheck | ( | ) |
Counts what stands on the ground and reports which villager requests it satisfies.
Definition at line 2158 of file editground.cpp.
| int CEditGround::CheckPartsRect | ( | int | parts_no, |
| int | area_no, | ||
| CRect_i_ & | rect | ||
| ) |
Reports whether a part of a given kind stands inside a rectangle.
Definition at line 2206 of file editground.cpp.
Gives the grid rectangle a part covers, widened by a margin on every side.
Definition at line 2228 of file editground.cpp.
Gives the grid cell that one cell of a part lands on, turned the way the part faces.
Definition at line 2260 of file editground.cpp.
Gives the strip of cells a set depth deep along one side of a part, the side taken relative to the way the part faces.
Definition at line 2366 of file editground.cpp.
| void CEditGround::NornRequest | ( | CMapParts *(*) | placed[64] | ) |
Checks the ground against Norn's request.
Definition at line 2429 of file editground.cpp.
| void CEditGround::MatatagiRequest | ( | CMapParts *(*) | placed[64] | ) |
Checks the ground against Matataki's request, which wants the rivers chained up.
Definition at line 2513 of file editground.cpp.
| void CEditGround::QueensRequest | ( | CMapParts *(*) | placed[64] | ) |
Checks the ground against the Queen's request.
Definition at line 2664 of file editground.cpp.
| void CEditGround::MuskaRequest | ( | CMapParts *(*) | placed[64] | ) |
Checks the ground against Muska Racka's request.
Definition at line 2787 of file editground.cpp.
| void CEditGround::YellowRequest | ( | CMapParts *(*) | placed[64] | ) |
Checks the ground against the yellow request, which wants parts facing one another.
Definition at line 2889 of file editground.cpp.
| s32 CEditGround::map_no |
| CEditArea* CEditGround::areas[4] |
Editable areas that make up the ground.
Definition at line 98 of file editground.hpp.
| s32 CEditGround::area_visible[4] |
Whether each area is drawn this frame.
Definition at line 99 of file editground.hpp.
| u8 CEditGround::unk_00024[0xC] |
Definition at line 100 of file editground.hpp.
| CMapParts CEditGround::parts[128] |
Parts placed on the ground, indexed by part ID.
Definition at line 101 of file editground.hpp.
| CEditPartsInfo* CEditGround::parts_info |
Catalogue of the parts the map can hold.
Definition at line 102 of file editground.hpp.
| u8 CEditGround::unk_15034[0xC] |
Definition at line 103 of file editground.hpp.
| CGroundWater CEditGround::water_surfaces[4] |
The four ground water surfaces.
Definition at line 104 of file editground.hpp.
| s32 CEditGround::effect_count |
Steps left before the falling part lands; zero or less when none falls.
Definition at line 105 of file editground.hpp.
| s32 CEditGround::effect_parts_id |
ID of the falling part, or -1.
Definition at line 106 of file editground.hpp.
| float CEditGround::effect_alt |
Height the falling part starts from.
Definition at line 107 of file editground.hpp.
| float CEditGround::effect_target_alt |
Height the falling part lands at.
Definition at line 108 of file editground.hpp.
| float CEditGround::effect_step |
Height the falling part moves each step.
Definition at line 109 of file editground.hpp.
| s32 CEditGround::focus_parts_id |
ID of the part under the cursor, or -1.
Definition at line 110 of file editground.hpp.
| u8 CEditGround::unk_15f18[8] |
Definition at line 111 of file editground.hpp.
| sceVu0FVECTOR CEditGround::clip_plane |
Plane used to clip the editable ground's rendered geometry.
Definition at line 112 of file editground.hpp.
| CMapParts* CEditGround::plot_parts |
Template part of each plot, indexed by plot number.
Definition at line 113 of file editground.hpp.
| CMapParts* CEditGround::river_parts |
Template river pieces, indexed by how the river joins its neighbours.
Definition at line 114 of file editground.hpp.
| CMapParts* CEditGround::road_parts |
Template road pieces, indexed by how the road joins its neighbours.
Definition at line 115 of file editground.hpp.
| u8 CEditGround::unk_15f3c[4] |
Definition at line 116 of file editground.hpp.
| CMapParts CEditGround::fixed_parts[64] |
Parts of the map that the player cannot move; in Muska Racka the first is the ground model.
Definition at line 117 of file editground.hpp.
| s32 CEditGround::spare_words[1] |
Words Initialize clears; nothing reads them.
Definition at line 118 of file editground.hpp.
| CPartsCursor CEditGround::cursor |
Cursor drawn over the cells a part would occupy.
Definition at line 119 of file editground.hpp.
| EPARTS_FUNC_DATA* CEditGround::people[128] |
Villager markers of the placed parts.
Definition at line 120 of file editground.hpp.
| s32 CEditGround::people_count |
Number of villager markers in use.
Definition at line 121 of file editground.hpp.
| s32 CEditGround::suppress_water |
Whether rendering of the editable ground's water is disabled.
Definition at line 122 of file editground.hpp.