Examining FitzQuake vs. FitzQuake SDL Windows

Discuss programming topics for the various GPL'd game engine sources.
Post Reply
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Examining FitzQuake vs. FitzQuake SDL Windows

Post by Baker »

I'm going make a project file that can compile FitzQuake Win32 or FitzQuake SDL Win 32 (or the other 32-bit OS builds, like OS X or Linux) with the idea of uniting the 2 separate projects into a single one.

Largely because I think it is unnecessary to compile a FitzQuake SDL for Windows, but I also think you still want to have that build available.

System Differences - Itemized

1. SDL FitzQuake doesn't handle application the focus the same (window activation/deactivation). Maybe Quakespasm is more similar. FitzQuake SDL has IN_Activate and IN_Deactivate in several different places. GLQuake would check at the end of each frame and I believe it checks a Windows message to detect when it receives or loses focus, all of that stuff is in gl_vidnt.c

2. vid.h - Window state has been moved here and made part of viddef_t

3. console.c --- see #1

4. quakedef.h -- just includes

Code: Select all

#include "platform.h"

#include "SDL/include/SDL.h"
#include "SDL/include/SDL_opengl.h"
5. net_dgrm.c --- The SDL build doesn't like #define BAN_TEST. Neither does the PSP. At the moment, I can't quite remember what #define BAN_TEST enables in the network code. Likely related to the SDL_Net Library. FitzQuake SDL isn't using native networking code, I think Quakespasm changed to using native networking code.

6. glquake.h --- Gah!
Include differences, of course:

FitzQuake Win32

Code: Select all

#pragma warning(disable : 4244)     // MIPS
#pragma warning(disable : 4136)     // X86
#pragma warning(disable : 4051)     // ALPHA

#ifdef _WIN32
#include <windows.h>
#endif

#include <GL/gl.h>
#include <GL/glu.h>
FitzQuake Win32

Code: Select all

#ifdef _WIN32
extern	PROC glArrayElementEXT;
extern	PROC glColorPointerEXT;
extern	PROC glTexturePointerEXT;
extern	PROC glVertexPointerEXT;
#endif
FitzQuake SDL comments this out

Code: Select all

//#define APIENTRY /* */

//johnfitz -- modified multitexture support
/*
typedef void (APIENTRY *SELECTTEXFUNC) (GLenum);
typedef void (APIENTRY *MTEXCOORDFUNC) (GLenum, GLfloat, GLfloat);
extern MTEXCOORDFUNC GL_MTexCoord2fFunc;
extern SELECTTEXFUNC GL_SelectTextureFunc;
#define	GL_TEXTURE0_ARB	0x84C0
#define	GL_TEXTURE1_ARB	0x84C1
*/
//johnfitz
Adds this ...

Code: Select all

extern PFNGLMULTITEXCOORD2FARBPROC  GL_MTexCoord2fFunc;
extern PFNGLACTIVETEXTUREARBPROC    GL_SelectTextureFunc;
7. hosts.c -- Input initialization and key event differences
_Host_Frame (FitzQuake SDL)

Code: Select all

// get new key events
	//Sys_SendKeyEvents (); not needed for SDL
And the location of IN_INIT is moved.
8. snd_dma.c and snd_mix.c -- many changes.

9. keys.c --- SDL version removes the Windows clipboard code and adds in some keymaps

10. host_cmd.c --- change from Windows proprietary directory searching to using dirent.h

11. menu.c - the inclusion of "winquake.h" obviously is no more in the SDL version.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
Post Reply