x64 and hsfload improvements, build every REL (#582)

* Port some of hsfload.c

* More byteswaps in hsfload.c

* Finish hsfload besides cenv

* hsfload fixes

* Some x64 improvements

* More x64 improvements

* 64 bit improvements

* Link in lots of files

* Fix armem bug

* Fix dll killing, load modeseldll

* Fixes, clearing TODOs

* Tons of warning/error fixes

* Linux build fixes

* Add -fPIC flag to fix build on x64 linux

* GXSETARRAY sizes and misc fixes

* More fixes

* Build all RELs

* Implement C_Quat functions

* Fix PAL build
This commit is contained in:
Dávid Balatoni 2025-04-14 18:02:42 +02:00 committed by GitHub
parent bc19d2263b
commit 34cf507e3f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
186 changed files with 3256 additions and 1540 deletions

View file

@ -17,6 +17,17 @@
#include "ext_math.h"
#include "string.h"
#include <game/audio.h>
#include <game/board/basic_space.h>
#include <game/board/bowser.h>
#include <game/board/fortune.h>
#include <game/board/warp.h>
s32 BoardBlockExec(s32 player, s32 space); // wrong
extern void BoardMushroomExec(s32 player, s32 space); // wrong
extern void BoardBooHouseExec(s32 player, s32 space); // wrong
extern void BoardBlockHouseExec(s32 player, s32 space); // wrong
static BoardSpace spaceData[2][256];
s16 boardSpaceStarTbl[8];
static GXTexObj spaceHiliteTex;
@ -300,7 +311,6 @@ void BoardSpaceHostSet(s32 space)
{
s16 host_space;
Vec pos;
BoardSpace *space_plat;
BoardSpaceTypeSet(0, space, 8);
host_space = BoardSpaceLinkFlagSearch(0, space, 0x04000000);
BoardSpacePosGet(0, host_space, &pos);
@ -817,7 +827,7 @@ static void DrawSpaces(ModelData *model, Mtx matrix)
camera = &boardCamera;
BoardCameraPosGet(&pos);
BoardCameraTargetGet(&target);
MTXPerspective(proj, camera->fov, camera->aspect, camera->near, camera->far);
MTXPerspective(proj, camera->fov, camera->aspect, camera->nnear, camera->ffar);
GXSetProjection(proj, GX_PERSPECTIVE);
MTXLookAt(lookat, &pos, &camera->up, &target);
GXSetViewport(camera->viewport_x, camera->viewport_y, camera->viewport_w, camera->viewport_h, camera->viewport_near, camera->viewport_far);
@ -1079,14 +1089,11 @@ void BoardSpaceInit(s32 data_num)
if (_CheckFlag(FLAG_ID_MAKE(1, 1))) {
Vec pos;
Vec rot;
s16 space;
BoardModelVisibilitySet(starPlatMdl, 1);
GWSystem.star_flag |= (u8)(1 << GWSystem.star_pos);
BoardSpaceTypeSet(0, boardSpaceStarTbl[GWSystem.star_pos], 8);
{
int space;
BoardSpace *space_plat;
space = BoardSpaceLinkFlagSearch(0, BoardSpaceStarGetCurr(), 0x04000000);
int space = BoardSpaceLinkFlagSearch(0, BoardSpaceStarGetCurr(), 0x04000000);
BoardSpacePosGet(0, space, &pos);
BoardModelPosSetV(StarPlatGetMdl(), &pos);
BoardSpaceRotGet(0, space, &rot);