From 01f020da2b82fcc781f4654aefb90fb3033e2196 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 23 Aug 2003 14:42:37 +0000 Subject: SetPalette conflicts with an OS symbol on OS X svn-id: r9829 --- sword2/anims.cpp | 2 +- sword2/build_display.cpp | 12 ++++++------ sword2/console.cpp | 8 ++++---- sword2/driver/driver96.h | 6 +++--- sword2/driver/palette.cpp | 12 ++++++------ sword2/driver/rdwin.cpp | 4 ++-- sword2/function.cpp | 20 ++++++++++---------- sword2/mouse.cpp | 4 ++-- sword2/resman.cpp | 2 +- 9 files changed, 35 insertions(+), 35 deletions(-) (limited to 'sword2') diff --git a/sword2/anims.cpp b/sword2/anims.cpp index 9bafb41e17..84568b4013 100644 --- a/sword2/anims.cpp +++ b/sword2/anims.cpp @@ -890,7 +890,7 @@ int32 FN_play_sequence(int32 *params) // James(09apr97) _palEntry pal[256]; memset(pal, 0, 256*sizeof(_palEntry)); - SetPalette(0, 256, (uint8 *) pal, RDPAL_INSTANT); + BS2_SetPalette(0, 256, (uint8 *) pal, RDPAL_INSTANT); //-------------------------------------------------- Zdebug("FN_play_sequence FINISHED"); diff --git a/sword2/build_display.cpp b/sword2/build_display.cpp index 41c5e4fc75..06356b7997 100644 --- a/sword2/build_display.cpp +++ b/sword2/build_display.cpp @@ -308,7 +308,7 @@ void Build_display(void) //Tony21Sept96 else { StartConsole(); - SetPalette(0, 3, pal, RDPAL_INSTANT); //force the palette + BS2_SetPalette(0, 3, pal, RDPAL_INSTANT); //force the palette Print_to_console("no valid screen?"); } #endif // _SWORD2_DEBUG @@ -399,7 +399,7 @@ void DisplayMsg( uint8 *text, int time ) // Chris 15May97 pal[187].red = 255; pal[187].green = 255; pal[187].blue = 255; - SetPalette(0, 256, (uint8 *) pal, RDPAL_FADE); + BS2_SetPalette(0, 256, (uint8 *) pal, RDPAL_FADE); CopyScreenBuffer(); @@ -455,7 +455,7 @@ void DisplayMsg( uint8 *text, int time ) // Chris 15May97 CopyScreenBuffer(); } - SetPalette(0, 256, (uint8 *) oldPal, RDPAL_FADE); + BS2_SetPalette(0, 256, (uint8 *) oldPal, RDPAL_FADE); } //------------------------------------------------------------------------------------ @@ -1043,7 +1043,7 @@ void Start_new_palette(void) //Tony25Sept96 UpdatePaletteMatchTable((uint8 *) FetchPaletteMatchTable(screenFile)); - SetPalette(0, 256, FetchPalette(screenFile), RDPAL_FADE); + BS2_SetPalette(0, 256, FetchPalette(screenFile), RDPAL_FADE); lastPaletteRes=0; // indicating that it's a screen palette res_man.Res_close(this_screen.background_layer_id); // close screen file @@ -1184,7 +1184,7 @@ void SetFullPalette(int32 palRes) // James17jun97 // UpdatePaletteMatchTable(file+(256*4)); // not yet in separate palette files - SetPalette(0, 256, file, RDPAL_INSTANT); + BS2_SetPalette(0, 256, file, RDPAL_INSTANT); if (palRes != CONTROL_PANEL_PALETTE) // (James 03sep97) lastPaletteRes=palRes; // indicating that it's a separate palette resource @@ -1200,7 +1200,7 @@ void SetFullPalette(int32 palRes) // James17jun97 UpdatePaletteMatchTable((uint8 *) FetchPaletteMatchTable(file)); - SetPalette(0, 256, FetchPalette(file), RDPAL_INSTANT); + BS2_SetPalette(0, 256, FetchPalette(file), RDPAL_INSTANT); lastPaletteRes=0; // indicating that it's a screen palette res_man.Res_close(this_screen.background_layer_id); // close screen file diff --git a/sword2/console.cpp b/sword2/console.cpp index bfcbdea369..5fe5034535 100644 --- a/sword2/console.cpp +++ b/sword2/console.cpp @@ -182,7 +182,7 @@ void Init_console(void) //Tony9Sept96 con_chr_height=12; con_width=screenWide; //max across - SetPalette(CON_PEN, 1, white, RDPAL_INSTANT); // Force a palatte for the console. Chris 11Apr97 + BS2_SetPalette(CON_PEN, 1, white, RDPAL_INSTANT); // Force a palatte for the console. Chris 11Apr97 console_sprite = Twalloc(con_width*(CON_lines*con_chr_height), MEM_float, UID_con_sprite); @@ -545,7 +545,7 @@ uint32 Parse_user_input(void) //Tony13Aug96 //--------------------------------- case 8: // START Con_start(&input[1][0]); - SetPalette(187, 1, pal, RDPAL_INSTANT); //force the palette + BS2_SetPalette(187, 1, pal, RDPAL_INSTANT); //force the palette return(0); break; //--------------------------------- @@ -613,7 +613,7 @@ uint32 Parse_user_input(void) //Tony13Aug96 //--------------------------------- case 18: // S (same as START) Con_start(&input[1][0]); - SetPalette(187, 1, pal, RDPAL_INSTANT); //force the palette + BS2_SetPalette(187, 1, pal, RDPAL_INSTANT); //force the palette return(0); break; //--------------------------------- @@ -1012,7 +1012,7 @@ void Con_fatal_error(const char *format,...) //Tony17Oct96 uint8 white[4] = {255,255,255,0}; // (James 05mar97) - SetPalette(CON_PEN, 1, white, RDPAL_INSTANT); // set text colour in case screen is faded down! (James 05mar97) + BS2_SetPalette(CON_PEN, 1, white, RDPAL_INSTANT); // set text colour in case screen is faded down! (James 05mar97) va_start(arg_ptr,format); _vsnprintf( buf, 150, format, arg_ptr); diff --git a/sword2/driver/driver96.h b/sword2/driver/driver96.h index 1f3163dc28..8dd25de649 100644 --- a/sword2/driver/driver96.h +++ b/sword2/driver/driver96.h @@ -113,7 +113,7 @@ // 1.20 03-Dec-96 PRP Sound driver functions added. It is now // possible to play speech. // -// 1.21 05-Dec-96 PRP SetPalette changed so that the palette can +// 1.21 05-Dec-96 PRP BS2_SetPalette changed so that the palette can // be realized immediately or later when fading // is called. // @@ -443,7 +443,7 @@ // ------------------------------- palette.c -------------------------------- // -------------------------------------------------------------------------- // -// void SetPalette(int32 startEntry, int32 noEntries, uint8 *colourTable, uint8 setNow) +// void BS2_SetPalette(int32 startEntry, int32 noEntries, uint8 *colourTable, uint8 setNow) // // Sets the palette from position startEntry for noEntries, to the data // pointed to by colourTable. To set the palette immediately pass @@ -1506,7 +1506,7 @@ extern int32 GetGameName(uint8 *name); //----------------------------------------------------------------------------- // Palette functions - from palette.c //----------------------------------------------------------------------------- -extern int32 SetPalette(int16 startEntry, int16 noEntries, uint8 *palette, uint8 setNow); +extern int32 BS2_SetPalette(int16 startEntry, int16 noEntries, uint8 *palette, uint8 setNow); extern int32 UpdatePaletteMatchTable(uint8 *data); extern uint8 QuickMatch(uint8 r, uint8 g, uint8 b); extern int32 FadeUp(float time); diff --git a/sword2/driver/palette.cpp b/sword2/driver/palette.cpp index 31c26c6972..4d228a237e 100644 --- a/sword2/driver/palette.cpp +++ b/sword2/driver/palette.cpp @@ -61,7 +61,7 @@ // speed - but didn't work. Added functions // to fade the palette up and down. // -// 1.10 05-Dec-96 PRP Added a flag to SetPalette so that the palette +// 1.10 05-Dec-96 PRP Added a flag to BS2_SetPalette so that the palette // can be set immediately or later by the fade. // // 1.11 06-Dec-96 JEL fadeStatus now initialised to 0 @@ -91,18 +91,18 @@ // // 1.21 09-Jul-97 JEL Fixed palette dimming - to unsigned rather than signed RGB values! // -// 1.22 26-Jun-97 JEL SetPalette now always sets colour 0 to black so doesn't need setting to black from game engine +// 1.22 26-Jun-97 JEL BS2_SetPalette now always sets colour 0 to black so doesn't need setting to black from game engine // // 1.23 10-Jul-97 JEL Nothing changed but new version had to be booked in anyway. // -// 1.24 10-Jul-97 JEL SetPalette doesn't do that any more (see above)! +// 1.24 10-Jul-97 JEL BS2_SetPalette doesn't do that any more (see above)! // // Functions // --------- // // -------------------------------------------------------------------------- // -// void SetPalette(int32 startEntry, int32 noEntries, uint8 *colourTable) +// void BS2_SetPalette(int32 startEntry, int32 noEntries, uint8 *colourTable) // // Sets the palette from position startEntry for noEntries, to the data // pointed to by colourTable. @@ -315,10 +315,10 @@ uint8 QuickMatch(uint8 r, uint8 g, uint8 b) { -int32 SetPalette(int16 startEntry, int16 noEntries, uint8 *colourTable, uint8 fadeNow) +int32 BS2_SetPalette(int16 startEntry, int16 noEntries, uint8 *colourTable, uint8 fadeNow) { - debug(0, "SetPalette(%d, %d, %d)", startEntry, noEntries, fadeNow); + debug(0, "BS2_SetPalette(%d, %d, %d)", startEntry, noEntries, fadeNow); StackLock lock(g_sword2->_paletteMutex); diff --git a/sword2/driver/rdwin.cpp b/sword2/driver/rdwin.cpp index bfa990e7fb..dfdd68b823 100644 --- a/sword2/driver/rdwin.cpp +++ b/sword2/driver/rdwin.cpp @@ -307,12 +307,12 @@ long FAR PASCAL WindowsMessageHandler(HWND hWnd, UINT message, WPARAM wParam, LP { int32 hr; - hr = IDirectDrawSurface_SetPalette(lpPrimarySurface, lpPalette); + hr = IDirectDrawSurface_BS2_SetPalette(lpPrimarySurface, lpPalette); if (hr == DDERR_SURFACELOST) { IDirectDrawSurface_Restore(lpPrimarySurface); - hr= IDirectDrawSurface_SetPalette(lpPrimarySurface, lpPalette); + hr= IDirectDrawSurface_BS2_SetPalette(lpPrimarySurface, lpPalette); if(hr == DDERR_SURFACELOST) { Message("Failed to restore palette after second try"); diff --git a/sword2/function.cpp b/sword2/function.cpp index d0668c57d5..2d602627e1 100644 --- a/sword2/function.cpp +++ b/sword2/function.cpp @@ -291,19 +291,19 @@ int32 FN_flash(int32 *params) // (James14feb97) switch (params[0]) // what colour? { case WHITE: - SetPalette(0, 1, white, RDPAL_INSTANT); + BS2_SetPalette(0, 1, white, RDPAL_INSTANT); break; case RED: - SetPalette(0, 1, red, RDPAL_INSTANT); + BS2_SetPalette(0, 1, red, RDPAL_INSTANT); break; case GREEN: - SetPalette(0, 1, green, RDPAL_INSTANT); + BS2_SetPalette(0, 1, green, RDPAL_INSTANT); break; case BLUE: - SetPalette(0, 1, blue, RDPAL_INSTANT); + BS2_SetPalette(0, 1, blue, RDPAL_INSTANT); break; } @@ -313,7 +313,7 @@ int32 FN_flash(int32 *params) // (James14feb97) count--; } - SetPalette(0, 1, black, RDPAL_INSTANT); + BS2_SetPalette(0, 1, black, RDPAL_INSTANT); #endif // _SWORD2_DEBUG @@ -332,23 +332,23 @@ int32 FN_colour(int32 *params) // (James14feb97) switch (params[0]) // what colour? { case BLACK: - SetPalette(0, 1, black, RDPAL_INSTANT); + BS2_SetPalette(0, 1, black, RDPAL_INSTANT); break; case WHITE: - SetPalette(0, 1, white, RDPAL_INSTANT); + BS2_SetPalette(0, 1, white, RDPAL_INSTANT); break; case RED: - SetPalette(0, 1, red, RDPAL_INSTANT); + BS2_SetPalette(0, 1, red, RDPAL_INSTANT); break; case GREEN: - SetPalette(0, 1, green, RDPAL_INSTANT); + BS2_SetPalette(0, 1, green, RDPAL_INSTANT); break; case BLUE: - SetPalette(0, 1, blue, RDPAL_INSTANT); + BS2_SetPalette(0, 1, blue, RDPAL_INSTANT); break; } diff --git a/sword2/mouse.cpp b/sword2/mouse.cpp index fb528aa877..1c66031736 100644 --- a/sword2/mouse.cpp +++ b/sword2/mouse.cpp @@ -1216,12 +1216,12 @@ int32 FN_add_human(int32 *params) //Tony30Sept96 #ifdef _SWORD2_DEBUG if (testingSnR) // testing logic scripts by simulating an instant Save & Restore { - SetPalette(0, 1, white, RDPAL_INSTANT); + BS2_SetPalette(0, 1, white, RDPAL_INSTANT); Clear_fx_queue(); // stops all fx & clears the queue - eg. when leaving a location res_man.Kill_all_objects(0); // ie. trashing all object resources so they load in fresh & restart their logic scripts - SetPalette(0, 1, black, RDPAL_INSTANT); + BS2_SetPalette(0, 1, black, RDPAL_INSTANT); } #endif // ('0' means don't print to console, but console isn't up anyway) //---------------------------------------------------------------------------------------------- diff --git a/sword2/resman.cpp b/sword2/resman.cpp index ff90daeadb..9b3145739c 100644 --- a/sword2/resman.cpp +++ b/sword2/resman.cpp @@ -1094,7 +1094,7 @@ void resMan::CacheNewCluster(uint32 newCluster) InitialiseBackgroundLayer(FetchBackgroundLayer(bgfile)); InitialiseBackgroundLayer(NULL); InitialiseBackgroundLayer(NULL); - SetPalette(0, 256, FetchPalette(bgfile), RDPAL_FADE); + BS2_SetPalette(0, 256, FetchPalette(bgfile), RDPAL_FADE); RenderParallax(FetchBackgroundLayer(bgfile), 2); res_man.Res_close(2950); // release the screen resource -- cgit v1.2.3