mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 03:00:38 +00:00
git-svn-id: https://svn.eduke32.com/eduke32@1203 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
94d1fc6bfe
commit
1cc73560f2
11 changed files with 62 additions and 16 deletions
|
@ -12,7 +12,8 @@ DXROOT=../sdk/dx
|
||||||
|
|
||||||
ALROOT = AL
|
ALROOT = AL
|
||||||
|
|
||||||
SDLCONFIG = /usr/local/bin/sdl-config
|
SDLCONFIG = sdl-config
|
||||||
|
# SDLCONFIG = /usr/local/bin/sdl-config
|
||||||
|
|
||||||
ifeq ($(wildcard $(SDLCONFIG)),$(SDLCONFIG))
|
ifeq ($(wildcard $(SDLCONFIG)),$(SDLCONFIG))
|
||||||
SDLROOT = /usr/local
|
SDLROOT = /usr/local
|
||||||
|
|
|
@ -3,7 +3,9 @@
|
||||||
ENGINELIB=libengine.a
|
ENGINELIB=libengine.a
|
||||||
EDITORLIB=libbuild.a
|
EDITORLIB=libbuild.a
|
||||||
|
|
||||||
SDLCONFIG = /usr/local/bin/sdl-config
|
# SDLCONFIG = /usr/local/bin/sdl-config
|
||||||
|
|
||||||
|
SDLCONFIG = sdl-config
|
||||||
|
|
||||||
ifeq ($(wildcard $(SDLCONFIG)),$(SDLCONFIG))
|
ifeq ($(wildcard $(SDLCONFIG)),$(SDLCONFIG))
|
||||||
SDLROOT = /usr/local
|
SDLROOT = /usr/local
|
||||||
|
|
|
@ -85,6 +85,7 @@ extern int qsetmode;
|
||||||
int initsystem(void);
|
int initsystem(void);
|
||||||
void uninitsystem(void);
|
void uninitsystem(void);
|
||||||
|
|
||||||
|
extern int flushlogwindow;
|
||||||
void initprintf(const char *, ...);
|
void initprintf(const char *, ...);
|
||||||
void debugprintf(const char *,...);
|
void debugprintf(const char *,...);
|
||||||
|
|
||||||
|
|
|
@ -60,6 +60,8 @@ char *strtolower(char *str, int len)
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int flushlogwindow = 0;
|
||||||
|
|
||||||
static void onvideomodechange(int newmode) { UNREFERENCED_PARAMETER(newmode); }
|
static void onvideomodechange(int newmode) { UNREFERENCED_PARAMETER(newmode); }
|
||||||
void (*baselayer_onvideomodechange)(int) = onvideomodechange;
|
void (*baselayer_onvideomodechange)(int) = onvideomodechange;
|
||||||
|
|
||||||
|
|
|
@ -333,20 +333,30 @@ void initprintf(const char *f, ...)
|
||||||
{
|
{
|
||||||
va_list va;
|
va_list va;
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
|
static char dabuf[1024];
|
||||||
va_start(va, f);
|
static int cnt = 0;
|
||||||
vprintf(f,va);
|
|
||||||
va_end(va);
|
|
||||||
|
|
||||||
va_start(va, f);
|
va_start(va, f);
|
||||||
Bvsnprintf(buf, 1024, f, va);
|
Bvsnprintf(buf, 1024, f, va);
|
||||||
va_end(va);
|
va_end(va);
|
||||||
|
|
||||||
OSD_Printf(buf);
|
OSD_Printf(buf);
|
||||||
|
|
||||||
startwin_puts(buf);
|
if (Bstrlen(dabuf) + Bstrlen(buf) > 1022)
|
||||||
startwin_idle(NULL);
|
{
|
||||||
}
|
startwin_puts(dabuf);
|
||||||
|
Bmemset(dabuf, 0, sizeof(dabuf));
|
||||||
|
}
|
||||||
|
|
||||||
|
Bstrcat(dabuf,buf);
|
||||||
|
|
||||||
|
if (++cnt < 16 || flushlogwindow || Bstrlen(dabuf) > 768)
|
||||||
|
{
|
||||||
|
startwin_puts(dabuf);
|
||||||
|
startwin_idle(NULL);
|
||||||
|
Bmemset(dabuf, 0, sizeof(dabuf));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// debugprintf() -- prints a debug string to stderr
|
// debugprintf() -- prints a debug string to stderr
|
||||||
|
|
|
@ -609,13 +609,29 @@ void initprintf(const char *f, ...)
|
||||||
{
|
{
|
||||||
va_list va;
|
va_list va;
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
|
static char dabuf[1024];
|
||||||
|
static int cnt = 0;
|
||||||
|
|
||||||
va_start(va, f);
|
va_start(va, f);
|
||||||
Bvsnprintf(buf, 1024, f, va);
|
Bvsnprintf(buf, 1024, f, va);
|
||||||
va_end(va);
|
va_end(va);
|
||||||
|
|
||||||
OSD_Printf(buf);
|
OSD_Printf(buf);
|
||||||
startwin_puts(buf);
|
|
||||||
|
if (Bstrlen(dabuf) + Bstrlen(buf) > 1022)
|
||||||
|
{
|
||||||
|
startwin_puts(dabuf);
|
||||||
|
Bmemset(dabuf, 0, sizeof(dabuf));
|
||||||
|
}
|
||||||
|
|
||||||
|
Bstrcat(dabuf,buf);
|
||||||
|
|
||||||
|
if (++cnt < 16 || flushlogwindow || Bstrlen(dabuf) > 768)
|
||||||
|
{
|
||||||
|
startwin_puts(dabuf);
|
||||||
handleevents();
|
handleevents();
|
||||||
|
Bmemset(dabuf, 0, sizeof(dabuf));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -10988,7 +10988,7 @@ void app_main(int argc,const char **argv)
|
||||||
G_GameExit(" ");
|
G_GameExit(" ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else initprintf("... no upgrade available\n");
|
else initprintf("... no updates available\n");
|
||||||
}
|
}
|
||||||
else initprintf("update: failed to check for updates\n");
|
else initprintf("update: failed to check for updates\n");
|
||||||
}
|
}
|
||||||
|
|
|
@ -156,7 +156,7 @@ const char *keyw[] =
|
||||||
"state", // 17 begins defining a state if used outside a state or actor, otherwise calls a state
|
"state", // 17 begins defining a state if used outside a state or actor, otherwise calls a state
|
||||||
"ends", // 18 ends defining a state
|
"ends", // 18 ends defining a state
|
||||||
"define", // 19 defines a value
|
"define", // 19 defines a value
|
||||||
"<null>", // 20 was previously used to define a comment
|
"return", // 20
|
||||||
"ifai", // 21 checks if actor is currently performing a specific ai function
|
"ifai", // 21 checks if actor is currently performing a specific ai function
|
||||||
"killit", // 22 kills an actor
|
"killit", // 22 kills an actor
|
||||||
"addweapon", // 23 adds a weapon to the closest player
|
"addweapon", // 23 adds a weapon to the closest player
|
||||||
|
@ -4581,7 +4581,6 @@ repeatcase:
|
||||||
g_scriptPtr++; */
|
g_scriptPtr++; */
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case CON_IFPINVENTORY:
|
|
||||||
case CON_IFRND:
|
case CON_IFRND:
|
||||||
if (!C_CheckEventSync(g_currentEvent))
|
if (!C_CheckEventSync(g_currentEvent))
|
||||||
{
|
{
|
||||||
|
@ -4609,6 +4608,7 @@ repeatcase:
|
||||||
case CON_IFACTION:
|
case CON_IFACTION:
|
||||||
case CON_IFMOVE:
|
case CON_IFMOVE:
|
||||||
case CON_IFP:
|
case CON_IFP:
|
||||||
|
case CON_IFPINVENTORY:
|
||||||
{
|
{
|
||||||
intptr_t offset;
|
intptr_t offset;
|
||||||
intptr_t lastScriptPtr = (g_scriptPtr-&script[0]-1);
|
intptr_t lastScriptPtr = (g_scriptPtr-&script[0]-1);
|
||||||
|
@ -5372,6 +5372,7 @@ repeatcase:
|
||||||
Bsprintf(g_szCurrentBlockName,"(none)");
|
Bsprintf(g_szCurrentBlockName,"(none)");
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
case CON_RETURN:
|
||||||
case CON_BREAK:
|
case CON_BREAK:
|
||||||
if (g_checkingSwitch)
|
if (g_checkingSwitch)
|
||||||
{
|
{
|
||||||
|
@ -5827,6 +5828,8 @@ void C_Compile(const char *filenam)
|
||||||
|
|
||||||
while (C_ParseCommand() == 0);
|
while (C_ParseCommand() == 0);
|
||||||
|
|
||||||
|
flushlogwindow = 1;
|
||||||
|
|
||||||
if (g_numCompilerErrors > 63)
|
if (g_numCompilerErrors > 63)
|
||||||
initprintf("fatal error: too many errors: Aborted\n");
|
initprintf("fatal error: too many errors: Aborted\n");
|
||||||
|
|
||||||
|
@ -5910,6 +5913,8 @@ void C_Compile(const char *filenam)
|
||||||
|
|
||||||
C_IncreaseScriptSize(g_scriptPtr-script+8);
|
C_IncreaseScriptSize(g_scriptPtr-script+8);
|
||||||
|
|
||||||
|
flushlogwindow = 0;
|
||||||
|
|
||||||
initprintf("Script compiled in %dms\n",getticks()-startcompiletime);
|
initprintf("Script compiled in %dms\n",getticks()-startcompiletime);
|
||||||
|
|
||||||
initprintf("Compiled code size: %ld*%d bytes, version %s\n",(unsigned)(g_scriptPtr-script),sizeof(intptr_t),(g_scriptVersion == 14?"1.4+":"1.3D"));
|
initprintf("Compiled code size: %ld*%d bytes, version %s\n",(unsigned)(g_scriptPtr-script),sizeof(intptr_t),(g_scriptVersion == 14?"1.4+":"1.3D"));
|
||||||
|
|
|
@ -553,7 +553,7 @@ enum ScriptKeywords_t
|
||||||
CON_STATE, // 17
|
CON_STATE, // 17
|
||||||
CON_ENDS, // 18
|
CON_ENDS, // 18
|
||||||
CON_DEFINE, // 19
|
CON_DEFINE, // 19
|
||||||
CON_COMMENT, // 20 deprecated
|
CON_RETURN, // 20
|
||||||
CON_IFAI, // 21
|
CON_IFAI, // 21
|
||||||
CON_KILLIT, // 22
|
CON_KILLIT, // 22
|
||||||
CON_ADDWEAPON, // 23
|
CON_ADDWEAPON, // 23
|
||||||
|
|
|
@ -41,6 +41,7 @@ spritetype *g_sp;
|
||||||
static int g_killitFlag;
|
static int g_killitFlag;
|
||||||
int g_errorLineNum;
|
int g_errorLineNum;
|
||||||
int g_tw;
|
int g_tw;
|
||||||
|
int g_return;
|
||||||
|
|
||||||
static int X_DoExecute(void);
|
static int X_DoExecute(void);
|
||||||
|
|
||||||
|
@ -85,12 +86,14 @@ void X_OnEvent(int iEventID, int iActor, int iPlayer, int lDist)
|
||||||
int og_x=g_x;// *og_t=g_t;
|
int og_x=g_x;// *og_t=g_t;
|
||||||
intptr_t *oinsptr=insptr, *og_t=g_t;
|
intptr_t *oinsptr=insptr, *og_t=g_t;
|
||||||
spritetype *og_sp=g_sp;
|
spritetype *og_sp=g_sp;
|
||||||
|
int oreturn=g_return;
|
||||||
|
|
||||||
g_i = iActor; // current sprite ID
|
g_i = iActor; // current sprite ID
|
||||||
g_p = iPlayer; // current player ID
|
g_p = iPlayer; // current player ID
|
||||||
g_x = lDist; // ?
|
g_x = lDist; // ?
|
||||||
g_sp = &sprite[g_i];
|
g_sp = &sprite[g_i];
|
||||||
g_t = &ActorExtra[g_i].temp_data[0];
|
g_t = &ActorExtra[g_i].temp_data[0];
|
||||||
|
g_return = 0;
|
||||||
|
|
||||||
insptr = apScriptGameEvent[iEventID];
|
insptr = apScriptGameEvent[iEventID];
|
||||||
|
|
||||||
|
@ -116,6 +119,7 @@ void X_OnEvent(int iEventID, int iActor, int iPlayer, int lDist)
|
||||||
g_sp=og_sp;
|
g_sp=og_sp;
|
||||||
g_t=og_t;
|
g_t=og_t;
|
||||||
g_killitFlag=okillit_flag;
|
g_killitFlag=okillit_flag;
|
||||||
|
g_return=oreturn;
|
||||||
insptr=oinsptr;
|
insptr=oinsptr;
|
||||||
|
|
||||||
//AddLog("End of Execution");
|
//AddLog("End of Execution");
|
||||||
|
@ -652,6 +656,7 @@ static int X_DoExecute(void)
|
||||||
int j, l, s, tw = *insptr;
|
int j, l, s, tw = *insptr;
|
||||||
|
|
||||||
if (g_killitFlag) return 1;
|
if (g_killitFlag) return 1;
|
||||||
|
if (g_return) return 1;
|
||||||
|
|
||||||
// Bsprintf(g_szBuf,"Parsing: %d",*insptr);
|
// Bsprintf(g_szBuf,"Parsing: %d",*insptr);
|
||||||
// AddLog(g_szBuf);
|
// AddLog(g_szBuf);
|
||||||
|
@ -1118,6 +1123,8 @@ static int X_DoExecute(void)
|
||||||
g_sp->zvel = 0;
|
g_sp->zvel = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case CON_RETURN:
|
||||||
|
g_return = 1;
|
||||||
case CON_ENDA:
|
case CON_ENDA:
|
||||||
case CON_BREAK:
|
case CON_BREAK:
|
||||||
case CON_ENDS:
|
case CON_ENDS:
|
||||||
|
@ -4215,6 +4222,7 @@ void A_LoadActor(int iActor)
|
||||||
g_x = -1; // lDist; // ??
|
g_x = -1; // lDist; // ??
|
||||||
g_sp = &sprite[g_i]; // Pointer to sprite structure
|
g_sp = &sprite[g_i]; // Pointer to sprite structure
|
||||||
g_t = &ActorExtra[g_i].temp_data[0]; // Sprite's 'extra' data
|
g_t = &ActorExtra[g_i].temp_data[0]; // Sprite's 'extra' data
|
||||||
|
g_return = 0;
|
||||||
|
|
||||||
if (actorLoadEventScrptr[g_sp->picnum] == 0) return;
|
if (actorLoadEventScrptr[g_sp->picnum] == 0) return;
|
||||||
|
|
||||||
|
@ -4247,6 +4255,7 @@ void A_Execute(int iActor,int iPlayer,int lDist)
|
||||||
g_x = lDist; // ??
|
g_x = lDist; // ??
|
||||||
g_sp = &sprite[g_i]; // Pointer to sprite structure
|
g_sp = &sprite[g_i]; // Pointer to sprite structure
|
||||||
g_t = &ActorExtra[g_i].temp_data[0]; // Sprite's 'extra' data
|
g_t = &ActorExtra[g_i].temp_data[0]; // Sprite's 'extra' data
|
||||||
|
g_return = 0;
|
||||||
|
|
||||||
insptr = 4 + (actorscrptr[g_sp->picnum]);
|
insptr = 4 + (actorscrptr[g_sp->picnum]);
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
#include "duke3d.h"
|
#include "duke3d.h"
|
||||||
|
|
||||||
const char *s_buildDate = "20090104";
|
const char *s_buildDate = "20090105";
|
||||||
char *MusicPtr = NULL;
|
char *MusicPtr = NULL;
|
||||||
int g_musicSize;
|
int g_musicSize;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue