123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190 |
- #include "Precompiled.h"
- #include "globaldata.h"
- #include <stdlib.h>
- #include <stdio.h>
- #include <string.h>
- #include <stdarg.h>
- #include "doomdef.h"
- #include "m_misc.h"
- #include "i_video.h"
- #include "i_sound.h"
- #include "d_net.h"
- #include "g_game.h"
- #ifdef __GNUG__
- #pragma implementation "i_system.h"
- #endif
- #include "i_system.h"
- #include "Main.h"
- #if 1
- ticcmd_t* I_BaseTiccmd(void)
- {
- return &::g->emptycmd;
- }
- int I_GetHeapSize (void)
- {
- return ::g->mb_used*1024*1024;
- }
- int I_GetTime (void)
- {
- return ::g->current_time;
- }
- void I_SetTime( int time_in )
- {
- ::g->current_time = time_in;
- }
- void I_Init (void)
- {
- I_InitSound();
-
- }
- void I_Quit (void)
- {
- D_QuitNetGame ();
- I_ShutdownSound();
- I_ShutdownMusic();
- M_SaveDefaults ();
- I_ShutdownGraphics();
- }
- void I_WaitVBL(int count)
- {
-
-
- }
- void I_BeginRead(void)
- {
- }
- void I_EndRead(void)
- {
- }
- extern bool debugOutput;
- void I_Printf(char* msg, ...)
- {
- char pmsg[1024];
- va_list argptr;
-
- if( debugOutput ) {
- va_start (argptr,msg);
- vsprintf (pmsg, msg, argptr);
- safeOutputDebug(pmsg);
- va_end (argptr);
- }
- }
- void I_PrintfE(char* msg, ...)
- {
- char pmsg[1024];
- va_list argptr;
-
- if( debugOutput ) {
- va_start (argptr,msg);
- vsprintf (pmsg, msg, argptr);
- safeOutputDebug("ERROR: ");
- safeOutputDebug(pmsg);
- va_end (argptr);
- }
- }
- void I_Error(char *error, ...)
- {
- const int ERROR_MSG_SIZE = 1024;
- char error_msg[ERROR_MSG_SIZE];
- va_list argptr;
-
- if( debugOutput ) {
- va_start (argptr,error);
- idStr::vsnPrintf (error_msg, ERROR_MSG_SIZE, error, argptr);
- safeOutputDebug("Error: ");
- safeOutputDebug(error_msg);
- safeOutputDebug("\n");
- va_end (argptr);
- }
-
-
- DoomLib::Interface.QuitCurrentGame();
- idLib::Printf( "DOOM Classic error: %s", error_msg );
- common->SwitchToGame( DOOM3_BFG );
- }
- #endif
|