Add r_osdhightile in case anyone really wants ugly blurry console text

Will not be given a menu option.


git-svn-id: https://svn.eduke32.com/eduke32@901 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2008-07-25 04:33:33 +00:00
parent cb1b36fb64
commit 0f28a14ba3
4 changed files with 12 additions and 4 deletions

View file

@ -30,12 +30,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <time.h>
*/
#include "baselayer.h"
#include "duke3d.h"
#include "scriplib.h"
#include "osd.h"
#include "osdcmds.h"
#include "baselayer.h"
#include "osdfuncs.h"
// we load this in to get default button and key assignments
// as well as setting up function mappings
@ -713,6 +713,7 @@ int32 CONFIG_ReadSetup(void)
#endif
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "OSDTextMode",&dummy);
OSD_SetTextMode(dummy);
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "OSDHightile",&r_osdhightile);
SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "Executions",&ud.executions);
SCRIPT_GetNumber(ud.config.scripthandle, "Setup", "ForceSetup",&ud.config.ForceSetup);
SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "RunMode",&ud.config.RunMode);
@ -943,6 +944,7 @@ void CONFIG_WriteSetup(void)
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "UseModels",usemodels,false,false);
#endif
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "OSDTextMode",OSD_GetTextMode(),false,false);
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "OSDHightile",r_osdhightile,false,false);
SCRIPT_PutNumber(ud.config.scripthandle, "Sound Setup", "AmbienceToggle",ud.config.AmbienceToggle,false,false);
SCRIPT_PutNumber(ud.config.scripthandle, "Sound Setup", "FXVolume",ud.config.FXVolume,false,false);
SCRIPT_PutNumber(ud.config.scripthandle, "Sound Setup", "MusicToggle",ud.config.MusicToggle,false,false);

View file

@ -28,6 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "baselayer.h"
#include "duke3d.h"
#include "crc32.h"
#include "osdfuncs.h"
#include <ctype.h>
#include <limits.h>
@ -693,6 +694,7 @@ cvarmappings cvar[] =
#endif
#endif
{ "r_drawweapon", "r_drawweapon: enable/disable weapon drawing", (void*)&ud.drawweapon, CVAR_INT, 0, 0, 2 },
{ "r_osdhightile", "r_osdhightile: enable/disable hires art replacements for console text", (void*)&r_osdhightile, CVAR_BOOL, 0, 0, 1 },
{ "r_showfps", "r_showfps: show the frame rate counter", (void*)&ud.tickrate, CVAR_BOOL, 0, 0, 1 },
{ "r_shadows", "r_shadows: enable/disable sprite and model shadows", (void*)&ud.shadows, CVAR_BOOL, 0, 0, 1 },
{ "r_precache", "r_precache: enable/disable the pre-level caching routine", (void*)&ud.config.useprecache, CVAR_BOOL, 0, 0, 1 },

View file

@ -3,6 +3,8 @@
#include "namesdyn.h"
#include "osdfuncs.h"
int r_osdhightile = 0;
void GAME_drawosdchar(int x, int y, char ch, int shade, int pal)
{
short ac;
@ -11,7 +13,7 @@ void GAME_drawosdchar(int x, int y, char ch, int shade, int pal)
if (ch == 32) return;
ac = ch-'!'+STARTALPHANUM;
if (ac < STARTALPHANUM || ac > ENDALPHANUM) return;
usehightile = 0;
usehightile = (r_osdhightile && ht);
rotatesprite(((x<<3)+x)<<16, (y<<3)<<16, 65536l, 0, ac, shade, pal, 8|16, 0, 0, xdim-1, ydim-1);
usehightile = ht;
}
@ -23,7 +25,7 @@ void GAME_drawosdstr(int x, int y, char *ch, int len, int shade, int pal)
char *fmt = OSD_GetFmtPtr();
int ht = usehightile;
usehightile = 0;
usehightile = (r_osdhightile && ht);
for (x = (x<<3)+x; len>0; len--, ch++, x++)
{

View file

@ -6,5 +6,7 @@ int GAME_getrowheight(int w);
void GAME_clearbackground(int c, int r);
void GAME_onshowosd(int shown);
extern int r_osdhightile;
#define OSDCHAR_WIDTH 8