diff --git a/polymer/eduke32/build/include/build.h b/polymer/eduke32/build/include/build.h index 066176900..969b2c477 100644 --- a/polymer/eduke32/build/include/build.h +++ b/polymer/eduke32/build/include/build.h @@ -701,6 +701,10 @@ void hash_add(hashtable_t *t, const char *s, int32_t key); #ifdef POLYMER # include "polymer.h" +#else +#ifdef POLYMOST +# include "polymost.h" +#endif #endif #ifdef __cplusplus diff --git a/polymer/eduke32/build/include/compat.h b/polymer/eduke32/build/include/compat.h index 9e767ab16..9122fd6e7 100644 --- a/polymer/eduke32/build/include/compat.h +++ b/polymer/eduke32/build/include/compat.h @@ -65,6 +65,7 @@ # endif #else # include +# include #endif #ifdef __compat_h_macrodef__ diff --git a/polymer/eduke32/build/include/polymer.h b/polymer/eduke32/build/include/polymer.h index 21259e887..e489aea33 100644 --- a/polymer/eduke32/build/include/polymer.h +++ b/polymer/eduke32/build/include/polymer.h @@ -157,44 +157,7 @@ typedef struct s_prprogrambit { char* frag_prog; } _prprogrambit; -// LIGHTS -#define PR_MAXLIGHTS 1024 -#define SHADOW_DEPTH_OFFSET 30 -#define PR_MAXLIGHTPRIORITY 6 - -typedef struct s_prplanelist { - struct s_prplane* plane; - struct s_prplanelist* n; -} _prplanelist; - -#pragma pack(push,1) -typedef struct s_prlight { - int32_t x, y, z, horiz, range; - int16_t angle, faderadius, radius, sector; - uint8_t color[3], priority; - int8_t minshade, maxshade; - int16_t tilenum; - // internal members - GLfloat proj[16]; - GLfloat transform[16]; - float frustum[5 * 4]; - int32_t rtindex; - struct { - int32_t active : 1; - int32_t invalidate : 1; - int32_t isinview : 1; - } flags; - GLuint lightmap; - _prplanelist* planelist; - int32_t planecount; -} _prlight; - -extern _prlight prlights[PR_MAXLIGHTS]; -extern int32_t lightcount; - -extern _prlight gamelights[PR_MAXLIGHTS]; -extern int32_t gamelightcount; -#pragma pack(pop) +#include "prlights.h" // RENDER TARGETS typedef struct s_prrt { diff --git a/polymer/eduke32/build/include/prlights.h b/polymer/eduke32/build/include/prlights.h new file mode 100644 index 000000000..56fc75bfe --- /dev/null +++ b/polymer/eduke32/build/include/prlights.h @@ -0,0 +1,40 @@ +// LIGHTS +#ifndef _prlight_h_ +# define _prlight_h_ + +#define PR_MAXLIGHTS 1024 +#define SHADOW_DEPTH_OFFSET 30 +#define PR_MAXLIGHTPRIORITY 6 + +typedef struct s_prplanelist { + struct s_prplane* plane; + struct s_prplanelist* n; +} _prplanelist; + +#pragma pack(push,1) +typedef struct s_prlight { + int32_t x, y, z, horiz, range; + int16_t angle, faderadius, radius, sector; + uint8_t color[3], priority; + int8_t minshade, maxshade; + int16_t tilenum; + // internal members + float proj[16]; + float transform[16]; + float frustum[5 * 4]; + int32_t rtindex; + struct { + int32_t active : 1; + int32_t invalidate : 1; + int32_t isinview : 1; + } flags; + uint32_t lightmap; + _prplanelist* planelist; + int32_t planecount; +} _prlight; + +extern _prlight prlights[PR_MAXLIGHTS]; +extern int32_t lightcount; +#pragma pack(pop) + +#endif \ No newline at end of file diff --git a/polymer/eduke32/build/src/polymer.c b/polymer/eduke32/build/src/polymer.c index 2563d39f5..cf2476008 100644 --- a/polymer/eduke32/build/src/polymer.c +++ b/polymer/eduke32/build/src/polymer.c @@ -140,9 +140,6 @@ GLfloat artskydata[16]; _prlight prlights[PR_MAXLIGHTS]; int32_t lightcount; int32_t curlight; - -_prlight gamelights[PR_MAXLIGHTS]; -int32_t gamelightcount; #pragma pack(pop) static GLfloat shadowBias[] = diff --git a/polymer/eduke32/build/src/startgtk.editor.c b/polymer/eduke32/build/src/startgtk.editor.c index cc4a05af0..f621f9269 100644 --- a/polymer/eduke32/build/src/startgtk.editor.c +++ b/polymer/eduke32/build/src/startgtk.editor.c @@ -7,6 +7,7 @@ #include "build.h" #include "editor.h" +#include "baselayer.h" enum { TAB_CONFIG, diff --git a/polymer/eduke32/source/actors.c b/polymer/eduke32/source/actors.c index 0c0830209..d66faad6f 100644 --- a/polymer/eduke32/source/actors.c +++ b/polymer/eduke32/source/actors.c @@ -3732,6 +3732,7 @@ ACTOR_STATIC void G_MoveActors(void) s->z = sector[sect].ceilingz+(32<<8); #ifdef POLYMER +/* gamelights[gamelightcount&(PR_MAXLIGHTS-1)].sector = s->sectnum; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].x = s->x; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].y = s->y; @@ -3751,6 +3752,7 @@ ACTOR_STATIC void G_MoveActors(void) if (gamelightcount < PR_MAXLIGHTS) gamelightcount++; +*/ #endif // POLYMER if (!g_netServer && ud.multimode < 2) diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index b19008709..2098557ba 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -109,7 +109,7 @@ static struct strllist static const char *Typestr[] = { "Wall", "Ceiling", "Floor", "Sprite", "Wall" }; static const char *typestr[] = { "wall", "ceiling", "floor", "sprite", "wall" }; static const char *Typestr_wss[] = { "Wall", "Sector", "Sector", "Sprite", "Wall" }; -static const char *typestr_wss[] = { "wall", "sector", "sector", "sprite", "wall" }; +/*static const char *typestr_wss[] = { "wall", "sector", "sector", "sprite", "wall" };*/ //#define AIMED_obj (typestr[searchstat]) diff --git a/polymer/eduke32/source/config.c b/polymer/eduke32/source/config.c index f8e6a50d4..628f1cb13 100644 --- a/polymer/eduke32/source/config.c +++ b/polymer/eduke32/source/config.c @@ -712,9 +712,11 @@ int32_t CONFIG_ReadSetup(void) SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "ScreenBPP", &ud.config.ScreenBPP); if (ud.config.ScreenBPP < 8) ud.config.ScreenBPP = 32; +#ifdef POLYMER SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "Polymer", &dummy); if (dummy > 0 && ud.config.ScreenBPP >= 16) glrendmode = 4; else glrendmode = 3; +#endif /* @@ -857,7 +859,9 @@ void CONFIG_WriteSetup(void) SCRIPT_PutNumber(ud.config.scripthandle, "Setup", "ForceSetup",ud.config.ForceSetup,FALSE,FALSE); SCRIPT_PutNumber(ud.config.scripthandle, "Setup", "NoAutoLoad",ud.config.NoAutoLoad,FALSE,FALSE); +#ifdef POLYMER SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "Polymer",glrendmode == 4 && bpp > 8,FALSE,FALSE); +#endif if (!NAM) { diff --git a/polymer/eduke32/source/duke3d.h b/polymer/eduke32/source/duke3d.h index 51056996d..d0d937158 100644 --- a/polymer/eduke32/source/duke3d.h +++ b/polymer/eduke32/source/duke3d.h @@ -33,6 +33,10 @@ extern "C" { #include "build.h" #ifdef POLYMER # include "polymer.h" +#else +#ifdef POLYMOST +# include "polymost.h" +#endif #endif #include "cache1d.h" #include "pragmas.h" diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index c8078fef4..e2ca87917 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -12699,11 +12699,6 @@ GAME_STATIC int32_t G_DoMoveThings(void) everyothertime++; if (g_earthquakeTime > 0) g_earthquakeTime--; -#ifdef POLYMER - if (ud.pause_on == 0) - gamelightcount = 0; -#endif - if (ud.pause_on == 0) { g_globalRandom = krand(); diff --git a/polymer/eduke32/source/gamevars.c b/polymer/eduke32/source/gamevars.c index 39353f943..cb2684678 100644 --- a/polymer/eduke32/source/gamevars.c +++ b/polymer/eduke32/source/gamevars.c @@ -1531,6 +1531,8 @@ static void Gv_AddSystemVars(void) Gv_NewVar("lastsavepos",(intptr_t)&g_lastSaveSlot, GAMEVAR_SYSTEM | GAMEVAR_INTPTR | GAMEVAR_SYNCCHECK); #ifdef POLYMOST Gv_NewVar("rendmode",(intptr_t)&rendmode, GAMEVAR_READONLY | GAMEVAR_INTPTR | GAMEVAR_SYSTEM | GAMEVAR_SYNCCHECK); +#else + Gv_NewVar("rendmode", 0, GAMEVAR_READONLY | GAMEVAR_SYSTEM | GAMEVAR_SYNCCHECK); #endif } diff --git a/polymer/eduke32/source/jaudiolib/third-party/mingw32/include/ogg/config_types.h b/polymer/eduke32/source/jaudiolib/third-party/mingw32/include/ogg/config_types.h index a320fc854..327ef0b33 100644 --- a/polymer/eduke32/source/jaudiolib/third-party/mingw32/include/ogg/config_types.h +++ b/polymer/eduke32/source/jaudiolib/third-party/mingw32/include/ogg/config_types.h @@ -1,11 +1,11 @@ -#ifndef __CONFIG_TYPES_H__ -#define __CONFIG_TYPES_H__ - -/* these are filled in by configure */ -typedef short ogg_int16_t; -typedef unsigned short ogg_uint16_t; -typedef int ogg_int32_t; -typedef unsigned int ogg_uint32_t; -typedef long long ogg_int64_t; - -#endif +#ifndef __CONFIG_TYPES_H__ +#define __CONFIG_TYPES_H__ + +/* these are filled in by configure */ +typedef short ogg_int16_t; +typedef unsigned short ogg_uint16_t; +typedef int ogg_int32_t; +typedef unsigned int ogg_uint32_t; +typedef long long ogg_int64_t; + +#endif diff --git a/polymer/eduke32/source/jaudiolib/third-party/mingw32/include/ogg/os_types.h b/polymer/eduke32/source/jaudiolib/third-party/mingw32/include/ogg/os_types.h index a42f8007e..f6f8b3818 100644 --- a/polymer/eduke32/source/jaudiolib/third-party/mingw32/include/ogg/os_types.h +++ b/polymer/eduke32/source/jaudiolib/third-party/mingw32/include/ogg/os_types.h @@ -11,7 +11,7 @@ ******************************************************************** function: #ifdef jail to whip a few platforms into the UNIX ideal. - last mod: $Id: os_types.h 14997 2008-06-04 03:27:18Z ivo $ + last mod: $Id: os_types.h 16649 2009-10-25 00:49:58Z ds $ ********************************************************************/ #ifndef _OS_TYPES_H @@ -129,6 +129,15 @@ typedef unsigned int ogg_uint32_t; typedef long long int ogg_int64_t; +#elif defined(__TMS320C6X__) + + /* TI C64x compiler */ + typedef signed short ogg_int16_t; + typedef unsigned short ogg_uint16_t; + typedef signed int ogg_int32_t; + typedef unsigned int ogg_uint32_t; + typedef long long int ogg_int64_t; + #else # include diff --git a/polymer/eduke32/source/jaudiolib/third-party/mingw32/include/vorbis/codec.h b/polymer/eduke32/source/jaudiolib/third-party/mingw32/include/vorbis/codec.h index 259798c61..999aa3351 100644 --- a/polymer/eduke32/source/jaudiolib/third-party/mingw32/include/vorbis/codec.h +++ b/polymer/eduke32/source/jaudiolib/third-party/mingw32/include/vorbis/codec.h @@ -11,7 +11,7 @@ ******************************************************************** function: libvorbis codec headers - last mod: $Id: codec.h 16037 2009-05-26 21:10:58Z xiphmont $ + last mod: $Id: codec.h 17021 2010-03-24 09:29:41Z xiphmont $ ********************************************************************/ @@ -121,7 +121,7 @@ typedef struct vorbis_block{ /* vorbis_block is a single block of data to be processed as part of the analysis/synthesis stream; it belongs to a specific logical -bitstream, but is independant from other vorbis_blocks belonging to +bitstream, but is independent from other vorbis_blocks belonging to that logical bitstream. *************************************************/ struct alloc_chain{ diff --git a/polymer/eduke32/source/jaudiolib/third-party/mingw32/include/vorbis/vorbisfile.h b/polymer/eduke32/source/jaudiolib/third-party/mingw32/include/vorbis/vorbisfile.h index ef2a36d3e..a865cd097 100644 --- a/polymer/eduke32/source/jaudiolib/third-party/mingw32/include/vorbis/vorbisfile.h +++ b/polymer/eduke32/source/jaudiolib/third-party/mingw32/include/vorbis/vorbisfile.h @@ -11,7 +11,7 @@ ******************************************************************** function: stdio-based convenience library for opening/seeking/decoding - last mod: $Id: vorbisfile.h 16243 2009-07-10 02:49:31Z xiphmont $ + last mod: $Id: vorbisfile.h 17021 2010-03-24 09:29:41Z xiphmont $ ********************************************************************/ @@ -47,7 +47,7 @@ typedef struct { /* a few sets of convenient callbacks, especially for use under * Windows where ov_open_callbacks() should always be used instead of - * ov_open() to avoid problems with incompatable crt.o version linking + * ov_open() to avoid problems with incompatible crt.o version linking * issues. */ static int _ov_header_fseek_wrap(FILE *f,ogg_int64_t off,int whence){ @@ -122,7 +122,7 @@ typedef struct OggVorbis_File { ogg_int64_t *dataoffsets; long *serialnos; ogg_int64_t *pcmlengths; /* overloaded to maintain binary - compatability; x2 size, stores both + compatibility; x2 size, stores both beginning and end values */ vorbis_info *vi; vorbis_comment *vc; diff --git a/polymer/eduke32/source/jaudiolib/third-party/mingw32/lib/libogg.a b/polymer/eduke32/source/jaudiolib/third-party/mingw32/lib/libogg.a index f1050ac50..b994dd5ed 100644 Binary files a/polymer/eduke32/source/jaudiolib/third-party/mingw32/lib/libogg.a and b/polymer/eduke32/source/jaudiolib/third-party/mingw32/lib/libogg.a differ diff --git a/polymer/eduke32/source/jaudiolib/third-party/mingw32/lib/libvorbis.a b/polymer/eduke32/source/jaudiolib/third-party/mingw32/lib/libvorbis.a index f38f93d28..4c61eaba8 100644 Binary files a/polymer/eduke32/source/jaudiolib/third-party/mingw32/lib/libvorbis.a and b/polymer/eduke32/source/jaudiolib/third-party/mingw32/lib/libvorbis.a differ diff --git a/polymer/eduke32/source/jaudiolib/third-party/mingw32/lib/libvorbisfile.a b/polymer/eduke32/source/jaudiolib/third-party/mingw32/lib/libvorbisfile.a index 9dceee241..d56934509 100644 Binary files a/polymer/eduke32/source/jaudiolib/third-party/mingw32/lib/libvorbisfile.a and b/polymer/eduke32/source/jaudiolib/third-party/mingw32/lib/libvorbisfile.a differ diff --git a/polymer/eduke32/source/premap.c b/polymer/eduke32/source/premap.c index b89889692..631579683 100644 --- a/polymer/eduke32/source/premap.c +++ b/polymer/eduke32/source/premap.c @@ -498,7 +498,7 @@ void G_CacheMapData(void) polymost_precache(i,DETAILPAL,type); if (r_glowmapping && !KB_KeyPressed(sc_Space)) polymost_precache(i,GLOWPAL,type); - +#ifdef POLYMER if (rendmode==4) { if (pr_specularmapping && !KB_KeyPressed(sc_Space)) @@ -506,6 +506,7 @@ void G_CacheMapData(void) if (pr_normalmapping && !KB_KeyPressed(sc_Space)) polymost_precache(i,NORMALPAL,type); } +#endif } } #endif diff --git a/polymer/eduke32/source/savegame.c b/polymer/eduke32/source/savegame.c index b3e469eb0..a01a2ded4 100644 --- a/polymer/eduke32/source/savegame.c +++ b/polymer/eduke32/source/savegame.c @@ -21,6 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. //------------------------------------------------------------------------- #include "duke3d.h" +#include "prlights.h" extern char *bitptr; diff --git a/polymer/eduke32/source/startgtk.game.c b/polymer/eduke32/source/startgtk.game.c index df17986a8..4ecf60faf 100644 --- a/polymer/eduke32/source/startgtk.game.c +++ b/polymer/eduke32/source/startgtk.game.c @@ -70,7 +70,9 @@ static struct GtkWidget *vmode3dlabel; GtkWidget *vmode3dcombo; GtkWidget *fullscreencheck; +#ifdef POLYMER GtkWidget *polymercheck; +#endif GtkWidget *inputdevlabel; GtkWidget *inputdevcombo; GtkWidget *custommodlabel; @@ -103,7 +105,9 @@ static struct static struct { int32_t fullscreen; +#ifdef POLYMER int32_t polymer; +#endif int32_t xdim3d, ydim3d, bpp3d; int32_t forcesetup; int32_t autoload; @@ -142,6 +146,7 @@ static void on_fullscreencheck_toggled(GtkToggleButton *togglebutton, gpointer u PopulateForm(POPULATE_VIDEO); } +#ifdef POLYMER static void on_polymercheck_toggled(GtkToggleButton *togglebutton, gpointer user_data) { UNREFERENCED_PARAMETER(user_data); @@ -161,6 +166,7 @@ static void on_polymercheck_toggled(GtkToggleButton *togglebutton, gpointer user settings.polymer = FALSE; } } +#endif static void on_inputdevcombo_changed(GtkComboBox *combobox, gpointer user_data) { @@ -420,7 +426,9 @@ static void PopulateForm(unsigned char pgs) // populate check buttons gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(stwidgets.fullscreencheck), settings.fullscreen); +#ifdef POLYMER gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(stwidgets.polymercheck), settings.polymer); +#endif gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(stwidgets.autoloadcheck), settings.autoload); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(stwidgets.alwaysshowcheck), settings.forcesetup); } @@ -532,9 +540,11 @@ static GtkWidget *create_window(void) stwidgets.fullscreencheck = gtk_check_button_new_with_mnemonic("_Fullscreen"); gtk_box_pack_start(GTK_BOX(stwidgets.displayvlayout), stwidgets.fullscreencheck, FALSE, FALSE, 0); +#ifdef POLYMER // Polymer checkbox stwidgets.polymercheck = gtk_check_button_new_with_mnemonic("_Polymer"); gtk_box_pack_start(GTK_BOX(stwidgets.displayvlayout), stwidgets.polymercheck, FALSE, FALSE, 0); +#endif // Input devices LabelText stwidgets.inputdevlabel = gtk_label_new_with_mnemonic("_Input devices:"); @@ -556,7 +566,7 @@ static GtkWidget *create_window(void) gtk_table_attach(GTK_TABLE(stwidgets.configtlayout), stwidgets.inputdevcombo, 1,2, 1,2, GTK_EXPAND | GTK_FILL, 0, 4, 0); // Custom mod LabelText - stwidgets.custommodlabel = gtk_label_new_with_mnemonic("Custom _Mod:"); + stwidgets.custommodlabel = gtk_label_new_with_mnemonic("Custom _game:"); gtk_misc_set_alignment(GTK_MISC(stwidgets.custommodlabel), 0.3, 0); gtk_table_attach(GTK_TABLE(stwidgets.configtlayout), stwidgets.custommodlabel, 0,1, 2,3, GTK_FILL, 0, 4, 7); @@ -596,7 +606,7 @@ static GtkWidget *create_window(void) gtk_container_set_border_width(GTK_CONTAINER(stwidgets.gamevlayout), 4); // Game data field LabelText - stwidgets.gamelabel = gtk_label_new_with_mnemonic("_Game or addon:"); + stwidgets.gamelabel = gtk_label_new_with_mnemonic("_Game:"); gtk_box_pack_start(GTK_BOX(stwidgets.gamevlayout), stwidgets.gamelabel, FALSE, FALSE, 0); gtk_misc_set_alignment(GTK_MISC(stwidgets.gamelabel), 0, 0.5); @@ -703,9 +713,11 @@ static GtkWidget *create_window(void) g_signal_connect((gpointer) stwidgets.fullscreencheck, "toggled", G_CALLBACK(on_fullscreencheck_toggled), NULL); +#ifdef POLYMER g_signal_connect((gpointer) stwidgets.polymercheck, "toggled", G_CALLBACK(on_polymercheck_toggled), NULL); +#endif g_signal_connect((gpointer) stwidgets.inputdevcombo, "changed", G_CALLBACK(on_inputdevcombo_changed), NULL); @@ -858,11 +870,13 @@ int32_t startwin_run(void) Bstrncpy(settings.selectedgrp, g_grpNamePtr, BMAX_PATH); if (ud.config.NoAutoLoad) settings.autoload = FALSE; else settings.autoload = TRUE; +#ifdef POLYMER if (glrendmode == RDR_POLYMER) { if (settings.bpp3d == 8) settings.bpp3d = 32; settings.polymer = TRUE; } +#endif PopulateForm(ALL); gtk_main();