|
DCDecomp
A decompilation of Dark Cloud for the PlayStation 2
|
#include <editarea.hpp>
Public Member Functions | |
| void | SetSize (int width, int height, float unit_size, float unit_alt) |
| void | GetPos (CVector3_i_ *position, float x, float y, float z) |
| void | GetPos (CVector3_f_ *position, int x, int y, int z) |
| void | SetPartsNo (int x, int y, int parts_no) |
| void | SetPartsID (int x, int y, int parts_id) |
| void | SetPartsExtra (int x, int y, int parts_extra) |
| void | SetCode (int x, int y, int code) |
| int | GetPartsID (int x, int y) |
| int | GetCode (int x, int y) |
| void | SetAlt (int x, int y, int altitude) |
| int | GetAlt_i (int x, int y) |
| float | GetAlt (int x, int y) |
| float | GetAlt (float x, float y, float z) |
| int | GetAlt_i (float x, float y, float z) |
| int | GetPartsExtra (int x, int y) |
| int | SetMapParts (int parts_id, CMapParts *parts, float x, float y, float z, int rot_y) |
| int | DeleteMapParts (int parts_no, CMapParts *parts, float x, float y, float z) |
| int | SetRiverParts (int x, int y) |
| int | SetRoadParts (int x, int y) |
| int | SearchPartsID (float x, float y, float z) |
| int | SearchPartsExtra (float x, float y, float z) |
| void | GetGrid (CVector3_f_ *snapped, float x, float y, float z) |
| void | RemakeGrid () |
| void | GetPartsBox (CBoxVu0 *box) |
| void | MakePartsBox () |
| int | CheckArea (float x, float y, float z) |
| int | CheckAreaRect (float x, float y, float z, int rect_width, int rect_height) |
| int | CheckParts (CMapParts *parts, float x, float y, float z, int rotation) |
| int | PickUpPoly (CCPoly *polygons, float x, float y, float z) |
| int | PickUpPoly (CCPoly *polygons, CRect_i_ rect) |
| int | PickUpPoly (CCPoly *polygons, CBoxVu0 box) |
| int | GetPartsRect (CRect_i_ &rect, int *parts_ids, int capacity) |
| void | ChainWorkClear () |
| int | CheckRiverChain (int x, int y, int target_x, int target_y) |
| void | DrawGrid () |
| void | Clear () |
| void | Initialize () |
| void | SetMapInfo (int map_no, int area_id) |
| int | GetMapNo () |
| int | GetAreaID () |
| void | SetGridFrame (CFrameVu1 *frame) |
| CFrameVu1 * | GetGridFrame () |
| void | SetOffset (float x, float y, float z) |
| void | GetOffset (float *offset) |
| int | GetWidth () |
| int | GetHeight () |
| void | AddAlt (int x, int y, int altitude_delta) |
| float | GetUnitSize () |
| float | GetUnitAlt () |
| CEditArea () | |
Public Attributes | |
| int | area_id |
| int | map_no |
| int | width |
| int | height |
| float | offset_x |
| float | offset_y |
| float | offset_z |
| int | unk_1c |
| float | unit_size |
| float | unit_alt |
| CEditAreaCell | grid [16][16] |
| int | chain_work [16][16] |
| CFrameVu1 * | grid_frame |
| int | unk_202c |
| CBoxVu0 | parts_box |
| int | grid_redraw |
| int | grid_redraw_count |
Maintains the editable map grid and its world-space dimensions.
Definition at line 35 of file editarea.hpp.
| CEditArea::CEditArea | ( | ) |
Constructs an initialized editable area.
Definition at line 1120 of file editarea.cpp.
| void CEditArea::SetSize | ( | int | width, |
| int | height, | ||
| float | unit_size, | ||
| float | unit_alt | ||
| ) |
Sets the active grid dimensions and world-space unit scales.
Definition at line 54 of file editarea.cpp.
| void CEditArea::GetPos | ( | CVector3_i_ * | position, |
| float | x, | ||
| float | y, | ||
| float | z | ||
| ) |
Converts a world-space position to integral grid coordinates.
Definition at line 61 of file editarea.cpp.
| void CEditArea::GetPos | ( | CVector3_f_ * | position, |
| int | x, | ||
| int | y, | ||
| int | z | ||
| ) |
Converts grid coordinates to a world-space position.
Definition at line 72 of file editarea.cpp.
| void CEditArea::SetPartsNo | ( | int | x, |
| int | y, | ||
| int | parts_no | ||
| ) |
Sets the map-part number stored at one grid coordinate.
Definition at line 78 of file editarea.cpp.
| void CEditArea::SetPartsID | ( | int | x, |
| int | y, | ||
| int | parts_id | ||
| ) |
Sets the map-part identifier stored at one grid coordinate.
Definition at line 90 of file editarea.cpp.
| void CEditArea::SetPartsExtra | ( | int | x, |
| int | y, | ||
| int | parts_extra | ||
| ) |
Sets the area-specific part attribute at one grid coordinate.
Definition at line 102 of file editarea.cpp.
| void CEditArea::SetCode | ( | int | x, |
| int | y, | ||
| int | code | ||
| ) |
Sets the geometry code stored at one grid coordinate.
Definition at line 114 of file editarea.cpp.
| int CEditArea::GetPartsID | ( | int | x, |
| int | y | ||
| ) |
Returns the map-part identifier at one grid coordinate.
Definition at line 126 of file editarea.cpp.
| int CEditArea::GetCode | ( | int | x, |
| int | y | ||
| ) |
Returns the geometry code at one grid coordinate.
Definition at line 138 of file editarea.cpp.
| void CEditArea::SetAlt | ( | int | x, |
| int | y, | ||
| int | altitude | ||
| ) |
Sets a clamped integral altitude at one grid coordinate.
Definition at line 150 of file editarea.cpp.
| int CEditArea::GetAlt_i | ( | int | x, |
| int | y | ||
| ) |
Returns the integral altitude at one grid coordinate.
Definition at line 170 of file editarea.cpp.
| float CEditArea::GetAlt | ( | int | x, |
| int | y | ||
| ) |
Returns the world-space altitude at one grid coordinate.
Definition at line 182 of file editarea.cpp.
| float CEditArea::GetAlt | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) |
Returns the world-space altitude at one world position.
Definition at line 194 of file editarea.cpp.
| int CEditArea::GetAlt_i | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) |
Returns the integral altitude at one world position.
Definition at line 200 of file editarea.cpp.
| int CEditArea::GetPartsExtra | ( | int | x, |
| int | y | ||
| ) |
Returns the area-specific part attribute at one grid coordinate.
Definition at line 206 of file editarea.cpp.
| int CEditArea::SetMapParts | ( | int | parts_id, |
| CMapParts * | parts, | ||
| float | x, | ||
| float | y, | ||
| float | z, | ||
| int | rot_y | ||
| ) |
Projects one map part into the editable grid.
Definition at line 254 of file editarea.cpp.
| int CEditArea::DeleteMapParts | ( | int | parts_no, |
| CMapParts * | parts, | ||
| float | x, | ||
| float | y, | ||
| float | z | ||
| ) |
Removes one map part from the editable grid.
Definition at line 290 of file editarea.cpp.
| int CEditArea::SetRiverParts | ( | int | x, |
| int | y | ||
| ) |
Determines the river connection code at one grid coordinate.
Definition at line 336 of file editarea.cpp.
| int CEditArea::SetRoadParts | ( | int | x, |
| int | y | ||
| ) |
Determines the road connection code at one grid coordinate.
Definition at line 466 of file editarea.cpp.
| int CEditArea::SearchPartsID | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) |
Returns the map-part identifier at one world position.
Definition at line 586 of file editarea.cpp.
| int CEditArea::SearchPartsExtra | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) |
Returns the area-specific part attribute at one world position.
Definition at line 592 of file editarea.cpp.
| void CEditArea::GetGrid | ( | CVector3_f_ * | snapped, |
| float | x, | ||
| float | y, | ||
| float | z | ||
| ) |
Snaps a world-space position to the editable grid.
Definition at line 598 of file editarea.cpp.
| void CEditArea::RemakeGrid | ( | ) |
Rebuilds the frame geometry used to draw the grid.
Definition at line 604 of file editarea.cpp.
| void CEditArea::GetPartsBox | ( | CBoxVu0 * | box | ) |
Copies the occupied-parts bounding box to the caller.
Definition at line 648 of file editarea.cpp.
| void CEditArea::MakePartsBox | ( | ) |
Recomputes the occupied-parts bounding box.
Definition at line 652 of file editarea.cpp.
| int CEditArea::CheckArea | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) |
Returns whether a world position lies inside the editable area.
Definition at line 693 of file editarea.cpp.
| int CEditArea::CheckAreaRect | ( | float | x, |
| float | y, | ||
| float | z, | ||
| int | rect_width, | ||
| int | rect_height | ||
| ) |
Returns whether a centered grid rectangle fits inside the area.
Definition at line 713 of file editarea.cpp.
| int CEditArea::CheckParts | ( | CMapParts * | parts, |
| float | x, | ||
| float | y, | ||
| float | z, | ||
| int | rotation | ||
| ) |
Returns whether a map part can occupy the requested world position.
Definition at line 738 of file editarea.cpp.
| int CEditArea::PickUpPoly | ( | CCPoly * | polygons, |
| float | x, | ||
| float | y, | ||
| float | z | ||
| ) |
Collects collision polygons around one world position.
Definition at line 849 of file editarea.cpp.
Collects collision polygons from one grid rectangle.
Definition at line 861 of file editarea.cpp.
Collects collision polygons overlapping one world-space box.
Definition at line 910 of file editarea.cpp.
| int CEditArea::GetPartsRect | ( | CRect_i_ & | rect, |
| int * | parts_ids, | ||
| int | capacity | ||
| ) |
Collects part identifiers from one grid rectangle.
Definition at line 927 of file editarea.cpp.
| void CEditArea::ChainWorkClear | ( | ) |
Clears the river-chain traversal marks.
Definition at line 962 of file editarea.cpp.
| int CEditArea::CheckRiverChain | ( | int | x, |
| int | y, | ||
| int | target_x, | ||
| int | target_y | ||
| ) |
Returns whether two river cells belong to one connected chain.
Definition at line 970 of file editarea.cpp.
| void CEditArea::DrawGrid | ( | ) |
Updates and draws the editable grid overlay.
Definition at line 1006 of file editarea.cpp.
| void CEditArea::Clear | ( | ) |
Resets every active grid cell to its empty state.
Definition at line 1040 of file editarea.cpp.
| void CEditArea::Initialize | ( | ) |
Initializes the editable area to an empty 16 by 16 grid.
Definition at line 1057 of file editarea.cpp.
| void CEditArea::SetMapInfo | ( | int | map_no, |
| int | area_id | ||
| ) |
Selects the map number and area identifier represented by the grid.
Definition at line 1067 of file editarea.cpp.
| int CEditArea::GetMapNo | ( | ) |
Returns the selected map number.
Definition at line 1072 of file editarea.cpp.
| int CEditArea::GetAreaID | ( | ) |
Returns the selected area identifier.
Definition at line 1076 of file editarea.cpp.
| void CEditArea::SetGridFrame | ( | CFrameVu1 * | frame | ) |
Selects the frame used to render the grid overlay.
Definition at line 1080 of file editarea.cpp.
| CFrameVu1 * CEditArea::GetGridFrame | ( | ) |
Returns the frame used to render the grid overlay.
Definition at line 1084 of file editarea.cpp.
| void CEditArea::SetOffset | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) |
Sets the world-space origin of the editable grid.
Definition at line 1088 of file editarea.cpp.
| void CEditArea::GetOffset | ( | float * | offset | ) |
Copies the world-space grid origin to the caller.
Definition at line 1094 of file editarea.cpp.
| int CEditArea::GetWidth | ( | ) |
Returns the active grid width.
Definition at line 1100 of file editarea.cpp.
| int CEditArea::GetHeight | ( | ) |
Returns the active grid height.
Definition at line 1104 of file editarea.cpp.
| void CEditArea::AddAlt | ( | int | x, |
| int | y, | ||
| int | altitude_delta | ||
| ) |
Adds an integral altitude delta to one grid coordinate.
Definition at line 1108 of file editarea.cpp.
| float CEditArea::GetUnitSize | ( | ) |
Returns one cell's horizontal world-space extent.
Definition at line 1112 of file editarea.cpp.
| float CEditArea::GetUnitAlt | ( | ) |
Returns one elevation unit's world-space extent.
Definition at line 1116 of file editarea.cpp.
| int CEditArea::area_id |
Selects the area's special grid rules.
Definition at line 37 of file editarea.hpp.
| int CEditArea::map_no |
Identifies the map represented by the grid.
Definition at line 38 of file editarea.hpp.
| int CEditArea::width |
Gives the active grid width in cells.
Definition at line 39 of file editarea.hpp.
| int CEditArea::height |
Gives the active grid height in cells.
Definition at line 40 of file editarea.hpp.
| float CEditArea::offset_x |
Gives the grid origin on the world X axis.
Definition at line 41 of file editarea.hpp.
| float CEditArea::offset_y |
Gives the grid origin on the world Y axis.
Definition at line 42 of file editarea.hpp.
| float CEditArea::offset_z |
Gives the grid origin on the world Z axis.
Definition at line 43 of file editarea.hpp.
| int CEditArea::unk_1c |
Definition at line 44 of file editarea.hpp.
| float CEditArea::unit_size |
Gives one cell's horizontal world-space extent.
Definition at line 45 of file editarea.hpp.
| float CEditArea::unit_alt |
Gives one elevation unit's world-space extent.
Definition at line 46 of file editarea.hpp.
| CEditAreaCell CEditArea::grid[16][16] |
Stores the editable cells in grid coordinates.
Definition at line 47 of file editarea.hpp.
| int CEditArea::chain_work[16][16] |
Marks cells visited while following river chains.
Definition at line 48 of file editarea.hpp.
| CFrameVu1* CEditArea::grid_frame |
Holds the frame used to render the grid overlay.
Definition at line 49 of file editarea.hpp.
| int CEditArea::unk_202c |
Definition at line 50 of file editarea.hpp.
| CBoxVu0 CEditArea::parts_box |
Bounds all occupied cells in world space.
Definition at line 51 of file editarea.hpp.
| int CEditArea::grid_redraw |
Set to have DrawGrid rebuild the grid overlay.
Definition at line 52 of file editarea.hpp.
| int CEditArea::grid_redraw_count |
Draws left that rebuild the grid overlay.
Definition at line 53 of file editarea.hpp.