DCDecomp
A decompilation of Dark Cloud for the PlayStation 2
Loading...
Searching...
No Matches
dungeonparts.hpp File Reference

Go to the source code of this file.

Classes

struct  PARTS_WATER
 
class  CDungeonParts
 
struct  PIERO_ITEM_SET
 
struct  ITEM_PUT_SET
 
struct  ITEM_FREE_RECT
 
struct  ITEM_FREE_AREA
 

Enumerations

enum  MapPartsNo {
  MAP_PARTS_NONE = -1 , MAP_PARTS_ROAD_STRAIGHT = 0 , MAP_PARTS_ROAD_CORNER = 1 , MAP_PARTS_ROAD_CROSS = 2 ,
  MAP_PARTS_ROAD_TEE = 3 , MAP_PARTS_ROAD_DEAD_END = 4 , MAP_PARTS_ROOM_WALL_NORTH = 5 , MAP_PARTS_ROOM_WALL_EAST = 6 ,
  MAP_PARTS_ROOM_WALL_SOUTH = 7 , MAP_PARTS_ROOM_WALL_WEST = 8 , MAP_PARTS_ROOM_DOOR_NORTH = 9 , MAP_PARTS_ROOM_DOOR_EAST = 10 ,
  MAP_PARTS_ROOM_DOOR_SOUTH = 11 , MAP_PARTS_ROOM_DOOR_WEST = 12 , MAP_PARTS_ROOM_CORNER_NORTH_WEST = 13 , MAP_PARTS_ROOM_CORNER_NORTH_EAST = 14 ,
  MAP_PARTS_ROOM_CORNER_SOUTH_EAST = 15 , MAP_PARTS_ROOM_CORNER_SOUTH_WEST = 16 , MAP_PARTS_ROOM_FLOOR = 17 , MAP_PARTS_DIVIDE_END_NORTH = 18 ,
  MAP_PARTS_DIVIDE_END_EAST = 19 , MAP_PARTS_DIVIDE_END_SOUTH = 20 , MAP_PARTS_DIVIDE_END_WEST = 21 , MAP_PARTS_DIVIDE_DOOR_NORTH = 22 ,
  MAP_PARTS_DIVIDE_DOOR_EAST = 23 , MAP_PARTS_DIVIDE_DOOR_SOUTH = 24 , MAP_PARTS_DIVIDE_DOOR_WEST = 25 , MAP_PARTS_DIVIDE_WALL_NORTH = 26 ,
  MAP_PARTS_DIVIDE_WALL_EAST = 27 , MAP_PARTS_DIVIDE_WALL_SOUTH = 28 , MAP_PARTS_DIVIDE_WALL_WEST = 29 , MAP_PARTS_STAIR_DOWN = 30 ,
  MAP_PARTS_STAIR_UP = 31 , MAP_PARTS_HEAL_SPRING_NORTH = 32 , MAP_PARTS_HEAL_SPRING_EAST = 33 , MAP_PARTS_HEAL_SPRING_SOUTH = 34 ,
  MAP_PARTS_HEAL_SPRING_WEST = 35 , MAP_PARTS_ROOM_GATE_NORTH = 36 , MAP_PARTS_ROOM_GATE_EAST = 37 , MAP_PARTS_ROOM_GATE_SOUTH = 38 ,
  MAP_PARTS_ROOM_GATE_WEST = 39 , MAP_PARTS_URA_ENTRANCE_NORTH = 40 , MAP_PARTS_URA_ENTRANCE_EAST = 41 , MAP_PARTS_URA_ENTRANCE_SOUTH = 42 ,
  MAP_PARTS_URA_ENTRANCE_WEST = 43 , MAP_PARTS_URA_ROAD = 44 , MAP_PARTS_PILLAR_1 = 45 , MAP_PARTS_PILLAR_2 = 46 ,
  MAP_PARTS_ROOM_DOOR_B_NORTH = 47 , MAP_PARTS_ROOM_DOOR_B_EAST = 48 , MAP_PARTS_ROOM_DOOR_B_SOUTH = 49 , MAP_PARTS_ROOM_DOOR_B_WEST = 50 ,
  MAP_PARTS_ROOM_DOOR_C_NORTH = 51 , MAP_PARTS_ROOM_DOOR_C_EAST = 52 , MAP_PARTS_ROOM_DOOR_C_SOUTH = 53 , MAP_PARTS_ROOM_DOOR_C_WEST = 54 ,
  MAP_PARTS_KEY_DOOR_XIAO_NORTH = 55 , MAP_PARTS_KEY_DOOR_XIAO_EAST = 56 , MAP_PARTS_KEY_DOOR_XIAO_SOUTH = 57 , MAP_PARTS_KEY_DOOR_XIAO_WEST = 58 ,
  MAP_PARTS_KEY_XIAO = 59 , MAP_PARTS_KEY_DOOR_GORO_NORTH = 60 , MAP_PARTS_KEY_DOOR_GORO_EAST = 61 , MAP_PARTS_KEY_DOOR_GORO_SOUTH = 62 ,
  MAP_PARTS_KEY_DOOR_GORO_WEST = 63 , MAP_PARTS_KEY_DOOR_RUBY_NORTH = 64 , MAP_PARTS_KEY_DOOR_RUBY_EAST = 65 , MAP_PARTS_KEY_DOOR_RUBY_SOUTH = 66 ,
  MAP_PARTS_KEY_DOOR_RUBY_WEST = 67 , MAP_PARTS_KEY_UNGAGA = 68 , MAP_PARTS_KEY_OSMOND = 69
}
 

