Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…keplatinum into fixes
  • Loading branch information
DylanDoesProgramming664 committed Jan 18, 2025
2 parents c8a7a1f + 99426e9 commit af5fe44
Show file tree
Hide file tree
Showing 40 changed files with 1,122 additions and 1,172 deletions.
7 changes: 4 additions & 3 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ the repository](#2-downloading-the-repository).
sudo mkdir -pm755 /etc/apt/keyrings
sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
sudo apt update
sudo apt install --install-recommends winehq-stable
sudo apt install --install-recommends wine-stable
```
2. Install the following packages via `apt`:
Expand Down Expand Up @@ -319,10 +319,11 @@ in the lower right corner.
### Unix Systems
Export the environment variable as above to your terminal profile:
Export the environment variable as above to your terminal profile. To do so, run the
following commands from the root of your repository:
```bash
echo 'export LM_LICENSE_FILE="/path/to/pokeplatinum/tools/cw/license.dat"' >> ~/.bashrc
echo "export LM_LICENSE_FILE=\"$(pwd)/tools/cw/license.dat\"" >> ~/.bashrc
source ~/.bashrc
```
Expand Down
6 changes: 3 additions & 3 deletions include/constants/map_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
#define MAP_OBJ_STATUS_12 (1 << 12)
#define MAP_OBJ_STATUS_13 (1 << 13)
#define MAP_OBJ_STATUS_14 (1 << 14)
#define MAP_OBJ_STATUS_15 (1 << 15)
#define MAP_OBJ_STATUS_16 (1 << 16)
#define MAP_OBJ_STATUS_17 (1 << 17)
#define MAP_OBJ_STATUS_SHOW_SHADOW (1 << 15)
#define MAP_OBJ_STATUS_START_JUMP (1 << 16)
#define MAP_OBJ_STATUS_END_JUMP (1 << 17)
#define MAP_OBJ_STATUS_18 (1 << 18)
#define MAP_OBJ_STATUS_19 (1 << 19)
#define MAP_OBJ_STATUS_HIDE_SHADOW (1 << 20)
Expand Down
331 changes: 180 additions & 151 deletions include/map_object.h

Large diffs are not rendered by default.

54 changes: 27 additions & 27 deletions include/map_object_move.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,36 @@

#include "field/field_system_decl.h"

void MapObject_InitMove(MapObject *param0);
void MapObject_Move(MapObject *param0);
u32 sub_02063E18(const MapObject *param0, const VecFx32 *param1, int param2, int param3, int param4, int param5);
u32 sub_02063E94(const MapObject *param0, int param1, int param2, int param3, int param4);
u32 sub_02063EBC(const MapObject *param0, int param1);
int sub_02063F00(const MapObject *param0, int param1, int param2, int param3);
int sub_02063FAC(const MapObject *param0, int param1, int param2, int param3);
int sub_02064004(const MapObject *param0, int param1, int param2, int param3);
int sub_0206406C(MapObject *param0, u32 param1);
int sub_020640A0(MapObject *param0, u32 param1);
int MapObject_IsOnSnow(MapObject *param0, u32 param1);
int sub_02064108(MapObject *param0, u32 param1);
int sub_0206413C(MapObject *param0, u32 param1);
int sub_0206415C(MapObject *param0, u32 param1);
int sub_0206417C(MapObject *param0, u32 param1);
int MapObject_GetDxFromDir(int param0);
int MapObject_GetDyFromDir(int param0);
void MapObject_InitMove(MapObject *mapObj);
void MapObject_Move(MapObject *mapObj);
u32 sub_02063E18(const MapObject *mapObj, const VecFx32 *pos, int x, int y, int z, int dir);
u32 sub_02063E94(const MapObject *mapObj, int x, int y, int z, int dir);
u32 sub_02063EBC(const MapObject *mapObj, int dir);
int sub_02063F00(const MapObject *mapObj, int x, int y, int z);
int MapObject_IsOutOfRange(const MapObject *mapObj, int x, int y, int z);
int sub_02064004(const MapObject *mapObj, int x, int z, int dir);
int MapObject_IsOnWater(MapObject *mapObj, u32 tileBehavior);
int MapObject_IsOnSand(MapObject *mapObj, u32 tileBehavior);
int MapObject_IsOnSnow(MapObject *mapObj, u32 tileBehavior);
int MapObject_IsOnShallowSnow(MapObject *mapObj, u32 tileBehavior);
int MapObject_IsOnBridge(MapObject *mapObj, u32 tileBehavior);
int MapObject_IsOnBikeBridgeNorthSouth(MapObject *mapObj, u32 tileBehavior);
int MapObject_IsOnBikeBridgeEastWest(MapObject *mapObj, u32 tileBehavior);
int MapObject_GetDxFromDir(int dir);
int MapObject_GetDzFromDir(int dir);
void MapObject_StepDir(MapObject *mapObj, int dir);
void MapObject_UpdateCoords(MapObject *mapObj);
u32 sub_02064238(MapObject *param0, int param1);
void MapObject_AddVecToPos(MapObject *param0, const VecFx32 *param1);
u32 MapObject_GetTileBehaviorFromDir(MapObject *mapObj, int dir);
void MapObject_AddVecToPos(MapObject *mapObj, const VecFx32 *vec);
void MapObject_MovePosInDir(MapObject *mapObj, int dir, fx32 distance);
int sub_020642F8(MapObject *param0);
int sub_02064390(MapObject *param0);
void VecFx32_StepDirection(int param0, VecFx32 *param1, fx32 param2);
void sub_02064450(int param0, int param1, VecFx32 *param2);
void sub_02064464(MapObject *param0);
int sub_020642F8(MapObject *mapObj);
int MapObject_SetTileBehaviors(MapObject *mapObj);
void VecFx32_StepDirection(int param0, VecFx32 *vec, fx32 val);
void sub_02064450(int x, int z, VecFx32 *pos);
void sub_02064464(MapObject *mapObj);
int Direction_GetOpposite(int param0);
int sub_02064488(int param0, int param1, int param2, int param3);
int sub_020644A4(FieldSystem *fieldSystem, VecFx32 *param1);
int sub_020644D0(FieldSystem *fieldSystem, VecFx32 *param1, int param2);
int sub_02064488(int x, int z, int xPrev, int zPrev);
int sub_020644A4(FieldSystem *fieldSystem, VecFx32 *pos);
int sub_020644D0(FieldSystem *fieldSystem, VecFx32 *pos, int param2);

#endif // POKEPLATINUM_MAP_OBJECT_MOVE_H
34 changes: 0 additions & 34 deletions include/struct_defs/struct_02061D3C.h

This file was deleted.

10 changes: 5 additions & 5 deletions src/comm_player_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -1129,7 +1129,7 @@ static BOOL CommPlayer_MoveBlow(int netId, int param1)
x = CommPlayer_GetXServer(netId);
z = CommPlayer_GetZServer(netId);
x += MapObject_GetDxFromDir(sCommPlayerManager->unk_112[netId]);
z += MapObject_GetDyFromDir(sCommPlayerManager->unk_112[netId]);
z += MapObject_GetDzFromDir(sCommPlayerManager->unk_112[netId]);

if (sCommPlayerManager->unk_10A[netId] != 0) {
if (CommPlayer_CheckCollision(x, z, netId)) {
Expand Down Expand Up @@ -1318,7 +1318,7 @@ int sub_02058DC0(int netId)
return 0xffff;
}

return sCommPlayerManager->playerLocation[netId].z + MapObject_GetDyFromDir(sCommPlayerManager->playerLocation[netId].dir);
return sCommPlayerManager->playerLocation[netId].z + MapObject_GetDzFromDir(sCommPlayerManager->playerLocation[netId].dir);
}

int CommPlayer_GetXServer(int netId)
Expand Down Expand Up @@ -1380,7 +1380,7 @@ int CommPlayer_AddZServer(int netId)
return 0xffff;
}

return sCommPlayerManager->playerLocationServer[netId].z + MapObject_GetDyFromDir(sCommPlayerManager->playerLocationServer[netId].dir);
return sCommPlayerManager->playerLocationServer[netId].z + MapObject_GetDzFromDir(sCommPlayerManager->playerLocationServer[netId].dir);
}

int CommPlayer_Dir(int netId)
Expand Down Expand Up @@ -1591,7 +1591,7 @@ BOOL sub_0205928C(void)

dir = CommPlayer_GetOppositeDir(playerLocation->dir);
playerLocation->x += MapObject_GetDxFromDir(dir);
playerLocation->z += MapObject_GetDyFromDir(dir);
playerLocation->z += MapObject_GetDzFromDir(dir);
playerLocation->moveSpeed = 2;

sCommPlayerManager->movementChanged[netId] = 1;
Expand Down Expand Up @@ -1771,7 +1771,7 @@ void CommPlayerMan_ForcePos(void)

MapObject_SetX(obj, x);
MapObject_SetZ(obj, z);
MapObject_SetPosDir(obj, x, 0, z, dir);
MapObject_SetPosDirFromCoords(obj, x, 0, z, dir);
}
}

Expand Down
1 change: 0 additions & 1 deletion src/field_overworld_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

#include "struct_defs/struct_020556C4.h"
#include "struct_defs/struct_0205EC34.h"
#include "struct_defs/struct_02061D3C.h"

#include "field/field_system.h"

Expand Down
Loading

0 comments on commit af5fe44

Please sign in to comment.