From 25ac5770c0e3a15c58c5d52ac3b28650db4c58a7 Mon Sep 17 00:00:00 2001 From: terminx Date: Sun, 24 Feb 2008 00:46:57 +0000 Subject: [PATCH] git-svn-id: https://svn.eduke32.com/eduke32@627 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/build/include/baselayer.h | 4 ++++ polymer/build/src/baselayer.c | 13 +++++++------ polymer/build/src/build.c | 2 +- polymer/build/src/cache1d.c | 2 +- polymer/build/src/glbuild.c | 2 +- polymer/build/src/hightile.c | 2 +- polymer/build/src/osd.c | 4 ++-- polymer/build/src/polymost.c | 2 +- polymer/build/src/sdlayer.c | 14 ++++++++++---- polymer/build/src/sound.c | 2 +- polymer/build/src/winlayer.c | 28 +++++++++++++++++----------- polymer/eduke32/source/astub.c | 2 +- polymer/eduke32/source/game.c | 8 ++++---- polymer/eduke32/source/gamevars.c | 5 +---- polymer/eduke32/source/osdcmds.c | 4 ++-- 15 files changed, 54 insertions(+), 40 deletions(-) diff --git a/polymer/build/include/baselayer.h b/polymer/build/include/baselayer.h index 2564ae04b..2ef1e9e25 100644 --- a/polymer/build/include/baselayer.h +++ b/polymer/build/include/baselayer.h @@ -31,6 +31,9 @@ extern char offscreenrendering; extern void (*baselayer_onvideomodechange)(int); #ifdef USE_OPENGL +#include "osd.h" +extern int osdcmd_glinfo(const osdfuncparm_t *parm); + struct glinfo { const char *vendor; const char *renderer; @@ -52,6 +55,7 @@ struct glinfo { char multitex; char envcombine; char vbos; + char dumped; }; extern struct glinfo glinfo; #endif diff --git a/polymer/build/src/baselayer.c b/polymer/build/src/baselayer.c index 703b89a52..102727946 100644 --- a/polymer/build/src/baselayer.c +++ b/polymer/build/src/baselayer.c @@ -30,6 +30,7 @@ struct glinfo glinfo = 0, // multitexturing 0, // env_combine 0, // Vertex Buffer Objects + 0, // GL info dumped }; #endif @@ -79,17 +80,17 @@ static int osdcmd_hicsetpalettetint(const osdfuncparm_t *parm) } #endif -static int osdcmd_glinfo(const osdfuncparm_t *parm) +int osdcmd_glinfo(const osdfuncparm_t *parm) { char *s,*t,*u,i; if (bpp == 8) { - OSD_Printf("glinfo: Not in OpenGL mode.\n"); + initprintf("glinfo: Not in OpenGL mode.\n"); return OSDCMD_OK; } - OSD_Printf("OpenGL Information:\n" + initprintf("OpenGL Information:\n" " Version: %s\n" " Vendor: %s\n" " Renderer: %s\n" @@ -130,7 +131,7 @@ static int osdcmd_glinfo(const osdfuncparm_t *parm) ); s = Bstrdup(glinfo.extensions); - if (!s) OSD_Printf(glinfo.extensions); + if (!s) initprintf(glinfo.extensions); else { i = 0; t = u = s; @@ -141,14 +142,14 @@ static int osdcmd_glinfo(const osdfuncparm_t *parm) if (i&1) { *t = 0; - OSD_Printf(" %s\n",u); + initprintf(" %s\n",u); u = t+1; } i++; } t++; } - if (i&1) OSD_Printf(" %s\n",u); + if (i&1) initprintf(" %s\n",u); Bfree(s); } diff --git a/polymer/build/src/build.c b/polymer/build/src/build.c index 0ed78672b..ae26b4d8c 100644 --- a/polymer/build/src/build.c +++ b/polymer/build/src/build.c @@ -276,7 +276,7 @@ int app_main(int argc, const char **argv) pathsearchmode = 1; // unrestrict findfrompath so that full access to the filesystem can be had #ifdef USE_OPENGL - OSD_RegisterFunction("restartvid","restartvid: reinitialise the video mode",osdcmd_restartvid); + OSD_RegisterFunction("restartvid","restartvid: reinitialize the video mode",osdcmd_restartvid); OSD_RegisterFunction("vidmode","vidmode [xdim ydim] [bpp] [fullscreen]: immediately change the video mode",osdcmd_vidmode); #endif diff --git a/polymer/build/src/cache1d.c b/polymer/build/src/cache1d.c index 3ad81f598..bdb582dbc 100644 --- a/polymer/build/src/cache1d.c +++ b/polymer/build/src/cache1d.c @@ -104,7 +104,7 @@ void initcache(intptr_t dacachestart, int dacachesize) cac[0].lock = &zerochar; cacnum = 1; - initprintf("initcache(): Initialised with %d bytes\n", dacachesize); + initprintf("initcache(): Initialized with %d bytes\n", dacachesize); } void allocache(intptr_t *newhandle, int newbytes, char *newlockptr) diff --git a/polymer/build/src/glbuild.c b/polymer/build/src/glbuild.c index b8d3a5722..729cd4d82 100644 --- a/polymer/build/src/glbuild.c +++ b/polymer/build/src/glbuild.c @@ -1,4 +1,4 @@ -#include "compat.h" +#include "compat.h" #include "glbuild.h" #include "baselayer.h" #include diff --git a/polymer/build/src/hightile.c b/polymer/build/src/hightile.c index 0939402b8..fc140e0d8 100644 --- a/polymer/build/src/hightile.c +++ b/polymer/build/src/hightile.c @@ -63,7 +63,7 @@ static hicreplctyp * hicfindsubst(int picnum, int palnum, int skybox) // // hicinit() -// Initialise the high-colour stuff to default. +// Initialize the high-colour stuff to default. // void hicinit(void) { diff --git a/polymer/build/src/osd.c b/polymer/build/src/osd.c index 00daf0fdf..6975ec12c 100644 --- a/polymer/build/src/osd.c +++ b/polymer/build/src/osd.c @@ -59,7 +59,7 @@ static char osdvisible=0; // onscreen display visible? static char osdinput=0; // capture input? static int osdhead=0; // topmost visible line number static BFILE *osdlog=NULL; // log filehandle -static char osdinited=0; // text buffer initialised? +static char osdinited=0; // text buffer initialized? static int osdkey=0x29; // tilde shows the osd static int keytime=0; static int osdscrtime = 0; @@ -288,7 +288,7 @@ void OSD_Cleanup(void) // -// OSD_Init() -- Initialises the on-screen display +// OSD_Init() -- Initializes the on-screen display // void OSD_Init(void) { diff --git a/polymer/build/src/polymost.c b/polymer/build/src/polymost.c index 8359e7f02..acdddce20 100644 --- a/polymer/build/src/polymost.c +++ b/polymer/build/src/polymost.c @@ -688,7 +688,7 @@ void polymost_glreset() } } -// one-time initialisation of OpenGL for polymost +// one-time initialization of OpenGL for polymost void polymost_glinit() { GLfloat col[4]; diff --git a/polymer/build/src/sdlayer.c b/polymer/build/src/sdlayer.c index 9fb40a51e..7cd678b41 100644 --- a/polymer/build/src/sdlayer.c +++ b/polymer/build/src/sdlayer.c @@ -216,7 +216,7 @@ int initsystem(void) SDL_VERSION(&compiled); - initprintf("Initialising SDL system interface " + initprintf("Initializing SDL system interface " "(compiled with SDL version %d.%d.%d, DLL version %d.%d.%d)\n", linked->major, linked->minor, linked->patch, compiled.major, compiled.minor, compiled.patch); @@ -227,7 +227,7 @@ int initsystem(void) #endif )) { - initprintf("Initialisation failed! (%s)\n", SDL_GetError()); + initprintf("Initialization failed! (%s)\n", SDL_GetError()); return -1; } @@ -585,13 +585,13 @@ Uint32 timerticspersec=0; static void(*usertimercallback)(void) = NULL; // -// inittimer() -- initialise timer +// inittimer() -- initialize timer // int inittimer(int tickspersecond) { if (timerfreq) return 0; // already installed -// initprintf("Initialising timer\n"); +// initprintf("Initializing timer\n"); timerfreq = 1000; timerticspersec = tickspersecond; @@ -1110,6 +1110,12 @@ int setvideomode(int x, int y, int c, int fs) } } Bfree(p); + + if (!glinfo.dumped) + { + osdcmd_glinfo(NULL); + glinfo.dumped = 1; + } } #endif diff --git a/polymer/build/src/sound.c b/polymer/build/src/sound.c index a43fe2b9a..b8ac4b70b 100644 --- a/polymer/build/src/sound.c +++ b/polymer/build/src/sound.c @@ -74,7 +74,7 @@ void initsb(char dadigistat, char damusistat, int dasamplerate, char danumspeake musicstat = damusistat; - printOSD("Initialising FMOD...\n"); + printOSD("Initializing FMOD...\n"); printOSD(" Linked version: %.02f\n", FMOD_VERSION); printOSD(" DLL version: %.02f\n", FSOUND_GetVersion()); diff --git a/polymer/build/src/winlayer.c b/polymer/build/src/winlayer.c index 738a4095f..1933dc4fd 100644 --- a/polymer/build/src/winlayer.c +++ b/polymer/build/src/winlayer.c @@ -514,7 +514,7 @@ int initsystem(void) { DEVMODE desktopmode; - initprintf("Initialising Windows DirectX/GDI system interface\n"); + initprintf("Initializing Windows DirectX/GDI system interface\n"); // get the desktop dimensions before anything changes them ZeroMemory(&desktopmode, sizeof(DEVMODE)); @@ -548,7 +548,7 @@ int initsystem(void) // try and start DirectDraw if (InitDirectDraw()) - initprintf("DirectDraw initialisation failed. Fullscreen modes will be unavailable.\n"); + initprintf("DirectDraw initialization failed. Fullscreen modes will be unavailable.\n"); OSD_RegisterFunction("maxrefreshfreq", "maxrefreshfreq: maximum display frequency to set for OpenGL Polymost modes (0=no maximum)", set_maxrefreshfreq); OSD_RegisterFunction("r_windowpositioning", "r_windowpositioning: enable/disable window position memory", set_windowpos); @@ -807,7 +807,7 @@ int initmouse(void) { if (moustat) return 0; - initprintf("Initialising mouse\n"); + initprintf("Initializing mouse\n"); // grab input moustat=1; @@ -1135,7 +1135,7 @@ static BOOL InitDirectInput(void) if (bDInputInited) return FALSE; - initprintf("Initialising DirectInput...\n"); + initprintf("Initializing DirectInput...\n"); // load up the DirectInput DLL if (!hDInputDLL) @@ -1267,7 +1267,7 @@ static void UninitDirectInput(void) int devn; int i; - if (bDInputInited) initprintf("Uninitialising DirectInput...\n"); + if (bDInputInited) initprintf("Uninitializing DirectInput...\n"); AcquireInputDevices(0,-1); @@ -1798,7 +1798,7 @@ void (*installusertimercallback(void (*callback)(void)))(void) // -// inittimer() -- initialise timer +// inittimer() -- initialize timer // int inittimer(int tickspersecond) { @@ -1806,7 +1806,7 @@ int inittimer(int tickspersecond) if (timerfreq) return 0; // already installed -// initprintf("Initialising timer\n"); +// initprintf("Initializing timer\n"); // OpenWatcom seems to want us to query the value into a local variable // instead of the global 'timerfreq' or else it gets pissed with an @@ -2164,7 +2164,7 @@ void getvalidmodes(void) if (bDDrawInited) { - // if DirectDraw initialisation didn't fail enumerate fullscreen modes + // if DirectDraw initialization didn't fail enumerate fullscreen modes result = IDirectDraw_EnumDisplayModes(lpDD, 0, NULL, 0, getvalidmodes_enum); if (result != DD_OK) @@ -2663,7 +2663,7 @@ static BOOL InitDirectDraw(void) if (bDDrawInited) return FALSE; - initprintf("Initialising DirectDraw...\n"); + initprintf("Initializing DirectDraw...\n"); // load up the DirectDraw DLL if (!hDDrawDLL) @@ -2734,7 +2734,7 @@ static BOOL InitDirectDraw(void) // static void UninitDirectDraw(void) { - if (bDDrawInited) initprintf("Uninitialising DirectDraw...\n"); + if (bDDrawInited) initprintf("Uninitializing DirectDraw...\n"); ReleaseDirectDrawSurfaces(); @@ -3052,7 +3052,7 @@ static void ReleaseOpenGL(void) // -// UninitOpenGL() -- unitialises any openGL libraries +// UninitOpenGL() -- unitializes any openGL libraries // static void UninitOpenGL(void) { @@ -3248,6 +3248,12 @@ static int SetupOpenGL(int width, int height, int bitspp) } numpages = 2; // KJS 20031225: tell rotatesprite that it's double buffered! + if (!glinfo.dumped) + { + osdcmd_glinfo(NULL); + glinfo.dumped = TRUE; + } + return FALSE; } #endif diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index edd794d6a..7788caa15 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -5972,7 +5972,7 @@ int ExtInit(void) if (initengine()) { - initprintf("There was a problem initialising the engine.\n"); + initprintf("There was a problem initializing the engine.\n"); return -1; } diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index cffa3fc49..b0a4d2aa9 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -9611,8 +9611,8 @@ static void Startup(int argc, const char **argv) if (initengine()) { - wm_msgbox("Build Engine Initialisation Error", - "There was a problem initialising the Build engine: %s", engineerrstr); + wm_msgbox("Build Engine Initialization Error", + "There was a problem initializing the Build engine: %s", engineerrstr); freeconmem(); exit(1); } @@ -10122,8 +10122,8 @@ void app_main(int argc,const char **argv) if (preinitengine()) { - wm_msgbox("Build Engine Initialisation Error", - "There was a problem initialising the Build engine: %s", engineerrstr); + wm_msgbox("Build Engine Initialization Error", + "There was a problem initializing the Build engine: %s", engineerrstr); exit(1); } diff --git a/polymer/eduke32/source/gamevars.c b/polymer/eduke32/source/gamevars.c index 675c7e1cb..cf3e10324 100755 --- a/polymer/eduke32/source/gamevars.c +++ b/polymer/eduke32/source/gamevars.c @@ -566,7 +566,7 @@ int GetGameVar(const char *szGameLabel, int lDefault, int iActor, int iPlayer) return lDefault; } -static int *GetGameValuePtr(const char *szGameLabel) +static intptr_t *GetGameValuePtr(const char *szGameLabel) { int i; for (i=0;i: changes the mouse sensitivity", osdcmd_sensitivity); OSD_RegisterFunction("setvar","setvar : sets the value of a gamevar", osdcmd_setvar);