ok, now the amiga target on cvs is complete

This commit is contained in:
Nicholai Benalal 2001-08-16 12:35:52 +00:00
parent f5e4bfe125
commit 075578621b
3 changed files with 14 additions and 24 deletions

View File

@ -595,7 +595,7 @@ typedef struct {
bx_param_bool_c *Osystem_clock_sync;
bx_param_bool_c *Omouse_enabled;
bx_param_bool_c *Oprivate_colormap;
#if BX_USE_AMIGAOS
#if BX_WITH_AMIGAOS
bx_param_bool_c *Ofullscreen;
bx_param_string_c *Oscreenmode;
#endif

View File

@ -138,7 +138,7 @@ open_screen(void)
{
int id = INVALID_ID;
extern Boolean amigawin;
char *scrmode;
struct DrawInfo *screen_drawinfo = NULL;
@ -152,8 +152,7 @@ open_screen(void)
struct Hook screenreqhook = { 0, 0, (ULONG(*)())&GATEDispatcherFunc, (ULONG(*)())screenreqfunc, 0 };
if(!amigawin)
if(bx_options.Ofullscreen->get ())
{
if (smr = (ScreenModeRequester *)AllocAslRequestTags(ASL_ScreenModeRequest,
ASLSM_DoWidth, TRUE,
@ -367,9 +366,7 @@ bx_gui_c::flush(void)
void
bx_gui_c::clear_screen(void)
{
extern Boolean amigawin;
if(d > 8 || amigawin)
if(d > 8 || !bx_options.Ofullscreen->get ())
SetAPen(window->RPort, black);
else
SetAPen(window->RPort, 0); /*should be ok to clear with the first pen in the map*/
@ -434,7 +431,6 @@ bx_gui_c::palette_change(unsigned index, unsigned red, unsigned green, unsigned
{
Bit8u *ptr;
extern Boolean amigawin;
ptr = (Bit8u *)(cmap+index);
@ -443,7 +439,7 @@ bx_gui_c::palette_change(unsigned index, unsigned red, unsigned green, unsigned
*ptr = green; ptr++;
*ptr = blue;
if(d > 8 || amigawin)
if(d > 8 || !bx_options.Ofullscreen->get ())
{
if(pmap[index] != -1)
ReleasePen(window->WScreen->ViewPort.ColorMap, pmap[index]);
@ -476,9 +472,7 @@ bx_gui_c::graphics_tile_update(Bit8u *tile, unsigned x0, unsigned y0)
void
bx_gui_c::dimension_update(unsigned x, unsigned y)
{
extern Boolean amigawin;
if(amigawin && (x != w || y != h))
if(!bx_options.Ofullscreen->get () && (x != w || y != h))
{
ChangeWindowBox(window, window->LeftEdge, window->TopEdge, x + bx_borderleft + bx_borderright, y + bx_bordertop + bx_borderbottom + bx_headerbar_y);
w = x;
@ -492,8 +486,6 @@ bx_gui_c::dimension_update(unsigned x, unsigned y)
unsigned
bx_gui_c::create_bitmap(const unsigned char *bmap, unsigned xdim, unsigned ydim)
{
extern Boolean amigawin;
int i = 0;
Bit8u *a;
@ -509,7 +501,7 @@ bx_gui_c::create_bitmap(const unsigned char *bmap, unsigned xdim, unsigned ydim)
bx_header_image[bx_image_entries].ImageData = (UWORD *)bmap;
bx_header_image[bx_image_entries].NextImage = NULL;
bx_header_image[bx_image_entries].PlanePick = 0x1;
if(d > 8 || amigawin)
if(d > 8 || !bx_options.Ofullscreen->get ())
bx_header_image[bx_image_entries].PlaneOnOff = 0x2;
/*we need to reverse the bitorder for this to work*/
@ -568,9 +560,7 @@ return(bx_headerbar_entries - 1);
void
bx_gui_c::show_headerbar(void)
{
extern Boolean amigawin;
if(d > 8 || amigawin)
if(d > 8 || !bx_options.Ofullscreen->get ())
SetAPen(window->RPort, white);
else
SetAPen(window->RPort, 0);

View File

@ -81,7 +81,7 @@ bx_options_t bx_options = {
NULL, // system clock sync
NULL, // default mouse_enabled
NULL, // default private_colormap
#if BX_USE_AMIGAOS
#if BX_WITH_AMIGAOS
NULL, // full screen mode
NULL, // screen mode
#endif
@ -493,7 +493,7 @@ void bx_init_options ()
"Sync with system clock",
"This option slows down bochs if it starts to run ahead of the system clock",
0);
#if BX_USE_AMIGAOS
#if BX_WITH_AMIGAOS
bx_options.Ofullscreen = new bx_param_bool_c (BXP_FULLSCREEN,
"Use full screen mode",
"When enabled, bochs occupies the whole screen instead of just a window.",
@ -511,7 +511,7 @@ void bx_init_options ()
bx_options.Omax_ips,
bx_options.Osystem_clock_sync,
bx_options.Oprivate_colormap,
#if BX_USE_AMIGAOS
#if BX_WITH_AMIGAOS
bx_options.Ofullscreen,
bx_options.Oscreenmode,
#endif
@ -1431,7 +1431,7 @@ parse_line_formatted(char *context, int num_params, char *params[])
}
}
else if (!strcmp(params[0], "fullscreen")) {
#if BX_USE_AMIGAOS
#if BX_WITH_AMIGAOS
if (num_params != 2) {
BX_PANIC(("%s: fullscreen directive malformed.", context));
}
@ -1446,7 +1446,7 @@ parse_line_formatted(char *context, int num_params, char *params[])
#endif
}
else if (!strcmp(params[0], "screenmode")) {
#if BX_USE_AMIGAOS
#if BX_WITH_AMIGAOS
if (num_params != 2) {
BX_PANIC(("%s: screenmode directive malformed.", context));
}
@ -1824,7 +1824,7 @@ bx_write_configuration (char *rc, int overwrite)
fprintf (fp, "system_clock_sync: enabled=%d\n", bx_options.Osystem_clock_sync->get ());
fprintf (fp, "mouse: enabled=%d\n", bx_options.Omouse_enabled->get ());
fprintf (fp, "private_colormap: enabled=%d\n", bx_options.Oprivate_colormap->get ());
#if BX_USE_AMIGAOS
#if BX_WITH_AMIGAOS
fprintf (fp, "fullscreen: enabled=%d\n", bx_options.Ofullscreen->get ());
fprintf (fp, "screenmode: name=\"%s\"\n", bx_options.Oscreenmode->getptr ());
#endif