Functions

 STATIC_ASSERT (sizeof(PARTS_WATER)==0x60)
 
 STATIC_ASSERT (sizeof(CDungeonParts)==0x1D0)
 
 STATIC_ASSERT (sizeof(PIERO_ITEM_SET)==0x208)
 
 STATIC_ASSERT (sizeof(ITEM_PUT_SET)==0x208)
 
void GetPieroItem (int map_no, int ura_dungeon, int *item0, int *item1)
 
int PresetSmallItemNo_Get (int map_no, int floor_no, int special, int small)
 
 STATIC_ASSERT (sizeof(ITEM_FREE_RECT)==0x18)
 
 STATIC_ASSERT (sizeof(ITEM_FREE_AREA)==0x64)
 
int SearchiDoPutArea (MAPPARTS *cells, int x, int y, int width, int height, float *pos)
 
int BtAtraFloorCyoice (int map_no, int floor_no, int *atra_no)
 
int setCollisionData (CDungeonMap *map, CCPoly *poly, float *position, float radius, float height)
 

Variables

PIERO_ITEM_SET * PieroItemListPtr [14]
 
ITEM_PUT_SET * ItemPutListPtr [14]
 
ITEM_FREE_AREA * ItemFreeAreaAll [7]
 
ITEM_PUT_SET ItemPutListTbl12 [3]
 
s8 ItemPutListTbl12_bytes []
 
char info_cfg_literal []
 

Detailed Description

Declares one part of a dungeon floor and the operations on it.

Definition in file dungeonparts.hpp.

Enumeration Type Documentation

◆ MapPartsNo

enum MapPartsNo

Names each map part that a dungeon floor is built from.

A floor holds one part definition per number, in the order the dungeon's configuration file declares them, and a grid cell names the part it draws by its number. A group of four covers the four directions a part can face, in the order north, east, south, west.

Enumerator
MAP_PARTS_NONE 

The cell draws no part.

MAP_PARTS_ROAD_STRAIGHT 

Corridor that runs straight through.

MAP_PARTS_ROAD_CORNER 

Corridor that turns a corner.

MAP_PARTS_ROAD_CROSS 

Corridor that meets three others.

MAP_PARTS_ROAD_TEE 

Corridor that meets two others.

MAP_PARTS_ROAD_DEAD_END 

Corridor that stops.

MAP_PARTS_ROOM_DOOR_NORTH 

Room wall that a corridor opens into.

MAP_PARTS_ROOM_FLOOR 

Open floor inside a room.

MAP_PARTS_DIVIDE_END_NORTH 

End of a wall that divides a room.

MAP_PARTS_DIVIDE_DOOR_NORTH 

Door through a wall that divides a room.

MAP_PARTS_DIVIDE_WALL_NORTH 

Wall that divides a room.

MAP_PARTS_STAIR_DOWN 

Stair that the player comes in by.

MAP_PARTS_STAIR_UP 

Stair that the player leaves by, which the gate key opens.

MAP_PARTS_HEAL_SPRING_NORTH 

Spring that heals the party.

MAP_PARTS_ROOM_GATE_NORTH 

Door that closes the room a floor links to.

MAP_PARTS_URA_ENTRANCE_NORTH 

Way in and out of the back floor.

MAP_PARTS_URA_ROAD 

Corridor of the back floor.

MAP_PARTS_PILLAR_1 

