git-svn-id: https://svn.eduke32.com/eduke32@1203 1a8010ca-5511-0410-912e-c29ae57300e0

This commit is contained in:
terminx 2009-01-06 06:59:18 +00:00
parent 94d1fc6bfe
commit 1cc73560f2
11 changed files with 62 additions and 16 deletions

View file

@ -12,7 +12,8 @@ DXROOT=../sdk/dx
ALROOT = AL
SDLCONFIG = /usr/local/bin/sdl-config
SDLCONFIG = sdl-config
# SDLCONFIG = /usr/local/bin/sdl-config
ifeq ($(wildcard $(SDLCONFIG)),$(SDLCONFIG))
SDLROOT = /usr/local

View file

@ -3,7 +3,9 @@
ENGINELIB=libengine.a
EDITORLIB=libbuild.a
SDLCONFIG = /usr/local/bin/sdl-config
# SDLCONFIG = /usr/local/bin/sdl-config
SDLCONFIG = sdl-config
ifeq ($(wildcard $(SDLCONFIG)),$(SDLCONFIG))
SDLROOT = /usr/local

View file

@ -85,6 +85,7 @@ extern int qsetmode;
int initsystem(void);
void uninitsystem(void);
extern int flushlogwindow;
void initprintf(const char *, ...);
void debugprintf(const char *,...);

View file

@ -60,6 +60,8 @@ char *strtolower(char *str, int len)
return str;
}
int flushlogwindow = 0;
static void onvideomodechange(int newmode) { UNREFERENCED_PARAMETER(newmode); }
void (*baselayer_onvideomodechange)(int) = onvideomodechange;

View file

@ -333,20 +333,30 @@ void initprintf(const char *f, ...)
{
va_list va;
char buf[1024];
va_start(va, f);
vprintf(f,va);
va_end(va);
static char dabuf[1024];
static int cnt = 0;
va_start(va, f);
Bvsnprintf(buf, 1024, f, va);
va_end(va);
OSD_Printf(buf);
startwin_puts(buf);
startwin_idle(NULL);
}
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);
startwin_idle(NULL);
Bmemset(dabuf, 0, sizeof(dabuf));
}
}
//
// debugprintf() -- prints a debug string to stderr

View file

@ -609,13 +609,29 @@ void initprintf(const char *f, ...)
{
va_list va;
char buf[1024];
static char dabuf[1024];
static int cnt = 0;
va_start(va, f);
Bvsnprintf(buf, 1024, f, va);
va_end(va);
OSD_Printf(buf);
startwin_puts(buf);
handleevents();
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();
Bmemset(dabuf, 0, sizeof(dabuf));
}
}

View file

@ -10988,7 +10988,7 @@ void app_main(int argc,const char **argv)
G_GameExit(" ");
}
}
else initprintf("... no upgrade available\n");
else initprintf("... no updates available\n");
}
else initprintf("update: failed to check for updates\n");
}

View file

@ -156,7 +156,7 @@ const char *keyw[] =
"state", // 17 begins defining a state if used outside a state or actor, otherwise calls a state
"ends", // 18 ends defining a state
"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
"killit", // 22 kills an actor
"addweapon", // 23 adds a weapon to the closest player
@ -4581,7 +4581,6 @@ repeatcase:
g_scriptPtr++; */
return 0;
case CON_IFPINVENTORY:
case CON_IFRND:
if (!C_CheckEventSync(g_currentEvent))
{
@ -4609,6 +4608,7 @@ repeatcase:
case CON_IFACTION:
case CON_IFMOVE:
case CON_IFP:
case CON_IFPINVENTORY:
{
intptr_t offset;
intptr_t lastScriptPtr = (g_scriptPtr-&script[0]-1);
@ -5372,6 +5372,7 @@ repeatcase:
Bsprintf(g_szCurrentBlockName,"(none)");
return 0;
case CON_RETURN:
case CON_BREAK:
if (g_checkingSwitch)
{
@ -5827,6 +5828,8 @@ void C_Compile(const char *filenam)
while (C_ParseCommand() == 0);
flushlogwindow = 1;
if (g_numCompilerErrors > 63)
initprintf("fatal error: too many errors: Aborted\n");
@ -5910,6 +5913,8 @@ void C_Compile(const char *filenam)
C_IncreaseScriptSize(g_scriptPtr-script+8);
flushlogwindow = 0;
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"));

View file

@ -553,7 +553,7 @@ enum ScriptKeywords_t
CON_STATE, // 17
CON_ENDS, // 18
CON_DEFINE, // 19
CON_COMMENT, // 20 deprecated
CON_RETURN, // 20
CON_IFAI, // 21
CON_KILLIT, // 22
CON_ADDWEAPON, // 23

View file

@ -41,6 +41,7 @@ spritetype *g_sp;
static int g_killitFlag;
int g_errorLineNum;
int g_tw;
int g_return;
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;
intptr_t *oinsptr=insptr, *og_t=g_t;
spritetype *og_sp=g_sp;
int oreturn=g_return;
g_i = iActor; // current sprite ID
g_p = iPlayer; // current player ID
g_x = lDist; // ?
g_sp = &sprite[g_i];
g_t = &ActorExtra[g_i].temp_data[0];
g_return = 0;
insptr = apScriptGameEvent[iEventID];
@ -116,6 +119,7 @@ void X_OnEvent(int iEventID, int iActor, int iPlayer, int lDist)
g_sp=og_sp;
g_t=og_t;
g_killitFlag=okillit_flag;
g_return=oreturn;
insptr=oinsptr;
//AddLog("End of Execution");
@ -652,6 +656,7 @@ static int X_DoExecute(void)
int j, l, s, tw = *insptr;
if (g_killitFlag) return 1;
if (g_return) return 1;
// Bsprintf(g_szBuf,"Parsing: %d",*insptr);
// AddLog(g_szBuf);
@ -1118,6 +1123,8 @@ static int X_DoExecute(void)
g_sp->zvel = 0;
break;
case CON_RETURN:
g_return = 1;
case CON_ENDA:
case CON_BREAK:
case CON_ENDS:
@ -4215,6 +4222,7 @@ void A_LoadActor(int iActor)
g_x = -1; // lDist; // ??
g_sp = &sprite[g_i]; // Pointer to sprite structure
g_t = &ActorExtra[g_i].temp_data[0]; // Sprite's 'extra' data
g_return = 0;
if (actorLoadEventScrptr[g_sp->picnum] == 0) return;
@ -4247,6 +4255,7 @@ void A_Execute(int iActor,int iPlayer,int lDist)
g_x = lDist; // ??
g_sp = &sprite[g_i]; // Pointer to sprite structure
g_t = &ActorExtra[g_i].temp_data[0]; // Sprite's 'extra' data
g_return = 0;
insptr = 4 + (actorscrptr[g_sp->picnum]);

View file

@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//-------------------------------------------------------------------------
#include "duke3d.h"
const char *s_buildDate = "20090104";
const char *s_buildDate = "20090105";
char *MusicPtr = NULL;
int g_musicSize;