--- BasiliskII/src/AmigaOS/video_amiga.cpp 2001/06/27 19:03:35 1.13 +++ BasiliskII/src/AmigaOS/video_amiga.cpp 2001/06/30 17:21:52 1.16 @@ -119,8 +119,6 @@ static void set_video_monitor(uint32 wid mode.depth = VDEPTH_8BIT; break; case 15: - mode.depth = VDEPTH_16BIT; - break; case 16: mode.depth = VDEPTH_16BIT; break; @@ -156,14 +154,14 @@ static bool init_window(int width, int h TAG_END ); if (the_win == NULL) { - ErrorAlert(GetString(STR_OPEN_WINDOW_ERR)); + ErrorAlert(STR_OPEN_WINDOW_ERR); return false; } // Create bitmap ("height + 2" for safety) the_bitmap = AllocBitMap(width, height + 2, 1, BMF_CLEAR, NULL); if (the_bitmap == NULL) { - ErrorAlert(GetString(STR_NO_MEM_ERR)); + ErrorAlert(STR_NO_MEM_ERR); return false; } @@ -208,7 +206,7 @@ static bool init_pip(int width, int heig TAG_END ); if (the_win == NULL || error) { - ErrorAlert(GetString(STR_OPEN_WINDOW_ERR)); + ErrorAlert(STR_OPEN_WINDOW_ERR); return false; } @@ -216,8 +214,8 @@ static bool init_pip(int width, int heig p96PIP_GetTags(the_win, P96PIP_SourceBitMap, (ULONG)&the_bitmap, TAG_END); // Add resolution and set VideoMonitor - set_video_monitor(width, height, p96GetBitMapAttr(the_bitmap, P96BMA_BYTESPERROW), 16); VideoMonitor.mac_frame_base = p96GetBitMapAttr(the_bitmap, P96BMA_MEMORY); + set_video_monitor(width, height, p96GetBitMapAttr(the_bitmap, P96BMA_BYTESPERROW), 16); return true; } @@ -237,19 +235,19 @@ static bool init_screen_p96(ULONG mode_i case 15: case 16: if (format != RGBFB_R5G5B5) { - ErrorAlert(GetString(STR_WRONG_SCREEN_FORMAT_ERR)); + ErrorAlert(STR_WRONG_SCREEN_FORMAT_ERR); return false; } break; case 24: case 32: if (format != RGBFB_A8R8G8B8) { - ErrorAlert(GetString(STR_WRONG_SCREEN_FORMAT_ERR)); + ErrorAlert(STR_WRONG_SCREEN_FORMAT_ERR); return false; } break; default: - ErrorAlert(GetString(STR_WRONG_SCREEN_DEPTH_ERR)); + ErrorAlert(STR_WRONG_SCREEN_DEPTH_ERR); return false; } @@ -268,7 +266,7 @@ static bool init_screen_p96(ULONG mode_i TAG_END ); if (the_screen == NULL) { - ErrorAlert(GetString(STR_OPEN_SCREEN_ERR)); + ErrorAlert(STR_OPEN_SCREEN_ERR); return false; } @@ -285,7 +283,7 @@ static bool init_screen_p96(ULONG mode_i TAG_END ); if (the_win == NULL) { - ErrorAlert(GetString(STR_OPEN_WINDOW_ERR)); + ErrorAlert(STR_OPEN_WINDOW_ERR); return false; } @@ -314,19 +312,19 @@ static bool init_screen_cgfx(ULONG mode_ case 16: // !!! PIXFMT_RGB15 is correct !!! if (format != PIXFMT_RGB15) { - ErrorAlert(GetString(STR_WRONG_SCREEN_FORMAT_ERR)); + ErrorAlert(STR_WRONG_SCREEN_FORMAT_ERR); return false; } break; case 24: case 32: if (format != PIXFMT_ARGB32) { - ErrorAlert(GetString(STR_WRONG_SCREEN_FORMAT_ERR)); + ErrorAlert(STR_WRONG_SCREEN_FORMAT_ERR); return false; } break; default: - ErrorAlert(GetString(STR_WRONG_SCREEN_DEPTH_ERR)); + ErrorAlert(STR_WRONG_SCREEN_DEPTH_ERR); return false; } @@ -343,7 +341,7 @@ static bool init_screen_cgfx(ULONG mode_ TAG_END ); if (the_screen == NULL) { - ErrorAlert(GetString(STR_OPEN_SCREEN_ERR)); + ErrorAlert(STR_OPEN_SCREEN_ERR); return false; } @@ -360,7 +358,7 @@ static bool init_screen_cgfx(ULONG mode_ TAG_END ); if (the_win == NULL) { - ErrorAlert(GetString(STR_OPEN_WINDOW_ERR)); + ErrorAlert(STR_OPEN_WINDOW_ERR); return false; } @@ -385,7 +383,7 @@ bool VideoInit(bool classic) // Allocate blank mouse pointer data null_pointer = (UWORD *)AllocMem(12, MEMF_PUBLIC | MEMF_CHIP | MEMF_CLEAR); if (null_pointer == NULL) { - ErrorAlert(GetString(STR_NO_MEM_ERR)); + ErrorAlert(STR_NO_MEM_ERR); return false; } @@ -416,7 +414,7 @@ bool VideoInit(bool classic) else if (CyberGfxBase && IsCyberModeID(mode_id)) display_type = DISPLAY_SCREEN_CGFX; else { - ErrorAlert(GetString(STR_NO_P96_MODE_ERR)); + ErrorAlert(STR_NO_P96_MODE_ERR); return false; } } @@ -453,7 +451,7 @@ bool VideoInit(bool classic) TAG_END ); if (periodic_proc == NULL) { - ErrorAlert(GetString(STR_NO_MEM_ERR)); + ErrorAlert(STR_NO_MEM_ERR); return false; } return true; @@ -540,7 +538,8 @@ void VideoExit(void) void video_set_palette(uint8 *pal) { - if (display_type == DISPLAY_SCREEN_P96 || display_type == DISPLAY_SCREEN_CGFX) { + if ((display_type == DISPLAY_SCREEN_P96 || display_type == DISPLAY_SCREEN_CGFX) + && !IsDirectMode(VideoMonitor.mode)) { // Convert palette to 32 bits ULONG table[2 + 256 * 3]; @@ -558,6 +557,15 @@ void video_set_palette(uint8 *pal) } +/* + * Switch video mode + */ + +void video_switch_to_mode(const video_mode &mode) +{ +} + + /* * Video message handling (not neccessary under AmigaOS, handled by periodic_func()) */