--- BasiliskII/src/AmigaOS/video_amiga.cpp 2001/06/30 12:58:07 1.15 +++ BasiliskII/src/AmigaOS/video_amiga.cpp 2001/07/03 19:20:45 1.18 @@ -129,6 +129,7 @@ static void set_video_monitor(uint32 wid } VideoModes.push_back(mode); + video_init_depth_list(); VideoMonitor.mode = mode; } @@ -154,14 +155,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; } @@ -206,7 +207,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; } @@ -235,19 +236,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; } @@ -266,7 +267,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; } @@ -283,7 +284,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; } @@ -312,19 +313,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; } @@ -341,7 +342,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; } @@ -358,7 +359,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; } @@ -383,7 +384,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; } @@ -414,7 +415,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; } } @@ -451,7 +452,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; @@ -536,16 +537,16 @@ void VideoExit(void) * Set palette */ -void video_set_palette(uint8 *pal) +void video_set_palette(uint8 *pal, in num) { if ((display_type == DISPLAY_SCREEN_P96 || display_type == DISPLAY_SCREEN_CGFX) && !IsDirectMode(VideoMonitor.mode)) { // Convert palette to 32 bits ULONG table[2 + 256 * 3]; - table[0] = 256 << 16; - table[256 * 3 + 1] = 0; - for (int i=0; i<256; i++) { + table[0] = num << 16; + table[num * 3 + 1] = 0; + for (int i=0; i