mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
git-svn-id: https://svn.eduke32.com/eduke32@1097 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
b93b724e20
commit
c21b1deae2
11 changed files with 27 additions and 18 deletions
|
@ -23,7 +23,7 @@ typedef struct _symbol
|
|||
} symbol_t;
|
||||
|
||||
symbol_t *symbols;
|
||||
const char *stripcolorcodes(const char *in, char *out);
|
||||
const char *stripcolorcodes(char *out, const char *in);
|
||||
|
||||
#define OSD_ALIAS 1337
|
||||
#define OSD_UNALIASED 1338
|
||||
|
|
|
@ -128,7 +128,7 @@ static int (*_getrowheight)(int) = _internal_getrowheight;
|
|||
// ^S# sets a shade, range is 0-7 equiv to shades 0-14
|
||||
// ^O resets formatting to defaults
|
||||
|
||||
const char *stripcolorcodes(const char *in, char *out)
|
||||
const char *stripcolorcodes(char *out, const char *in)
|
||||
{
|
||||
char *ptr = out;
|
||||
|
||||
|
@ -1438,7 +1438,7 @@ void OSD_Printf(const char *fmt, ...)
|
|||
if (osdlog&&(!logcutoff||linecnt<logcutoff))
|
||||
{
|
||||
chp = Bstrdup(tmpstr);
|
||||
Bfputs(stripcolorcodes(tmpstr,chp), osdlog);
|
||||
Bfputs(stripcolorcodes(chp,tmpstr), osdlog);
|
||||
Bfree(chp);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#define BUILDDATE " 20081005"
|
||||
#define BUILDDATE " 20081011"
|
||||
#define VERSION " 1.2.0devel"
|
||||
|
||||
static int floor_over_floor;
|
||||
|
|
|
@ -592,6 +592,7 @@ extern palette_t crosshair_colors;
|
|||
extern palette_t default_crosshair_colors;
|
||||
extern char mod_dir[BMAX_PATH];
|
||||
extern int r_maxfps;
|
||||
extern int g_NoSetup;
|
||||
|
||||
int32 CONFIG_ReadSetup(void)
|
||||
{
|
||||
|
@ -649,7 +650,7 @@ int32 CONFIG_ReadSetup(void)
|
|||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
if (mod_dir[0] == '/')
|
||||
if (g_NoSetup == 0 && mod_dir[0] == '/')
|
||||
SCRIPT_GetString(ud.config.scripthandle, "Setup","ModDir",&mod_dir[0]);
|
||||
#endif
|
||||
|
||||
|
@ -1139,6 +1140,7 @@ void CONFIG_WriteSetup(void)
|
|||
SCRIPT_PutString(ud.config.scripthandle, "Setup","SelectedGRP",&duke3dgrp[0]);
|
||||
|
||||
#ifdef _WIN32
|
||||
if (g_NoSetup == 0)
|
||||
SCRIPT_PutString(ud.config.scripthandle, "Setup","ModDir",&mod_dir[0]);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#define APPNAME "EDuke32"
|
||||
#define VERSION " 1.5.0devel"
|
||||
// this is checked against http://eduke32.com/VERSION
|
||||
#define BUILDDATE " 20081005"
|
||||
#define BUILDDATE " 20081011"
|
||||
#define HEAD2 APPNAME VERSION BUILDDATE
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -108,7 +108,7 @@ extern void savetemp(const char *fn,int daptr,int dasiz);
|
|||
extern int loadplayer(int spot);
|
||||
extern int saveplayer(int spot);
|
||||
extern int menutext_(int x,int y,int s,int p,char *t,int bits);
|
||||
#define menutext(x,y,s,p,t) menutext_(x,y,s,p,(char *)stripcolorcodes(t,menutextbuf),10+16)
|
||||
#define menutext(x,y,s,p,t) menutext_(x,y,s,p,(char *)stripcolorcodes(menutextbuf,t),10+16)
|
||||
extern void menus(void);
|
||||
extern void palto(int r,int g,int b,int e);
|
||||
extern void playanm(const char *fn,char);
|
||||
|
|
|
@ -65,7 +65,7 @@ int cameradist = 0, cameraclock = 0;
|
|||
static int playerswhenstarted;
|
||||
static int qe,cp;
|
||||
static int g_CommandSetup = 0;
|
||||
static int g_NoSetup = 0;
|
||||
int g_NoSetup = 0;
|
||||
static int g_NoAutoLoad = 0;
|
||||
static int g_NoSound = 0;
|
||||
static int g_NoMusic = 0;
|
||||
|
@ -244,6 +244,9 @@ static inline int sbarsc(int sc)
|
|||
|
||||
static inline int textsc(int sc)
|
||||
{
|
||||
// prevent ridiculousness to a degree
|
||||
if (xdim <= 640) return sc;
|
||||
if (xdim <= 800) return scale(sc,min(300,ud.textscale),100);
|
||||
return scale(sc,ud.textscale,100);
|
||||
}
|
||||
|
||||
|
@ -2714,8 +2717,8 @@ static void operatefta(void)
|
|||
|
||||
if (g_player[screenpeek].ps->fta > 1 && (g_player[screenpeek].ps->ftq < 115 || g_player[screenpeek].ps->ftq > 117))
|
||||
{
|
||||
if (g_player[screenpeek].ps->fta > 5)
|
||||
k += 6;
|
||||
if (g_player[screenpeek].ps->fta > 6)
|
||||
k += 7;
|
||||
else k += g_player[screenpeek].ps->fta; /*if (g_player[screenpeek].ps->fta > 2)
|
||||
k += 3;
|
||||
else k += 1; */
|
||||
|
@ -2739,7 +2742,7 @@ static void operatefta(void)
|
|||
if (k > 4) { mpgametext(j,user_quote[i],0,2+8+16); j += textsc(8); }
|
||||
else if (k > 2) { mpgametext(j,user_quote[i],0,2+8+16+1); j += textsc(k<<1); }
|
||||
else { mpgametext(j,user_quote[i],0,2+8+16+1+32); j += textsc(k<<1); }
|
||||
l = gametextlen(USERQUOTE_LEFTOFFSET,stripcolorcodes(user_quote[i],tempbuf));
|
||||
l = gametextlen(USERQUOTE_LEFTOFFSET,stripcolorcodes(tempbuf,user_quote[i]));
|
||||
while (l > (ud.config.ScreenWidth - USERQUOTE_RIGHTOFFSET))
|
||||
{
|
||||
l -= (ud.config.ScreenWidth-USERQUOTE_RIGHTOFFSET);
|
||||
|
@ -3013,7 +3016,7 @@ static int strget_(int small,int x,int y,char *t,int dalen,int c)
|
|||
}
|
||||
c = 4-(sintable[(totalclock<<4)&2047]>>11);
|
||||
|
||||
i = gametextlen(USERQUOTE_LEFTOFFSET,stripcolorcodes(t,tempbuf));
|
||||
i = gametextlen(USERQUOTE_LEFTOFFSET,stripcolorcodes(tempbuf,t));
|
||||
while (i > (ud.config.ScreenWidth - USERQUOTE_RIGHTOFFSET))
|
||||
{
|
||||
i -= (ud.config.ScreenWidth - USERQUOTE_RIGHTOFFSET);
|
||||
|
@ -3088,7 +3091,7 @@ static void typemode(void)
|
|||
}
|
||||
adduserquote(recbuf);
|
||||
quotebot += 8;
|
||||
l = gametextlen(USERQUOTE_LEFTOFFSET,stripcolorcodes(recbuf,tempbuf));
|
||||
l = gametextlen(USERQUOTE_LEFTOFFSET,stripcolorcodes(tempbuf,recbuf));
|
||||
while (l > (ud.config.ScreenWidth - USERQUOTE_RIGHTOFFSET))
|
||||
{
|
||||
l -= (ud.config.ScreenWidth - USERQUOTE_RIGHTOFFSET);
|
||||
|
|
|
@ -878,7 +878,7 @@ void menus(void)
|
|||
{
|
||||
x = strget(d-50,37,buf,30,0);
|
||||
|
||||
while (Bstrlen(stripcolorcodes(buf,tempbuf)) > 10)
|
||||
while (Bstrlen(stripcolorcodes(tempbuf,buf)) > 10)
|
||||
{
|
||||
buf[Bstrlen(buf)-1] = '\0';
|
||||
inputloc--;
|
||||
|
|
|
@ -727,6 +727,7 @@ cvarmappings cvar[] =
|
|||
{ "hud_glowingquotes", "hud_glowingquotes: enable/disable \"glowing\" quote text", (void*)&hud_glowingquotes, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "hud_showmapname", "hud_showmapname: enable/disable map name display on load", (void*)&hud_showmapname, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "hud_stats", "hud_stats: enable/disable level statistics display\n", (void*)&ud.levelstats, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "hud_textscale", "hud_textscale: sets multiplayer chat message size\n", (void*)&ud.textscale, CVAR_INT, 0, 100, 400 },
|
||||
|
||||
{ "cl_autoaim", "cl_autoaim: enable/disable weapon autoaim", (void*)&ud.config.AutoAim, CVAR_INT|CVAR_MULTI, 0, 0, 2 },
|
||||
{ "cl_automsg", "cl_automsg: enable/disable automatically sending messages to all players", (void*)&ud.automsg, CVAR_BOOL, 0, 0, 1 },
|
||||
|
@ -998,7 +999,7 @@ static int osdcmd_name(const osdfuncparm_t *parm)
|
|||
|
||||
Bstrcpy(tempbuf,parm->parms[0]);
|
||||
|
||||
while (Bstrlen(stripcolorcodes(tempbuf,namebuf)) > 10)
|
||||
while (Bstrlen(stripcolorcodes(namebuf,tempbuf)) > 10)
|
||||
tempbuf[Bstrlen(tempbuf)-1] = '\0';
|
||||
|
||||
Bstrncpy(myname,tempbuf,sizeof(myname)-1);
|
||||
|
|
|
@ -1179,6 +1179,7 @@ static void prelevel(char g)
|
|||
{
|
||||
wall[j].picnum = MIRROR;
|
||||
wall[j].overpicnum = MIRROR;
|
||||
if (wall[mirrorwall[i]].pal == 4)
|
||||
wall[j].pal = 4;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,6 +75,8 @@ static int getfilenames(char *path)
|
|||
extern char TEXCACHEDIR[];
|
||||
#endif
|
||||
|
||||
extern int g_NoSetup;
|
||||
|
||||
static void PopulateForm(int pgs)
|
||||
{
|
||||
HWND hwnd;
|
||||
|
@ -667,7 +669,7 @@ int startwin_run(void)
|
|||
duke3dgrp = settings.selectedgrp;
|
||||
g_GameType = settings.game;
|
||||
|
||||
if (settings.gamedir != NULL)
|
||||
if (g_NoSetup == 0 && settings.gamedir != NULL)
|
||||
Bstrcpy(mod_dir,settings.gamedir);
|
||||
else Bsprintf(mod_dir,"/");
|
||||
|
||||
|
|
Loading…
Reference in a new issue