persona-3-dual
A DS demake of Persona 3
Loading...
Searching...
No Matches
MovementTypes.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <aegis/ndsTypes.hpp>
4#include <aegis/types.hpp>
5#include <core/geometry.hpp>
6#include <nds.h>
7
8enum class TileType
9{
12 SAVE = 2,
13
14 // scenes / events
15 SCENE_0 = 400,
16 SCENE_1 = 401,
17 SCENE_2 = 402,
18 SCENE_3 = 403,
19 SCENE_4 = 404,
20 SCENE_5 = 405,
21 SCENE_6 = 406,
22 SCENE_7 = 407,
23 SCENE_8 = 408,
24 SCENE_9 = 409,
25
26 // characters (party)
27 C_MC = 600,
28 C_YU = 601,
29 C_JU = 602,
30 C_AK = 603,
31 C_MI = 604,
32 C_FU = 605,
33 C_AE = 606,
34 C_KO = 607,
35 C_KE = 608,
36 C_SH = 609,
37
38 // enemies (shadows)
39 // w = weak, m = medium, s = tring
40 SHD_W = 800,
41 SHD_M = 801,
42 SHD_S = 802,
43};
44
46{
47 ae::q20_12_t x;
48 ae::q20_12_t z;
49 ae::q20_12_t y; // height
50 ae::q20_12_t facingAngle;
51};
52
54{
55 ae::q20_12_t x0, z0;
56 ae::q20_12_t x1, z1;
57 ae::q20_12_t halfWidth;
58 ae::q20_12_t y0, y1;
59};
60
62{
63 ae::q20_12_t minX, maxX;
64 ae::q20_12_t minZ, maxZ;
65 ae::q20_12_t height;
66};
67
71{
72 //stair traversal
73 ae::q20_12_t baseHeight{0};
74
75 const StairSegment* stairs = nullptr;
76 int stairCount = 0;
77
78 const HeightRegion* landings = nullptr;
79 int landingCount = 0;
80
81 // 3D environment
84 uint16_t* collisionMap;
85
86 // world
87 ae::q20_12_t tileSize;
88 ae::q20_12_t worldOffsetX;
89 ae::q20_12_t worldOffsetZ;
91
92 // translation
93 ae::q20_12_t speed;
94 ae::q20_12_t height;
97
98 MovementConfig() = default;
99
100 MovementConfig(int iMapWidth,
101 int iMapHeight,
102 uint16_t* iCollisionMap,
103 ae::q20_12_t iTileSize,
104 ae::q20_12_t iWorldOffsetX,
105 ae::q20_12_t iWorldOffsetZ,
106 Point2D<ae::q20_12_t> iCharacterSize,
107 ae::q20_12_t iSpeed,
108 ae::q20_12_t iHeight,
109 Point2D<ae::q20_12_t> iCharacterTranslate,
110 ae::q20_12_t iCharacterFacingAngle)
111 : baseHeight(iHeight), mapWidth(iMapWidth), mapHeight(iMapHeight), collisionMap(iCollisionMap),
112 tileSize(iTileSize), worldOffsetX(iWorldOffsetX), worldOffsetZ(iWorldOffsetZ), characterSize(iCharacterSize),
113 speed(iSpeed), height(iHeight), characterTranslate(iCharacterTranslate),
114 characterFacingAngle(iCharacterFacingAngle)
115 {
116 }
117};
TileType
ae::q20_12_t facingAngle
ae::q20_12_t height
ae::q20_12_t minZ
ae::q20_12_t minX
ae::q20_12_t maxZ
ae::q20_12_t maxX
Point2D< ae::q20_12_t > characterSize
ae::q20_12_t tileSize
ae::q20_12_t characterFacingAngle
MovementConfig(int iMapWidth, int iMapHeight, uint16_t *iCollisionMap, ae::q20_12_t iTileSize, ae::q20_12_t iWorldOffsetX, ae::q20_12_t iWorldOffsetZ, Point2D< ae::q20_12_t > iCharacterSize, ae::q20_12_t iSpeed, ae::q20_12_t iHeight, Point2D< ae::q20_12_t > iCharacterTranslate, ae::q20_12_t iCharacterFacingAngle)
ae::q20_12_t worldOffsetX
Point2D< ae::q20_12_t > characterTranslate
const HeightRegion * landings
ae::q20_12_t baseHeight
const StairSegment * stairs
uint16_t * collisionMap
ae::q20_12_t speed
ae::q20_12_t height
MovementConfig()=default
ae::q20_12_t worldOffsetZ
ae::q20_12_t z0
ae::q20_12_t x0
ae::q20_12_t y0
ae::q20_12_t z1
ae::q20_12_t halfWidth
ae::q20_12_t x1
ae::q20_12_t y1