Files
SpaghettiKart/src/code_800029B0.h
T
MegaMech 32632cacdb Impl new intro (#193)
* Update menus

* Update CMakeLists.txt

* Add Ship

* Impl hm ship actors

* Update HM course

* Impl new intro

* Finish intro scene

* Rename

* Start Editor Work

* raycast works

* Fix ScreenRayTrace in widescreen

* Basic Actor Picking

* wip

* Editor use vtx collision

* gizmo work

* otr works for object picking

* Impl objects for editor

* actor init

* Update

* Add all axis move (freemove)

* Docking Windows works here

* Setup imgui layout for editor

* Editor Snap to Ground works

* Basic Scene Explorer Works

* Editor get actor names

* Impl editor object names

* impl Editor Play and Pause buttons

* Editor translate works while paused

* Fix freecam lighting

* Added adjustable track properties to editor

* Editor matrix, icons, rotation, impl light

* Setup Track Properties 1

* Editor tooling wip

* Load modded o2rs

* Don't enable hud if editor is enabled

* Updates

* SceneManager nearly working

* Fix mario kart 64 intro logo sizing

* Fix Rotator

* Finish new matrix translation code

* Cleanup headers

* Cleanup

* Cleanup 2

* Cleanup 3

* Prevent divize by zero crash

* Add visible circle for translate in all axis

* Editor scaling/rot works properly now

* Scale All_Axis evenly

* Fixes to includes to work on Linux.

* Removed overfilled arguments in gfx_create_framebuffer()

* Added missing function definitions to Game.h

* Editor sun face the camera

* Add rotation model to gizmo

* Add new handles

* Failed attempt at transforming collision

* Impl water volume

* Import fast64 paths

* water surface

* Scene Setup 1

* Custom Track O2R almost working needs testing

* Custom Track Load path O2r

* Render custom track. Wip collision

* Add missing function

* Debug Spawning Custom O2R Track

* Import courses working now

* Fix memory leak

* Remove New Track Button

* Engine.cpp more consistent with sf64

* Fix Editor Enable Button

* Editor Accurate mouse click drag objects

* Editor selects closest object and cleanup

* Gizmo rot and scale collision working

* Remove constexpr from IRotator

* Impl properties for location/rot/scale

* Better Properties display, swap rot handles

* Fix content browser dock and editor now disabled by default

* Remove GameInfoWindow, Multiplayer Button, and FPS Slider

* Disable Editor when its disabled

* Add new logo to hm intro

* Fix pause menu item box cursor

* Remove minimap from Course::from_json and to_json

* Impl Import Minimap

* Fix custom minimap rendering

* minimap uses extension .png

* Refactor minimap

* Freecam only for player 1

* GrandPrix Balloons work in custom track

* Track Id is now std::string and outside of Props

* Moved editor assets to be included in ship.o2r

* Fixed GenerateO2R to package the correct folder and save to the correct filename

* Linux specific changes.

* Added "#include <stdio.h>" that required them
* Changed how the "ship.o2r" file is loaded to allow it to load the file from within appimages.
* Changed the Linuxdeploy version to avoid errors later when the Github Actions creates appimages(same fix applied to other ports.)

* Revert "Moved editor assets to be included in ship.o2r"

This reverts commit 05704c01f7.

* Added back files(this time without LUS changes)

* Changed workflow file to use correct filename for assets file.

* Missed a few spots in the workflow file.

* Added .desktop file and made corrections to the main workflow.

* Added the rest of upstream CMakeLists.txt

* disabled USE_NETWORKING

* New InverseMatrix

* Renamed both .o2r files to be more accurate to its contents.

* Reverted CmakeList.txt

---------

Co-authored-by: MegaMech <7255464+MegaMech@users.noreply.github.com>
Co-authored-by: sitton76 <58642183+sitton76@users.noreply.github.com>
2025-05-14 18:30:32 -06:00

156 lines
4.2 KiB
C

#ifndef CODE_800029B0_H
#define CODE_800029B0_H
#include <macros.h>
#include <libultraship.h>
#include <actor_types.h>
#include "camera.h"
struct UnkStruct_800DC5EC {
/* 0x00 */ struct Controller* controllers; // gControllers ptr 800F6910
/* 0x04 */ Camera* camera; // Player camera ptr
/* 0x08 */ Player* player; // Player ptr 800F6990
/* 0x0C */ s32* unkC; // unk struct?
/* 0x10 */ Vp viewport;
/* 0x20 */ s32 pad[2];
/* 0x28 */ s16 cameraHeight;
/* 0x2A */ s16 unk;
/* 0x2C */ s16 screenWidth;
/* 0x2E */ s16 screenHeight;
/* 0x30 */ s16 screenStartX;
/* 0x32 */ s16 screenStartY;
/* 0x34 */ s16 unk3C;
/* 0x36 */ s16 playerDirection;
/* 0x38 */ s16 pathCounter;
/* 0x3A */ s16 unk42;
/* 0x3C */ s32 pad2;
}; // size = 0x40
/* Function Prototypes */
void func_800029B0(void);
void setup_race(void);
void func_80002DAC(void);
void clear_nmi_buffer(void);
void credits_spawn_actors(void);
extern s16 gCurrentCourseId; // D_800DC5A0
extern s16 gCurrentlyLoadedCourseId;
extern u16 D_800DC5A8;
extern s32 D_800DC5AC;
extern u16 D_800DC5B0;
extern u16 D_800DC5B4;
extern u16 D_800DC5B8;
extern u16 D_800DC5BC;
extern u16 gIsInQuitToMenuTransition;
extern u16 gQuitToMenuTransitionCounter;
extern u16 D_800DC5C8;
extern u16 D_800DC5CC;
extern s32 D_800DC5D0;
extern s32 D_800DC5D4;
extern s32 D_800DC5D8;
extern s32 D_800DC5DC;
extern s32 D_800DC5E0;
// This is tracking which credit "state" we're in, decides which credits are shown (and probably other stuff)
extern u16 D_800DC5E4;
extern s32 gPlayerWinningIndex;
extern struct UnkStruct_800DC5EC D_8015F480[4];
extern struct UnkStruct_800DC5EC* D_800DC5EC;
extern struct UnkStruct_800DC5EC* D_800DC5F0;
extern struct UnkStruct_800DC5EC* D_800DC5F4;
extern struct UnkStruct_800DC5EC* D_800DC5F8;
extern u16 gIsGamePaused;
extern bool gIsEditorPaused;
extern u8* pAppNmiBuffer;
extern s32 gIsMirrorMode; // D_800DC604
extern s16 gCreditsCourseId;
extern s16 gPlaceItemBoxes;
extern CollisionTriangle* gCollisionMesh;
extern u16* gCollisionIndices;
extern u16 gCollisionMeshCount;
extern u16 gNumCollisionTriangles;
extern u32 D_8015F58C;
extern Vec3f D_8015F590;
extern s32 D_8015F59C;
extern s32 D_8015F5A0;
extern s32 D_8015F5A4;
extern Vtx* vtxBuffer[];
extern s16 gCourseMaxX;
extern s16 gCourseMinX;
extern s16 gCourseMaxY;
extern s16 gCourseMinY;
extern s16 gCourseMaxZ;
extern s16 gCourseMinZ;
extern s16 D_8015F6F4;
extern s16 D_8015F6F6;
extern u16 D_8015F6F8;
extern s16 D_8015F6FA;
extern s16 D_8015F6FC;
extern u16 gNumSpawnedShells;
extern u16 D_8015F700;
extern u16 D_8015F702;
extern f32 D_8015F704;
extern Vec3f D_8015F708;
extern UNUSED u32 D_8015F718[3];
extern size_t gFreeMemorySize;
extern uintptr_t gNextFreeMemoryAddress;
extern uintptr_t gHeapEndPtr;
/**
* This repoints gNextFreeMemoryAddress to the point in the memory pool just after a course was loaded.
* This allows players to retry or reset a course without reloading the whole course.
* Memory allocated after course load is not zeroed or reset. But should get overwritten by future allocations.
*
* This is a relatively unsafe way to architect a memory pool as old memory could accidentally be used if future allocations do not zero or fully overwrite their free memory.
*/
extern uintptr_t gFreeMemoryCourseAnchor;
extern uintptr_t gFreeMemoryResetAnchor;
extern Vec3f D_8015F738;
extern Vec3f D_8015F748;
extern Vec3f D_8015F758;
extern Vec3f D_8015F768;
extern Vec3f D_8015F778;
extern f32 gCourseDirection;
extern s32 gNumScreens;
extern s32 D_8015F790[];
extern u16 D_8015F890;
extern u16 D_8015F892;
extern u16 D_8015F894;
extern f32 gTimePlayerLastTouchedFinishLine[];
extern u8* gNmiUnknown1;
extern u8* gNmiUnknown2;
extern u8* gNmiUnknown3;
extern u8* gNmiUnknown4;
extern u8* gNmiUnknown5;
extern u8* gNmiUnknown6;
extern Vec3f D_8015F8D0;
extern s32 D_8015F8DC;
extern s32 D_8015F8E0;
extern f32 gWaterLevel;
extern f32 gWaterVelocity;
extern s16 gPlayerPositionLUT[]; // Player index at each position
extern u16 gNumPermanentActors;
extern UNUSED u8 D_80162578[];
extern s16 gDebugPathCount;
extern s16 sIsController1Unplugged;
extern s32 D_801625EC;
extern s32 D_801625F0;
extern s32 D_801625F4;
extern uintptr_t D_801625F8;
extern f32 D_801625FC;
#endif