Pillar that stands in a room.

MAP_PARTS_KEY_DOOR_XIAO_NORTH 

Room door that only Xiao opens.

MAP_PARTS_KEY_XIAO 

The second part that only Xiao opens.

MAP_PARTS_KEY_DOOR_GORO_NORTH 

Room door that only Goro opens.

MAP_PARTS_KEY_DOOR_RUBY_NORTH 

Room door that only Ruby opens.

MAP_PARTS_KEY_UNGAGA 

The part that only Ungaga opens.

MAP_PARTS_KEY_OSMOND 

The part that only Osmond opens.

Definition at line 25 of file dungeonparts.hpp.

Function Documentation

◆ GetPieroItem()

void GetPieroItem ( int  map_no,
int  ura_dungeon,
int *  item0,
int *  item1 
)

Gives the two items the clown offers on one floor.

Mangled name:
GetPieroItem__FiiPiPi
Address:
0x1BFAB0
Size:
0x440

Definition at line 1522 of file dungeonparts.cpp.

◆ PresetSmallItemNo_Get()

int PresetSmallItemNo_Get ( int  map_no,
int  floor_no,
int  special,
int  small 
)

Selects one item preset for a treasure box on a floor.

Mangled name:
PresetSmallItemNo_Get__Fiiii
Address:
0x1BFEF0
Size:
0x4CC

Definition at line 1605 of file dungeonparts.cpp.

◆ SearchiDoPutArea()

int SearchiDoPutArea ( MAPPARTS *  cells,
int  x,
int  y,
int  width,
int  height,
float *  pos 
)

Selects a random open world position in a rectangular group of cells, and returns how many placement boxes the cells offered.

Mangled name:
SearchiDoPutArea__FP8MAPPARTSiiiiPf
Address:
0x1C03C0
Size:
0x578

Definition at line 1786 of file dungeonparts.cpp.

◆ BtAtraFloorCyoice()

int BtAtraFloorCyoice ( int  map_no,
int  floor_no,
int *  atra_no 
)

Selects the atla identifiers that appear on a floor.

Mangled name:
BtAtraFloorCyoice__FiiPi
Address:
0x1C0D20
Size:
0x2A0

Selects the atla identifiers that appear on a floor: keeps the fixed ones, draws each open slot from the dungeon's list for its half, packs them to the front and returns how many there are.

Mangled name:
BtAtraFloorCyoice__FiiPi
Address:
0x1C0D20
Size:
0x2A0

Definition at line 1992 of file dungeonparts.cpp.

◆ setCollisionData()

int setCollisionData ( CDungeonMap *  map,
CCPoly *  poly,
float *  position,
float  radius,
float  height 
)

Gathers the floor's polygons within reach of a position, and returns how many.

Mangled name:
setCollisionData__FP11CDungeonMapP6CCPolyPfff
Address:
0x1C0FC0
Size:
0x5D0

Definition at line 2076 of file dungeonparts.cpp.

Variable Documentation

◆ PieroItemListPtr

PIERO_ITEM_SET* PieroItemListPtr[14]
extern

The clown's item lists, seven dungeons and then their back floors, each pointing at the lists for the floors below and above the midpoint.

The clown's item lists, seven dungeons and then their back floors.

Definition at line 1446 of file dungeonparts.cpp.

◆ ItemPutListPtr

ITEM_PUT_SET* ItemPutListPtr[14]
extern

The treasure box item lists, seven dungeons and then their back floors, for ordinary and special boxes.

The treasure box item lists, seven dungeons and then their back floors.

Definition at line 867 of file dungeonparts.cpp.

◆ ItemFreeAreaAll

ITEM_FREE_AREA* ItemFreeAreaAll[7]

The areas where items can be put down on each map.

Definition at line 298 of file dungeonparts.hpp.

◆ ItemPutListTbl12

ITEM_PUT_SET ItemPutListTbl12[3]
extern

The treasure box item lists of the twelfth dungeon table; dngstatusdata reads the owning character out of it by byte offset.

The treasure box item lists of dungeon 5's back floors.

Definition at line 796 of file dungeonparts.cpp.

◆ ItemPutListTbl12_bytes

s8 ItemPutListTbl12_bytes[]
extern

The same table seen as bytes; GetItem indexes it far past its end to pick the character a weapon is routed to.

◆ info_cfg_literal

char info_cfg_literal[]
extern

Configuration entry name every model pack is opened with.

Definition at line 1777 of file dungeonparts.cpp.