Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // tengine.c
- #include "cppu64.h"
- #include "os_internal.h"
- #ifndef MAKE_CART
- #include <PR/ramrom.h> // needed for argument passing into the app
- #endif
- #include "tengine.h"
- #include "dlists.h"
- #include "scaling.h"
- #include "particle.h"
- #include "mattable.h"
- #include "tcontrol.h"
- #include "tmove.h"
- #include "audio.h"
- #include "sfx.h"
- #include "textload.h"
- #include "regtype.h"
- #include "pickup.h"
- #include "attract.h"
- #include "map.h"
- #include "collinfo.h"
- #include "onscrn.h"
- #include "introcam.h"
- #include "galrecam.h"
- #include "cammodes.h"
- #include "bossflgs.h"
- #include "persist.h"
- extern int WeaponOrder[] ;
- extern int RequestorMode ;
- extern BOOL persistant_data_loaded ;
- extern char text_errorcontroller[] ;
- extern char text_pakdamaged[] ;
- //--------------------------------------------------------------------------------------------------
- // Text
- //--------------------------------------------------------------------------------------------------
- #ifdef ENGLISH
- // ---------------------- English text ---------------------------
- static char text_killerfish[] = {"killer fish"};
- static char text_beetle[] = {"giant beetle"};
- static char text_dragonfly[] = {"giant dragonfly"};
- static char text_campaignerssoldier[] = {"campaigners soldier"};
- static char text_campaignersseargent[] = {"campaigners sergeant"};
- static char text_poacher[] = {"poacher"};
- static char text_dimetrodon[] = {"dimetrodon"};
- static char text_raptor[] = {"raptor"};
- static char text_cyborgraptor[] = {"raptor mech"};
- static char text_leaper[] = {"leaper"};
- static char text_hulk[] = {"purlin"};
- static char text_alieninfantry[] = {"alien infantry"};
- static char text_moschops[] = {"moschops"};
- static char text_ancientwarrior[] = {"ancient warrior"};
- static char text_highpriest[] = {"high priest"};
- static char text_cyborg[] = {"cyborg"};
- static char text_demon[] = {"demon"};
- static char text_demonlord[] = {"demon lord"};
- static char text_pteranodon[] = {"pteranodon"};
- static char text_sludgebeast[] = {"sludge beast"};
- static char text_killerplant[] = {"killer plant"};
- static char text_robot[] = {"attack robot"};
- static char text_triceratops[] = {"triceratops"};
- static char text_subterranean[] = {"subterranean"};
- static char text_quittraining[] = {"quit training"} ;
- static char text_areyousure[] = {"are you sure"} ;
- #endif
- #ifdef GERMAN
- // ---------------------- German text ---------------------------
- static char text_killerfish[] = {"killerfisch"};
- static char text_beetle[] = {"riesenk<fer"}; //a.
- static char text_dragonfly[] = {"riesenlibelle"};
- static char text_campaignerssoldier[] = {"campaigner soldat"};
- static char text_campaignersseargent[] = {"campaigner hauptmann"};
- static char text_poacher[] = {"wilddied"};
- static char text_dimetrodon[] = {"dimetrodon"};
- static char text_raptor[] = {"raptor"};
- static char text_cyborgraptor[] = {"mech raptor"};
- static char text_leaper[] = {"springer"};
- static char text_hulk[] = {"riese"};
- static char text_alieninfantry[] = {"ausserirdische infanterie"};
- static char text_moschops[] = {"moschops"};
- static char text_ancientwarrior[] = {"krieger"};
- static char text_highpriest[] = {"hoher priester"};
- static char text_cyborg[] = {"cyborg"};
- static char text_demon[] = {"d<mon"}; //a.
- static char text_demonlord[] = {"d<mon anf/hrer"}; //a.u.
- static char text_pteranodon[] = {"pteranodon"};
- static char text_sludgebeast[] = {"schlammungeheuer"};
- static char text_killerplant[] = {"killerpflanze"};
- static char text_robot[] = {"kampfroboter"};
- static char text_triceratops[] = {"trizeratops"};
- static char text_subterranean[] = {"unterirdischer"};
- static char text_quittraining[] = {"training beenden"} ;
- static char text_areyousure[] = {"bist du sicher"} ;
- #endif
- #ifdef KANJI
- // ---------------------- Japanese text ---------------------------
- static char text_killerfish[] = {0x35, 0x21, 0x15, 0x00, -1};
- static char text_beetle[] = {0x25, 0x41, 0x10, -1};
- static char text_dragonfly[] = {0x2e, 0x0c, 0x19, 0x21, 0x01, -1};
- static char text_campaignerssoldier[] = {0x0e, 0x23, 0x2c, 0x3d, 0x41, -1};
- static char text_campaignersseargent[] = {0x29, 0x27, 0x0e, 0x02, -1};
- static char text_poacher[] = {0x30, 0x41, 0x30, 0x22, 0x00, 0x27, -1};
- static char text_dimetrodon[] = {0x0c, 0x34, 0x01, 0x05, 0x41, -1};
- static char text_raptor[] = {0x21, 0x36, 0x0f, 0x41, -1};
- static char text_cyborgraptor[] = {0x30, 0x01, 0x04, 0x21, 0x36, 0x0f, 0x41, -1};
- static char text_leaper[] = {0x22, 0x2b, 0x41, 0x2f, -1};
- static char text_hulk[] = {0x31, 0x41, 0x0c, 0x13, -1};
- static char text_alieninfantry[] = {0x06, 0x21, 0x41, 0x00, 0x27, 0x13, -1};
- static char text_moschops[] = {0x1b, 0x40, 0x07, 0x0c, -1};
- static char text_ancientwarrior[] = {0x0c, 0x08, 0x23, 0x0f, 0x41, -1};
- static char text_highpriest[] = {0x1a, 0x41, 0x22, 0x41, 0x25, 0x41, 0x2f, -1};
- static char text_cyborg[] = {0x33, 0x41, 0x29, -1};
- static char text_demon[] = {0x2e, 0x41, 0x1f, 0x27, -1};
- static char text_demonlord[] = {0x2e, 0x41, 0x1f, 0x27, 0x25, 0x41, 0x2f, -1};
- static char text_pteranodon[] = {0x2e, 0x0c, 0x02, 0x3a, 0x27, 0x29, -1};
- static char text_sludgebeast[] = {0x06, 0x21, 0x41, 0x0b, 0x2b, 0x41, 0x2d, -1};
- static char text_killerplant[] = {0x2e, 0x0c, 0x36, 0x21, 0x27, 0x13, -1};
- static char text_robot[] = {0x25, 0x33, 0x01, 0x2f, -1};
- static char text_triceratops[] = {0x30, 0x01, 0x04, 0x2b, 0x02, 0x23, 0x0c, -1};
- static char text_subterranean[] = {0x26, 0x41, 0x1d, -1};
- static char text_quittraining[] = {0x13, 0x24, 0x41, 0x15, 0x27, 0x29, 0x74, 0x6c, 0x6a, 0x5d, -1} ;
- static char text_areyousure[] = {0x6D, 0x72, 0x57, 0x4D, 0x7A, 0x57, 0x80, 0x4E, 0x51, -1} ;
- #endif
- // thread overview
- /////////////////////////////////////////////////////////////////////////////
- // rmon thread. Used for debugging.
- // Its main purpose is to send printf's back to host machine.
- // scheduler thread. The highest priority thread of the game. Its
- // function is to see that audio and graphics tasks get built
- // and executed in a timely fashion.
- // audio thread. The second highest thread. Creates the audio task
- // lists to be executed by the audio microcode to synthesize
- // the audio. Audio should run at a higher priority than
- // graphics, since if a frame of audio gets dropped, it will
- // cause a serious click, but a frame of graphics can always
- // redraw the last frame.
- // game thread. Loops waiting for messages from scheduler.
- // Upon receiving retrace messages, will branch to the graphics
- // routine and the controller read routine.
- // idle thread. Starts out as the init thread, but becomes the idle
- // thread.
- // fault thread. prints debug information on the screen after
- // a CPU exception. If the rmon thread is started after the
- // fault thread, it will steal the exception interrupt thereby
- // preventing the fault thread from doing anything.
- /////////////////////////////////////////////////////////////////////////////
- //#define DISPLAY_TIMING
- #ifdef MAKE_CART
- #ifdef DISPLAY_TIMING
- #undef DISPLAY_TIMING
- #endif
- #endif
- // analog menu control defines
- #define MENU_START_SPEED 249.0
- #define MAX_MENU_SPEED 250.0
- #define MENU_HORIZONTAL_THRESHHOLD 30
- #define MENU_VERTICAL_THRESHHOLD 30
- // TEMP
- void CCartCache__MemoryDump(CCartCache *pThis);
- void printFaultData(OSThread *);
- // CEngineApp implementation
- /////////////////////////////////////////////////////////////////////////////
- void CEngineApp__InitializeGameVars(CEngineApp *pThis) ;
- void CEngineApp__SetupShadowVtxs();
- void CEngineApp__InitGame(CEngineApp *pThis);
- void CEngineApp__InitGraphics(CEngineApp *pThis);
- CFrameData* CEngineApp__CreateGraphicsTask(CEngineApp *pThis);
- void CEngineApp__SendGraphicsTask(CEngineApp *pThis, CFrameData *pFData);
- void CEngineApp__InitDisplayLists(CEngineApp *pThis);
- void CEngineApp__ClearBuffers(CEngineApp *pThis);
- void CEngineApp__SetupSegments(CEngineApp *pThis);
- #define CEngineApp__SetDebugMode(pThis, Debug) (pThis)->m_DebugMode = Debug
- void CEngineApp__SetupDraw(CEngineApp *pThis) ;
- void CEngineApp__DrawGAMEPAK(CEngineApp *pThis);
- void CEngineApp__DrawLEGALSCREEN(CEngineApp *pThis);
- void CEngineApp__DrawTITLE(CEngineApp *pThis);
- void CEngineApp__DrawGALLERY(CEngineApp *pThis);
- void CEngineApp__DrawGAME(CEngineApp *pThis);
- void CEngineApp__DrawCREDITS(CEngineApp *pThis);
- void CEngineApp__DrawFlash(CEngineApp *pThis);
- void CEngineApp__DrawColorFlash(CEngineApp *pThis);
- void CEngineApp__UpdateFade(CEngineApp *pThis);
- void CEngineApp__ResetGallery(CEngineApp *pThis);
- void CEngineApp__UpdateGallery(CEngineApp *pThis);
- void CEngineApp__DrawFade(CEngineApp *pThis);
- void CEngineApp__DrawWarp(CEngineApp *pThis);
- void CEngineApp__DrawSunGlare(CEngineApp *pThis);
- void CEngineApp__DrawDeath(CEngineApp *pThis);
- void CEngineApp__PlayerLostLife(CEngineApp *pThis);
- void CEngineApp__BuildDispList(CEngineApp *pThis);
- void CEngineApp__ScreenShot(CEngineApp *pThis);
- void CEngineApp__SetCameraToTurok(CEngineApp *pThis);
- void CEngineApp__DoPause(CEngineApp *pThis);
- #define ToggleEvenOdd() even_odd ^= 1
- void CEngineApp__AdvanceFrameData(CEngineApp *pThis);
- #define CEngineApp__GetFrameData(pThis) ((pThis)->m_pCurrentFrameData)
- void CEngineApp__GetFogColor(CEngineApp *pThis, BYTE *pR, BYTE *pG, BYTE *pB);
- void CEngineApp__UpdateSpiritMode(CEngineApp *pThis) ;
- void CEngineApp__UpdateCameraAttributes(CEngineApp *pThis);
- void CEngineApp__UpdatePause(CEngineApp *pThis);
- void CEngineApp__UpdateFrameData(CEngineApp *pThis, GFXMsg *pMsg);
- void CEngineApp__DoWarp(CEngineApp *pThis,
- int WarpID,
- float Seconds,
- int SoundEffect,
- BOOL WarpIn,
- BYTE Red, BYTE Green, BYTE Blue,
- BOOL StoreWarpReturn);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement