Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void CEngineApp__UpdateTITLE(CEngineApp *pThis);
- void CEngineApp__UpdateGAME(CEngineApp *pThis);
- void CEngineApp__UpdateCREDITS(CEngineApp *pThis);
- void CEngineApp__PrepareFrame(CEngineApp *pThis, int nMinimumF
- // Symbol genererated by "makerom" to indicate the end of the code segment
- // in virtual (and physical) memory
- /////////////////////////////////////////////////////////////////////////////
- extern char _codeSegmentEnd[];
- // Symbols generated by "makerom" to tell us where the static segment is
- // in ROM.
- /////////////////////////////////////////////////////////////////////////////
- extern char _staticSegmentRomStart[], _staticSegmentRomEnd[];
- // Entry points for new threads
- /////////////////////////////////////////////////////////////////////////////
- // boot thread entry point
- void boot();
- // idle thread entry point
- void idle(void *pArg);
- // main thread entry point
- void mainproc(void *pArg);
- // fault thread entry point
- /////////////////////////////////////////////////////////////////////////////
- float particle_speed_aceler = 1.0;
- float sky_speed_scaler = 1.0;
- float old_enemy_speed_scaler = 1.0;
- float old_particle_speed_scaler = 1.0;
- float old_sky_speed_scaler = 1.0;
- float rsp_total_time = 0.0;
- float rsp_audio_time = 0.0;
- float rsp_graphics_time = 0.0;
- float rdp_time = 0.0;
- float cpu_time = 0.0;
- float weapon_z_rotation = 0.0;
- //ROMAddress *rp_current_textureset;
- //DWORD current_texture;
- //DWORD idle_count;
- BOOL player_is_moving = TRUE;
- BOOL cache_is_valid = FALSE;
- CViewVolume view_volume;
- CBoundsRect view_bounds_rect,
- anim_bounds_rect;
- /////////////////////////////////////////////////////////////////////////////
- // _Disable_ unimplemented:operation exception for floating point
- // The trunc.w.s instruction causes this exception when the input
- // value is larger than the maximum fixed point value. This is
- // can happen in the game, so I'm disabling the exception.
- //fpstat &= ^(FPCSR_CE | FPCSR_FS | FPCSR_EV | FPCSR_F1 | FPCSR_RM_PN);
- //fpstat &= -FPCSR_CE;
- //fpstat = 0;
- __osSetFpcCsr(fpstat);
- //last = (OSThread*) NULL;
- while (TRUE)
- {
- osRecvMesg(&faultMsgQ, (OSMesg*) &msg, OS_MESG_BLOCK);
- #ifdef SHIP_IT
- // create the persistant data block
- if ( cache_is_valid
- && (GetApp()->m_Mode == MODE_GAME)
- && CEngineApp__GetPlayer(GetApp()) )
- {
- pPlayer = CEngineApp__GetPlayer(GetApp());
- if (frame_number
- /////////////////////////////////////////////////////////////////////////////
- pThis->m_FirstRun = TRUE;
- *pTest++ = *pSig++;
- }
- if (pThis->m_FirstRun)
- COptions__SetDefaults(&pThis->m_Options);
- pThis->m_bReset = FALSE;
- pThis->m_FadeStatus = FADE_NULL ;
- pThis->m_FadeFast = FALSE;
- CEngineApp__SetDebugMode(pThis, FALSE);
- pThis->m_pDLP = NULL;
- pThis->m_SloMo = FALSE;
- pThis->m_bPause = FALSE;
- pThis->m_hMusic = -1;
- pThis->m_MusicVolume = 0.0;
- pThis->m_SFXVolume = 0.0;
- CMtxF__RotateX(mfRot, -ANGLE_PI/2) ;
- CMtxF__Scale(mfFlipZ, 1, 1, -1);
- CMtxF__PostMult(mf_3dstudio_to_u64, mfRot, mfFlipZ);
- /////////////////////////////////////////////////////////////////////////////
- //int i;
- // Initialize video
- /////////////////////////////////////////////////////////////////////////////
- osViBlack(TRUE); // set display to black
- // start PI Mgr for access to cartridge
- /////////////////////////////////////////////////////////////////////////////
- osCreatePiManager((OSPri)OS_PRIORITY_PIMGR, &PiMessageQ, PiMessages,
- /////////////////////////////////////////////////////////////////////////////
- // queue. The background processing thread would call osYieldThread()
- // between critical sections.
- while (TRUE);
- }
- void CEngineApp__SetupSegments(CEngineApp *pThis)
- {
- gSPSegment(pThis->m_pDLP++, 0, 0x0);
- }
- void CEngineApp__GetFogColor(CEngineApp *pThis, BYTE *pR, BYTE *pG, BYTE *pB)
- {
- // mask off bottom 3 bits so background and fog will be the same color
- *pR = pThis->m_FogColor[0] & 0xf8;
- *pG = pThis->m_FogColor[1] & 0xf8;
- *pB = pThis->m_FogColor[2] & 0xf8;
- }
- void CEngineApp__ClearBuffers(CEngineApp *pThis)
- {
- BYTE r, g, b;
- CCamera *pCamera = &pThis->m_Camera ;
- // must clear buffers in G_RM_OPA_SURF render mode
- CGeometry__SetRenderMode(&pThis->m_pDLP, G_RM_NOOP__G_RM_NOOP2);
- /////////////////////////////////////////////////////////////////////////////
- void CEngineApp__BuildDispList(CEngineApp *pThis)
- {
- CCamera *pCamera = &pThis->m_Camera ;
- // clears current render and combine modes
- CGeometry__ResetDrawModes() ;
- CEngineApp__InitDisplayLists(pThis);
- CEngineApp__ClearBuffers(pThis);
- switch (pThis->m_Mode)
- {
- case MODE_LEGALSCREEN:
- CEngineApp__DrawLEGALSCREEN(pThis);
- break ;
- case MODE_GAMEPAK:
- CEngineApp__DrawGAMEPAK(pThis);
- break ;
- case MODE_TITLE:
- CEngineApp__DrawTITLE(pThis);
- break ;
- case MODE_INTRO:
- case MODE_GAME:
- case MODE_GAMEOVER:
- CEngineApp__DrawGAME(pThis);
- break ;
- case MODE_CREDITS:
- CEngineApp__DrawCREDITS(pThis);
- break ;
- case MODE_GALLERY:
- CEngineApp__DrawGAME(pThis);
- CEngineApp__DrawGALLERY(pThis);
- break ;
- /////////////////////////////////////////////////////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment