Files
SpaghettiKart/src/port/Game.cpp
T
2024-05-03 15:33:22 -06:00

44 lines
868 B
C++

#include <libultraship.h>
#include <Fast3D/gfx_pc.h>
#include "Engine.h"
extern "C" {
#include "main.h"
#include "audio/load.h"
#include "audio/external.h"
}
extern "C"
void Graphics_PushFrame(Gfx* data) {
GameEngine::ProcessGfxCommands(data);
}
extern "C" void Timer_Update();
void push_frame() {
// GameEngine::StartAudioFrame();
GameEngine::Instance->StartFrame();
// Graphics_ThreadUpdate();w
// Timer_Update();
// thread5_iteration();
// GameEngine::EndAudioFrame();
}
#ifdef _WIN32
int SDL_main(int argc, char **argv) {
#else
#if defined(__cplusplus) && defined(PLATFORM_IOS)
extern "C"
#endif
int main(int argc, char *argv[]) {
#endif
GameEngine::Create();
audio_init();
sound_init();
thread5_game_loop();
GameEngine::Instance->ProcessFrame(push_frame);
GameEngine::Instance->Destroy();
return 0;
}