flag adjustments (trunk only)
Move all system or port specific flags to sysflags which is used only if SYSFLAGS is defined, and leave everything else in flags unconditional.
This commit is contained in:
@@ -266,8 +266,7 @@ saveDiskPrompt(start)
|
||||
{
|
||||
char buf[BUFSIZ], *bp;
|
||||
BPTR fileLock;
|
||||
|
||||
if (flags.asksavedisk) {
|
||||
if (sysflags.asksavedisk) {
|
||||
/* Don't prompt if you can find the save file */
|
||||
if (fileLock = Lock(SAVEF, SHARED_LOCK)) {
|
||||
UnLock(fileLock);
|
||||
|
||||
@@ -121,7 +121,7 @@ int how;
|
||||
newwin.Screen = HackScreen;
|
||||
|
||||
for( i = 0; i < amii_numcolors; ++i )
|
||||
flags.amii_curmap[i] = GetRGB4( HackScreen->ViewPort.ColorMap, i );
|
||||
sysflags.amii_curmap[i] = GetRGB4( HackScreen->ViewPort.ColorMap, i );
|
||||
|
||||
ripwin = OpenWindow( (void *)&newwin );
|
||||
if( !ripwin ) goto cleanup;
|
||||
@@ -310,7 +310,7 @@ cleanup:
|
||||
CloseWindow( ripwin );
|
||||
Permit();
|
||||
}
|
||||
LoadRGB4( &HackScreen->ViewPort, flags.amii_curmap, amii_numcolors );
|
||||
LoadRGB4( &HackScreen->ViewPort, sysflags.amii_curmap, amii_numcolors );
|
||||
|
||||
if(tbmp[0])FreeImageFiles(load_list, tbmp);
|
||||
if(just_return) return;
|
||||
|
||||
@@ -187,7 +187,7 @@ register struct IntuiMessage *message;
|
||||
|
||||
/* Allow ALT to function as a META key ... */
|
||||
/* But make it switchable - alt is needed for some non-US keymaps */
|
||||
if(flags.altmeta)
|
||||
if(sysflags.altmeta)
|
||||
qualifier &= ~(IEQUALIFIER_LALT | IEQUALIFIER_RALT);
|
||||
numeric_pad = (qualifier & IEQUALIFIER_NUMERICPAD) != 0;
|
||||
|
||||
@@ -293,7 +293,7 @@ arrow:
|
||||
and prevent it from interfering with # command (M-#) */
|
||||
if (length == ('#'|0x80))
|
||||
return '#';
|
||||
if (alt && flags.altmeta)
|
||||
if (alt && sysflags.altmeta)
|
||||
length |= 0x80;
|
||||
return(length);
|
||||
} /* else shift, ctrl, alt, amiga, F-key, shift-tab, etc */
|
||||
@@ -813,7 +813,7 @@ GetFMsg(port)
|
||||
struct IntuiMessage *msg,*succ,*succ1;
|
||||
|
||||
if(msg=(struct IntuiMessage *)GetMsg(port)){
|
||||
if(!flags.amiflush)return((struct Message *)msg);
|
||||
if(!sysflags.amiflush)return((struct Message *)msg);
|
||||
if(msg->Class==RAWKEY){
|
||||
Forbid();
|
||||
succ=(struct IntuiMessage *)(port->mp_MsgList.lh_Head);
|
||||
|
||||
@@ -1256,7 +1256,7 @@ SetBorder( gd )
|
||||
register short *sp;
|
||||
register int i, inc = -1, dec = -1;
|
||||
int borders = 6;
|
||||
int hipen = flags.amii_dripens[ SHINEPEN ], shadowpen = flags.amii_dripens[ SHADOWPEN ];
|
||||
int hipen = sysflags.amii_dripens[ SHINEPEN ], shadowpen = sysflags.amii_dripens[ SHADOWPEN ];
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
struct DrawInfo *dip;
|
||||
#endif
|
||||
|
||||
@@ -517,7 +517,7 @@ amiv_flush_glyph_buffer( vw )
|
||||
amiv_start_glyphout( WIN_MAP );
|
||||
|
||||
#ifdef OPT_DISPMAP
|
||||
if(flags.fast_map){
|
||||
if(sysflags.fast_map){
|
||||
#endif
|
||||
#ifdef DISPMAP
|
||||
display_map( vw );
|
||||
@@ -756,7 +756,7 @@ amiv_lprint_glyph(window,color_index, glyph)
|
||||
w->Height - 1 );
|
||||
|
||||
#ifdef OPT_DISPMAP
|
||||
if(flags.fast_map){
|
||||
if(sysflags.fast_map){
|
||||
#endif /* keni */
|
||||
#ifdef DISPMAP
|
||||
/* display_map() needs byte-aligned destinations, and we don't want to
|
||||
@@ -789,7 +789,7 @@ amiv_lprint_glyph(window,color_index, glyph)
|
||||
struct RastPort *rp = w->RPort;
|
||||
x = rp->cp_x - pictdata.xsize - 3;
|
||||
#ifdef OPT_DISPMAP
|
||||
if(flags.fast_map){
|
||||
if(sysflags.fast_map){
|
||||
#endif
|
||||
#ifdef DISPMAP
|
||||
x &= -8;
|
||||
@@ -823,11 +823,11 @@ amiv_lprint_glyph(window,color_index, glyph)
|
||||
pictdata.xsize, pictdata.ysize, 0xc0 );
|
||||
|
||||
apen = rp->FgPen;
|
||||
SetAPen( rp, flags.amii_dripens[ SHINEPEN ] );
|
||||
SetAPen( rp, sysflags.amii_dripens[ SHINEPEN ] );
|
||||
Move( rp, x-1, y + pictdata.ysize );
|
||||
Draw( rp, x-1, y - 1 );
|
||||
Draw( rp, x + pictdata.xsize, y - 1 );
|
||||
SetAPen( rp, flags.amii_dripens[ SHADOWPEN ] );
|
||||
SetAPen( rp, sysflags.amii_dripens[ SHADOWPEN ] );
|
||||
Move( rp, x + pictdata.xsize, y );
|
||||
Draw( rp, x + pictdata.xsize, y + pictdata.ysize );
|
||||
Draw( rp, x, y + pictdata.ysize );
|
||||
@@ -1232,7 +1232,7 @@ dispmap_sanity(){
|
||||
mxsize != mysize ||
|
||||
dispmap_sanity1(mxsize) ||
|
||||
dispmap_sanity1(mysize)){
|
||||
flags.fast_map = 0;
|
||||
sysflags.fast_map = 0;
|
||||
}
|
||||
}
|
||||
int
|
||||
|
||||
@@ -121,7 +121,7 @@ ami_wininit_data( void )
|
||||
#ifdef OPT_DISPMAP
|
||||
dispmap_sanity();
|
||||
#endif
|
||||
memcpy(flags.amii_dripens,amii_defpens,sizeof(flags.amii_dripens));
|
||||
memcpy(sysflags.amii_dripens,amii_defpens,sizeof(sysflags.amii_dripens));
|
||||
}
|
||||
|
||||
# ifdef INTUI_NEW_LOOK
|
||||
@@ -1228,7 +1228,7 @@ amii_init_nhwindows(argcp,argv)
|
||||
break;
|
||||
|
||||
case SA_Pens:
|
||||
scrntags[i].ti_Data = (long)flags.amii_dripens;
|
||||
scrntags[i].ti_Data = (long)sysflags.amii_dripens;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1239,7 +1239,7 @@ amii_init_nhwindows(argcp,argv)
|
||||
amii_bmhd = ReadTileImageFiles( );
|
||||
else
|
||||
memcpy( amii_initmap, amii_init_map, sizeof( amii_initmap ) );
|
||||
memcpy(flags.amii_curmap,amii_initmap,sizeof(flags.amii_curmap));
|
||||
memcpy(sysflags.amii_curmap,amii_initmap,sizeof(sysflags.amii_curmap));
|
||||
|
||||
/* Find out how deep the screen needs to be, 32 planes is enough! */
|
||||
for( i = 0; i < 32; ++i )
|
||||
@@ -1286,7 +1286,7 @@ amii_init_nhwindows(argcp,argv)
|
||||
amiIDisplay->ypix = HackScreen->Height;
|
||||
amiIDisplay->xpix = HackScreen->Width;
|
||||
|
||||
LoadRGB4(&HackScreen->ViewPort, flags.amii_curmap, amii_numcolors );
|
||||
LoadRGB4(&HackScreen->ViewPort, sysflags.amii_curmap, amii_numcolors );
|
||||
|
||||
VisualInfo = GetVisualInfo(HackScreen, TAG_END);
|
||||
MenuStrip = CreateMenus(GTHackMenu, TAG_END);
|
||||
|
||||
@@ -336,8 +336,8 @@ EditColor( )
|
||||
if( okay )
|
||||
{
|
||||
for( i = 0; i < ( amii_numcolors ); ++i )
|
||||
flags.amii_curmap[ i ] = colors[ i ];
|
||||
LoadRGB4( &scrn->ViewPort, flags.amii_curmap, amii_numcolors );
|
||||
sysflags.amii_curmap[ i ] = colors[ i ];
|
||||
LoadRGB4( &scrn->ViewPort, sysflags.amii_curmap, amii_numcolors );
|
||||
}
|
||||
else
|
||||
LoadRGB4( &scrn->ViewPort, svcolors, amii_numcolors );
|
||||
@@ -781,7 +781,7 @@ DrawCol( w, idx, colors )
|
||||
|
||||
if( i == idx )
|
||||
{
|
||||
SetAPen( w->RPort, flags.amii_dripens[ SHADOWPEN ] );
|
||||
SetAPen( w->RPort, sysflags.amii_dripens[ SHADOWPEN ] );
|
||||
Move( w->RPort, x, y+bxylen-4 );
|
||||
Draw( w->RPort, x, y );
|
||||
Draw( w->RPort, x+incx-1, y );
|
||||
@@ -790,7 +790,7 @@ DrawCol( w, idx, colors )
|
||||
Draw( w->RPort, x+1, y+1 );
|
||||
Draw( w->RPort, x+incx-2, y+1 );
|
||||
|
||||
SetAPen( w->RPort, flags.amii_dripens[ SHINEPEN ] );
|
||||
SetAPen( w->RPort, sysflags.amii_dripens[ SHINEPEN ] );
|
||||
Move( w->RPort, x+incx-1, y+1 );
|
||||
Draw( w->RPort, x+incx-1, y+bxylen-4 );
|
||||
Draw( w->RPort, x, y+bxylen-4 );
|
||||
@@ -908,7 +908,7 @@ amii_setpens( int count )
|
||||
args[1] = amii_numcolors;
|
||||
if( EasyRequest( NULL, &ea2, NULL, args ) == 1 )
|
||||
{
|
||||
memcpy( flags.amii_curmap, amii_initmap,
|
||||
memcpy( sysflags.amii_curmap, amii_initmap,
|
||||
amii_numcolors*sizeof(amii_initmap[0]));
|
||||
}
|
||||
}
|
||||
@@ -919,7 +919,7 @@ amii_setpens( int count )
|
||||
{
|
||||
if( EasyRequest( NULL, &ea, NULL, NULL ) == 1 )
|
||||
{
|
||||
memcpy( flags.amii_curmap, amii_initmap,
|
||||
memcpy( sysflags.amii_curmap, amii_initmap,
|
||||
amii_numcolors*sizeof(amii_initmap[0]));
|
||||
}
|
||||
}
|
||||
@@ -928,7 +928,7 @@ amii_setpens( int count )
|
||||
#endif
|
||||
if( count != amii_numcolors )
|
||||
{
|
||||
memcpy( flags.amii_curmap, amii_initmap,
|
||||
memcpy( sysflags.amii_curmap, amii_initmap,
|
||||
amii_numcolors*sizeof(amii_initmap[0]));
|
||||
}
|
||||
|
||||
@@ -937,7 +937,7 @@ amii_setpens( int count )
|
||||
*/
|
||||
if( HackScreen != NULL )
|
||||
{
|
||||
LoadRGB4( &HackScreen->ViewPort, flags.amii_curmap, amii_numcolors );
|
||||
LoadRGB4( &HackScreen->ViewPort, sysflags.amii_curmap, amii_numcolors );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1151,12 +1151,12 @@ void amii_change_color( pen, val, rev )
|
||||
long val;
|
||||
{
|
||||
if( rev )
|
||||
flags.amii_curmap[ pen ] = ~val;
|
||||
sysflags.amii_curmap[ pen ] = ~val;
|
||||
else
|
||||
flags.amii_curmap[ pen ] = val;
|
||||
sysflags.amii_curmap[ pen ] = val;
|
||||
|
||||
if( HackScreen )
|
||||
LoadRGB4( &HackScreen->ViewPort, flags.amii_curmap, amii_numcolors );
|
||||
LoadRGB4( &HackScreen->ViewPort, sysflags.amii_curmap, amii_numcolors );
|
||||
}
|
||||
|
||||
char *
|
||||
@@ -1169,7 +1169,7 @@ amii_get_color_string( )
|
||||
*buf = 0;
|
||||
for( i = 0; i < min(32,amii_numcolors); ++i )
|
||||
{
|
||||
sprintf( s, "%s%03lx", i ? "/" : "", (long)flags.amii_curmap[ i ] );
|
||||
sprintf( s, "%s%03lx", i ? "/" : "", (long)sysflags.amii_curmap[ i ] );
|
||||
strcat( buf, s );
|
||||
}
|
||||
|
||||
|
||||
@@ -2267,7 +2267,7 @@ mac_putstr (winid win, int attr, const char *str) {
|
||||
if (win == WIN_MESSAGE) {
|
||||
r.right -= SBARWIDTH;
|
||||
r.bottom -= SBARHEIGHT;
|
||||
if (flags.page_wait &&
|
||||
if (sysflags.page_wait &&
|
||||
aWin->last_more_lin <= aWin->y_size - (r.bottom - r.top) / aWin->row_height) {
|
||||
aWin->last_more_lin = aWin->y_size;
|
||||
mac_display_nhwindow(win, TRUE);
|
||||
|
||||
@@ -277,7 +277,7 @@ int start;
|
||||
|
||||
int fd;
|
||||
|
||||
if (flags.asksavedisk) {
|
||||
if (sysflags.asksavedisk) {
|
||||
/* Don't prompt if you can find the save file */
|
||||
if ((fd = open_savefile()) >= 0) {
|
||||
(void) close(fd);
|
||||
@@ -348,7 +348,7 @@ comspec_exists()
|
||||
void
|
||||
gameDiskPrompt()
|
||||
{
|
||||
if (flags.asksavedisk) {
|
||||
if (sysflags.asksavedisk) {
|
||||
if (record_exists() && comspec_exists())
|
||||
return;
|
||||
(void) putchar('\n');
|
||||
|
||||
Reference in New Issue
Block a user