joystick axes can be reassigned; higher offset for axes moving detection; correction for menus that are bigger than screen; plxver correction (is actually used)
This commit is contained in:
parent
85e4151534
commit
eb44193d3e
|
@ -1,8 +1,12 @@
|
|||
D1X-Rebirth Changelog
|
||||
|
||||
20070110
|
||||
--------
|
||||
main/kconfig.c, main/newmenu.c, main/playsave.c: joystick axes can be reassigned; higher offset for axes moving detection; correction for menus that are bigger than screen; plxver correction (is actually used)
|
||||
|
||||
20070109
|
||||
--------
|
||||
arch/ogl/gr.c, arch/ogl/ogl.c, arch/ogl/include/ogl_init.h, main/playsave.c, texmap/scanline.c, texmap/tmapflat.c: allocate 'pixels' and 'texbuf' according to current screen resolution, saving over a hundred megabytes of memory; divide negative light rates of change properly (fix bug #2575) (from D2X CVS); divide negative window x-coordinates properly, fixing random crashes (from D2X CVS); make sscanf look for "%i.%i" instead of "v%i.%i" because the 'v' isn't written to file; added missing changelog entries
|
||||
dxx-changelog.txt, arch/ogl/gr.c, arch/ogl/ogl.c, arch/ogl/include/ogl_init.h, main/playsave.c, texmap/scanline.c, texmap/tmapflat.c: allocate 'pixels' and 'texbuf' according to current screen resolution, saving over a hundred megabytes of memory; divide negative light rates of change properly (fix bug #2575) (from D2X CVS); divide negative window x-coordinates properly, fixing random crashes (from D2X CVS); make sscanf look for "%i.%i" instead of "v%i.%i" because the 'v' isn't written to file; added missing changelog entries
|
||||
|
||||
20061212
|
||||
--------
|
||||
|
|
|
@ -1302,11 +1302,8 @@ void kc_change_joyaxis( kc_item * item )
|
|||
joystick_read_raw_axis( JOY_ALL_AXIS, axis );
|
||||
|
||||
for (i=0; i<numaxis; i++ ) {
|
||||
#if defined(__WINDOWS__)
|
||||
if ( abs(axis[i]-old_axis[i])>1024 ) {
|
||||
#else
|
||||
if ( abs(axis[i]-old_axis[i])>200 ) {
|
||||
#endif
|
||||
if ( abs(axis[i]-old_axis[i])>1024 )
|
||||
{
|
||||
code = i;
|
||||
#ifndef NDEBUG
|
||||
printf("Axis Movement detected: Axis %i\n", i);
|
||||
|
@ -1314,13 +1311,13 @@ void kc_change_joyaxis( kc_item * item )
|
|||
}
|
||||
//old_axis[i] = axis[i];
|
||||
}
|
||||
for (i=0; i<Num_items; i++ )
|
||||
/* for (i=0; i<Num_items; i++ ) This only prevents us from defining an axis that is already mapped to another action
|
||||
{
|
||||
n = item - All_items;
|
||||
if ( (i!=n) && (All_items[i].type==BT_JOY_AXIS) && (All_items[i].value==code) )
|
||||
code = 255;
|
||||
}
|
||||
|
||||
*/
|
||||
}
|
||||
if (code!=255) {
|
||||
for (i=0; i<Num_items; i++ ) {
|
||||
|
@ -1333,6 +1330,7 @@ void kc_change_joyaxis( kc_item * item )
|
|||
|
||||
item->value = code;
|
||||
}
|
||||
|
||||
kc_drawitem( item, 1 );
|
||||
nm_restore_background( 0, INFO_Y, GWIDTH-10, FONTSCALE_Y(grd_curcanv->cv_font->ft_h) );
|
||||
game_flush_inputs();
|
||||
|
|
|
@ -697,8 +697,14 @@ int newmenu_do3_real( char * title, char * subtitle, int nitems, newmenu_item *
|
|||
w += 30*MENSCALE_X;
|
||||
h += 30*MENSCALE_Y;
|
||||
|
||||
if ( w > SWIDTH ) w = SWIDTH-3;
|
||||
if ( h > SHEIGHT ) h = SHEIGHT-3;
|
||||
// if ( w > SWIDTH ) w = SWIDTH;
|
||||
// if ( h > SHEIGHT ) h = SHEIGHT;
|
||||
/* If window is as or almost as big as screen define hard size so it fits (with borders and stuff).
|
||||
Also make use of MENSCALE_* so we are sure it does scale correct if font does scale or not */
|
||||
if (w >= 320*MENSCALE_X-3)
|
||||
w=318*MENSCALE_X;
|
||||
if (h >= 200*MENSCALE_Y-3)
|
||||
h=198*MENSCALE_Y;
|
||||
|
||||
x = (GWIDTH-w)/2;
|
||||
y = (GHEIGHT-h)/2;
|
||||
|
|
|
@ -278,7 +278,7 @@ int read_player_d1x(const char *filename)
|
|||
if(!strcmp(word,"PLX VERSION"))
|
||||
{
|
||||
int maj,min;
|
||||
sscanf(line,"%i.%i",&maj,&min);
|
||||
sscanf(line,"v%i.%i",&maj,&min);
|
||||
sprintf(plxver,"v%i.%i",maj,min);
|
||||
}
|
||||
free(line); free(word);
|
||||
|
|
Loading…
Reference in a new issue