added variable aspect function, changed cmd-help, changed ini file
This commit is contained in:
parent
6a9c15ac25
commit
a15ae0ec08
|
@ -211,8 +211,10 @@ void ogl_get_verinfo(void){
|
||||||
|
|
||||||
int gr_set_mode(u_int32_t mode)
|
int gr_set_mode(u_int32_t mode)
|
||||||
{
|
{
|
||||||
unsigned int w,h;
|
unsigned int w,h,t;
|
||||||
char *gr_bm_data;
|
char *gr_bm_data;
|
||||||
|
float awidth = 3;
|
||||||
|
float aheight = 4;
|
||||||
|
|
||||||
#ifdef NOGRAPH
|
#ifdef NOGRAPH
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -227,18 +229,24 @@ return 0;
|
||||||
//if (screen != NULL) gr_palette_clear();
|
//if (screen != NULL) gr_palette_clear();
|
||||||
|
|
||||||
// ogl_init_state();
|
// ogl_init_state();
|
||||||
|
|
||||||
|
if ((t = FindArg( "-aspect" ))) {
|
||||||
|
t=atoi(Args[t+1]);
|
||||||
|
if (t>0&&t<=16)
|
||||||
|
aheight=t;
|
||||||
|
}
|
||||||
|
if ((t = FindArg( "-aspect" ))) {
|
||||||
|
t=atoi(Args[t+2]);
|
||||||
|
if (t>0&&t<=16)
|
||||||
|
awidth=t;
|
||||||
|
}
|
||||||
|
|
||||||
gr_bm_data=grd_curscreen->sc_canvas.cv_bitmap.bm_data;//since we use realloc, we want to keep this pointer around.
|
gr_bm_data=grd_curscreen->sc_canvas.cv_bitmap.bm_data;//since we use realloc, we want to keep this pointer around.
|
||||||
memset( grd_curscreen, 0, sizeof(grs_screen));
|
memset( grd_curscreen, 0, sizeof(grs_screen));
|
||||||
grd_curscreen->sc_mode = mode;
|
grd_curscreen->sc_mode = mode;
|
||||||
grd_curscreen->sc_w = w;
|
grd_curscreen->sc_w = w;
|
||||||
grd_curscreen->sc_h = h;
|
grd_curscreen->sc_h = h;
|
||||||
if (FindArg("-16to9"))
|
grd_curscreen->sc_aspect = fixdiv(grd_curscreen->sc_w*awidth,grd_curscreen->sc_h*aheight);
|
||||||
grd_curscreen->sc_aspect = fixdiv(grd_curscreen->sc_w*9,grd_curscreen->sc_h*16);
|
|
||||||
else if (FindArg("-16to10"))
|
|
||||||
grd_curscreen->sc_aspect = fixdiv(grd_curscreen->sc_w*10,grd_curscreen->sc_h*16);
|
|
||||||
else
|
|
||||||
grd_curscreen->sc_aspect = fixdiv(grd_curscreen->sc_w*3,grd_curscreen->sc_h*4);
|
|
||||||
grd_curscreen->sc_canvas.cv_bitmap.bm_x = 0;
|
grd_curscreen->sc_canvas.cv_bitmap.bm_x = 0;
|
||||||
grd_curscreen->sc_canvas.cv_bitmap.bm_y = 0;
|
grd_curscreen->sc_canvas.cv_bitmap.bm_y = 0;
|
||||||
grd_curscreen->sc_canvas.cv_bitmap.bm_w = w;
|
grd_curscreen->sc_canvas.cv_bitmap.bm_w = w;
|
||||||
|
|
|
@ -65,7 +65,9 @@ void gr_update()
|
||||||
|
|
||||||
int gr_set_mode(u_int32_t mode)
|
int gr_set_mode(u_int32_t mode)
|
||||||
{
|
{
|
||||||
int w,h;
|
int w,h,t;
|
||||||
|
float awidth = 3;
|
||||||
|
float aheight = 4;
|
||||||
|
|
||||||
#ifdef NOGRAPH
|
#ifdef NOGRAPH
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -79,6 +81,17 @@ int gr_set_mode(u_int32_t mode)
|
||||||
|
|
||||||
if (screen != NULL) gr_palette_clear();
|
if (screen != NULL) gr_palette_clear();
|
||||||
|
|
||||||
|
if ((t = FindArg( "-aspect" ))) {
|
||||||
|
t=atoi(Args[t+1]);
|
||||||
|
if (t>0&&t<=16)
|
||||||
|
aheight=t;
|
||||||
|
}
|
||||||
|
if ((t = FindArg( "-aspect" ))) {
|
||||||
|
t=atoi(Args[t+2]);
|
||||||
|
if (t>0&&t<=16)
|
||||||
|
awidth=t;
|
||||||
|
}
|
||||||
|
|
||||||
//added on 11/06/98 by Matt Mueller to set the title bar. (moved from below)
|
//added on 11/06/98 by Matt Mueller to set the title bar. (moved from below)
|
||||||
//sekmu: might wanna copy this litte blurb to one of the text files or something
|
//sekmu: might wanna copy this litte blurb to one of the text files or something
|
||||||
//we want to set it here so that X window manager "Style" type commands work
|
//we want to set it here so that X window manager "Style" type commands work
|
||||||
|
@ -108,12 +121,7 @@ int gr_set_mode(u_int32_t mode)
|
||||||
grd_curscreen->sc_mode = mode;
|
grd_curscreen->sc_mode = mode;
|
||||||
grd_curscreen->sc_w = w;
|
grd_curscreen->sc_w = w;
|
||||||
grd_curscreen->sc_h = h;
|
grd_curscreen->sc_h = h;
|
||||||
if (FindArg("-16to9"))
|
grd_curscreen->sc_aspect = fixdiv(grd_curscreen->sc_w*awidth,grd_curscreen->sc_h*aheight);
|
||||||
grd_curscreen->sc_aspect = fixdiv(grd_curscreen->sc_w*9,grd_curscreen->sc_h*16);
|
|
||||||
else if (FindArg("-16to10"))
|
|
||||||
grd_curscreen->sc_aspect = fixdiv(grd_curscreen->sc_w*10,grd_curscreen->sc_h*16);
|
|
||||||
else
|
|
||||||
grd_curscreen->sc_aspect = fixdiv(grd_curscreen->sc_w*3,grd_curscreen->sc_h*4);
|
|
||||||
grd_curscreen->sc_canvas.cv_bitmap.bm_x = 0;
|
grd_curscreen->sc_canvas.cv_bitmap.bm_x = 0;
|
||||||
grd_curscreen->sc_canvas.cv_bitmap.bm_y = 0;
|
grd_curscreen->sc_canvas.cv_bitmap.bm_y = 0;
|
||||||
grd_curscreen->sc_canvas.cv_bitmap.bm_w = w;
|
grd_curscreen->sc_canvas.cv_bitmap.bm_w = w;
|
||||||
|
|
3
d1x.ini
3
d1x.ini
|
@ -11,8 +11,7 @@
|
||||||
;-gl_trilinear ;set gl texture filters to trilinear mipmapping
|
;-gl_trilinear ;set gl texture filters to trilinear mipmapping
|
||||||
;-gl_refresh <r> ;set refresh rate (in fullscreen mode)
|
;-gl_refresh <r> ;set refresh rate (in fullscreen mode)
|
||||||
;-gl_reticle <r> ;[WINDOWS ONLY] use OGL reticle 0=never 1=above 320x* 2=always
|
;-gl_reticle <r> ;[WINDOWS ONLY] use OGL reticle 0=never 1=above 320x* 2=always
|
||||||
;-16to9 ;use 16/9 widescreen
|
;-aspect <y> <x> ;use specified aspect - example: -aspect 16 9, -aspect 16 7.5 etc.
|
||||||
;-16to10 ;use 16/10 widescreen
|
|
||||||
|
|
||||||
***********
|
***********
|
||||||
***Sound***
|
***Sound***
|
||||||
|
|
|
@ -319,8 +319,7 @@ void show_cmdline_help() {
|
||||||
#ifdef GR_SUPPORTS_FULLSCREEN_TOGGLE
|
#ifdef GR_SUPPORTS_FULLSCREEN_TOGGLE
|
||||||
printf( " -window %s\n", "Run the game in a window"); // ZICO - from window to fullscreen
|
printf( " -window %s\n", "Run the game in a window"); // ZICO - from window to fullscreen
|
||||||
#endif
|
#endif
|
||||||
printf( " -16to9 %s\n", "use 16/9 widescreen");
|
printf( " -aspect <y> <x> %s\n" ";use specified aspect - example: -aspect 16 9, -aspect 16 7.5 etc.");
|
||||||
printf( " -16to10 %s\n", "use 16/10 widescreen");
|
|
||||||
#ifdef OGL
|
#ifdef OGL
|
||||||
printf( " -gl_texmaxfilt <f> %s\n","set GL_TEXTURE_MAX_FILTER (see readme.d1x)");
|
printf( " -gl_texmaxfilt <f> %s\n","set GL_TEXTURE_MAX_FILTER (see readme.d1x)");
|
||||||
printf( " -gl_texminfilt <f> %s\n","set GL_TEXTURE_MIN_FILTER (see readme.d1x)");
|
printf( " -gl_texminfilt <f> %s\n","set GL_TEXTURE_MIN_FILTER (see readme.d1x)");
|
||||||
|
|
Loading…
Reference in a new issue