From: <av...@us...> - 2009-07-01 20:31:52
|
Revision: 3166 http://sc2.svn.sourceforge.net/sc2/?rev=3166&view=rev Author: avolkov Date: 2009-07-01 20:31:49 +0000 (Wed, 01 Jul 2009) Log Message: ----------- Fixed Mmrnmhrm's X-Form transformation without energy use; bug #1004 Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/src/sc2code/ships/mmrnmhrm/mmrnmhrm.c Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2009-07-01 05:33:28 UTC (rev 3165) +++ trunk/sc2/ChangeLog 2009-07-01 20:31:49 UTC (rev 3166) @@ -1,4 +1,5 @@ Changes towards version 0.7: +- Fixed Mmrnmhrm's X-Form transformation without energy use (bug #1004) - Alex - Added missing sleeps in DoInput() functions (bug #893) - Alex - Starmap unit conversion corrections; fixes bug #970 - Alex - Rounding-error correction in log(x|y)ToUniverse (bug #1046), from Nic Modified: trunk/sc2/src/sc2code/ships/mmrnmhrm/mmrnmhrm.c =================================================================== --- trunk/sc2/src/sc2code/ships/mmrnmhrm/mmrnmhrm.c 2009-07-01 05:33:28 UTC (rev 3165) +++ trunk/sc2/src/sc2code/ships/mmrnmhrm/mmrnmhrm.c 2009-07-01 20:31:49 UTC (rev 3166) @@ -369,8 +369,6 @@ ProcessSound (SetAbsSoundIndex ( /* TRANSFORM */ StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1), ElementPtr); - DeltaEnergy (ElementPtr, - -StarShipPtr->RaceDescPtr->characteristics.special_energy_cost); StarShipPtr->weapon_counter = 0; @@ -434,11 +432,9 @@ if ((StarShipPtr->cur_status_flags & SPECIAL) && StarShipPtr->special_counter == 0) { - if (StarShipPtr->RaceDescPtr->ship_info.energy_level < - StarShipPtr->RaceDescPtr->characteristics.special_energy_cost) - DeltaEnergy (ElementPtr, - -StarShipPtr->RaceDescPtr->characteristics.special_energy_cost); /* so text will flash */ - else + /* Either we transform or text will flash */ + if (DeltaEnergy (ElementPtr, + -StarShipPtr->RaceDescPtr->characteristics.special_energy_cost)) { if (ElementPtr->next.image.farray == StarShipPtr->RaceDescPtr->ship_data.ship) ElementPtr->next.image.farray = This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2009-07-02 02:53:24
|
Revision: 3167 http://sc2.svn.sourceforge.net/sc2/?rev=3167&view=rev Author: avolkov Date: 2009-07-02 01:44:31 +0000 (Thu, 02 Jul 2009) Log Message: ----------- First steps towards clean exit; bug #52 Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/src/sc2code/comm/starbas/starbas.c trunk/sc2/src/sc2code/confirm.c trunk/sc2/src/sc2code/controls.h trunk/sc2/src/sc2code/encount.c trunk/sc2/src/sc2code/gameinp.c trunk/sc2/src/sc2code/libs/graphics/cmap.c trunk/sc2/src/sc2code/libs/graphics/sdl/sdl_common.c trunk/sc2/src/sc2code/libs/inplib.h trunk/sc2/src/sc2code/libs/sound/audiocore.c trunk/sc2/src/sc2code/libs/sound/sound.c trunk/sc2/src/sc2code/starcon.c trunk/sc2/src/sc2code/starcon.h trunk/sc2/src/sc2code/util.c trunk/sc2/src/starcon2.c Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2009-07-01 20:31:49 UTC (rev 3166) +++ trunk/sc2/ChangeLog 2009-07-02 01:44:31 UTC (rev 3167) @@ -1,4 +1,5 @@ Changes towards version 0.7: +- Game attempts to exit cleanly under normal circustances (bug #52) - Alex - Fixed Mmrnmhrm's X-Form transformation without energy use (bug #1004) - Alex - Added missing sleeps in DoInput() functions (bug #893) - Alex - Starmap unit conversion corrections; fixes bug #970 - Alex Modified: trunk/sc2/src/sc2code/comm/starbas/starbas.c =================================================================== --- trunk/sc2/src/sc2code/comm/starbas/starbas.c 2009-07-01 20:31:49 UTC (rev 3166) +++ trunk/sc2/src/sc2code/comm/starbas/starbas.c 2009-07-02 01:44:31 UTC (rev 3167) @@ -1753,7 +1753,8 @@ total += amount * GLOBAL (ElementWorth[i]); do { - if (!Sleepy || AnyButtonPress (TRUE)) + if (!Sleepy || AnyButtonPress (TRUE) || + (GLOBAL (CurrentActivity) & CHECK_ABORT)) { Sleepy = FALSE; GLOBAL_SIS (ElementAmounts[i]) = 0; Modified: trunk/sc2/src/sc2code/confirm.c =================================================================== --- trunk/sc2/src/sc2code/confirm.c 2009-07-01 20:31:49 UTC (rev 3166) +++ trunk/sc2/src/sc2code/confirm.c 2009-07-02 01:44:31 UTC (rev 3167) @@ -84,7 +84,7 @@ DoConfirmExit (void) { BOOLEAN result; - static BOOLEAN in_confirm = FALSE; + if (LOBYTE (GLOBAL (CurrentActivity)) != SUPER_MELEE && LOBYTE (GLOBAL (CurrentActivity)) != WON_LAST_BATTLE && !(LastActivity & CHECK_RESTART)) @@ -93,13 +93,7 @@ PauseTrack (); LockMutex (GraphicsLock); - if (in_confirm) { - result = FALSE; - ExitRequested = FALSE; - } - else - { RECT r; STAMP s; FRAME F; @@ -107,7 +101,6 @@ RECT oldRect; BOOLEAN response = FALSE, done; - in_confirm = TRUE; oldContext = SetContext (ScreenContext); GetContextClipRect (&oldRect); SetContextClipRect (NULL); @@ -130,16 +123,20 @@ FlushGraphics (); //LockMutex (GraphicsLock); - GLOBAL (CurrentActivity) |= CHECK_ABORT; FlushInput (); done = FALSE; - + do { // Forbid recursive calls or pausing here! ExitRequested = FALSE; GamePaused = FALSE; UpdateInputState (); - if (PulsedInputState.menu[KEY_MENU_SELECT]) + if (GLOBAL (CurrentActivity) & CHECK_ABORT) + { // something else triggered an exit + done = TRUE; + response = TRUE; + } + else if (PulsedInputState.menu[KEY_MENU_SELECT]) { done = TRUE; PlayMenuSound (MENU_SOUND_SUCCESS); @@ -155,21 +152,21 @@ DrawConfirmationWindow (response); PlayMenuSound (MENU_SOUND_MOVE); } - TaskSwitch (); + SleepThread (ONE_SECOND / 30); } while (!done); s.frame = F; DrawStamp (&s); DestroyDrawable (ReleaseDrawable (s.frame)); ClearSystemRect (); - if (response) + if (response || (GLOBAL (CurrentActivity) & CHECK_ABORT)) { result = TRUE; + GLOBAL (CurrentActivity) |= CHECK_ABORT; } else { result = FALSE; - GLOBAL (CurrentActivity) &= ~CHECK_ABORT; } ExitRequested = FALSE; GamePaused = FALSE; @@ -190,7 +187,6 @@ do_subtitles ((void *)~0); } - in_confirm = FALSE; return (result); } Modified: trunk/sc2/src/sc2code/controls.h =================================================================== --- trunk/sc2/src/sc2code/controls.h 2009-07-01 20:31:49 UTC (rev 3166) +++ trunk/sc2/src/sc2code/controls.h 2009-07-02 01:44:31 UTC (rev 3167) @@ -102,7 +102,6 @@ void ResetKeyRepeat (void); BOOLEAN PauseGame (void); BOOLEAN DoConfirmExit (void); -void TFB_Abort (void); BOOLEAN WaitAnyButtonOrQuit (BOOLEAN CheckSpecial); void WaitForNoInput (SIZE Duration); BOOLEAN ConfirmExit (void); Modified: trunk/sc2/src/sc2code/encount.c =================================================================== --- trunk/sc2/src/sc2code/encount.c 2009-07-01 20:31:49 UTC (rev 3166) +++ trunk/sc2/src/sc2code/encount.c 2009-07-02 01:44:31 UTC (rev 3167) @@ -201,8 +201,7 @@ PlayMusic (MR, FALSE, 1); SegueFrame = CaptureDrawable (LoadGraphic (SEGUE_PMAP_ANIM)); UnlockMutex (GraphicsLock); - while (PLRPlaying (MR)) - TaskSwitch (); + WaitForSoundEnd (TFBSOUND_WAIT_ALL); StopMusic (); DestroyMusic (MR); LockMutex (GraphicsLock); @@ -622,7 +621,8 @@ for (j = 0; j < NUM_SHIP_FADES; ++j) { UnlockMutex (GraphicsLock); - Sleepy = (BOOLEAN)!AnyButtonPress (TRUE); + Sleepy = (BOOLEAN)!AnyButtonPress (TRUE) && + !(GLOBAL (CurrentActivity) & CHECK_ABORT); LockMutex (GraphicsLock); if (!Sleepy) break; @@ -658,6 +658,7 @@ FlushInput (); Time = GetTimeCounter () + (ONE_SECOND * 3); UnlockMutex (GraphicsLock); + // TODO: handle rapid quit while (!(AnyButtonPress (TRUE)) && GetTimeCounter () < Time) TaskSwitch (); LockMutex (GraphicsLock); @@ -688,6 +689,7 @@ DrawFadeText (str1, str2, TRUE, &scavenge_r); Time = GetTimeCounter () + ONE_SECOND * 2; UnlockMutex (GraphicsLock); + // TODO: handle rapid quit while (!(AnyButtonPress (TRUE)) && GetTimeCounter () < Time) TaskSwitch (); Modified: trunk/sc2/src/sc2code/gameinp.c =================================================================== --- trunk/sc2/src/sc2code/gameinp.c 2009-07-01 20:31:49 UTC (rev 3166) +++ trunk/sc2/src/sc2code/gameinp.c 2009-07-02 01:44:31 UTC (rev 3167) @@ -60,7 +60,6 @@ static BOOLEAN OldGestalt, CachedGestalt; static DWORD _max_accel, _min_accel, _step_accel; static BOOLEAN _gestalt_keys; -int ExitState; static MENU_SOUND_FLAGS sound_0, sound_1; @@ -353,9 +352,6 @@ #endif /* CREATE_JOURNAL */ } - if (CurrentInputState.menu[KEY_EXIT]) - ExitState = ConfirmExit (); - soundFlags = MenuKeysToSoundFlags (&PulsedInputState); if (MenuSounds Modified: trunk/sc2/src/sc2code/libs/graphics/cmap.c =================================================================== --- trunk/sc2/src/sc2code/libs/graphics/cmap.c 2009-07-01 20:31:49 UTC (rev 3166) +++ trunk/sc2/src/sc2code/libs/graphics/cmap.c 2009-07-02 01:44:31 UTC (rev 3167) @@ -18,6 +18,7 @@ #include "gfx_common.h" #include "libs/tasklib.h" +#include "libs/inplib.h" #include "libs/log.h" #include <string.h> @@ -606,6 +607,9 @@ if (!ColorMapPtr) return (0); + if (QuitPosted) // Don't make users wait for fades + TimeInterval = 0; + what = *ColorMapPtr; if (what >= (int)FadeAllToWhite && what <= (int)FadeSomeToColor) return XFormFade (ColorMapPtr, TimeInterval); Modified: trunk/sc2/src/sc2code/libs/graphics/sdl/sdl_common.c =================================================================== --- trunk/sc2/src/sc2code/libs/graphics/sdl/sdl_common.c 2009-07-01 20:31:49 UTC (rev 3166) +++ trunk/sc2/src/sc2code/libs/graphics/sdl/sdl_common.c 2009-07-02 01:44:31 UTC (rev 3167) @@ -56,11 +56,7 @@ #define FPS_PERIOD 100 int RenderedFrames = 0; -void -TFB_Abort (void) -{ - abortFlag = TRUE; -} +volatile int QuitPosted = 0; void TFB_PreInit (void) @@ -208,8 +204,7 @@ // TODO break; case SDL_QUIT: - log_showBox (false, false); - exit (EXIT_SUCCESS); + QuitPosted = 1; break; case SDL_VIDEORESIZE: /* User resized video mode */ // TODO @@ -222,7 +217,7 @@ } } - if (ImmediateInputState.menu[KEY_ABORT] || abortFlag) + if (ImmediateInputState.menu[KEY_ABORT]) { log_showBox (false, false); exit (EXIT_SUCCESS); Modified: trunk/sc2/src/sc2code/libs/inplib.h =================================================================== --- trunk/sc2/src/sc2code/libs/inplib.h 2009-07-01 20:31:49 UTC (rev 3166) +++ trunk/sc2/src/sc2code/libs/inplib.h 2009-07-02 01:44:31 UTC (rev 3167) @@ -39,6 +39,7 @@ */ extern volatile int MouseButtonDown; +extern volatile int QuitPosted; /* Functions for dealing with Character Mode */ Modified: trunk/sc2/src/sc2code/libs/sound/audiocore.c =================================================================== --- trunk/sc2/src/sc2code/libs/sound/audiocore.c 2009-07-01 20:31:49 UTC (rev 3166) +++ trunk/sc2/src/sc2code/libs/sound/audiocore.c 2009-07-02 01:44:31 UTC (rev 3167) @@ -27,6 +27,8 @@ /* The globals that control the sound drivers. */ int snddriver, soundflags; +volatile bool audio_inited = false; + /* * Declarations for driver init funcs */ @@ -74,12 +76,19 @@ "NOTICE: Try running UQM with '--sound=none' option"); exit (EXIT_FAILURE); } + + audio_inited = true; + return ret; } void unInitAudio (void) { + if (!audio_inited) + return; + + audio_inited = false; audiodrv.Uninitialize (); } Modified: trunk/sc2/src/sc2code/libs/sound/sound.c =================================================================== --- trunk/sc2/src/sc2code/libs/sound/sound.c 2009-07-01 20:31:49 UTC (rev 3166) +++ trunk/sc2/src/sc2code/libs/sound/sound.c 2009-07-02 01:44:31 UTC (rev 3167) @@ -17,8 +17,9 @@ */ #include "sound.h" -#include "../compiler.h" -#include "../tasklib.h" +#include "libs/compiler.h" +#include "libs/tasklib.h" +#include "libs/inplib.h" static Task FadeTask; static SIZE TTotal; @@ -118,6 +119,8 @@ SoundPlaying () : ChannelPlaying (Channel)) { SleepThread (ONE_SECOND / 20); + if (QuitPosted) // Don't make users wait for sounds to end + break; } } @@ -184,6 +187,9 @@ { DWORD TimeOut; + if (QuitPosted) // Don't make users wait for fades + TimeInterval = 0; + if (FadeTask) { volume_end = musicVolume; Modified: trunk/sc2/src/sc2code/starcon.c =================================================================== --- trunk/sc2/src/sc2code/starcon.c 2009-07-01 20:31:49 UTC (rev 3166) +++ trunk/sc2/src/sc2code/starcon.c 2009-07-02 01:44:31 UTC (rev 3167) @@ -39,6 +39,8 @@ #include "uqmversion.h" #include "options.h" +volatile int MainExited = FALSE; + // Open or close the periodically occuring QuasiSpace portal. // A seperate thread is always inside this function when the player // is in hyperspace. This thread awakens every BATTLE_FRAME_RATE seconds. @@ -96,6 +98,13 @@ } } +void +SignalStopMainThread (void) +{ + GamePaused = FALSE; + GLOBAL (CurrentActivity) |= CHECK_ABORT; +} + /* TODO: Remove these declarations once threading is gone. */ extern int snddriver, soundflags; @@ -125,11 +134,13 @@ } #endif // CREATE_JOURNAL - /* TODO: Put initAudio back in main where it belongs once threading - * is gone. - */ - extern sint32 initAudio (sint32 driver, sint32 flags); - initAudio (snddriver, soundflags); + { + /* TODO: Put initAudio back in main where it belongs once threading + * is gone. + */ + extern sint32 initAudio (sint32 driver, sint32 flags); + initAudio (snddriver, soundflags); + } if (!LoadKernel (0,0)) { @@ -258,9 +269,7 @@ FreeGameData (); FreeKernel (); - // XXX: the abort can now be changed to something cleaner; - // something to terminate the for(;;) loop in main() - TFB_Abort (); + MainExited = TRUE; (void) threadArg; /* Satisfying compiler (unused parameter) */ return 0; Modified: trunk/sc2/src/sc2code/starcon.h =================================================================== --- trunk/sc2/src/sc2code/starcon.h 2009-07-01 20:31:49 UTC (rev 3166) +++ trunk/sc2/src/sc2code/starcon.h 2009-07-02 01:44:31 UTC (rev 3167) @@ -17,6 +17,9 @@ #ifndef _STARCON_H #define _STARCON_H +extern volatile int MainExited; +extern void SignalStopMainThread (void); + extern int Starcon2Main (void *threadArg); extern void FreeGameData (void); Modified: trunk/sc2/src/sc2code/util.c =================================================================== --- trunk/sc2/src/sc2code/util.c 2009-07-01 20:31:49 UTC (rev 3166) +++ trunk/sc2/src/sc2code/util.c 2009-07-02 01:44:31 UTC (rev 3167) @@ -188,19 +188,19 @@ FlushGraphics (); //LockMutex (GraphicsLock); - while (ImmediateInputState.menu[KEY_PAUSE]) + while (ImmediateInputState.menu[KEY_PAUSE] && GamePaused) { BeginInputFrame (); TaskSwitch (); } - while (!ImmediateInputState.menu[KEY_PAUSE]) + while (!ImmediateInputState.menu[KEY_PAUSE] && GamePaused) { BeginInputFrame (); TaskSwitch (); } - while (ImmediateInputState.menu[KEY_PAUSE]) + while (ImmediateInputState.menu[KEY_PAUSE] && GamePaused) { BeginInputFrame (); TaskSwitch (); Modified: trunk/sc2/src/starcon2.c =================================================================== --- trunk/sc2/src/starcon2.c 2009-07-01 20:31:49 UTC (rev 3166) +++ trunk/sc2/src/starcon2.c 2009-07-02 01:44:31 UTC (rev 3167) @@ -29,6 +29,7 @@ #include "libs/graphics/gfx_common.h" #include "libs/sound/sound.h" #include "libs/input/input_common.h" +#include "libs/inplib.h" #include "libs/tasklib.h" #include "controls.h" #include "element.h" @@ -146,6 +147,7 @@ /* .speechVolumeScale = */ 1.0f, }; int optionsResult; + int i; log_init (15); @@ -476,21 +478,47 @@ StartThread (Starcon2Main, NULL, 1024, "Starcon2Main"); - for (;;) + for (i = 0; i < 2000 && !MainExited; ) { + if (QuitPosted) + { /* Try to stop the main thread, but limited number of times */ + SignalStopMainThread (); + ++i; + } + TFB_ProcessEvents (); ProcessThreadLifecycles (); TFB_FlushGraphics (); } + /* Currently, we use atexit() callbacks everywhere, so we + * cannot simply call unInitAudio() and the like, because other + * tasks might still be using it */ + if (MainExited) + { + // Not yet: TFB_UninitInput (); + unInitAudio (); + uninit_communication (); + UninitColorMaps (); + // Not yet: TFB_UninitGraphics (); + +#ifdef NETPLAY + NetManager_uninit (); + Alarm_uninit (); + Network_uninit (); +#endif + + // Not yet: CleanupTaskSystem (); + UnInitTimeSystem (); #if 0 - unInitTempDir (); + unInitTempDir (); #endif - uninitIO (); + uninitIO (); + UnInitThreadSystem (); + mem_uninit (); + } -#ifdef NETPLAY - Network_uninit (); -#endif + log_showBox (false, false); return EXIT_SUCCESS; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2009-07-04 06:18:28
|
Revision: 3168 http://sc2.svn.sourceforge.net/sc2/?rev=3168&view=rev Author: avolkov Date: 2009-07-04 06:18:22 +0000 (Sat, 04 Jul 2009) Log Message: ----------- Cleanup of GLOBAL(ShipStamp.frame) abuse; also fixes #1054 Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/src/sc2code/comm/chmmr/chmmrc.c trunk/sc2/src/sc2code/comm.c trunk/sc2/src/sc2code/encount.c trunk/sc2/src/sc2code/globdata.h trunk/sc2/src/sc2code/hyper.c trunk/sc2/src/sc2code/load.c trunk/sc2/src/sc2code/planets/solarsys.c trunk/sc2/src/sc2code/save.c trunk/sc2/src/sc2code/ship.c trunk/sc2/src/sc2code/sis.c trunk/sc2/src/sc2code/uqmdebug.c Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2009-07-02 01:44:31 UTC (rev 3167) +++ trunk/sc2/ChangeLog 2009-07-04 06:18:22 UTC (rev 3168) @@ -1,4 +1,5 @@ Changes towards version 0.7: +- Cleanup of GLOBAL(ShipStamp.frame) abuse; fixes bug #1054 - Alex - Game attempts to exit cleanly under normal circustances (bug #52) - Alex - Fixed Mmrnmhrm's X-Form transformation without energy use (bug #1004) - Alex - Added missing sleeps in DoInput() functions (bug #893) - Alex Modified: trunk/sc2/src/sc2code/comm/chmmr/chmmrc.c =================================================================== --- trunk/sc2/src/sc2code/comm/chmmr/chmmrc.c 2009-07-02 01:44:31 UTC (rev 3167) +++ trunk/sc2/src/sc2code/comm/chmmr/chmmrc.c 2009-07-04 06:18:22 UTC (rev 3168) @@ -155,7 +155,10 @@ /* transport player to Earth */ GLOBAL_SIS (log_x) = UNIVERSE_TO_LOGX (SOL_X); GLOBAL_SIS (log_y) = UNIVERSE_TO_LOGY (SOL_Y); - GLOBAL (ShipStamp.frame) = (FRAME)MAKE_DWORD (1, EARTH_INDEX + 1); + GLOBAL (ShipFacing) = 1; + /* At Earth or at Starbase */ + GLOBAL (ip_planet) = EARTH_INDEX + 1; + GLOBAL (in_orbit) = 0; /* XXX : this should be unhardcoded eventually */ GLOBAL (ip_location.x) = EARTH_OUTER_X; GLOBAL (ip_location.y) = EARTH_OUTER_Y; Modified: trunk/sc2/src/sc2code/comm.c =================================================================== --- trunk/sc2/src/sc2code/comm.c 2009-07-02 01:44:31 UTC (rev 3167) +++ trunk/sc2/src/sc2code/comm.c 2009-07-04 06:18:22 UTC (rev 3168) @@ -1440,7 +1440,7 @@ DrawSISMessage (NULL); if (LOBYTE (GLOBAL (CurrentActivity)) == IN_HYPERSPACE) DrawHyperCoords (GLOBAL (ShipStamp.origin)); - else if (HIWORD (GLOBAL (ShipStamp.frame)) == 0) + else if (GLOBAL (ip_planet) == 0) DrawHyperCoords (CurStarDescPtr->star_pt); else DrawSISTitle (GLOBAL_SIS (PlanetName)); Modified: trunk/sc2/src/sc2code/encount.c =================================================================== --- trunk/sc2/src/sc2code/encount.c 2009-07-02 01:44:31 UTC (rev 3167) +++ trunk/sc2/src/sc2code/encount.c 2009-07-04 06:18:22 UTC (rev 3168) @@ -501,7 +501,7 @@ DrawSISMessage (NULL); if (LOBYTE (GLOBAL (CurrentActivity)) == IN_HYPERSPACE) DrawHyperCoords (GLOBAL (ShipStamp.origin)); - else if (HIWORD (GLOBAL (ShipStamp.frame)) == 0) + else if (GLOBAL (ip_planet) == 0) DrawHyperCoords (CurStarDescPtr->star_pt); else DrawSISTitle(GLOBAL_SIS (PlanetName)); Modified: trunk/sc2/src/sc2code/globdata.h =================================================================== --- trunk/sc2/src/sc2code/globdata.h 2009-07-02 01:44:31 UTC (rev 3167) +++ trunk/sc2/src/sc2code/globdata.h 2009-07-04 06:18:22 UTC (rev 3168) @@ -960,6 +960,9 @@ POINT autopilot; POINT ip_location; STAMP ShipStamp; + UWORD ShipFacing; + BYTE ip_planet; + BYTE in_orbit; VELOCITY_DESC velocity; DWORD BattleGroupRef; Modified: trunk/sc2/src/sc2code/hyper.c =================================================================== --- trunk/sc2/src/sc2code/hyper.c 2009-07-02 01:44:31 UTC (rev 3167) +++ trunk/sc2/src/sc2code/hyper.c 2009-07-04 06:18:22 UTC (rev 3168) @@ -446,7 +446,9 @@ GLOBAL (CurrentActivity) |= START_ENCOUNTER; break; case INTERPLANETARY_TRANSITION: - GLOBAL (ShipStamp.frame) = 0; + GLOBAL (ip_planet) = 0; + GLOBAL (in_orbit) = 0; + GLOBAL (ShipFacing) = 0; /* Not reentering the system */ SET_GAME_STATE (USED_BROADCASTER, 0); if (GET_GAME_STATE (ARILOU_SPACE_SIDE) <= 1) { @@ -505,7 +507,7 @@ * or HyperSpace from QuasiSpace through the periodically * opening portal. */ - GLOBAL (ShipStamp.frame) = 0; + GLOBAL (ShipFacing) = 0; /* Not reentering the system */ SET_GAME_STATE (USED_BROADCASTER, 0); GLOBAL (autopilot.x) = ~0; GLOBAL (autopilot.y) = ~0; Modified: trunk/sc2/src/sc2code/load.c =================================================================== --- trunk/sc2/src/sc2code/load.c 2009-07-02 01:44:31 UTC (rev 3167) +++ trunk/sc2/src/sc2code/load.c 2009-07-04 06:18:22 UTC (rev 3168) @@ -380,7 +380,6 @@ LoadGameState (GAME_STATE *GSPtr, DECODE_REF fh) { BYTE dummy8; - DWORD tmpd; cread_8 (fh, &dummy8); /* obsolete */ cread_8 (fh, &GSPtr->glob_flags); @@ -401,8 +400,9 @@ /* STAMP ShipStamp */ cread_16 (fh, &GSPtr->ShipStamp.origin.x); cread_16 (fh, &GSPtr->ShipStamp.origin.y); - cread_32 (fh, &tmpd); /* abused ptr to store DWORD */ - GSPtr->ShipStamp.frame = (FRAME)tmpd; + cread_16 (fh, &GSPtr->ShipFacing); + cread_8 (fh, &GSPtr->ip_planet); + cread_8 (fh, &GSPtr->in_orbit); /* VELOCITY_DESC velocity */ cread_16 (fh, &GSPtr->velocity.TravelAngle); Modified: trunk/sc2/src/sc2code/planets/solarsys.c =================================================================== --- trunk/sc2/src/sc2code/planets/solarsys.c 2009-07-02 01:44:31 UTC (rev 3167) +++ trunk/sc2/src/sc2code/planets/solarsys.c 2009-07-04 06:18:22 UTC (rev 3168) @@ -224,13 +224,10 @@ }; pSolarSysState->MenuState.CurState = 0; - pSolarSysState->MenuState.Initialized = - HIBYTE (HIWORD (GLOBAL (ShipStamp.frame))); + pSolarSysState->MenuState.Initialized = GLOBAL (in_orbit); if (pSolarSysState->MenuState.Initialized) { - GLOBAL (ShipStamp.frame) = (FRAME)MAKE_DWORD ( - LOWORD (GLOBAL (ShipStamp.frame)), - LOBYTE (HIWORD (GLOBAL (ShipStamp.frame)))); + GLOBAL (in_orbit) = 0; ++pSolarSysState->MenuState.Initialized; } else @@ -324,7 +321,7 @@ sort_array[i + 1]; } - i = LOBYTE (HIWORD (GLOBAL (ShipStamp.frame))); + i = GLOBAL (ip_planet); if (i == 0) pSolarSysState->pBaseDesc = pSolarSysState->pOrbitalDesc = pSolarSysState->PlanetDesc; @@ -372,7 +369,8 @@ } else { - i = LOWORD (GLOBAL (ShipStamp.frame)); + i = GLOBAL (ShipFacing); + // XXX: Solar system reentry test depends on ShipFacing != 0 if (i == 0) ++i; @@ -1433,7 +1431,7 @@ pSolarSysState->MenuState.InputFunc = DoFlagshipCommands; - Reentry = (BOOLEAN)(GLOBAL (ShipStamp.frame) != 0); + Reentry = (GLOBAL (ShipFacing) != 0); if (!Reentry) { GLOBAL (autopilot.x) = ~0; @@ -1540,7 +1538,8 @@ else if ((GLOBAL (CurrentActivity) & START_ENCOUNTER) && EncounterGroup) { GetGroupInfo (GLOBAL (BattleGroupRef), EncounterGroup); - if (HIWORD (GLOBAL (ShipStamp.frame)) == 0) + // Generate the encounter location name based on the closest planet + if (GLOBAL (ip_planet) == 0) { BYTE i; DWORD best_dist; Modified: trunk/sc2/src/sc2code/save.c =================================================================== --- trunk/sc2/src/sc2code/save.c 2009-07-02 01:44:31 UTC (rev 3167) +++ trunk/sc2/src/sc2code/save.c 2009-07-04 06:18:22 UTC (rev 3168) @@ -367,7 +367,10 @@ /* STAMP ShipStamp */ cwrite_16 (fh, GSPtr->ShipStamp.origin.x); cwrite_16 (fh, GSPtr->ShipStamp.origin.y); - cwrite_32 (fh, (DWORD)GSPtr->ShipStamp.frame); /* abused ptr to store DWORD */ + cwrite_16 (fh, GSPtr->ShipFacing); + cwrite_8 (fh, GSPtr->ip_planet); + cwrite_8 (fh, GSPtr->in_orbit); + /* VELOCITY_DESC velocity */ cwrite_16 (fh, GSPtr->velocity.TravelAngle); cwrite_16 (fh, GSPtr->velocity.vector.width); @@ -648,7 +651,6 @@ GAME_STATE_FILE *fp; DWORD flen; COUNT num_links; - FRAME frame; POINT pt; STAR_DESC SD; char buf[256], file[PATH_MAX]; @@ -659,9 +661,7 @@ else memset (&SD, 0, sizeof (SD)); - // XXX: Backup: ShipStamp.frame is abused to store DWORD info - // SaveFlagshipState() overwrites it with a DWORD value - frame = GLOBAL (ShipStamp.frame); + // XXX: Backup: SaveFlagshipState() overwrites ip_location pt = GLOBAL (ip_location); SaveFlagshipState (); if (LOBYTE (GLOBAL (CurrentActivity)) == IN_INTERPLANETARY @@ -671,9 +671,10 @@ SaveGameState (&GlobData.Game_state, fh); + // XXX: Restore GLOBAL (ip_location) = pt; - // XXX: Restore: ShipStamp.frame is abused to store DWORD info - GLOBAL (ShipStamp.frame) = frame; + // Only relevant when loading a game and must be cleaned + GLOBAL (in_orbit) = 0; SaveRaceQueue (fh, &GLOBAL (avail_race_q)); // START_INTERPLANETARY is only set when saving from Homeworld Modified: trunk/sc2/src/sc2code/ship.c =================================================================== --- trunk/sc2/src/sc2code/ship.c 2009-07-02 01:44:31 UTC (rev 3167) +++ trunk/sc2/src/sc2code/ship.c 2009-07-04 06:18:22 UTC (rev 3168) @@ -454,15 +454,17 @@ { StarShipPtr->ShipFacing = NORMALIZE_FACING (TFB_Random ()); if (LOBYTE (GLOBAL (CurrentActivity)) == IN_HYPERSPACE) - { - COUNT facing; - - facing = LOWORD (GLOBAL (ShipStamp.frame)); + { // Only one ship is ever spawned in HyperSpace -- flagship + COUNT facing = GLOBAL (ShipFacing); + // XXX: Solar system reentry test depends on ShipFacing != 0 if (facing > 0) --facing; - GLOBAL (ShipStamp.frame) = (FRAME)MAKE_DWORD ( - StarShipPtr->ShipFacing + 1, 0); + // XXX: This appears to set the facing to a random value + // for when the ship returns from an encounter back + // to HyperSpace. However, it is overwritten later + // in sis.c. See also r1614. + //GLOBAL (ShipFacing) = StarShipPtr->ShipFacing + 1; StarShipPtr->ShipFacing = facing; } ShipElementPtr->current.image.frame = Modified: trunk/sc2/src/sc2code/sis.c =================================================================== --- trunk/sc2/src/sc2code/sis.c 2009-07-02 01:44:31 UTC (rev 3167) +++ trunk/sc2/src/sc2code/sis.c 2009-07-04 06:18:22 UTC (rev 3168) @@ -1588,7 +1588,7 @@ if (LOBYTE (GLOBAL (CurrentActivity)) == IN_HYPERSPACE) { // Player is in HyperSpace or QuasiSpace. - // Update 'GLOBAL (ShipStamp.frame)' to the direction the flagship + // Update 'GLOBAL (ShipFacing)' to the direction the flagship // is facing. HELEMENT hElement, hNextElement; @@ -1606,8 +1606,8 @@ STARSHIP *StarShipPtr; GetElementStarShip (ElementPtr, &StarShipPtr); - GLOBAL (ShipStamp.frame) = (FRAME)MAKE_DWORD ( - StarShipPtr->ShipFacing + 1, 0); + // XXX: Solar system reentry test depends on ShipFacing != 0 + GLOBAL (ShipFacing) = StarShipPtr->ShipFacing + 1; hNextElement = 0; } UnlockElement (hElement); @@ -1616,22 +1616,19 @@ else if (pSolarSysState) { // Player is in a solar system. - UWORD index1, index2; - FRAME frame; - - frame = GLOBAL (ShipStamp.frame); - if (pSolarSysState->MenuState.Initialized < 3) { - index1 = GetFrameIndex (frame) + 1; + // XXX: Solar system reentry test depends on ShipFacing != 0 + GLOBAL (ShipFacing) = GetFrameIndex (GLOBAL (ShipStamp.frame)) + 1; + GLOBAL (in_orbit) = 0; if (pSolarSysState->pBaseDesc == pSolarSysState->PlanetDesc) { - index2 = 0; + GLOBAL (ip_planet) = 0; } else { - index2 = (UWORD)(pSolarSysState->pBaseDesc->pPrevDesc - - pSolarSysState->PlanetDesc + 1); + GLOBAL (ip_planet) = pSolarSysState->pBaseDesc->pPrevDesc + - pSolarSysState->PlanetDesc + 1; GLOBAL (ip_location) = pSolarSysState->SunDesc[0].location; } @@ -1639,7 +1636,8 @@ else { // In orbit around a planet. - + BYTE moon; + // Update the starinfo.dat file if necessary. if (GET_GAME_STATE (PLANETARY_CHANGE)) { @@ -1647,17 +1645,14 @@ SET_GAME_STATE (PLANETARY_CHANGE, 0); } - index1 = LOWORD (frame); - index2 = 1; + // GLOBAL (ip_planet) is already set + moon = 1; /* the planet itself */ if (pSolarSysState->pOrbitalDesc != pSolarSysState->pBaseDesc->pPrevDesc) - index2 += pSolarSysState->pOrbitalDesc + moon += pSolarSysState->pOrbitalDesc - pSolarSysState->pBaseDesc + 1; - index2 = MAKE_WORD (HIWORD (frame), index2); + GLOBAL (in_orbit) = moon; } - - GLOBAL (ShipStamp.frame) = - (FRAME)MAKE_DWORD (index1, index2); } } Modified: trunk/sc2/src/sc2code/uqmdebug.c =================================================================== --- trunk/sc2/src/sc2code/uqmdebug.c 2009-07-02 01:44:31 UTC (rev 3167) +++ trunk/sc2/src/sc2code/uqmdebug.c 2009-07-04 06:18:22 UTC (rev 3168) @@ -483,7 +483,9 @@ GLOBAL (CurrentActivity) &= ~IN_BATTLE; // Enter IP: - GLOBAL (ShipStamp.frame) = 0; + GLOBAL (ShipFacing) = 0; + GLOBAL (ip_planet) = 0; + GLOBAL (in_orbit) = 0; // This causes the ship position in IP to be reset. GLOBAL (CurrentActivity) |= START_INTERPLANETARY; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2009-07-04 07:26:00
|
Revision: 3169 http://sc2.svn.sourceforge.net/sc2/?rev=3169&view=rev Author: avolkov Date: 2009-07-04 07:25:58 +0000 (Sat, 04 Jul 2009) Log Message: ----------- Fixed crashes and potential weirdness when loading savegames from a Homeworld encounter screen Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/src/sc2code/planets/solarsys.c Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2009-07-04 06:18:22 UTC (rev 3168) +++ trunk/sc2/ChangeLog 2009-07-04 07:25:58 UTC (rev 3169) @@ -1,4 +1,6 @@ Changes towards version 0.7: +- Fixed crashes and potential weirdness when loading savegames from + a Homeworld encounter screen - Alex - Cleanup of GLOBAL(ShipStamp.frame) abuse; fixes bug #1054 - Alex - Game attempts to exit cleanly under normal circustances (bug #52) - Alex - Fixed Mmrnmhrm's X-Form transformation without energy use (bug #1004) - Alex Modified: trunk/sc2/src/sc2code/planets/solarsys.c =================================================================== --- trunk/sc2/src/sc2code/planets/solarsys.c 2009-07-04 06:18:22 UTC (rev 3168) +++ trunk/sc2/src/sc2code/planets/solarsys.c 2009-07-04 07:25:58 UTC (rev 3169) @@ -1531,9 +1531,13 @@ if (GLOBAL (CurrentActivity) & END_INTERPLANETARY) { GLOBAL (CurrentActivity) &= ~END_INTERPLANETARY; - (*pSolarSysState->GenFunc) (UNINIT_NPCS); - - SET_GAME_STATE (USED_BROADCASTER, 0); + + if (!(GLOBAL (CurrentActivity) & (CHECK_ABORT | CHECK_LOAD))) + { // These are game state changing ops and so cannot be + // called once another game has been loaded! + (*pSolarSysState->GenFunc) (UNINIT_NPCS); + SET_GAME_STATE (USED_BROADCASTER, 0); + } } else if ((GLOBAL (CurrentActivity) & START_ENCOUNTER) && EncounterGroup) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2009-07-07 00:51:27
|
Revision: 3173 http://sc2.svn.sourceforge.net/sc2/?rev=3173&view=rev Author: avolkov Date: 2009-07-07 00:51:26 +0000 (Tue, 07 Jul 2009) Log Message: ----------- Do not pause the game in places where not relevant; bug #984 Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/src/sc2code/cnctdlg.c trunk/sc2/src/sc2code/loadmele.c trunk/sc2/src/sc2code/melee.c trunk/sc2/src/sc2code/setupmenu.c Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2009-07-07 00:22:52 UTC (rev 3172) +++ trunk/sc2/ChangeLog 2009-07-07 00:51:26 UTC (rev 3173) @@ -1,4 +1,5 @@ Changes towards version 0.7: +- Do not pause the game in places where not relevant (bug #984) - Alex - Fixed crashes and potential weirdness when loading savegames from a Homeworld encounter screen (bug #997) - Alex - Cleanup of GLOBAL(ShipStamp.frame) abuse; fixes bug #1054 - Alex Modified: trunk/sc2/src/sc2code/cnctdlg.c =================================================================== --- trunk/sc2/src/sc2code/cnctdlg.c 2009-07-07 00:22:52 UTC (rev 3172) +++ trunk/sc2/src/sc2code/cnctdlg.c 2009-07-07 00:51:26 UTC (rev 3173) @@ -548,6 +548,9 @@ { BOOLEAN changed; + /* Cancel any presses of the Pause key. */ + GamePaused = FALSE; + if (!state->Initialized) { state->Initialized = TRUE; Modified: trunk/sc2/src/sc2code/loadmele.c =================================================================== --- trunk/sc2/src/sc2code/loadmele.c 2009-07-07 00:22:52 UTC (rev 3172) +++ trunk/sc2/src/sc2code/loadmele.c 2009-07-07 00:51:26 UTC (rev 3173) @@ -330,6 +330,9 @@ { DWORD TimeIn = GetTimeCounter (); + /* Cancel any presses of the Pause key. */ + GamePaused = FALSE; + if (GLOBAL (CurrentActivity) & CHECK_ABORT) return FALSE; Modified: trunk/sc2/src/sc2code/melee.c =================================================================== --- trunk/sc2/src/sc2code/melee.c 2009-07-07 00:22:52 UTC (rev 3172) +++ trunk/sc2/src/sc2code/melee.c 2009-07-07 00:51:26 UTC (rev 3173) @@ -1051,6 +1051,9 @@ { DWORD TimeIn = GetTimeCounter (); + /* Cancel any presses of the Pause key. */ + GamePaused = FALSE; + if (GLOBAL (CurrentActivity) & CHECK_ABORT) return (FALSE); @@ -1221,6 +1224,9 @@ { DWORD TimeIn = GetTimeCounter (); + /* Cancel any presses of the Pause key. */ + GamePaused = FALSE; + if (GLOBAL (CurrentActivity) & CHECK_ABORT) return (FALSE); @@ -1398,6 +1404,9 @@ ssize_t numDone; #endif + /* Cancel any presses of the Pause key. */ + GamePaused = FALSE; + if (PulsedInputState.menu[KEY_MENU_CANCEL]) { pMS->InputFunc = DoMelee; @@ -1853,6 +1862,9 @@ COUNT which_side = (pMS->MeleeOption == NET_TOP) ? 1 : 0; NetConnection *conn; + /* Cancel any presses of the Pause key. */ + GamePaused = FALSE; + if (GLOBAL (CurrentActivity) & CHECK_ABORT) return (FALSE); @@ -2036,8 +2048,11 @@ DoMelee (MELEE_STATE *pMS) { DWORD TimeIn = GetTimeCounter (); + BOOLEAN force_select = FALSE; - BOOLEAN force_select = FALSE; + /* Cancel any presses of the Pause key. */ + GamePaused = FALSE; + if (GLOBAL (CurrentActivity) & CHECK_ABORT) return (FALSE); Modified: trunk/sc2/src/sc2code/setupmenu.c =================================================================== --- trunk/sc2/src/sc2code/setupmenu.c 2009-07-07 00:22:52 UTC (rev 3172) +++ trunk/sc2/src/sc2code/setupmenu.c 2009-07-07 00:51:26 UTC (rev 3173) @@ -426,6 +426,9 @@ static BOOLEAN DoSetupMenu (SETUP_MENU_STATE *pInputState) { + /* Cancel any presses of the Pause key. */ + GamePaused = FALSE; + if (!pInputState->initialized) { SetDefaultMenuRepeatDelay (); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2009-07-09 05:24:47
|
Revision: 3174 http://sc2.svn.sourceforge.net/sc2/?rev=3174&view=rev Author: avolkov Date: 2009-07-09 05:24:40 +0000 (Thu, 09 Jul 2009) Log Message: ----------- Game settings Quit menu now delegates to F10 quit; bug #462 Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/content/base/gamestrings.txt trunk/sc2/content/base/ui/playmenu.ani trunk/sc2/src/sc2code/gameopt.c trunk/sc2/src/sc2code/gamestr.h trunk/sc2/src/sc2code/menu.c trunk/sc2/src/sc2code/mouse_err.c trunk/sc2/src/sc2code/restart.c trunk/sc2/src/sc2code/sis.h Removed Paths: ------------- trunk/sc2/content/base/ui/playmenu-065.png trunk/sc2/content/base/ui/playmenu-066.png Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2009-07-07 00:51:26 UTC (rev 3173) +++ trunk/sc2/ChangeLog 2009-07-09 05:24:40 UTC (rev 3174) @@ -1,4 +1,5 @@ Changes towards version 0.7: +- Game settings Quit menu now delegates to F10 quit (bug #462) - Alex - Do not pause the game in places where not relevant (bug #984) - Alex - Fixed crashes and potential weirdness when loading savegames from a Homeworld encounter screen (bug #997) - Alex Modified: trunk/sc2/content/base/gamestrings.txt =================================================================== --- trunk/sc2/content/base/gamestrings.txt 2009-07-07 00:51:26 UTC (rev 3173) +++ trunk/sc2/content/base/gamestrings.txt 2009-07-09 05:24:40 UTC (rev 3174) @@ -1862,14 +1862,6 @@ No -#(Don't Quit) -Don't Quit - - -#(Quit Game) -Quit Game - - #(Cr) Cr @@ -2178,14 +2170,6 @@ -#(no, play!) -no, play! - - -#(yes, quit!) -yes, quit! - - #(scan) scan Deleted: trunk/sc2/content/base/ui/playmenu-065.png =================================================================== (Binary files differ) Deleted: trunk/sc2/content/base/ui/playmenu-066.png =================================================================== (Binary files differ) Modified: trunk/sc2/content/base/ui/playmenu.ani =================================================================== --- trunk/sc2/content/base/ui/playmenu.ani 2009-07-07 00:51:26 UTC (rev 3173) +++ trunk/sc2/content/base/ui/playmenu.ani 2009-07-09 05:24:40 UTC (rev 3174) @@ -37,8 +37,6 @@ playmenu-035.png 0 0 0 10 playmenu-036.png 0 0 0 10 playmenu-037.png 0 0 1 10 -playmenu-065.png 0 0 1 10 -playmenu-066.png 0 0 1 10 playmenu-058.png 0 0 -1 -12 playmenu-059.png 0 0 -138 -93 playmenu-060.png 0 0 0 0 Modified: trunk/sc2/src/sc2code/gameopt.c =================================================================== --- trunk/sc2/src/sc2code/gameopt.c 2009-07-07 00:51:26 UTC (rev 3173) +++ trunk/sc2/src/sc2code/gameopt.c 2009-07-09 05:24:40 UTC (rev 3174) @@ -123,12 +123,6 @@ EXIT_MENU_SETTING }; -enum -{ - NO_QUIT_MENU, - YES_QUIT_MENU -}; - static void FeedbackSetting (BYTE which_setting) { @@ -190,26 +184,6 @@ UnlockMutex (GraphicsLock); } -static void -FeedbackQuit (BYTE which_setting) -{ - const UNICODE *buf = ""; - - switch (which_setting) - { - case NO_QUIT_MENU: - buf = GAME_STRING (QUITMENU_STRING_BASE + 3); // "Don't Quit" - break; - case YES_QUIT_MENU: - buf = GAME_STRING (QUITMENU_STRING_BASE + 4); // "Quit Game" - break; - } - - LockMutex (GraphicsLock); - DrawStatusMessage (buf); - UnlockMutex (GraphicsLock); -} - #define DDSHS_NORMAL 0 #define DDSHS_EDIT 1 #define DDSHS_BLOCKCUR 2 @@ -499,52 +473,6 @@ return (TRUE); } -static BOOLEAN -DoQuitMenu (MENU_STATE *pMS) -{ - if (GLOBAL (CurrentActivity) & CHECK_ABORT) - return (FALSE); - - SetMenuSounds (MENU_SOUND_ARROWS, MENU_SOUND_SELECT); - - if (!pMS->Initialized) - { - DrawMenuStateStrings (PM_NO_QUIT, pMS->CurState); - FeedbackQuit (pMS->CurState); - pMS->Initialized = TRUE; - pMS->InputFunc = DoQuitMenu; - } - else if (PulsedInputState.menu[KEY_MENU_CANCEL] - || (PulsedInputState.menu[KEY_MENU_SELECT] - && pMS->CurState == NO_QUIT_MENU)) - { - LockMutex (GraphicsLock); - DrawStatusMessage (NULL); - UnlockMutex (GraphicsLock); - - pMS->CurState = QUIT_GAME; - pMS->InputFunc = DoGameOptions; - pMS->Initialized = 0; - } - else if (PulsedInputState.menu[KEY_MENU_SELECT]) - { - switch (pMS->CurState) - { - case NO_QUIT_MENU: - break; - case YES_QUIT_MENU: - GLOBAL (CurrentActivity) |= CHECK_ABORT; - ExitRequested = FALSE; - break; - } - FeedbackQuit (pMS->CurState); - } - else if (DoMenuChooser (pMS, PM_NO_QUIT)) - FeedbackQuit (pMS->CurState); - - return (TRUE); -} - static void DrawCargo (COUNT redraw_state) { @@ -778,8 +706,7 @@ { s.origin.x = SUMMARY_X_OFFS - SUMMARY_SIDE_OFFS + 6; s.origin.y = 0; - s.frame = SetRelFrameIndex ( - pLocMenuState->ModuleFrame, 0); + s.frame = SetRelFrameIndex (pLocMenuState->ModuleFrame, 0); DrawStamp (&s); s.origin.x = SUMMARY_X_OFFS + SUMMARY_SIDE_OFFS; s.frame = IncFrameIndex (s.frame); @@ -940,7 +867,7 @@ { extern FRAME PlayFrame; - pMS->ModuleFrame = SetAbsFrameIndex (PlayFrame, 41); + pMS->ModuleFrame = SetAbsFrameIndex (PlayFrame, 39); } LockMutex (GraphicsLock); @@ -1330,9 +1257,8 @@ // to a FRAME. return PickGame (pMS); case QUIT_GAME: - pMS->Initialized = FALSE; - pMS->CurState = NO_QUIT_MENU; - pMS->InputFunc = DoQuitMenu; + if (ConfirmExit ()) + return FALSE; break; case SETTINGS: pMS->Initialized = FALSE; Modified: trunk/sc2/src/sc2code/gamestr.h =================================================================== --- trunk/sc2/src/sc2code/gamestr.h 2009-07-07 00:51:26 UTC (rev 3173) +++ trunk/sc2/src/sc2code/gamestr.h 2009-07-09 05:24:40 UTC (rev 3174) @@ -41,11 +41,11 @@ #define MELEE_STRING_COUNT 9 #define SAVEGAME_STRING_COUNT 5 #define OPTION_STRING_COUNT 5 -#define QUITMENU_STRING_COUNT 5 +#define QUITMENU_STRING_COUNT 3 #define STATUS_STRING_COUNT 6 #define FLAGSHIP_STRING_COUNT 13 #define ORBITSCAN_STRING_COUNT 19 -#define MAINMENU_STRING_COUNT 57 +#define MAINMENU_STRING_COUNT 55 #define NETMELEE_STRING_COUNT 19 enum { Modified: trunk/sc2/src/sc2code/menu.c =================================================================== --- trunk/sc2/src/sc2code/menu.c 2009-07-07 00:51:26 UTC (rev 3173) +++ trunk/sc2/src/sc2code/menu.c 2009-07-09 05:24:40 UTC (rev 3174) @@ -150,9 +150,6 @@ case PM_SOUND_ON: return PM_EXIT_MENU4; break; - case PM_NO_QUIT: - return PM_YES_QUIT; - break; case PM_ALT_SCAN: case PM_ALT_STARMAP: return PM_ALT_NAVIGATE; @@ -533,19 +530,6 @@ break; } } - if (beg_index == PM_NO_QUIT) - { - end_index = beg_index + 1; - switch (beg_index + NewState) - { - case PM_NO_QUIT: - NewState = 0; - break; - case PM_YES_QUIT: - NewState = 1; - break; - } - } r.extent.height = RADAR_HEIGHT + 11; DrawPCMenu (beg_index, end_index, (BYTE)NewState, hilite, &r); s.frame = 0; Modified: trunk/sc2/src/sc2code/mouse_err.c =================================================================== --- trunk/sc2/src/sc2code/mouse_err.c 2009-07-07 00:51:26 UTC (rev 3173) +++ trunk/sc2/src/sc2code/mouse_err.c 2009-07-09 05:24:40 UTC (rev 3174) @@ -20,5 +20,5 @@ void MouseError (void) { - DoPopupWindow (GAME_STRING (MAINMENU_STRING_BASE + 56)); + DoPopupWindow (GAME_STRING (MAINMENU_STRING_BASE + 54)); } Modified: trunk/sc2/src/sc2code/restart.c =================================================================== --- trunk/sc2/src/sc2code/restart.c 2009-07-07 00:51:26 UTC (rev 3173) +++ trunk/sc2/src/sc2code/restart.c 2009-07-09 05:24:40 UTC (rev 3174) @@ -245,7 +245,7 @@ LockMutex (GraphicsLock); SetFlashRect (NULL, (FRAME)0); UnlockMutex (GraphicsLock); - DoPopupWindow (GAME_STRING (MAINMENU_STRING_BASE + 56)); + DoPopupWindow (GAME_STRING (MAINMENU_STRING_BASE + 54)); // Mouse not supported message SetMenuSounds (MENU_SOUND_UP | MENU_SOUND_DOWN, MENU_SOUND_SELECT); SetTransitionSource (NULL); Modified: trunk/sc2/src/sc2code/sis.h =================================================================== --- trunk/sc2/src/sc2code/sis.h 2009-07-07 00:51:26 UTC (rev 3173) +++ trunk/sc2/src/sc2code/sis.h 2009-07-09 05:24:40 UTC (rev 3174) @@ -51,9 +51,6 @@ PM_CHANGE_SHIP, PM_EXIT_MENU4, - PM_NO_QUIT, - PM_YES_QUIT, - PM_ALT_SCAN, PM_ALT_STARMAP, PM_ALT_MANIFEST, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2009-09-30 22:37:44
|
Revision: 3181 http://sc2.svn.sourceforge.net/sc2/?rev=3181&view=rev Author: avolkov Date: 2009-09-30 22:37:36 +0000 (Wed, 30 Sep 2009) Log Message: ----------- Scope graphing rewrite: speech/music merged, allows 8- or 16-bit, auto-adjust level; bug #1064 Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/src/sc2code/libs/sound/audiocore.c trunk/sc2/src/sc2code/libs/sound/audiocore.h trunk/sc2/src/sc2code/libs/sound/sound.h trunk/sc2/src/sc2code/libs/sound/stream.c trunk/sc2/src/sc2code/libs/sound/stream.h trunk/sc2/src/sc2code/libs/sound/trackplayer.c trunk/sc2/src/sc2code/libs/sound/trackplayer.h trunk/sc2/src/sc2code/oscill.c Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2009-09-08 22:56:02 UTC (rev 3180) +++ trunk/sc2/ChangeLog 2009-09-30 22:37:36 UTC (rev 3181) @@ -1,4 +1,6 @@ Changes towards version 0.7: +- Allow any sound data format to be graphed by comm oscilloscope; also + auto-adjust the scope for different gain levels (bug #1064) - Alex - Game settings Quit menu now delegates to F10 quit (bug #462) - Alex - Do not pause the game in places where not relevant (bug #984) - Alex - Fixed crashes and potential weirdness when loading savegames from Modified: trunk/sc2/src/sc2code/libs/sound/audiocore.c =================================================================== --- trunk/sc2/src/sc2code/libs/sound/audiocore.c 2009-09-08 22:56:02 UTC (rev 3180) +++ trunk/sc2/src/sc2code/libs/sound/audiocore.c 2009-09-30 22:37:36 UTC (rev 3181) @@ -237,3 +237,31 @@ audiodrv.BufferData (bufobj, audiodrv.EnumLookup[format], data, size, freq); } + +bool +audio_GetFormatInfo (uint32 format, int *channels, int *sample_size) +{ + switch (format) + { + case audio_FORMAT_MONO8: + *channels = 1; + *sample_size = sizeof (uint8); + return true; + + case audio_FORMAT_STEREO8: + *channels = 2; + *sample_size = sizeof (uint8); + return true; + + case audio_FORMAT_MONO16: + *channels = 1; + *sample_size = sizeof (sint16); + return true; + + case audio_FORMAT_STEREO16: + *channels = 2; + *sample_size = sizeof (sint16); + return true; + } + return false; +} Modified: trunk/sc2/src/sc2code/libs/sound/audiocore.h =================================================================== --- trunk/sc2/src/sc2code/libs/sound/audiocore.h 2009-09-08 22:56:02 UTC (rev 3180) +++ trunk/sc2/src/sc2code/libs/sound/audiocore.h 2009-09-30 22:37:36 UTC (rev 3181) @@ -164,4 +164,6 @@ void audio_BufferData (audio_Object bufobj, uint32 format, void* data, uint32 size, uint32 freq); +bool audio_GetFormatInfo (uint32 format, int *channels, int *sample_size); + #endif /* _AUDIOCORE_H */ Modified: trunk/sc2/src/sc2code/libs/sound/sound.h =================================================================== --- trunk/sc2/src/sc2code/libs/sound/sound.h 2009-09-08 22:56:02 UTC (rev 3180) +++ trunk/sc2/src/sc2code/libs/sound/sound.h 2009-09-30 22:37:36 UTC (rev 3181) @@ -75,11 +75,11 @@ sint32 start_time; void *positional_object; - // for oscilloscope + // Cyclic waveform buffer for oscilloscope void *sbuffer; - uint32 sbuf_start; + uint32 sbuf_start; // cyclic buffer tail (confusing, eh?) uint32 sbuf_size; - uint32 sbuf_offset; + uint32 sbuf_offset; // cyclic buffer head uint32 sbuf_lasttime; // keep track for paused tracks uint32 pause_time; Modified: trunk/sc2/src/sc2code/libs/sound/stream.c =================================================================== --- trunk/sc2/src/sc2code/libs/sound/stream.c 2009-09-08 22:56:02 UTC (rev 3180) +++ trunk/sc2/src/sc2code/libs/sound/stream.c 2009-09-30 22:37:36 UTC (rev 3181) @@ -449,3 +449,175 @@ return 0; } +inline sint32 +readSoundSample (void *ptr, int sample_size) +{ + if (sample_size == sizeof (uint8)) + return (*(uint8*)ptr - 128) << 8; + else + return *(sint16*)ptr; +} + +// Graphs the current sound data for the oscilloscope. +// Includes a rudimentary automatic gain control (AGC) to properly graph +// the streams at different gain levels (based on running average). +// We use AGC because different pieces of music and speech can easily be +// at very different gain levels, because the game is moddable. +int +GraphForegroundStream (uint8 *data, sint32 width, sint32 height) +{ + int source_num; + TFB_SoundSource *source; + TFB_SoundDecoder *decoder; + int channels; + int sample_size; + int full_sample; + int step; + long played_time; + long delta; + uint8 *sbuffer; + unsigned long pos; + int scale; + sint32 i; + // AGC variables +#define DEF_PAGE_MAX 28000 +#define AGC_PAGE_COUNT 16 + static int page_sum = DEF_PAGE_MAX * AGC_PAGE_COUNT; + static int pages[AGC_PAGE_COUNT] = + { + DEF_PAGE_MAX, DEF_PAGE_MAX, DEF_PAGE_MAX, DEF_PAGE_MAX, + DEF_PAGE_MAX, DEF_PAGE_MAX, DEF_PAGE_MAX, DEF_PAGE_MAX, + DEF_PAGE_MAX, DEF_PAGE_MAX, DEF_PAGE_MAX, DEF_PAGE_MAX, + DEF_PAGE_MAX, DEF_PAGE_MAX, DEF_PAGE_MAX, DEF_PAGE_MAX, + }; + static int page_head; +#define AGC_FRAME_COUNT 8 + static int frame_sum; + static int frames; + static int avg_amp = DEF_PAGE_MAX; // running amplitude (sort of) average + int target_amp; + int max_a; +#define VAD_MIN_ENERGY 100 + long energy; + + + if (speechVolumeScale != 0.0f) + { // Use speech waveform when speech is enabled + source_num = SPEECH_SOURCE; + // Step is picked experimentally. Using step of 1 sample at 11025Hz, + // because human speech is mostly in the low frequencies, and it looks + // better this way. + step = 1; + + } + else if (musicVolumeScale != 0.0f) + { // Use music waveform when speech is disabled + source_num = MUSIC_SOURCE; + // Step is picked experimentally. Using step of 4 samples at 11025Hz. + // It looks better this way. + step = 4; + } + else + { + return 0; + } + + source = &soundSource[source_num]; + LockMutex (source->stream_mutex); + if (!PlayingStream (source_num) || !source->sample + || !source->sample->decoder || !source->sbuffer + || source->sbuf_size == 0) + { // We don't have data to return, oh well. + UnlockMutex (source->stream_mutex); + return 0; + } + decoder = source->sample->decoder; + + assert (audio_GetFormatInfo (decoder->format, &channels, &sample_size)); + full_sample = channels * sample_size; + + // See how far into the buffer we should be now + played_time = GetTimeCounter () - source->sbuf_lasttime; + delta = played_time * decoder->frequency * full_sample / ONE_SECOND; + // align delta to sample start + delta = delta & ~(full_sample - 1); + + if (delta < 0) + { + log_add (log_Debug, "GraphForegroundStream(): something is messed" + " with timing, delta %ld", delta); + delta = 0; + } + else if (delta > (long)source->sbuf_size) + { // Stream decoder task has just had a heart attack, not much we can do + delta = 0; + } + + // Step is in 11025 Hz units, so we need to adjust to source frequency + step = decoder->frequency * step / 11025; + if (step == 0) + step = 1; + step *= full_sample; + + sbuffer = source->sbuffer; + pos = source->sbuf_offset + delta; + + // We are not basing the scaling factor on signal energy, because we + // want it to *look* pretty instead of sounding nice and even + target_amp = (height >> 1) >> 1; + scale = avg_amp / target_amp; + + max_a = 0; + energy = 0; + for (i = 0; i < width; ++i, pos += step) + { + sint32 s; + int t; + + pos %= source->sbuf_size; + + s = readSoundSample (sbuffer + pos, sample_size); + if (channels > 1) + s += readSoundSample (sbuffer + pos + sample_size, sample_size); + + energy += (s * s) / 0x10000; + t = abs(s); + if (t > max_a) + max_a = t; + + s = (s / scale) + (height >> 1); + if (s < 0) + s = 0; + else if (s > height - 1) + s = height - 1; + + data[i] = s; + } + energy /= width; + + // Very basic VAD. We don't want to count speech pauses in the average + if (energy > VAD_MIN_ENERGY) + { + // Record the maximum amplitude (sort of) + frame_sum += max_a; + ++frames; + if (frames == 8) + { // Got a full page + frame_sum /= AGC_FRAME_COUNT; + // Record the page + page_sum -= pages[page_head]; + page_sum += frame_sum; + pages[page_head] = frame_sum; + page_head = (page_head + 1) % AGC_PAGE_COUNT; + + frame_sum = 0; + frames = 0; + + avg_amp = page_sum / AGC_PAGE_COUNT; + } + } + + UnlockMutex (source->stream_mutex); + return 1; +} + Modified: trunk/sc2/src/sc2code/libs/sound/stream.h =================================================================== --- trunk/sc2/src/sc2code/libs/sound/stream.h 2009-09-08 22:56:02 UTC (rev 3180) +++ trunk/sc2/src/sc2code/libs/sound/stream.h 2009-09-30 22:37:36 UTC (rev 3181) @@ -30,4 +30,6 @@ void TFB_ClearBufferTag (TFB_SoundTag* ptag); void TFB_TagBuffer (TFB_SoundSample* sample, audio_Object buffer, void* data); +int GraphForegroundStream (uint8 *data, sint32 width, sint32 height); + #endif Modified: trunk/sc2/src/sc2code/libs/sound/trackplayer.c =================================================================== --- trunk/sc2/src/sc2code/libs/sound/trackplayer.c 2009-09-08 22:56:02 UTC (rev 3180) +++ trunk/sc2/src/sc2code/libs/sound/trackplayer.c 2009-09-30 22:37:36 UTC (rev 3181) @@ -19,9 +19,7 @@ #include "libs/sound/trackint.h" #include "libs/log.h" #include "comm.h" -#include "sis.h" #include "options.h" -#include <assert.h> #include <ctype.h> #include <stdlib.h> @@ -821,179 +819,6 @@ return TRUE; } -// processes sound data to oscilloscope -int -GetSoundData (void *data) -{ - // XXX: These two variants are begging to be merged - if (speechVolumeScale != 0.0f) - { - // speech is enabled - - LockMutex (soundSource[SPEECH_SOURCE].stream_mutex); - if (soundSource[SPEECH_SOURCE].sample && soundSource[SPEECH_SOURCE].sample->decoder && - PlayingStream (SPEECH_SOURCE) && soundSource[SPEECH_SOURCE].sbuffer && - soundSource[SPEECH_SOURCE].sbuf_size > 0) - { - float played_time = (GetTimeCounter () - soundSource[SPEECH_SOURCE].sbuf_lasttime) / - (float)ONE_SECOND; - long delta = (int) (played_time * (float)soundSource[SPEECH_SOURCE]. - sample->decoder->frequency * 2.0f); - unsigned long pos; - int i; - int step; - UBYTE *scopedata = (UBYTE *) data; - UBYTE *sbuffer = soundSource[SPEECH_SOURCE].sbuffer; - - assert (soundSource[SPEECH_SOURCE].sample->decoder->frequency >= 11025); - assert (soundSource[SPEECH_SOURCE].sample->decoder->format == audio_FORMAT_MONO16); - - // Using step of 1 sample at 11025Hz, because the human speech - // is mostly in the low frequencies - step = soundSource[SPEECH_SOURCE].sample->decoder->frequency * 2 / 11025; - step = (step + 1) & ~1; - - if (delta < 0) - { - log_add (log_Debug, "GetSoundData(): something's messed" - " with timing, delta %ld", delta); - delta = 0; - } - else if (delta > (int)(soundSource[SPEECH_SOURCE].sbuf_size * 2)) - { -#if 0 - log_add (log_Debug, "GetSoundData(): something's messed" - " with timing, delta %d", delta); -#endif - delta = 0; - } -#if 0 - log_add (log_Debug, "played_data %d total_decoded %d delta %d", - played_data, soundSource[SPEECH_SOURCE].total_decoded, - delta); -#endif - pos = soundSource[SPEECH_SOURCE].sbuf_offset + delta; - if (pos % 2 == 1) - pos++; - - // pos is an unsigned data type; this assertion cannot fail! - // assert (pos >= 0); - - for (i = 0; i < RADAR_WIDTH - 2; ++i) - { - SDWORD s; - - for (;;) - { - if (pos >= soundSource[SPEECH_SOURCE].sbuf_size) - pos = pos - soundSource[SPEECH_SOURCE].sbuf_size; - else - break; - } - - s = *(SWORD*) (&sbuffer[pos]); - s = (s / 1360) + (RADAR_HEIGHT >> 1); - if (s < 1) - s = 1; - else if (s > RADAR_HEIGHT - 2) - s = RADAR_HEIGHT - 2; - scopedata[i] = (UBYTE) s; - - pos += step; - } - - UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex); - return 1; - } - UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex); - } - else if (musicVolumeScale != 0.0f) - { - // speech is disabled but music is not so process it instead - - LockMutex (soundSource[MUSIC_SOURCE].stream_mutex); - if (soundSource[MUSIC_SOURCE].sample && soundSource[MUSIC_SOURCE].sample->decoder && - PlayingStream (MUSIC_SOURCE) && soundSource[MUSIC_SOURCE].sbuffer && - soundSource[MUSIC_SOURCE].sbuf_size > 0) - { - float played_time = (GetTimeCounter () - soundSource[MUSIC_SOURCE].sbuf_lasttime) / - (float)ONE_SECOND; - int delta = (int) (played_time * (float)soundSource[MUSIC_SOURCE]. - sample->decoder->frequency * 4.0f); - unsigned long pos; - int i, step; - UBYTE *scopedata = (UBYTE *) data; - UBYTE *sbuffer = soundSource[MUSIC_SOURCE].sbuffer; - - assert (soundSource[MUSIC_SOURCE].sample->decoder->frequency >= 11025); - assert (soundSource[MUSIC_SOURCE].sample->decoder->format == audio_FORMAT_STEREO16); - - // Using step of 4 samples at 11025Hz for the music - step = soundSource[MUSIC_SOURCE].sample->decoder->frequency / 11025 * 16; - if (step % 2 == 1) - step++; - - if (delta < 0) - { -#if 0 - log_add (log_Debug, "GetSoundData(): something's messed" - " with timing, delta %d", delta); -#endif - delta = 0; - } - else if (delta > (int)(soundSource[MUSIC_SOURCE].sbuf_size * 2)) - { -#if 0 - log_add (log_Debug, "GetSoundData(): something's messed" - " with timing, delta %d", delta); -#endif - delta = 0; - } -#if 0 - log_add (log_Debug, "played_data %d total_decoded %d delta %d", - played_data, soundSource[MUSIC_SOURCE].total_decoded, - delta); -#endif - pos = soundSource[MUSIC_SOURCE].sbuf_offset + delta; - if (pos % 2 == 1) - pos++; - - // pos is an unsigned type; this assertion cannot fail! - // assert (pos >= 0); - - for (i = 0; i < RADAR_WIDTH - 2; ++i) - { - SDWORD s; - - for (;;) - { - if (pos >= soundSource[MUSIC_SOURCE].sbuf_size) - pos = pos - soundSource[MUSIC_SOURCE].sbuf_size; - else - break; - } - - s = (*(SWORD*)(&sbuffer[pos])) + (*(SWORD*)(&sbuffer[pos + 2])); - - s = (s / 1800) + (RADAR_HEIGHT >> 1); - if (s < 1) - s = 1; - else if (s > RADAR_HEIGHT - 2) - s = RADAR_HEIGHT - 2; - scopedata[i] = (UBYTE) s; - - pos += step; - } - - UnlockMutex (soundSource[MUSIC_SOURCE].stream_mutex); - return 1; - } - UnlockMutex (soundSource[MUSIC_SOURCE].stream_mutex); - } - - return 0; -} - // tells current position of streaming speech int GetSoundInfo (int max_len) Modified: trunk/sc2/src/sc2code/libs/sound/trackplayer.h =================================================================== --- trunk/sc2/src/sc2code/libs/sound/trackplayer.h 2009-09-08 22:56:02 UTC (rev 3180) +++ trunk/sc2/src/sc2code/libs/sound/trackplayer.h 2009-09-30 22:37:36 UTC (rev 3181) @@ -37,7 +37,6 @@ void StopTrack(void); void SpliceTrack(UNICODE *filespec, UNICODE *textspec, UNICODE *TimeStamp, TFB_TrackCB cb); void SpliceMultiTrack (UNICODE *TrackNames[], UNICODE *TrackText); -int GetSoundData (void *data); int GetSoundInfo (int max_len); #endif Modified: trunk/sc2/src/sc2code/oscill.c =================================================================== --- trunk/sc2/src/sc2code/oscill.c 2009-09-08 22:56:02 UTC (rev 3180) +++ trunk/sc2/src/sc2code/oscill.c 2009-09-30 22:37:36 UTC (rev 3181) @@ -21,6 +21,7 @@ #include "sis.h" #include "libs/graphics/gfx_common.h" #include "libs/graphics/drawable.h" +#include "libs/sound/sound.h" #include "libs/sound/trackplayer.h" @@ -92,15 +93,15 @@ return; TFB_DrawImage_Image (scope_bg, 0, 0, 0, NULL, scope_surf); - if (GetSoundData (scope_data)) + if (GraphForegroundStream (scope_data, RADAR_WIDTH - 2, RADAR_HEIGHT - 2)) { int i, r, g, b; TFB_DrawCanvas_GetPixel (scope_bg->NormalImg, scope_bg->extent.width / 2, scope_bg->extent.height / 2, &r, &g, &b); for (i = 0; i < RADAR_WIDTH - 3; ++i) - TFB_DrawImage_Line (i + 1, scope_data[i], i + 2, - scope_data[i + 1], r, g, b, scope_surf); + TFB_DrawImage_Line (i + 1, scope_data[i] + 1, i + 2, + scope_data[i + 1] + 1, r, g, b, scope_surf); } TFB_DrawImage_Image (scope_surf, 0, 0, 0, NULL, scope_frame->image); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2009-09-30 23:12:59
|
Revision: 3182 http://sc2.svn.sourceforge.net/sc2/?rev=3182&view=rev Author: avolkov Date: 2009-09-30 23:12:49 +0000 (Wed, 30 Sep 2009) Log Message: ----------- Fixed a buffer overflow when saving a game with too many devices Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/src/sc2code/planets/devices.c trunk/sc2/src/sc2code/save.c trunk/sc2/src/sc2code/shipcont.h trunk/sc2/src/sc2code/sis.h Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2009-09-30 22:37:36 UTC (rev 3181) +++ trunk/sc2/ChangeLog 2009-09-30 23:12:49 UTC (rev 3182) @@ -1,4 +1,6 @@ Changes towards version 0.7: +- Fixed crash when saving a game into the last slot while having + too many devices on board - Alex - Allow any sound data format to be graphed by comm oscilloscope; also auto-adjust the scope for different gain levels (bug #1064) - Alex - Game settings Quit menu now delegates to F10 quit (bug #462) - Alex Modified: trunk/sc2/src/sc2code/planets/devices.c =================================================================== --- trunk/sc2/src/sc2code/planets/devices.c 2009-09-30 22:37:36 UTC (rev 3181) +++ trunk/sc2/src/sc2code/planets/devices.c 2009-09-30 23:12:49 UTC (rev 3182) @@ -532,13 +532,13 @@ } SIZE -InventoryDevices (BYTE *pDeviceMap) +InventoryDevices (BYTE *pDeviceMap, COUNT Size) { BYTE i; SIZE DevicesOnBoard; DevicesOnBoard = 0; - for (i = 0; i < NUM_DEVICES; ++i) + for (i = 0; i < NUM_DEVICES && Size > 0; ++i) { BYTE DeviceState; @@ -630,6 +630,7 @@ { *pDeviceMap++ = i; ++DevicesOnBoard; + --Size; } } @@ -641,7 +642,7 @@ { BYTE DeviceMap[NUM_DEVICES]; - pMS->first_item.x = InventoryDevices (DeviceMap); + pMS->first_item.x = InventoryDevices (DeviceMap, NUM_DEVICES); if (pMS->first_item.x) { pMS->InputFunc = DoManipulateDevices; Modified: trunk/sc2/src/sc2code/save.c =================================================================== --- trunk/sc2/src/sc2code/save.c 2009-09-30 22:37:36 UTC (rev 3181) +++ trunk/sc2/src/sc2code/save.c 2009-09-30 23:12:49 UTC (rev 3182) @@ -499,7 +499,8 @@ } } - SummPtr->NumDevices = InventoryDevices (SummPtr->DeviceList); + SummPtr->NumDevices = InventoryDevices (SummPtr->DeviceList, + MAX_EXCLUSIVE_DEVICES); SummPtr->Flags = GET_GAME_STATE (LANDER_SHIELDS) | (GET_GAME_STATE (IMPROVED_LANDER_SPEED) << (4 + 0)) Modified: trunk/sc2/src/sc2code/shipcont.h =================================================================== --- trunk/sc2/src/sc2code/shipcont.h 2009-09-30 22:37:36 UTC (rev 3181) +++ trunk/sc2/src/sc2code/shipcont.h 2009-09-30 23:12:49 UTC (rev 3182) @@ -30,7 +30,7 @@ extern void DrawCargoStrings (BYTE OldElement, BYTE NewElement); extern void ShowRemainingCapacity (void); -extern SIZE InventoryDevices (BYTE *pDeviceMap); +extern SIZE InventoryDevices (BYTE *pDeviceMap, COUNT Size); #endif /* _SHIPCONT_H */ Modified: trunk/sc2/src/sc2code/sis.h =================================================================== --- trunk/sc2/src/sc2code/sis.h 2009-09-30 22:37:36 UTC (rev 3181) +++ trunk/sc2/src/sc2code/sis.h 2009-09-30 23:12:49 UTC (rev 3182) @@ -223,6 +223,11 @@ UNICODE PlanetName[SIS_NAME_SIZE]; } SIS_STATE; +// XXX: Theoretically, a player can have 17 devices on board without +// cheating (18 if never visited the Starbase). We only provide +// room for 16 below, which is not really a problem since this +// is only used for displaying savegame summaries. There is also +// room for only 16 devices on screen. #define MAX_EXCLUSIVE_DEVICES 16 typedef struct This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2009-10-03 22:58:16
|
Revision: 3185 http://sc2.svn.sourceforge.net/sc2/?rev=3185&view=rev Author: avolkov Date: 2009-10-03 22:58:09 +0000 (Sat, 03 Oct 2009) Log Message: ----------- Better location descriptions in savegame summaries; bug #844 Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/content/base/gamestrings.txt trunk/sc2/src/sc2code/gameopt.c trunk/sc2/src/sc2code/gamestr.h trunk/sc2/src/sc2code/planets/planets.h trunk/sc2/src/sc2code/planets/scan.c trunk/sc2/src/sc2code/planets/solarsys.c trunk/sc2/src/sc2code/save.c Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2009-10-01 22:34:36 UTC (rev 3184) +++ trunk/sc2/ChangeLog 2009-10-03 22:58:09 UTC (rev 3185) @@ -1,4 +1,5 @@ Changes towards version 0.7: +- Better location description in savegame summaries (bug #844) - Alex - Fixed crash when saving a game into the last slot while having too many devices on board - Alex - Allow any sound data format to be graphed by comm oscilloscope; also Modified: trunk/sc2/content/base/gamestrings.txt =================================================================== --- trunk/sc2/content/base/gamestrings.txt 2009-10-01 22:34:36 UTC (rev 3184) +++ trunk/sc2/content/base/gamestrings.txt 2009-10-03 22:58:09 UTC (rev 3185) @@ -1625,6 +1625,8 @@ #(Planet XVI) Planet XVI +#(Sa-Matra) +Sa-Matra #(JAN) JAN Modified: trunk/sc2/src/sc2code/gameopt.c =================================================================== --- trunk/sc2/src/sc2code/gameopt.c 2009-10-01 22:34:36 UTC (rev 3184) +++ trunk/sc2/src/sc2code/gameopt.c 2009-10-03 22:58:09 UTC (rev 3185) @@ -804,17 +804,26 @@ t.CharCount = (COUNT)~0; font_DrawText (&t); t.align = ALIGN_CENTER; - t.baseline.x = SIS_SCREEN_WIDTH - SIS_TITLE_BOX_WIDTH - 3 + t.baseline.x = SIS_SCREEN_WIDTH - SIS_TITLE_BOX_WIDTH - 4 + (SIS_TITLE_WIDTH >> 1); - if (pSD->Activity == IN_STARBASE) - utf8StringCopy (buf, sizeof (buf), - GAME_STRING (STARBASE_STRING_BASE)); - else if (pSD->Activity == IN_PLANET_ORBIT) - utf8StringCopy (buf, sizeof (buf), GLOBAL_SIS (PlanetName)); - else - sprintf (buf, "%03u.%01u : %03u.%01u", - r.corner.x / 10, r.corner.x % 10, - r.corner.y / 10, r.corner.y % 10); + switch (pSD->Activity) + { + case IN_STARBASE: + utf8StringCopy (buf, sizeof (buf), // Starbase + GAME_STRING (STARBASE_STRING_BASE)); + break; + case IN_LAST_BATTLE: + utf8StringCopy (buf, sizeof (buf), // Sa-Matra + GAME_STRING (PLANET_NUMBER_BASE + 32)); + break; + case IN_PLANET_ORBIT: + utf8StringCopy (buf, sizeof (buf), GLOBAL_SIS (PlanetName)); + break; + default: + sprintf (buf, "%03u.%01u : %03u.%01u", + r.corner.x / 10, r.corner.x % 10, + r.corner.y / 10, r.corner.y % 10); + } t.CharCount = (COUNT)~0; font_DrawText (&t); Modified: trunk/sc2/src/sc2code/gamestr.h =================================================================== --- trunk/sc2/src/sc2code/gamestr.h 2009-10-01 22:34:36 UTC (rev 3184) +++ trunk/sc2/src/sc2code/gamestr.h 2009-10-03 22:58:09 UTC (rev 3185) @@ -31,7 +31,7 @@ #define ELEMENTS_STRING_COUNT 133 #define SCAN_STRING_COUNT 56 #define STAR_NUMBER_COUNT 14 -#define PLANET_NUMBER_COUNT 32 +#define PLANET_NUMBER_COUNT 33 #define MONTHS_STRING_COUNT 12 #define FEEDBACK_STRING_COUNT 2 #define STARBASE_STRING_COUNT 5 Modified: trunk/sc2/src/sc2code/planets/planets.h =================================================================== --- trunk/sc2/src/sc2code/planets/planets.h 2009-10-01 22:34:36 UTC (rev 3184) +++ trunk/sc2/src/sc2code/planets/planets.h 2009-10-03 22:58:09 UTC (rev 3185) @@ -255,5 +255,8 @@ extern void DeltaTopography (COUNT num_iterations, SBYTE *DepthArray, RECT *pRect, SIZE depth_delta); +extern UNICODE* GetNamedPlanetaryBody (void); +extern void GetPlanetOrMoonName (UNICODE *buf, COUNT bufsize); + #endif /* _PLANETS_H */ Modified: trunk/sc2/src/sc2code/planets/scan.c =================================================================== --- trunk/sc2/src/sc2code/planets/scan.c 2009-10-01 22:34:36 UTC (rev 3184) +++ trunk/sc2/src/sc2code/planets/scan.c 2009-10-03 22:58:09 UTC (rev 3185) @@ -125,6 +125,33 @@ } static void +GetPlanetTitle (UNICODE *buf, COUNT bufsize) +{ + int val; + UNICODE *named = GetNamedPlanetaryBody (); + if (named) + { + utf8StringCopy (buf, bufsize, named); + return; + } + + // Unnamed body, use world type + val = pSolarSysState->pOrbitalDesc->data_index & ~PLANET_SHIELDED; + if (val >= FIRST_GAS_GIANT) + { + sprintf (buf, "%s", GAME_STRING (SCAN_STRING_BASE + 4 + 51)); + // Gas Giant + } + else + { + sprintf (buf, "%s %s", + GAME_STRING (SCAN_STRING_BASE + 4 + val), + GAME_STRING (SCAN_STRING_BASE + 4 + 50)); + // World + } +} + +static void PrintCoarseScanPC (void) { #define SCAN_LEADING_PC 14 @@ -133,67 +160,11 @@ RECT r; UNICODE buf[200]; + GetPlanetTitle (buf, sizeof (buf)); + LockMutex (GraphicsLock); SetContext (SpaceContext); - if (CurStarDescPtr->Index == SOL_DEFINED) - { - if (pSolarSysState->pOrbitalDesc->pPrevDesc == - &pSolarSysState->SunDesc[0]) - utf8StringCopy (buf, sizeof (buf), GLOBAL_SIS (PlanetName)); - else - { - switch (pSolarSysState->pOrbitalDesc->pPrevDesc - - pSolarSysState->PlanetDesc) - { - case 2: /* EARTH */ - utf8StringCopy (buf, sizeof (buf), - GAME_STRING (PLANET_NUMBER_BASE + 9)); - break; - case 4: /* JUPITER */ - switch (pSolarSysState->pOrbitalDesc - - pSolarSysState->MoonDesc) - { - case 0: - utf8StringCopy (buf, sizeof (buf), - GAME_STRING (PLANET_NUMBER_BASE + 10)); - break; - case 1: - utf8StringCopy (buf, sizeof (buf), - GAME_STRING (PLANET_NUMBER_BASE + 11)); - break; - case 2: - utf8StringCopy (buf, sizeof (buf), - GAME_STRING (PLANET_NUMBER_BASE + 12)); - break; - case 3: - utf8StringCopy (buf, sizeof (buf), - GAME_STRING (PLANET_NUMBER_BASE + 13)); - break; - } - break; - case 5: /* SATURN */ - utf8StringCopy (buf, sizeof (buf), - GAME_STRING (PLANET_NUMBER_BASE + 14)); - break; - case 7: /* NEPTUNE */ - utf8StringCopy (buf, sizeof (buf), - GAME_STRING (PLANET_NUMBER_BASE + 15)); - break; - } - } - } - else - { - val = pSolarSysState->pOrbitalDesc->data_index & ~PLANET_SHIELDED; - if (val >= FIRST_GAS_GIANT) - sprintf (buf, "%s", GAME_STRING (SCAN_STRING_BASE + 4 + 51)); - else - sprintf (buf, "%s %s", - GAME_STRING (SCAN_STRING_BASE + 4 + val), - GAME_STRING (SCAN_STRING_BASE + 4 + 50)); - } - t.align = ALIGN_CENTER; t.baseline.x = SIS_SCREEN_WIDTH >> 1; t.baseline.y = 13; @@ -375,66 +346,11 @@ STAMP s; UNICODE buf[200]; + GetPlanetTitle (buf, sizeof (buf)); + LockMutex (GraphicsLock); SetContext (SpaceContext); - if (CurStarDescPtr->Index == SOL_DEFINED) - { - if (pSolarSysState->pOrbitalDesc->pPrevDesc == &pSolarSysState->SunDesc[0]) - utf8StringCopy (buf, sizeof (buf), GLOBAL_SIS (PlanetName)); - else - { - switch (pSolarSysState->pOrbitalDesc->pPrevDesc - - pSolarSysState->PlanetDesc) - { - case 2: /* EARTH */ - utf8StringCopy (buf, sizeof (buf), - GAME_STRING (PLANET_NUMBER_BASE + 9)); - break; - case 4: /* JUPITER */ - switch (pSolarSysState->pOrbitalDesc - - pSolarSysState->MoonDesc) - { - case 0: - utf8StringCopy (buf, sizeof (buf), - GAME_STRING (PLANET_NUMBER_BASE + 10)); - break; - case 1: - utf8StringCopy (buf, sizeof (buf), - GAME_STRING (PLANET_NUMBER_BASE + 11)); - break; - case 2: - utf8StringCopy (buf, sizeof (buf), - GAME_STRING (PLANET_NUMBER_BASE + 12)); - break; - case 3: - utf8StringCopy (buf, sizeof (buf), - GAME_STRING (PLANET_NUMBER_BASE + 13)); - break; - } - break; - case 5: /* SATURN */ - utf8StringCopy (buf, sizeof (buf), - GAME_STRING (PLANET_NUMBER_BASE + 14)); - break; - case 7: /* NEPTUNE */ - utf8StringCopy (buf, sizeof (buf), - GAME_STRING (PLANET_NUMBER_BASE + 15)); - break; - } - } - } - else - { - val = pSolarSysState->pOrbitalDesc->data_index & ~PLANET_SHIELDED; - if (val >= FIRST_GAS_GIANT) - sprintf (buf, "%s", GAME_STRING (SCAN_STRING_BASE + 4 + 51)); - else - sprintf (buf, "%s %s", - GAME_STRING (SCAN_STRING_BASE + 4 + val), - GAME_STRING (SCAN_STRING_BASE + 4 + 50)); - } - t.align = ALIGN_CENTER; t.baseline.x = SIS_SCREEN_WIDTH >> 1; t.baseline.y = 13; Modified: trunk/sc2/src/sc2code/planets/solarsys.c =================================================================== --- trunk/sc2/src/sc2code/planets/solarsys.c 2009-10-01 22:34:36 UTC (rev 3184) +++ trunk/sc2/src/sc2code/planets/solarsys.c 2009-10-03 22:58:09 UTC (rev 3185) @@ -1937,4 +1937,112 @@ pSolarSysState = 0; } +UNICODE * +GetNamedPlanetaryBody (void) +{ + int planet; + int moon; + int parent_planet; + if (!CurStarDescPtr || !pSolarSysState || !pSolarSysState->pOrbitalDesc) + return NULL; // Not inside an inner system, so no name + + planet = pSolarSysState->pOrbitalDesc - pSolarSysState->PlanetDesc; + moon = pSolarSysState->pOrbitalDesc - pSolarSysState->MoonDesc; + parent_planet = pSolarSysState->pOrbitalDesc->pPrevDesc + - pSolarSysState->PlanetDesc; + + if (CurStarDescPtr->Index == SOL_DEFINED) + { // Planets and moons in Sol + if (pSolarSysState->pOrbitalDesc->pPrevDesc == pSolarSysState->SunDesc) + { // A planet + return GAME_STRING (PLANET_NUMBER_BASE + planet); + } + // Moons + switch (parent_planet) + { + case 2: // Earth + switch (moon) + { + case 0: // Starbase + return GAME_STRING (STARBASE_STRING_BASE + 0); + case 1: // Luna + return GAME_STRING (PLANET_NUMBER_BASE + 9); + } + break; + case 4: // Jupiter + switch (moon) + { + case 0: // Io + return GAME_STRING (PLANET_NUMBER_BASE + 10); + case 1: // Europa + return GAME_STRING (PLANET_NUMBER_BASE + 11); + case 2: // Ganymede + return GAME_STRING (PLANET_NUMBER_BASE + 12); + case 3: // Callisto + return GAME_STRING (PLANET_NUMBER_BASE + 13); + } + break; + case 5: // Saturn + if (moon == 0) // Titan + return GAME_STRING (PLANET_NUMBER_BASE + 14); + break; + case 7: // Neptune + if (moon == 0) // Triton + return GAME_STRING (PLANET_NUMBER_BASE + 15); + break; + } + } + else if (CurStarDescPtr->Index == SPATHI_DEFINED) + { + if (pSolarSysState->pOrbitalDesc->pPrevDesc == pSolarSysState->SunDesc) + { // A planet +#ifdef NOTYET + if (planet == 0) + return "Spathiwa"; +#endif // NOTYET + } + } + else if (CurStarDescPtr->Index == SAMATRA_DEFINED) + { + if (parent_planet == 4 && moon == 0) // Sa-Matra + return GAME_STRING (PLANET_NUMBER_BASE + 32); + } + + return NULL; +} + +void +GetPlanetOrMoonName (UNICODE *buf, COUNT bufsize) +{ + UNICODE *named; + int moon; + int i; + + named = GetNamedPlanetaryBody (); + if (named) + { + utf8StringCopy (buf, bufsize, named); + return; + } + + // Either not named or we already have a name + utf8StringCopy (buf, bufsize, GLOBAL_SIS (PlanetName)); + + if (!pSolarSysState || !pSolarSysState->pOrbitalDesc || + pSolarSysState->pOrbitalDesc->pPrevDesc == pSolarSysState->SunDesc) + { // Outer or inner system or orbiting a planet + return; + } + + // Orbiting an unnamed moon + i = strlen (buf); + buf += i; + bufsize -= i; + moon = pSolarSysState->pOrbitalDesc - pSolarSysState->MoonDesc; + if (bufsize >= 3) + { + snprintf (buf, bufsize, "-%c", 'A' + moon); + buf[bufsize - 1] = '\0'; + } +} Modified: trunk/sc2/src/sc2code/save.c =================================================================== --- trunk/sc2/src/sc2code/save.c 2009-10-01 22:34:36 UTC (rev 3184) +++ trunk/sc2/src/sc2code/save.c 2009-10-03 22:58:09 UTC (rev 3185) @@ -467,18 +467,27 @@ { SummPtr->SS = GlobData.SIS_state; - switch (SummPtr->Activity = LOBYTE (GLOBAL (CurrentActivity))) + SummPtr->Activity = LOBYTE (GLOBAL (CurrentActivity)); + switch (SummPtr->Activity) { case IN_HYPERSPACE: if (GET_GAME_STATE (ARILOU_SPACE_SIDE) > 1) SummPtr->Activity = IN_QUASISPACE; break; case IN_INTERPLANETARY: + // Get a better planet name for summary + GetPlanetOrMoonName (SummPtr->SS.PlanetName, + sizeof (SummPtr->SS.PlanetName)); if (GET_GAME_STATE (GLOBAL_FLAGS_AND_DATA) == (BYTE)~0) SummPtr->Activity = IN_STARBASE; else if (pSolarSysState && pSolarSysState->MenuState.Initialized >= 3) SummPtr->Activity = IN_PLANET_ORBIT; break; + case IN_LAST_BATTLE: + utf8StringCopy (SummPtr->SS.PlanetName, + sizeof (SummPtr->SS.PlanetName), + GAME_STRING (PLANET_NUMBER_BASE + 32)); // Sa-Matra + break; } SummPtr->MCreditLo = GET_GAME_STATE (MELNORME_CREDIT0); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2009-10-07 00:30:18
|
Revision: 3186 http://sc2.svn.sourceforge.net/sc2/?rev=3186&view=rev Author: avolkov Date: 2009-10-07 00:30:11 +0000 (Wed, 07 Oct 2009) Log Message: ----------- Suppress generation of menu input when entering text with numpad with NumLock on; bug #934 Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/src/sc2code/getchar.c trunk/sc2/src/sc2code/libs/inplib.h trunk/sc2/src/sc2code/libs/input/sdl/input.c Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2009-10-03 22:58:09 UTC (rev 3185) +++ trunk/sc2/ChangeLog 2009-10-07 00:30:11 UTC (rev 3186) @@ -1,4 +1,5 @@ Changes towards version 0.7: +- Fixed inputting numbers with the numpad, except directx (bug #934) - Alex - Better location description in savegame summaries (bug #844) - Alex - Fixed crash when saving a game into the last slot while having too many devices on board - Alex Modified: trunk/sc2/src/sc2code/getchar.c =================================================================== --- trunk/sc2/src/sc2code/getchar.c 2009-10-03 22:58:09 UTC (rev 3185) +++ trunk/sc2/src/sc2code/getchar.c 2009-10-07 00:30:11 UTC (rev 3186) @@ -170,8 +170,10 @@ } pTES->CacheStr = HMalloc (pTES->MaxSize * sizeof (*pTES->CacheStr)); - + + EnterCharacterMode (); DoInput (pTES, TRUE); + ExitCharacterMode (); if (pTES->CacheStr) HFree (pTES->CacheStr); Modified: trunk/sc2/src/sc2code/libs/inplib.h =================================================================== --- trunk/sc2/src/sc2code/libs/inplib.h 2009-10-03 22:58:09 UTC (rev 3185) +++ trunk/sc2/src/sc2code/libs/inplib.h 2009-10-07 00:30:11 UTC (rev 3186) @@ -43,8 +43,8 @@ /* Functions for dealing with Character Mode */ -void EnableCharacterMode (void); -void DisableCharacterMode (void); +void EnterCharacterMode (void); +void ExitCharacterMode (void); wchar_t GetNextCharacter (void); wchar_t GetLastCharacter (void); Modified: trunk/sc2/src/sc2code/libs/input/sdl/input.c =================================================================== --- trunk/sc2/src/sc2code/libs/input/sdl/input.c 2009-10-03 22:58:09 UTC (rev 3185) +++ trunk/sc2/src/sc2code/libs/input/sdl/input.c 2009-10-07 00:30:11 UTC (rev 3186) @@ -42,7 +42,7 @@ static BOOLEAN InputInitialized = FALSE; -static BOOLEAN _in_character_mode = FALSE; +static BOOLEAN in_character_mode = FALSE; static const char *menu_res_names[] = { "pause", @@ -217,7 +217,7 @@ } #endif /* HAVE_JOYSTICK */ - _in_character_mode = FALSE; + in_character_mode = FALSE; resetKeyboardState (); /* Prepare the Virtual Controller system. */ @@ -239,22 +239,20 @@ HFree (kbdstate); } -// XXX: not currently used -- character mode is always on void -EnableCharacterMode (void) +EnterCharacterMode (void) { kbdhead = kbdtail = 0; lastchar = 0; - _in_character_mode = TRUE; + in_character_mode = TRUE; VControl_ResetInput (); } -// XXX: not currently used -- character mode is always on void -DisableCharacterMode (void) +ExitCharacterMode (void) { VControl_ResetInput (); - _in_character_mode = FALSE; + in_character_mode = FALSE; kbdhead = kbdtail = 0; lastchar = 0; } @@ -294,6 +292,16 @@ } } +static inline int +is_numpad_char_event (const SDL_Event *Event) +{ + return in_character_mode && + (Event->type == SDL_KEYDOWN || Event->type == SDL_KEYUP) && + (Event->key.keysym.mod & KMOD_NUM) && /* NumLock is ON */ + Event->key.keysym.unicode > 0 && /* Printable char */ + Event->key.keysym.sym >= SDLK_KP0 && /* Keypad key */ + Event->key.keysym.sym <= SDLK_KP_PLUS; +} void ProcessInputEvent (const SDL_Event *Event) @@ -302,8 +310,12 @@ return; ProcessMouseEvent (Event); - VControl_HandleEvent (Event); + // In character mode with NumLock on, numpad chars bypass VControl + // so that menu arrow events are not produced + if (!is_numpad_char_event (Event)) + VControl_HandleEvent (Event); + if (Event->type == SDL_KEYDOWN || Event->type == SDL_KEYUP) { // process character input event, if any SDLKey k = Event->key.keysym.sym; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2009-10-07 02:45:36
|
Revision: 3188 http://sc2.svn.sourceforge.net/sc2/?rev=3188&view=rev Author: avolkov Date: 2009-10-07 02:45:26 +0000 (Wed, 07 Oct 2009) Log Message: ----------- Canceling a load from main menu aborts the game and returns to main menu; bug #679 Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/src/sc2code/gameopt.c trunk/sc2/src/sc2code/planets/pstarmap.c trunk/sc2/src/sc2code/planets/solarsys.c Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2009-10-07 02:44:38 UTC (rev 3187) +++ trunk/sc2/ChangeLog 2009-10-07 02:45:26 UTC (rev 3188) @@ -1,4 +1,5 @@ Changes towards version 0.7: +- Canceling load from the main menu returns to main menu (bug #679) - Alex - Fixed inputting numbers with the numpad, except directx (bug #934) - Alex - Better location description in savegame summaries (bug #844) - Alex - Fixed crash when saving a game into the last slot while having Modified: trunk/sc2/src/sc2code/gameopt.c =================================================================== --- trunk/sc2/src/sc2code/gameopt.c 2009-10-07 02:44:38 UTC (rev 3187) +++ trunk/sc2/src/sc2code/gameopt.c 2009-10-07 02:45:26 UTC (rev 3188) @@ -898,7 +898,11 @@ pMS->ModuleFrame = 0; pMS->CurState = (BYTE)pMS->delta_item; ResumeMusic (); - if (pSolarSysState) + if (LastActivity == CHECK_LOAD) + { // Selected LOAD from main menu, and now canceled + GLOBAL (CurrentActivity) |= CHECK_ABORT; + } + else if (pSolarSysState) { #define DRAW_REFRESH (1 << 5) #define REPAIR_SCAN (1 << 6) @@ -1098,13 +1102,11 @@ } font_DrawText (&t); } - if (LastActivity == CHECK_LOAD) + if (LastActivity == CHECK_LOAD && first_time) { BYTE clut_buf[] = {FadeAllToColor}; UnbatchGraphics (); - - LastActivity = 0; XFormColorMap ((COLORMAPPTR)clut_buf, ONE_SECOND / 2); } else @@ -1236,7 +1238,7 @@ return (FALSE); if (LastActivity == CHECK_LOAD) - force_select = TRUE; + force_select = TRUE; // Selected LOAD from main menu SetMenuSounds (MENU_SOUND_ARROWS, MENU_SOUND_SELECT); Modified: trunk/sc2/src/sc2code/planets/pstarmap.c =================================================================== --- trunk/sc2/src/sc2code/planets/pstarmap.c 2009-10-07 02:44:38 UTC (rev 3187) +++ trunk/sc2/src/sc2code/planets/pstarmap.c 2009-10-07 02:45:26 UTC (rev 3188) @@ -1717,7 +1717,7 @@ NewState = pMS->CurState; if (LastActivity == CHECK_LOAD) - select = TRUE; + select = TRUE; // Selected LOAD from main menu if (select) { if (NewState != SCAN + 1 && NewState != (GAME_MENU) + 1) Modified: trunk/sc2/src/sc2code/planets/solarsys.c =================================================================== --- trunk/sc2/src/sc2code/planets/solarsys.c 2009-10-07 02:44:38 UTC (rev 3187) +++ trunk/sc2/src/sc2code/planets/solarsys.c 2009-10-07 02:45:26 UTC (rev 3188) @@ -1236,7 +1236,9 @@ LockMutex (GraphicsLock); DrawStatusMessage (NULL); if (LastActivity == CHECK_LOAD) + { // Selected LOAD from main menu pSolarSysState->MenuState.CurState = (ROSTER + 1) + 1; + } else { UnlockMutex (GraphicsLock); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2009-10-08 00:07:58
|
Revision: 3192 http://sc2.svn.sourceforge.net/sc2/?rev=3192&view=rev Author: avolkov Date: 2009-10-08 00:07:52 +0000 (Thu, 08 Oct 2009) Log Message: ----------- Ensure that lander explosion element gets allocated; bug #584 Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/src/sc2code/planets/lander.c Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2009-10-07 16:46:19 UTC (rev 3191) +++ trunk/sc2/ChangeLog 2009-10-08 00:07:52 UTC (rev 3192) @@ -1,4 +1,6 @@ Changes towards version 0.7: +- Lander will no longer hang when killed on planets with a lot of + natural disasters (bug #584) - Alex - Canceling load from the main menu returns to main menu (bug #679) - Alex - Fixed inputting numbers with the numpad, except directx (bug #934) - Alex - Better location description in savegame summaries (bug #844) - Alex Modified: trunk/sc2/src/sc2code/planets/lander.c =================================================================== --- trunk/sc2/src/sc2code/planets/lander.c 2009-10-07 16:46:19 UTC (rev 3191) +++ trunk/sc2/src/sc2code/planets/lander.c 2009-10-08 00:07:52 UTC (rev 3192) @@ -31,6 +31,7 @@ #include "element.h" #include "libs/graphics/gfx_common.h" #include "libs/mathlib.h" +#include "libs/log.h" //define SPIN_ON_LAUNCH to let the planet spin while @@ -1660,12 +1661,14 @@ { HELEMENT hExplosionElement; - ++pMS->CurState; hExplosionElement = AllocElement (); if (hExplosionElement) { ELEMENT *ExplosionElementPtr; + // Advance the state only once we've got the element + ++pMS->CurState; + LockElement (hExplosionElement, &ExplosionElementPtr); ExplosionElementPtr->mass_points = DEATH_EXPLOSION; @@ -1692,6 +1695,12 @@ LanderSounds, LANDER_DESTROYED ), NotPositional (), NULL, GAME_SOUND_PRIORITY + 1); } + else + { // We could not allocate because the queue was full, but + // we will get another chance on the next iteration + log_add (log_Warning, "DoPlanetSide(): could not" + " allocate explosion element!"); + } } ScrollPlanetSide (0, 0, -1); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2009-10-08 01:26:32
|
Revision: 3193 http://sc2.svn.sourceforge.net/sc2/?rev=3193&view=rev Author: avolkov Date: 2009-10-08 01:26:26 +0000 (Thu, 08 Oct 2009) Log Message: ----------- Process subtitles correctly with no timestamp file; bug #1060; some trackplayer cleanups Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/src/sc2code/comm.c trunk/sc2/src/sc2code/libs/sound/decoders/decoder.c trunk/sc2/src/sc2code/libs/sound/trackint.h trunk/sc2/src/sc2code/libs/sound/trackplayer.c Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2009-10-08 00:07:52 UTC (rev 3192) +++ trunk/sc2/ChangeLog 2009-10-08 01:26:26 UTC (rev 3193) @@ -1,4 +1,5 @@ Changes towards version 0.7: +- Process subtitles correctly with no timestamp file (bug #1060) - Alex - Lander will no longer hang when killed on planets with a lot of natural disasters (bug #584) - Alex - Canceling load from the main menu returns to main menu (bug #679) - Alex Modified: trunk/sc2/src/sc2code/comm.c =================================================================== --- trunk/sc2/src/sc2code/comm.c 2009-10-08 00:07:52 UTC (rev 3192) +++ trunk/sc2/src/sc2code/comm.c 2009-10-08 01:26:26 UTC (rev 3193) @@ -907,7 +907,7 @@ if (!pSS->Initialized) { pSS->PrintNext = TRUE; - pSS->NextSub = first_chain; + pSS->NextSub = chain_head; pSS->LeftOver = NULL; pSS->MenuRepeatDelay = 0; pSS->InputFunc = DoConvSummary; Modified: trunk/sc2/src/sc2code/libs/sound/decoders/decoder.c =================================================================== --- trunk/sc2/src/sc2code/libs/sound/decoders/decoder.c 2009-10-08 00:07:52 UTC (rev 3192) +++ trunk/sc2/src/sc2code/libs/sound/decoders/decoder.c 2009-10-08 01:26:26 UTC (rev 3193) @@ -321,6 +321,7 @@ TFB_SoundDecoder* SoundDecoder_Load (uio_DirHandle *dir, char *filename, uint32 buffer_size, uint32 startTime, sint32 runTime) + // runTime < 0 specifies a default length for a nul decoder { const char* pext; TFB_RegSoundDecoder* info; @@ -417,7 +418,9 @@ } decoder->length -= startTime / 1000.0f; - if (runTime > 0 && runTime / 1000.0 < decoder->length) + if (decoder->length < 0) + decoder->length = 0; + else if (runTime > 0 && runTime / 1000.0 < decoder->length) decoder->length = (float)(runTime / 1000.0); decoder->start_sample = (uint32)(startTime / 1000.0f * decoder->frequency); Modified: trunk/sc2/src/sc2code/libs/sound/trackint.h =================================================================== --- trunk/sc2/src/sc2code/libs/sound/trackint.h 2009-10-08 00:07:52 UTC (rev 3192) +++ trunk/sc2/src/sc2code/libs/sound/trackint.h 2009-10-08 01:26:26 UTC (rev 3193) @@ -23,7 +23,7 @@ float start_time; int tag_me; uint32 track_num; - void *text; + UNICODE *text; TFB_TrackCB callback; struct tfb_soundchain *next; } TFB_SoundChain; @@ -35,10 +35,10 @@ } TFB_SoundChainData; -extern TFB_SoundChain *first_chain; +extern TFB_SoundChain *chain_head; TFB_SoundChain *create_soundchain (TFB_SoundDecoder *decoder, float startTime); void destroy_soundchain (TFB_SoundChain *chain); -TFB_SoundChain *get_previous_chain (TFB_SoundChain *first_chain, TFB_SoundChain *current_chain); +TFB_SoundChain *get_chain_previous (TFB_SoundChain *head, TFB_SoundChain *current); #endif // TRACKINT_H Modified: trunk/sc2/src/sc2code/libs/sound/trackplayer.c =================================================================== --- trunk/sc2/src/sc2code/libs/sound/trackplayer.c 2009-10-08 00:07:52 UTC (rev 3192) +++ trunk/sc2/src/sc2code/libs/sound/trackplayer.c 2009-10-08 01:26:26 UTC (rev 3193) @@ -24,24 +24,24 @@ #include <stdlib.h> -static int tct; //total number of subtitle tracks -static int tcur; //currently playing subtitle track +static int track_count; //total number of subtitle tracks +static int cur_track; //currently playing subtitle track static UNICODE *cur_page = 0; //current page of subtitle track static int no_page_break = 0; static int track_pos_changed = 0; // set whenever ff, frev is enabled -static TFB_SoundChain *cur_text_chain = NULL; //current link w/ subbies -#define MAX_CLIPS 50 static TFB_SoundSample *sound_sample = NULL; -TFB_SoundChain *first_chain = NULL; //first decoder in linked list -static TFB_SoundChain *last_chain = NULL; //last decoder in linked list -static TFB_SoundChain *last_ts_chain = NULL; //last element in the chain with a subtitle +TFB_SoundChain *chain_head = NULL; //first decoder in linked list +static TFB_SoundChain *chain_tail = NULL; //last decoder in linked list +static TFB_SoundChain *last_sub = NULL; //last element in the chain with a subtitle -static Mutex track_mutex; //protects tcur and tct -void recompute_track_pos (TFB_SoundSample *sample, - TFB_SoundChain *first_chain, sint32 offset); +static Mutex track_mutex; //protects cur_track and track_count +void recompute_track_pos (TFB_SoundSample *sample, TFB_SoundChain *head, + sint32 offset); bool is_sample_playing(TFB_SoundSample* samp); +void destroy_sound_sample (TFB_SoundSample *sample); + // stream callbacks static bool OnTrackStart (TFB_SoundSample* sample); static bool OnChunkEnd (TFB_SoundSample* sample, audio_Object buffer); @@ -66,8 +66,8 @@ { TFB_SoundChainData* scd; uint32 cur_time; - sint32 total_length = (sint32)((last_chain->start_time + - last_chain->decoder->length) * (float)ONE_SECOND); + sint32 total_length = (sint32)((chain_tail->start_time + + chain_tail->decoder->length) * (float)ONE_SECOND); if (!sound_sample) return; @@ -80,8 +80,8 @@ soundSource[SPEECH_SOURCE].start_time = (sint32)cur_time - total_length; track_pos_changed = 1; - scd->play_chain_ptr = last_chain; - recompute_track_pos(sound_sample, first_chain, total_length + 1); + scd->play_chain_ptr = chain_tail; + recompute_track_pos (sound_sample, chain_head, total_length + 1); UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex); PlayingTrack(); } @@ -113,7 +113,7 @@ // ResumeTrack should resume a paused track, or start a stopped track, and do nothing // for a playing track void -ResumeTrack () +ResumeTrack (void) { TFB_SoundChainData* scd; @@ -151,23 +151,23 @@ } COUNT -PlayingTrack () +PlayingTrack (void) { // this is not a great way to detect whether the track is playing, // but as it should work during fast-forward/rewind, 'PlayingStream' can't be used -// if (tct == 0) +// if (track_count == 0) // return ((COUNT)~0); if (sound_sample && is_sample_playing (sound_sample)) { int last_track; UNICODE *last_page; LockMutex (track_mutex); - last_track = tcur; + last_track = cur_track; last_page = cur_page; UnlockMutex (track_mutex); if (do_subtitles (last_page)) { - return (tcur + 1); + return cur_track + 1; } else { @@ -184,35 +184,33 @@ } void -StopTrack () +StopTrack (void) { LockMutex (soundSource[SPEECH_SOURCE].stream_mutex); StopStream (SPEECH_SOURCE); UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex); - if (first_chain) + if (chain_head) { - destroy_soundchain (first_chain); - first_chain = NULL; - last_chain = NULL; - last_ts_chain = NULL; + destroy_soundchain (chain_head); + chain_head = NULL; + chain_tail = NULL; + last_sub = NULL; } if (sound_sample) { DestroyMutex (track_mutex); - audio_DeleteBuffers (sound_sample->num_buffers, sound_sample->buffer); - HFree (sound_sample->buffer); - HFree (sound_sample->buffer_tag); - HFree (sound_sample->data); - HFree (sound_sample); + destroy_sound_sample (sound_sample); sound_sample = NULL; } - tct = tcur = 0; + track_count = 0; + cur_track = 0; cur_page = 0; do_subtitles ((void *)~0); } -bool is_sample_playing(TFB_SoundSample* sample) +static bool +is_sample_playing (TFB_SoundSample* sample) { TFB_SoundChainData* scd = (TFB_SoundChainData*) sample->data; @@ -226,8 +224,8 @@ LockMutex (track_mutex); if (chain->callback) chain->callback (); - tcur = chain->track_num; - cur_page = (UNICODE *) chain->text; + cur_track = chain->track_num; + cur_page = chain->text; UnlockMutex (track_mutex); } @@ -299,21 +297,22 @@ } int -GetTimeStamps(UNICODE *TimeStamps, sint32 *time_stamps) +GetTimeStamps (UNICODE *TimeStamps, sint32 *time_stamps) { int pos; int num = 0; + while (*TimeStamps && (pos = strcspn (TimeStamps, ",\r\n"))) { UNICODE valStr[32]; uint32 val; - strncpy (valStr, TimeStamps, pos); + memcpy (valStr, TimeStamps, pos); valStr[pos] = '\0'; val = strtoul (valStr, NULL, 10); if (val) { - *time_stamps = (sint32)val; + *time_stamps = val; num++; time_stamps++; } @@ -324,92 +323,56 @@ } #define TEXT_SPEED 80 -UNICODE ** -SplitSubPages (UNICODE *text, sint32 *timestamp, int *num_pages) +// Returns number of parsed pages +int +SplitSubPages (UNICODE *text, UNICODE *pages[], sint32 timestamp[], int size) { - UNICODE **split_text = NULL; - int pos = 0, ellips = 0; - COUNT page = 0; - while (text[pos]) + int lead_ellips = 0; + COUNT page; + + for (page = 0; page < size && *text != '\0'; ++page) { - if (text[pos] == '\n' || text[pos] == '\r') - { - if (! split_text) - split_text = (UNICODE **) HMalloc (sizeof (UNICODE *) * (page + 1)); - else - split_text = (UNICODE **) HRealloc (split_text, - sizeof (UNICODE *) * (page + 1)); - // XXX: this will only work when ASCII punctuation and spaces - // are used exclusively - if (!ispunct (text[pos - 1]) && !isspace (text[pos - 1])) - { - split_text[page] = HMalloc (sizeof (UNICODE) * (pos + ellips + 4)); - if (ellips) - strcpy (split_text[page], ".."); - strncpy (split_text[page] + ellips, text, pos); - strcpy (split_text[page] + ellips + pos, "..."); - timestamp[page] = - pos * TEXT_SPEED; - if (timestamp[page] > -1000) - timestamp[page] = -1000; - ellips = 2; - text = text + pos; - pos = 0; - page ++; - } - else - { - split_text[page] = HMalloc (sizeof (UNICODE) * (pos + ellips + 1)); - if (ellips) - strcpy (split_text[page], ".."); - strncpy (split_text[page] + ellips, text, pos); - *(split_text[page] + ellips + pos) = 0; - timestamp[page] = - pos * TEXT_SPEED; - if (timestamp[page] > -1000) - timestamp[page] = -1000; - ellips = 0; - text = text + pos; - pos = 0; - page ++; - } - while (text[pos] == '\n' || text[pos] == '\r') - text++; - } - else - pos++; + int aft_ellips; + int pos; + + // seek to EOL or end of the string + pos = strcspn (text, "\r\n"); + // XXX: this will only work when ASCII punctuation and spaces + // are used exclusively + aft_ellips = 3 * (text[pos] != '\0' && pos > 0 && + !ispunct (text[pos - 1]) && !isspace (text[pos - 1])); + pages[page] = HMalloc (sizeof (UNICODE) * + (lead_ellips + pos + aft_ellips + 1)); + if (lead_ellips) + strcpy (pages[page], ".."); + memcpy (pages[page] + lead_ellips, text, pos); + pages[page][lead_ellips + pos] = '\0'; // string term + if (aft_ellips) + strcpy (pages[page] + lead_ellips + pos, "..."); + timestamp[page] = pos * TEXT_SPEED; + if (timestamp[page] < 1000) + timestamp[page] = 1000; + lead_ellips = aft_ellips ? 2 : 0; + text += pos; + // Skip any EOL + text += strspn (text, "\r\n"); } - if (pos) - { - if (! split_text) - split_text = (UNICODE **) HMalloc (sizeof (UNICODE *) * (page + 1)); - else - split_text = (UNICODE **) HRealloc (split_text, - sizeof (UNICODE *) * (page + 1)); - split_text[page] = HMalloc (sizeof (UNICODE) * (pos + ellips + 1)); - if (ellips) - strcpy (split_text[page], ".."); - strncpy (split_text[page] + ellips, text, pos); - *(split_text[page] + ellips + pos) = 0; - timestamp[page] = - pos * TEXT_SPEED; - if (timestamp[page] > -1000) - timestamp[page] = -1000; - timestamp[page] += -1000; - page ++; - } - *num_pages = page; - return (split_text); + + return page; } // decodes several tracks into one and adds it to queue // track list is NULL-terminated +// May only be called after at least one SpliceTrack(). This is a limitation +// for the sake of timestamps, but it does not have to be so. void SpliceMultiTrack (UNICODE *TrackNames[], UNICODE *TrackText) { #define MAX_MULTI_TRACKS 20 #define MAX_MULTI_BUFFERS 100 TFB_SoundDecoder* track_decs[MAX_MULTI_TRACKS + 1]; - TFB_SoundChain *begin_chain; int tracks; - int slen; + int slen1, slen2; if (!TrackText) { @@ -417,15 +380,8 @@ return; } - if (tct >= MAX_CLIPS) + if (!sound_sample || !chain_tail) { - log_add (log_Warning, "SpliceMultiTrack(): no more clip slots (%d)", - MAX_CLIPS); - return; - } - - if (! sound_sample) - { log_add (log_Warning, "SpliceMultiTrack(): Cannot be called before SpliceTrack()"); return; } @@ -444,10 +400,8 @@ track_decs[tracks]->format); SoundDecoder_DecodeAll (track_decs[tracks]); - last_chain->next = create_soundchain (track_decs[tracks], sound_sample->length); - last_chain = last_chain->next; - if (tracks == 0) - begin_chain = last_chain; + chain_tail->next = create_soundchain (track_decs[tracks], sound_sample->length); + chain_tail = chain_tail->next; sound_sample->length += track_decs[tracks]->length; } else @@ -465,210 +419,228 @@ return; } - slen = strlen (TrackText); - if (tct) - { - int slen1 = strlen ((UNICODE *)cur_text_chain->text); - cur_text_chain->text = HRealloc ( - (UNICODE *)cur_text_chain->text, slen1 + slen + 1); - strcpy (&((UNICODE *)cur_text_chain->text)[slen1], TrackText); - } - else - { - begin_chain->text = HMalloc (slen + 1); - strcpy ((UNICODE *)begin_chain->text, TrackText); - cur_text_chain = begin_chain; - begin_chain->tag_me = 1; - begin_chain->track_num = tct; - tct++; - } + slen1 = strlen (last_sub->text); + slen2 = strlen (TrackText); + last_sub->text = HRealloc (last_sub->text, slen1 + slen2 + 1); + strcpy (last_sub->text + slen1, TrackText); + no_page_break = 1; - } +// XXX: This code and the entire trackplayer are begging to be overhauled void SpliceTrack (UNICODE *TrackName, UNICODE *TrackText, UNICODE *TimeStamp, TFB_TrackCB cb) { - unsigned long startTime; - UNICODE **split_text = NULL; - if (TrackText) - { - if (TrackName == 0) + static UNICODE last_track_name[128] = ""; + static unsigned long startTime = 0; +#define MAX_PAGES 50 + UNICODE *pages[MAX_PAGES]; + sint32 time_stamps[MAX_PAGES]; + int num_pages; + int page; + + if (!TrackText) + return; + + if (!TrackName) + { // Appending a piece of subtitles to the last track + int slen1, slen2; + + if (track_count == 0) { - if (tct) - { - int slen1, slen2; - UNICODE *oTT; - int num_pages = 0, page_counter; - sint32 time_stamps[50]; + log_add (log_Warning, "SpliceTrack(): Tried to append a subtitle," + " but no current track"); + return; + } - if (!last_ts_chain || !last_ts_chain->text) + if (!last_sub || !last_sub->text) + { + log_add (log_Warning, "SpliceTrack(): Tried to append a subtitle" + " to a NULL string"); + return; + } + + num_pages = SplitSubPages (TrackText, pages, time_stamps, MAX_PAGES); + if (num_pages == 0) + { + log_add (log_Warning, "SpliceTrack(): Failed to parse subtitles"); + return; + } + // The last page's stamp is a suggested value. The track should + // actually play to the end. + time_stamps[num_pages - 1] = -time_stamps[num_pages - 1]; + + // Add the first piece to the last subtitle page + slen1 = strlen (last_sub->text); + slen2 = strlen (pages[0]); + last_sub->text = HRealloc (last_sub->text, slen1 + slen2 + 1); + strcpy (last_sub->text + slen1, pages[0]); + HFree (pages[0]); + + // Add the rest of the pages + for (page = 1; page < num_pages; ++page) + { + if (last_sub->next) + { // nodes prepared by previous call, just fill in the subs + last_sub = last_sub->next; + last_sub->text = pages[page]; + } + else + { // probably no timestamps were provided, so need more work + TFB_SoundDecoder *decoder = SoundDecoder_Load (contentDir, + last_track_name, 4096, startTime, time_stamps[page]); + if (!decoder) { - log_add (log_Warning, "SpliceTrack(): Tried to append" - " a subtitle to a NULL string"); - return; + log_add (log_Warning, "SpliceTrack(): couldn't load %s", TrackName); + break; } - split_text = SplitSubPages (TrackText, time_stamps, &num_pages); - if (! split_text) - { - log_add (log_Warning, "SpliceTrack(): Failed to parse sutitles"); - return; - } - oTT = (UNICODE *)last_ts_chain->text; - slen1 = strlen (oTT); - slen2 = strlen (split_text[0]); - last_ts_chain->text = HRealloc (oTT, slen1 + slen2 + 1); - strcpy (&((UNICODE *)last_ts_chain->text)[slen1], split_text[0]); - HFree (split_text[0]); - for (page_counter = 1; page_counter < num_pages; page_counter++) - { - if (! last_ts_chain->next) - { - log_add (log_Warning, "SpliceTrack(): More text pages than timestamps!"); - break; - } - last_ts_chain = last_ts_chain->next; - last_ts_chain->text = split_text[page_counter]; - } + startTime += (unsigned long)(decoder->length * 1000); + chain_tail->next = create_soundchain (decoder, sound_sample->length); + chain_tail = chain_tail->next; + chain_tail->tag_me = 1; + chain_tail->track_num = track_count - 1; + chain_tail->text = pages[page]; + chain_tail->callback = cb; + // We have to tag only one page with a callback + cb = NULL; + last_sub = chain_tail; + sound_sample->length += decoder->length; } } - else + } + else + { // Adding a new track + int num_timestamps = 0; + + utf8StringCopy (last_track_name, sizeof (last_track_name), TrackName); + + num_pages = SplitSubPages (TrackText, pages, time_stamps, MAX_PAGES); + if (num_pages == 0) { - int num_pages = 0, num_timestamps = 0, page_counter; - sint32 time_stamps[50]; - int i; + log_add (log_Warning, "SpliceTrack(): Failed to parse sutitles"); + return; + } + // The last page's stamp is a suggested value. The track should + // actually play to the end. + time_stamps[num_pages - 1] = -time_stamps[num_pages - 1]; - for (i = 0; i < 50; i++) - time_stamps[i] = -1000; + if (no_page_break && track_count) + { + int slen1, slen2; - split_text = SplitSubPages (TrackText, time_stamps, &num_pages); - if (! split_text) + slen1 = strlen (last_sub->text); + slen2 = strlen (pages[0]); + last_sub->text = HRealloc (last_sub->text, slen1 + slen2 + 1); + strcpy (last_sub->text + slen1, pages[0]); + HFree (pages[0]); + } + else + track_count++; + + log_add (log_Info, "SpliceTrack(): loading %s", TrackName); + + if (TimeStamp) + { + num_timestamps = GetTimeStamps (TimeStamp, time_stamps) + 1; + if (num_timestamps < num_pages) { - log_add (log_Warning, "SpliceTrack(): Failed to parse sutitles"); - return; + log_add (log_Warning, "SpliceTrack(): number of timestamps" + " doesn't match number of pages!"); } - if (no_page_break && tct) + else if (num_timestamps > num_pages) + { // We most likely will get more subtitles appended later + // Set the last page to the rest of the track + time_stamps[num_timestamps - 1] = -100000; + } + } + else + { + num_timestamps = num_pages; + } + + startTime = 0; + for (page = 0; page < num_timestamps; ++page) + { + static float old_volume = 0.0f; + TFB_SoundDecoder *decoder = SoundDecoder_Load (contentDir, + TrackName, 4096, startTime, time_stamps[page]); + if (!decoder) { - int slen1, slen2; - UNICODE *oTT; - - oTT = (UNICODE *)cur_text_chain->text; - slen1 = strlen (oTT); - slen2 = strlen (split_text[0]); - cur_text_chain->text = HRealloc (oTT, slen1 + slen2 + 1); - strcpy (&((UNICODE *)cur_text_chain->text)[slen1], split_text[0]); - HFree (split_text[0]); + log_add (log_Warning, "SpliceTrack(): couldn't load %s", TrackName); + break; } - else - tct++; - log_add (log_Info, "SpliceTrack(): loading %s", TrackName); - - if (TimeStamp) + if (!sound_sample) { - num_timestamps = GetTimeStamps (TimeStamp, time_stamps) + 1; - if (num_timestamps < num_pages) - log_add (log_Warning, "SpliceTrack(): number of timestamps" - " doesn't match number of pages!"); + TFB_SoundChainData* scd = HCalloc (sizeof (TFB_SoundChainData)); + track_mutex = CreateMutex ("trackplayer mutex", SYNC_CLASS_TOPLEVEL | SYNC_CLASS_AUDIO); + sound_sample = (TFB_SoundSample *) HMalloc (sizeof (TFB_SoundSample)); + sound_sample->data = scd; + sound_sample->callbacks = trackCBs; + sound_sample->num_buffers = 8; + sound_sample->buffer_tag = HCalloc (sizeof (TFB_SoundTag) * sound_sample->num_buffers); + sound_sample->buffer = HMalloc (sizeof (audio_Object) * sound_sample->num_buffers); + sound_sample->decoder = decoder; + sound_sample->length = 0; + audio_GenBuffers (sound_sample->num_buffers, sound_sample->buffer); + chain_head = create_soundchain (decoder, 0.0); + chain_tail = chain_head; + scd->read_chain_ptr = chain_head; + scd->play_chain_ptr = NULL; } else - num_timestamps = num_pages; - startTime = 0; - for (page_counter = 0; page_counter < num_timestamps; page_counter++) { - if (! sound_sample) - { - TFB_SoundDecoder *decoder; - TFB_SoundChainData* scd; - - track_mutex = CreateMutex("trackplayer mutex", SYNC_CLASS_TOPLEVEL | SYNC_CLASS_AUDIO); - sound_sample = (TFB_SoundSample *) HMalloc (sizeof (TFB_SoundSample)); - scd = (TFB_SoundChainData *) HCalloc (sizeof (TFB_SoundChainData)); - sound_sample->data = scd; - sound_sample->callbacks = trackCBs; - sound_sample->num_buffers = 8; - sound_sample->buffer_tag = HCalloc (sizeof (TFB_SoundTag) * sound_sample->num_buffers); - sound_sample->buffer = HMalloc (sizeof (audio_Object) * sound_sample->num_buffers); - audio_GenBuffers (sound_sample->num_buffers, sound_sample->buffer); - decoder = SoundDecoder_Load (contentDir, TrackName, 4096, - startTime, time_stamps[page_counter]); - scd->read_chain_ptr = create_soundchain (decoder, 0.0); - sound_sample->decoder = decoder; - first_chain = last_chain = scd->read_chain_ptr; - sound_sample->length = 0; - scd->play_chain_ptr = 0; - } - else - { - TFB_SoundDecoder *decoder; - decoder = SoundDecoder_Load (contentDir, TrackName, 4096, - startTime, time_stamps[page_counter]); - last_chain->next = create_soundchain (decoder, sound_sample->length); - last_chain = last_chain->next; - } - startTime += abs (time_stamps[page_counter]); - + chain_tail->next = create_soundchain (decoder, sound_sample->length); + chain_tail = chain_tail->next; + } + startTime += (unsigned long)(decoder->length * 1000); #if 0 - log_add (log_Debug, "page (%d of %d): %d ts: %d", - page_counter, num_pages, - startTime, time_stamps[page_counter]); + log_add (log_Debug, "page (%d of %d): %d ts: %d", + page, num_pages, + startTime, time_stamps[page]); #endif - if (last_chain->decoder) + if (decoder->is_null) + { + if (speechVolumeScale != 0.0f) { - static float old_volume = 0.0f; - if (last_chain->decoder->is_null) - { - if (speechVolumeScale != 0.0f) - { - /* No voice ogg available so zeroing speech volume to - ensure proper operation of oscilloscope and music fading */ - old_volume = speechVolumeScale; - speechVolumeScale = 0.0f; - log_add (log_Warning, "SpliceTrack(): no voice ogg" - " available so setting speech volume to zero"); - } - } - else if (old_volume != 0.0f && speechVolumeScale != old_volume) - { - /* This time voice ogg is there */ - log_add (log_Warning, "SpliceTrack(): restoring speech volume"); - speechVolumeScale = old_volume; - old_volume = 0.0f; - } - - sound_sample->length += last_chain->decoder->length; - if (! no_page_break) - { - last_chain->tag_me = 1; - // last_chain->tag.value = (void *)(((tct - 1) << 8) | page_counter); - last_chain->track_num = tct - 1; - if (page_counter < num_pages) - { - last_chain->text = split_text[page_counter]; - last_ts_chain = last_chain; - } - last_chain->callback = cb; - cur_text_chain = last_chain; - } - no_page_break = 0; + /* No voice ogg available so zeroing speech volume to + ensure proper operation of oscilloscope and music fading */ + old_volume = speechVolumeScale; + speechVolumeScale = 0.0f; + log_add (log_Warning, "SpliceTrack(): no voice ogg" + " available so setting speech volume to zero"); } - else + } + else if (old_volume != 0.0f && speechVolumeScale != old_volume) + { + /* This time voice ogg is there */ + log_add (log_Warning, "SpliceTrack(): restoring speech volume"); + speechVolumeScale = old_volume; + old_volume = 0.0f; + } + + sound_sample->length += decoder->length; + if (!no_page_break) + { + chain_tail->tag_me = 1; + // chain_tail->tag.value = (void *)(((track_count - 1) << 8) | page); + chain_tail->track_num = track_count - 1; + if (page < num_pages) { - log_add (log_Warning, "SpliceTrack(): couldn't load %s", TrackName); - audio_DeleteBuffers (sound_sample->num_buffers, sound_sample->buffer); - destroy_soundchain (first_chain); - first_chain = NULL; - HFree (sound_sample->buffer); - HFree (sound_sample); - sound_sample = NULL; + chain_tail->text = pages[page]; + last_sub = chain_tail; } + chain_tail->callback = cb; + // We have to tag only one page with a callback + cb = NULL; } + no_page_break = 0; } } } void -PauseTrack () +PauseTrack (void) { if (sound_sample && sound_sample->decoder) { @@ -680,47 +652,47 @@ } void -recompute_track_pos (TFB_SoundSample *sample, TFB_SoundChain *first_chain, sint32 offset) +recompute_track_pos (TFB_SoundSample *sample, TFB_SoundChain *head, sint32 offset) { TFB_SoundChainData* scd; - TFB_SoundChain *cur_chain = first_chain; + TFB_SoundChain *cur = head; if (! sample) return; scd = (TFB_SoundChainData*) sample->data; - while (cur_chain->next && - (sint32)(cur_chain->next->start_time * (float)ONE_SECOND) < offset) + while (cur->next && + (sint32)(cur->next->start_time * (float)ONE_SECOND) < offset) { - if (cur_chain->tag_me) - DoTrackTag (cur_chain); - cur_chain = cur_chain->next; + if (cur->tag_me) + DoTrackTag (cur); + cur = cur->next; } - if (cur_chain->tag_me) - DoTrackTag (cur_chain); - if ((sint32)((cur_chain->start_time + cur_chain->decoder->length) * (float)ONE_SECOND) < offset) + if (cur->tag_me) + DoTrackTag (cur); + if ((sint32)((cur->start_time + cur->decoder->length) * (float)ONE_SECOND) < offset) { scd->read_chain_ptr = NULL; sample->decoder = NULL; } else { - scd->read_chain_ptr = cur_chain; + scd->read_chain_ptr = cur; SoundDecoder_Seek(scd->read_chain_ptr->decoder, - (uint32)(1000 * (offset / (float)ONE_SECOND - cur_chain->start_time))); + (uint32)(1000 * (offset / (float)ONE_SECOND - cur->start_time))); } } void -FastReverse_Smooth () +FastReverse_Smooth (void) { if (sound_sample) { sint32 offset; uint32 cur_time; - sint32 total_length = (sint32)((last_chain->start_time + - last_chain->decoder->length) * (float)ONE_SECOND); + sint32 total_length = (sint32)((chain_tail->start_time + + chain_tail->decoder->length) * (float)ONE_SECOND); LockMutex (soundSource[SPEECH_SOURCE].stream_mutex); PauseStream (SPEECH_SOURCE); cur_time = GetTimeCounter(); @@ -737,7 +709,7 @@ } else offset = cur_time - soundSource[SPEECH_SOURCE].start_time; - recompute_track_pos(sound_sample, first_chain, offset); + recompute_track_pos (sound_sample, chain_head, offset); UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex); PlayingTrack(); @@ -745,18 +717,18 @@ } void -FastReverse_Page () +FastReverse_Page (void) { if (sound_sample) { TFB_SoundChainData* scd = (TFB_SoundChainData*) sound_sample->data; - TFB_SoundChain *prev_chain; + TFB_SoundChain *prev; LockMutex (soundSource[SPEECH_SOURCE].stream_mutex); - prev_chain = get_previous_chain (first_chain, scd->play_chain_ptr); - if (prev_chain) + prev = get_chain_previous (chain_head, scd->play_chain_ptr); + if (prev) { - scd->read_chain_ptr = prev_chain; + scd->read_chain_ptr = prev; PlayStream (sound_sample, SPEECH_SOURCE, false, speechVolumeScale != 0.0f, true); @@ -766,14 +738,14 @@ } void -FastForward_Smooth () +FastForward_Smooth (void) { if (sound_sample) { sint32 offset; uint32 cur_time; - sint32 total_length = (sint32)((last_chain->start_time + - last_chain->decoder->length) * (float)ONE_SECOND); + sint32 total_length = (sint32)((chain_tail->start_time + + chain_tail->decoder->length) * (float)ONE_SECOND); LockMutex (soundSource[SPEECH_SOURCE].stream_mutex); PauseStream (SPEECH_SOURCE); cur_time = GetTimeCounter(); @@ -783,27 +755,26 @@ (sint32)cur_time - total_length - 1; offset = cur_time - soundSource[SPEECH_SOURCE].start_time; track_pos_changed = 1; - recompute_track_pos(sound_sample, first_chain, offset); + recompute_track_pos (sound_sample, chain_head, offset); UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex); - PlayingTrack(); - + PlayingTrack (); } } int -FastForward_Page () +FastForward_Page (void) { if (sound_sample) { TFB_SoundChainData* scd = (TFB_SoundChainData*) sound_sample->data; - TFB_SoundChain *cur_ptr = scd->play_chain_ptr; + TFB_SoundChain *cur = scd->play_chain_ptr; LockMutex (soundSource[SPEECH_SOURCE].stream_mutex); - while (cur_ptr->next && !cur_ptr->next->tag_me) - cur_ptr = cur_ptr->next; - if (cur_ptr->next) + while (cur->next && !cur->next->tag_me) + cur = cur->next; + if (cur->next) { - scd->read_chain_ptr = cur_ptr->next; + scd->read_chain_ptr = cur->next; PlayStream (sound_sample, SPEECH_SOURCE, false, speechVolumeScale != 0.0f, true); @@ -845,46 +816,56 @@ create_soundchain (TFB_SoundDecoder *decoder, float startTime) { TFB_SoundChain *chain; - chain = (TFB_SoundChain *)HMalloc (sizeof (TFB_SoundChain)); + chain = HMalloc (sizeof (TFB_SoundChain)); chain->decoder = decoder; chain->next = NULL; chain->start_time = startTime; chain->tag_me = 0; chain->text = 0; - return (chain); + return chain; } void destroy_soundchain (TFB_SoundChain *chain) { - while (chain->next) + TFB_SoundChain *next = NULL; + for ( ; chain; chain = next) { - TFB_SoundChain *tmp_chain = chain->next; - chain->next = chain->next->next; - if (tmp_chain->decoder) - SoundDecoder_Free (tmp_chain->decoder); - if (tmp_chain->text) - HFree (tmp_chain->text); - HFree (tmp_chain); + next = chain->next; + if (chain->decoder) + SoundDecoder_Free (chain->decoder); + HFree (chain->text); + HFree (chain); } - SoundDecoder_Free (chain->decoder); - HFree (chain); } +void +destroy_sound_sample (TFB_SoundSample *sample) +{ + if (sample->buffer) + { + audio_DeleteBuffers (sample->num_buffers, sample->buffer); + HFree (sample->buffer); + } + HFree (sample->buffer_tag); + HFree (sample->data); + HFree (sample); +} + TFB_SoundChain * -get_previous_chain (TFB_SoundChain *first_chain, TFB_SoundChain *current_chain) +get_chain_previous (TFB_SoundChain *head, TFB_SoundChain *current) { - TFB_SoundChain *prev_chain, *last_valid = NULL; - prev_chain = first_chain; - if (prev_chain == current_chain) - return (prev_chain); - while (prev_chain->next) + TFB_SoundChain *prev, *last_valid = NULL; + prev = head; + if (prev == current) + return prev; + while (prev->next) { - if (prev_chain->tag_me) - last_valid = prev_chain; - if (prev_chain->next == current_chain) - return (last_valid); - prev_chain = prev_chain->next; + if (prev->tag_me) + last_valid = prev; + if (prev->next == current) + return last_valid; + prev = prev->next; } - return (first_chain); + return head; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2009-10-08 02:16:55
|
Revision: 3194 http://sc2.svn.sourceforge.net/sc2/?rev=3194&view=rev Author: avolkov Date: 2009-10-08 02:16:48 +0000 (Thu, 08 Oct 2009) Log Message: ----------- Don't set ATTACKED_DRUUGE if Druuge attempted to salvage your ship; bug #1013 Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/src/sc2code/comm/druuge/druugec.c Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2009-10-08 01:26:26 UTC (rev 3193) +++ trunk/sc2/ChangeLog 2009-10-08 02:16:48 UTC (rev 3194) @@ -1,4 +1,5 @@ Changes towards version 0.7: +- Druuge no longer turn hostile after attempting a salvage (bug #1013) - Alex - Process subtitles correctly with no timestamp file (bug #1060) - Alex - Lander will no longer hang when killed on planets with a lot of natural disasters (bug #584) - Alex Modified: trunk/sc2/src/sc2code/comm/druuge/druugec.c =================================================================== --- trunk/sc2/src/sc2code/comm/druuge/druugec.c 2009-10-08 01:26:26 UTC (rev 3193) +++ trunk/sc2/src/sc2code/comm/druuge/druugec.c 2009-10-08 02:16:48 UTC (rev 3194) @@ -157,6 +157,7 @@ }; static COUNT SlaveryCount = 0; +static BOOLEAN AttemptedSalvage = FALSE; static void ExitConversation (RESPONSE_REF R) @@ -688,8 +689,6 @@ { BYTE NumVisits; - SlaveryCount = 0; - if (LOBYTE (GLOBAL (CurrentActivity)) == WON_LAST_BATTLE) { NPCPhrase (OUT_TAKES); @@ -761,7 +760,9 @@ if (GET_GAME_STATE (ATTACKED_DRUUGE) && !GET_GAME_STATE (DRUUGE_DISCLAIMER)) { -// NPCPhrase (HOSTILE_TRADE); + // There is no HOSTILE_TRADE voice track that we know of + // so this is currently disabled + //NPCPhrase (HOSTILE_TRADE); SET_GAME_STATE (DRUUGE_DISCLAIMER, 1); } if (GET_GAME_STATE (MAIDENS_ON_SHIP) @@ -860,6 +861,7 @@ SET_GAME_STATE (DRUUGE_SALVAGE, NumVisits); SET_GAME_STATE (BATTLE_SEGUE, 1); + AttemptedSalvage = TRUE; } else { @@ -891,6 +893,7 @@ post_druuge_enc (void) { if (GET_GAME_STATE (BATTLE_SEGUE) == 1 + && !AttemptedSalvage && !GET_GAME_STATE (DRUUGE_MANNER)) { if (!GET_GAME_STATE (ATTACKED_DRUUGE)) @@ -906,6 +909,9 @@ { LOCDATA *retval; + SlaveryCount = 0; + AttemptedSalvage = FALSE; + druuge_desc.init_encounter_func = Intro; druuge_desc.post_encounter_func = post_druuge_enc; druuge_desc.uninit_encounter_func = uninit_druuge; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2009-10-08 16:23:34
|
Revision: 3198 http://sc2.svn.sourceforge.net/sc2/?rev=3198&view=rev Author: avolkov Date: 2009-10-08 16:23:21 +0000 (Thu, 08 Oct 2009) Log Message: ----------- Various include file cleanups Modified Paths: -------------- trunk/sc2/Makeproject trunk/sc2/src/msvc++/UrQuanMasters.dsp trunk/sc2/src/options.c trunk/sc2/src/sc2code/battle.c trunk/sc2/src/sc2code/battle.h trunk/sc2/src/sc2code/build.h trunk/sc2/src/sc2code/cleanup.c trunk/sc2/src/sc2code/coderes.h trunk/sc2/src/sc2code/comm/commall.h trunk/sc2/src/sc2code/cons_res.h trunk/sc2/src/sc2code/controls.h trunk/sc2/src/sc2code/cyborg.c trunk/sc2/src/sc2code/demo.c trunk/sc2/src/sc2code/displist.h trunk/sc2/src/sc2code/element.h trunk/sc2/src/sc2code/encount.c trunk/sc2/src/sc2code/fmv.c trunk/sc2/src/sc2code/galaxy.c trunk/sc2/src/sc2code/gameopt.c trunk/sc2/src/sc2code/gameopt.h trunk/sc2/src/sc2code/grpinfo.c trunk/sc2/src/sc2code/hyper.c trunk/sc2/src/sc2code/hyper.h trunk/sc2/src/sc2code/init.c trunk/sc2/src/sc2code/init.h trunk/sc2/src/sc2code/ipdisp.c trunk/sc2/src/sc2code/libs/decomp/lzdecode.c trunk/sc2/src/sc2code/libs/decomp/lzencode.c trunk/sc2/src/sc2code/libs/decomp/lzh.h trunk/sc2/src/sc2code/libs/file/dirs.c trunk/sc2/src/sc2code/libs/file/files.c trunk/sc2/src/sc2code/libs/gfxlib.h trunk/sc2/src/sc2code/libs/graphics/drawable.c trunk/sc2/src/sc2code/libs/graphics/drawcmd.h trunk/sc2/src/sc2code/libs/graphics/frame.c trunk/sc2/src/sc2code/libs/graphics/gfxintrn.h trunk/sc2/src/sc2code/libs/graphics/sdl/3do_blt.c trunk/sc2/src/sc2code/libs/graphics/sdl/3do_funcs.c trunk/sc2/src/sc2code/libs/graphics/sdl/bbox.h trunk/sc2/src/sc2code/libs/graphics/sdl/rotozoom.c trunk/sc2/src/sc2code/libs/graphics/sdl/sdl_common.c trunk/sc2/src/sc2code/libs/graphics/tfb_draw.h trunk/sc2/src/sc2code/libs/graphics/tfb_prim.h trunk/sc2/src/sc2code/libs/graphics/widgets.c trunk/sc2/src/sc2code/libs/inplib.h trunk/sc2/src/sc2code/libs/input/inpintrn.h trunk/sc2/src/sc2code/libs/input/sdl/input.c trunk/sc2/src/sc2code/libs/input/sdl/vcontrol.c trunk/sc2/src/sc2code/libs/list/list.c trunk/sc2/src/sc2code/libs/math/mthintrn.h trunk/sc2/src/sc2code/libs/mathlib.h trunk/sc2/src/sc2code/libs/memlib.h trunk/sc2/src/sc2code/libs/memory/w_memlib.c trunk/sc2/src/sc2code/libs/reslib.h trunk/sc2/src/sc2code/libs/resource/direct.c trunk/sc2/src/sc2code/libs/resource/index.h trunk/sc2/src/sc2code/libs/resource/loadres.c trunk/sc2/src/sc2code/libs/resource/propfile.c trunk/sc2/src/sc2code/libs/resource/propfile.h trunk/sc2/src/sc2code/libs/resource/resinit.c trunk/sc2/src/sc2code/libs/resource/resintrn.h trunk/sc2/src/sc2code/libs/sndlib.h trunk/sc2/src/sc2code/libs/sound/decoders/aiffaud.c trunk/sc2/src/sc2code/libs/sound/decoders/decoder.h trunk/sc2/src/sc2code/libs/sound/decoders/dukaud.c trunk/sc2/src/sc2code/libs/sound/decoders/modaud.c trunk/sc2/src/sc2code/libs/sound/decoders/oggaud.c trunk/sc2/src/sc2code/libs/sound/decoders/wav.c trunk/sc2/src/sc2code/libs/sound/fileinst.c trunk/sc2/src/sc2code/libs/sound/music.c trunk/sc2/src/sc2code/libs/sound/sndintrn.h trunk/sc2/src/sc2code/libs/sound/sound.h trunk/sc2/src/sc2code/libs/sound/trackplayer.h trunk/sc2/src/sc2code/libs/strings/sfileins.c trunk/sc2/src/sc2code/libs/strings/strings.c trunk/sc2/src/sc2code/libs/strings/strintrn.h trunk/sc2/src/sc2code/libs/strings/unicode.c trunk/sc2/src/sc2code/libs/strlib.h trunk/sc2/src/sc2code/libs/threads/sdl/sdlthreads.c trunk/sc2/src/sc2code/libs/video/vfileins.c trunk/sc2/src/sc2code/libs/video/video.h trunk/sc2/src/sc2code/libs/video/videodec.h trunk/sc2/src/sc2code/load.c trunk/sc2/src/sc2code/loadship.c trunk/sc2/src/sc2code/melee.c trunk/sc2/src/sc2code/misc.c trunk/sc2/src/sc2code/nameref.h trunk/sc2/src/sc2code/netplay/checksum.c trunk/sc2/src/sc2code/netplay/netmisc.h trunk/sc2/src/sc2code/pickmele.c trunk/sc2/src/sc2code/pickmele.h trunk/sc2/src/sc2code/pickship.c trunk/sc2/src/sc2code/planets/devices.c trunk/sc2/src/sc2code/planets/gendru.c trunk/sc2/src/sc2code/planets/genilw.c trunk/sc2/src/sc2code/planets/genmyc.c trunk/sc2/src/sc2code/planets/genorz.c trunk/sc2/src/sc2code/planets/genpet.c trunk/sc2/src/sc2code/planets/genpku.c trunk/sc2/src/sc2code/planets/genspa.c trunk/sc2/src/sc2code/planets/gensup.c trunk/sc2/src/sc2code/planets/genthrad.c trunk/sc2/src/sc2code/planets/gentopo.c trunk/sc2/src/sc2code/planets/genutw.c trunk/sc2/src/sc2code/planets/genvux.c trunk/sc2/src/sc2code/planets/genyeh.c trunk/sc2/src/sc2code/planets/lander.c trunk/sc2/src/sc2code/planets/lander.h trunk/sc2/src/sc2code/planets/oval.c trunk/sc2/src/sc2code/planets/planets.h trunk/sc2/src/sc2code/planets/scan.c trunk/sc2/src/sc2code/planets/solarsys.c trunk/sc2/src/sc2code/process.c trunk/sc2/src/sc2code/races.h trunk/sc2/src/sc2code/save.c trunk/sc2/src/sc2code/setup.c trunk/sc2/src/sc2code/setup.h trunk/sc2/src/sc2code/ship.c trunk/sc2/src/sc2code/ships/androsyn/androsyn.c trunk/sc2/src/sc2code/ships/chenjesu/chenjesu.c trunk/sc2/src/sc2code/ships/ilwrath/ilwrath.c trunk/sc2/src/sc2code/ships/lastbat/lastbat.c trunk/sc2/src/sc2code/ships/orz/orz.c trunk/sc2/src/sc2code/ships/ship.h trunk/sc2/src/sc2code/ships/supox/supox.c trunk/sc2/src/sc2code/ships/thradd/thradd.c trunk/sc2/src/sc2code/ships/utwig/utwig.c trunk/sc2/src/sc2code/shipstat.c trunk/sc2/src/sc2code/sis.c trunk/sc2/src/sc2code/starcon.c trunk/sc2/src/sc2code/status.c trunk/sc2/src/sc2code/tactrans.c trunk/sc2/src/sc2code/tactrans.h trunk/sc2/src/sc2code/uqmdebug.c trunk/sc2/src/sc2code/weapon.c trunk/sc2/src/starcon2.c Added Paths: ----------- trunk/sc2/src/sc2code/ipdisp.h trunk/sc2/src/sc2code/pickship.h trunk/sc2/src/sc2code/process.h trunk/sc2/src/sc2code/ship.h trunk/sc2/src/sc2code/status.h Modified: trunk/sc2/Makeproject =================================================================== --- trunk/sc2/Makeproject 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/Makeproject 2009-10-08 16:23:21 UTC (rev 3198) @@ -16,7 +16,7 @@ uqm_NAME="$uqm_NAME.exe" ;; esac -uqm_CFLAGS="$uqm_CFLAGS -Isrc -Isrc/sc2code -Isrc/sc2code/libs" +uqm_CFLAGS="$uqm_CFLAGS -Isrc -Isrc/sc2code" if [ "$uqm_HAVE_REGEX" = 0 ]; then uqm_CFLAGS="$uqm_CFLAGS -Isrc/regex" fi Modified: trunk/sc2/src/msvc++/UrQuanMasters.dsp =================================================================== --- trunk/sc2/src/msvc++/UrQuanMasters.dsp 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/msvc++/UrQuanMasters.dsp 2009-10-08 16:23:21 UTC (rev 3198) @@ -44,7 +44,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "." /I ".." /I "..\sc2code" /I "..\sc2code\libs" /I "..\sc2code\ships" /I "..\regex" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "HAVE_JOYSTICK" /D "NETPLAY" /D "ZLIB_DLL" /D "USE_INTERNAL_MIKMOD" /D "USE_PLATFORM_ACCEL" /FD /c +# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I ".." /I "..\sc2code" /I "..\regex" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "HAVE_JOYSTICK" /D "NETPLAY" /D "ZLIB_DLL" /D "USE_INTERNAL_MIKMOD" /D "USE_PLATFORM_ACCEL" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" @@ -74,7 +74,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "." /I ".." /I "..\sc2code" /I "..\sc2code\libs" /I "..\sc2code\ships" /I "..\regex" /D "DEBUG" /D "_DEBUG" /D "DEBUG_TRACK_SEM" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "HAVE_JOYSTICK" /D "NETPLAY" /D "ZLIB_DLL" /D "USE_INTERNAL_MIKMOD" /D "USE_PLATFORM_ACCEL" /FR /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I ".." /I "..\sc2code" /I "..\regex" /D "DEBUG" /D "_DEBUG" /D "DEBUG_TRACK_SEM" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "HAVE_JOYSTICK" /D "NETPLAY" /D "ZLIB_DLL" /D "USE_INTERNAL_MIKMOD" /D "USE_PLATFORM_ACCEL" /FR /FD /GZ /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" @@ -102,7 +102,7 @@ # PROP Target_Dir "" # ADD BASE CPP /nologo /MDd /W3 /GX /Zi /Od /I "." /I ".." /I "..\sc2code" /I "..\sc2code\libs" /I "..\sc2code\ships" /I "..\regex" /D "DEBUG" /D "_DEBUG" /D "DEBUG_TRACK_SEM" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "ZLIB_DLL" /D "USE_PLATFORM_ACCEL" /FR /FD /GZ /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "." /I ".." /I "..\sc2code" /I "..\sc2code\libs" /I "..\sc2code\ships" /I "..\regex" /D "DEBUG" /D "_DEBUG" /D "DEBUG_TRACK_SEM" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "HAVE_JOYSTICK" /D "NETPLAY" /D "ZLIB_DLL" /D "USE_INTERNAL_MIKMOD" /FR /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I ".." /I "..\sc2code" /I "..\regex" /D "DEBUG" /D "_DEBUG" /D "DEBUG_TRACK_SEM" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "HAVE_JOYSTICK" /D "NETPLAY" /D "ZLIB_DLL" /D "USE_INTERNAL_MIKMOD" /FR /FD /GZ /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" @@ -130,7 +130,7 @@ # PROP Target_Dir "" # ADD BASE CPP /nologo /MD /W3 /GX /Zi /O2 /I "." /I ".." /I "..\sc2code" /I "..\sc2code\libs" /I "..\sc2code\ships" /I "..\regex" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "ZLIB_DLL" /D "USE_PLATFORM_ACCEL" /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "." /I ".." /I "..\sc2code" /I "..\sc2code\libs" /I "..\sc2code\ships" /I "..\regex" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "HAVE_JOYSTICK" /D "NETPLAY" /D "ZLIB_DLL" /D "USE_INTERNAL_MIKMOD" /FR /FD /c +# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I ".." /I "..\sc2code" /I "..\regex" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "HAVE_JOYSTICK" /D "NETPLAY" /D "ZLIB_DLL" /D "USE_INTERNAL_MIKMOD" /FR /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" @@ -331,6 +331,10 @@ # End Source File # Begin Source File +SOURCE=..\sc2code\libs\graphics\sdl\dcqueue.h +# End Source File +# Begin Source File + SOURCE=..\sc2code\libs\graphics\sdl\hq2x.c # End Source File # Begin Source File @@ -4116,6 +4120,10 @@ # End Source File # Begin Source File +SOURCE=..\sc2code\ipdisp.h +# End Source File +# Begin Source File + SOURCE=..\sc2code\ires_ind.h # End Source File # Begin Source File @@ -4200,6 +4208,10 @@ # End Source File # Begin Source File +SOURCE=..\sc2code\pickship.h +# End Source File +# Begin Source File + SOURCE=..\sc2code\plandata.c # End Source File # Begin Source File @@ -4208,6 +4220,10 @@ # End Source File # Begin Source File +SOURCE=..\sc2code\process.h +# End Source File +# Begin Source File + SOURCE=..\sc2code\races.h # End Source File # Begin Source File @@ -4268,6 +4284,10 @@ # End Source File # Begin Source File +SOURCE=..\sc2code\ship.h +# End Source File +# Begin Source File + SOURCE=..\sc2code\shipcont.h # End Source File # Begin Source File @@ -4328,6 +4348,10 @@ # End Source File # Begin Source File +SOURCE=..\sc2code\status.h +# End Source File +# Begin Source File + SOURCE=..\sc2code\tactrans.c # End Source File # Begin Source File Modified: trunk/sc2/src/options.c =================================================================== --- trunk/sc2/src/options.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/options.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -23,7 +23,7 @@ #include "port.h" #include "libs/graphics/gfx_common.h" -#include "file.h" +#include "libs/file.h" #include "config.h" #include "libs/compiler.h" #include "libs/uio.h" Modified: trunk/sc2/src/sc2code/battle.c =================================================================== --- trunk/sc2/src/sc2code/battle.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/battle.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -21,6 +21,11 @@ #include "battlecontrols.h" #include "controls.h" #include "init.h" +#include "element.h" +#include "ship.h" +#include "process.h" +#include "tactrans.h" + // for flee_preprocess() #include "intel.h" #ifdef NETPLAY # include "netplay/netmelee.h" @@ -39,7 +44,6 @@ #include "libs/mathlib.h" -QUEUE disp_q; BYTE battle_counter[NUM_SIDES]; // The number of ships still available for battle to each side. // A ship that has warped out is no longer available. @@ -81,8 +85,6 @@ && ElementPtr->mass_points != MAX_SHIP_MASS * 10 && !(ElementPtr->state_flags & APPEARING)) { - extern void flee_preprocess (ELEMENT *); - battle_counter[0]--; ElementPtr->turn_wait = 3; Modified: trunk/sc2/src/sc2code/battle.h =================================================================== --- trunk/sc2/src/sc2code/battle.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/battle.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -23,8 +23,6 @@ typedef DWORD BattleFrameCounter; #endif -#include "displist.h" - // for QUEUE #include "init.h" // For NUM_SIDES @@ -35,11 +33,6 @@ DWORD NextTime; } BATTLE_STATE; -extern QUEUE disp_q; -// The maximum number of elements is chosen to provide a slight margin. -// Currently, it is maximum *known used* in Melee + 30 -#define MAX_DISPLAY_ELEMENTS 150 - extern BYTE battle_counter[NUM_SIDES]; extern BOOLEAN instantVictory; #if defined (NETPLAY) @@ -54,5 +47,9 @@ BOOLEAN Battle (void); -#endif /* _BATTLE_H */ +#define BATTLE_FRAME_RATE (ONE_SECOND / 24) +extern void BattleSong (BOOLEAN DoPlay); +extern void FreeBattleSong (void); + +#endif /* _BATTLE_H */ Modified: trunk/sc2/src/sc2code/build.h =================================================================== --- trunk/sc2/src/sc2code/build.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/build.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -23,13 +23,6 @@ #include "displist.h" #include "libs/compiler.h" -#define CREW_XOFFS 4 -#define ENERGY_XOFFS 52 -#define GAUGE_YOFFS (SHIP_INFO_HEIGHT - 10) -#define UNIT_WIDTH 2 -#define UNIT_HEIGHT 1 -#define STAT_WIDTH (1 + UNIT_WIDTH + 1 + UNIT_WIDTH + 1) - #define NAME_OFFSET 5 #define NUM_CAPTAINS_NAMES 16 @@ -67,14 +60,5 @@ extern void free_ship (RACE_DESC *RaceDescPtr, BOOLEAN FreeIconData, BOOLEAN FreeBattleData); -extern void DrawCrewFuelString (COORD y, SIZE state); -extern void ClearShipStatus (COORD y); -extern void OutlineShipStatus (COORD y); -extern void InitShipStatus (SHIP_INFO *ShipInfoPtr, BYTE captains_name_index, - RECT *pClipRect); -extern void DeltaStatistics (SHIP_INFO *ShipInfoPtr, SIZE crew_delta, - SIZE energy_delta); -extern void DrawBattleCrewAmount (SHIP_INFO *ShipInfoPtr); - #endif /* _BUILD_H */ Modified: trunk/sc2/src/sc2code/cleanup.c =================================================================== --- trunk/sc2/src/sc2code/cleanup.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/cleanup.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -16,12 +16,12 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "battle.h" #include "master.h" #include "nameref.h" -#include "reslib.h" +#include "libs/reslib.h" #include "gamestr.h" #include "init.h" +#include "element.h" #include "hyper.h" #include "planets/lander.h" #include "starcon.h" Modified: trunk/sc2/src/sc2code/coderes.h =================================================================== --- trunk/sc2/src/sc2code/coderes.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/coderes.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -19,7 +19,7 @@ #ifndef _CODERES_H #define _CODERES_H -#include "reslib.h" +#include "libs/reslib.h" extern BOOLEAN InstallCodeResType (void); extern void *LoadCodeResInstance (RESOURCE res); Modified: trunk/sc2/src/sc2code/comm/commall.h =================================================================== --- trunk/sc2/src/sc2code/comm/commall.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/comm/commall.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -21,7 +21,7 @@ #include "comm.h" #include "commglue.h" #include "encount.h" -#include "reslib.h" +#include "libs/reslib.h" #endif /* _COMMALL_H */ Modified: trunk/sc2/src/sc2code/cons_res.h =================================================================== --- trunk/sc2/src/sc2code/cons_res.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/cons_res.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -17,8 +17,8 @@ #ifndef CONS_RES_H_ #define CONS_RES_H_ -#include "gfxlib.h" -#include "sndlib.h" +#include "libs/gfxlib.h" +#include "libs/sndlib.h" void load_gravity_well (BYTE selector); void free_gravity_well (void); Modified: trunk/sc2/src/sc2code/controls.h =================================================================== --- trunk/sc2/src/sc2code/controls.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/controls.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -147,7 +147,7 @@ } TEXTENTRY_STATE; -BOOLEAN DoTextEntry (TEXTENTRY_STATE *pTES); +extern BOOLEAN DoTextEntry (TEXTENTRY_STATE *pTES); #endif Modified: trunk/sc2/src/sc2code/cyborg.c =================================================================== --- trunk/sc2/src/sc2code/cyborg.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/cyborg.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -16,10 +16,10 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "battle.h" #include "colors.h" #include "collide.h" #include "element.h" +#include "ship.h" #include "globdata.h" #include "intel.h" #include "setup.h" Modified: trunk/sc2/src/sc2code/demo.c =================================================================== --- trunk/sc2/src/sc2code/demo.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/demo.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -17,7 +17,8 @@ */ #include "demo.h" -#include "declib.h" +#include "libs/declib.h" +#include "setup.h" #if DEMO_MODE || CREATE_JOURNAL static DECODE_REF journal_fh; Modified: trunk/sc2/src/sc2code/displist.h =================================================================== --- trunk/sc2/src/sc2code/displist.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/displist.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -21,8 +21,8 @@ #include <assert.h> #include "port.h" -#include "compiler.h" -#include "misc.h" +#include "libs/compiler.h" +#include "libs/misc.h" // Note that we MUST use the QUEUE_TABLE variant at this time, because // certain gameplay elements depend on it. Namely, the maximum number Modified: trunk/sc2/src/sc2code/element.h =================================================================== --- trunk/sc2/src/sc2code/element.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/element.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -19,26 +19,12 @@ #ifndef _ELEMENT_H #define _ELEMENT_H -#include "battle.h" #include "displist.h" #include "units.h" #include "velocity.h" #include "libs/gfxlib.h" -#define BATTLE_FRAME_RATE (ONE_SECOND / 24) -#define SHIP_INFO_HEIGHT 65 -#define CAPTAIN_XOFFS 4 -#define CAPTAIN_YOFFS (SHIP_INFO_HEIGHT + 4) -#define SHIP_STATUS_HEIGHT (STATUS_HEIGHT >> 1) -#define BAD_GUY_YOFFS 0 -#define GOOD_GUY_YOFFS SHIP_STATUS_HEIGHT -#define STARCON_TEXT_HEIGHT 7 -#define TINY_TEXT_HEIGHT 9 - -#define BATTLE_CREW_X 10 -#define BATTLE_CREW_Y (64 - SAFE_Y) - #define NORMAL_LIFE 1 typedef HLINK HELEMENT; @@ -157,6 +143,11 @@ HELEMENT hTarget; }; +extern QUEUE disp_q; +// The maximum number of elements is chosen to provide a slight margin. +// Currently, it is maximum *known used* in Melee + 30 +#define MAX_DISPLAY_ELEMENTS 150 + #define MAX_DISPLAY_PRIMS 330 extern COUNT DisplayFreeList; extern PRIMITIVE DisplayArray[MAX_DISPLAY_PRIMS]; @@ -200,19 +191,10 @@ #define GetSuccElement(l) _GetSuccLink (l) extern void RemoveElement (HLINK hLink); -extern void RedrawQueue (BOOLEAN clear); -extern BOOLEAN DeltaEnergy (ELEMENT *ElementPtr, SIZE energy_delta); -extern BOOLEAN DeltaCrew (ELEMENT *ElementPtr, SIZE crew_delta); - -extern void PreProcessStatus (ELEMENT *ShipPtr); -extern void PostProcessStatus (ELEMENT *ShipPtr); - +// XXX: The following functions should not really be here extern void spawn_planet (void); extern void spawn_asteroid (ELEMENT *ElementPtr); -extern void animation_preprocess (ELEMENT *ElementPtr); extern void do_damage (ELEMENT *ElementPtr, SIZE damage); -extern void collision (ELEMENT *ElementPtr0, POINT *pPt0, - ELEMENT *ElementPtr1, POINT *pPt1); extern void crew_preprocess (ELEMENT *ElementPtr); extern void crew_collision (ELEMENT *ElementPtr0, POINT *pPt0, ELEMENT *ElementPtr1, POINT *pPt1); @@ -221,43 +203,12 @@ extern BOOLEAN TimeSpaceMatterConflict (ELEMENT *ElementPtr); extern COUNT PlotIntercept (ELEMENT *ElementPtr0, ELEMENT *ElementPtr1, COUNT max_turns, COUNT margin_of_error); -extern BOOLEAN LoadKernel (int argc, char *argv[]); -extern void FreeKernel (void); -extern void InitDisplayList (void); - extern void InitGalaxy (void); extern void MoveGalaxy (VIEW_STATE view_state, SIZE dx, SIZE dy); -extern void ship_preprocess (ELEMENT *ElementPtr); -extern void ship_postprocess (ELEMENT *ElementPtr); -extern void ship_death (ELEMENT *ShipPtr); -extern BOOLEAN hyper_transition (ELEMENT *ElementPtr); extern BOOLEAN CalculateGravity (ELEMENT *ElementPtr); -extern void SetUpElement (ELEMENT *ElementPtr); -extern void BattleSong (BOOLEAN DoPlay); -extern void FreeBattleSong (void); -extern void InsertPrim (PRIM_LINKS *pLinks, COUNT primIndex, COUNT iPI); - - -typedef UWORD STATUS_FLAGS; - -/* STATUS_FLAGS - heat of battle specific flags */ -#define LEFT (1 << 0) -#define RIGHT (1 << 1) -#define THRUST (1 << 2) -#define WEAPON (1 << 3) -#define SPECIAL (1 << 4) -#define LOW_ON_ENERGY (1 << 5) -#define SHIP_BEYOND_MAX_SPEED (1 << 6) -#define SHIP_AT_MAX_SPEED (1 << 7) -#define SHIP_IN_GRAVITY_WELL (1 << 8) -#define PLAY_VICTORY_DITTY (1 << 9) - -extern STATUS_FLAGS inertial_thrust (ELEMENT *ElementPtr); - - #endif /* _ELEMENT_H */ Modified: trunk/sc2/src/sc2code/encount.c =================================================================== --- trunk/sc2/src/sc2code/encount.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/encount.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -28,6 +28,7 @@ #include "gamestr.h" #include "globdata.h" #include "init.h" +#include "pickship.h" #include "intel.h" #include "nameref.h" #include "resinst.h" Modified: trunk/sc2/src/sc2code/fmv.c =================================================================== --- trunk/sc2/src/sc2code/fmv.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/fmv.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -26,7 +26,7 @@ #include "nameref.h" #include "settings.h" #include "setup.h" -#include "vidlib.h" +#include "libs/vidlib.h" #include "libs/graphics/gfx_common.h" #include "libs/inplib.h" Modified: trunk/sc2/src/sc2code/galaxy.c =================================================================== --- trunk/sc2/src/sc2code/galaxy.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/galaxy.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -21,6 +21,7 @@ #include "element.h" #include "globdata.h" #include "init.h" +#include "process.h" #include "units.h" #include "options.h" #include "libs/compiler.h" Modified: trunk/sc2/src/sc2code/gameopt.c =================================================================== --- trunk/sc2/src/sc2code/gameopt.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/gameopt.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -25,7 +25,7 @@ #include "encount.h" #include "planets/lander.h" #include "gamestr.h" -#include "inplib.h" +#include "libs/inplib.h" #include "load.h" #include "options.h" #include "save.h" Modified: trunk/sc2/src/sc2code/gameopt.h =================================================================== --- trunk/sc2/src/sc2code/gameopt.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/gameopt.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -16,7 +16,7 @@ #ifndef _GAMEOPT_H #define _GAMEOPT_H -#include "compiler.h" +#include "libs/compiler.h" #include "libs/gfxlib.h" extern void ConfirmSaveLoad (STAMP *MsgStamp); Modified: trunk/sc2/src/sc2code/grpinfo.c =================================================================== --- trunk/sc2/src/sc2code/grpinfo.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/grpinfo.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -18,7 +18,7 @@ #include "build.h" #include "encount.h" -#include "file.h" +#include "libs/file.h" #include "globdata.h" #include "intel.h" #include "sis.h" Modified: trunk/sc2/src/sc2code/hyper.c =================================================================== --- trunk/sc2/src/sc2code/hyper.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/hyper.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -23,6 +23,8 @@ #include "colors.h" #include "controls.h" #include "encount.h" +#include "ship.h" +#include "process.h" #include "globdata.h" #include "init.h" #include "nameref.h" Modified: trunk/sc2/src/sc2code/hyper.h =================================================================== --- trunk/sc2/src/sc2code/hyper.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/hyper.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -19,9 +19,11 @@ #ifndef _HYPER_H #define _HYPER_H +#include "element.h" extern void FreeHyperData (void); extern void check_hyperspace_encounter (void); +extern BOOLEAN hyper_transition (ELEMENT *ElementPtr); #endif /* _HYPER_H */ Modified: trunk/sc2/src/sc2code/init.c =================================================================== --- trunk/sc2/src/sc2code/init.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/init.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -19,12 +19,16 @@ #include "build.h" #include "colors.h" #include "cons_res.h" +#include "races.h" #include "element.h" +#include "tactrans.h" +#include "pickship.h" +#include "process.h" #include "globdata.h" #include "init.h" #include "port.h" #include "resinst.h" -#include "reslib.h" +#include "libs/reslib.h" #include "nameref.h" #include "setup.h" #include "units.h" @@ -281,7 +285,6 @@ hElement != 0; hElement = hNextElement) { ELEMENT *ElementPtr; - extern void new_ship (ELEMENT *ElementPtr); LockElement (hElement, &ElementPtr); hNextElement = GetSuccElement (ElementPtr); Modified: trunk/sc2/src/sc2code/init.h =================================================================== --- trunk/sc2/src/sc2code/init.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/init.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -18,6 +18,7 @@ #define _INIT_H #include "libs/gfxlib.h" +#include "libs/reslib.h" #define NUM_PLAYERS 2 #define NUM_SIDES 2 @@ -30,5 +31,9 @@ extern SIZE InitShips (void); extern void UninitShips (void); +extern BOOLEAN load_animation (FRAME *pixarray, RESOURCE big_res, + RESOURCE med_res, RESOURCE sml_res); +extern BOOLEAN free_image (FRAME *pixarray); + #endif /* _INIT_H */ Modified: trunk/sc2/src/sc2code/ipdisp.c =================================================================== --- trunk/sc2/src/sc2code/ipdisp.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/ipdisp.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -16,10 +16,13 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include "ipdisp.h" + #include "collide.h" #include "globdata.h" #include "init.h" #include "races.h" +#include "process.h" #include "grpinfo.h" #include "encount.h" #include "libs/mathlib.h" Added: trunk/sc2/src/sc2code/ipdisp.h =================================================================== --- trunk/sc2/src/sc2code/ipdisp.h (rev 0) +++ trunk/sc2/src/sc2code/ipdisp.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -0,0 +1,25 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef UQM_IPDISP_H_INCL_ +#define UQM_IPDISP_H_INCL_ + +#include "libs/compiler.h" + +extern void NotifyOthers (COUNT which_race, BYTE target_loc); +extern void DoMissions (void); + +#endif /* UQM_IPDISP_H_INCL_ */ Property changes on: trunk/sc2/src/sc2code/ipdisp.h ___________________________________________________________________ Added: svn:eol-style + native Modified: trunk/sc2/src/sc2code/libs/decomp/lzdecode.c =================================================================== --- trunk/sc2/src/sc2code/libs/decomp/lzdecode.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/decomp/lzdecode.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -29,7 +29,7 @@ #include <string.h> #include <ctype.h> #include "libs/decomp/lzh.h" -#include "reslib.h" +#include "libs/reslib.h" PLZHCODE_DESC _lpCurCodeDesc; STREAM_TYPE _StreamType; Modified: trunk/sc2/src/sc2code/libs/decomp/lzencode.c =================================================================== --- trunk/sc2/src/sc2code/libs/decomp/lzencode.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/decomp/lzencode.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -26,7 +26,7 @@ #include <stdio.h> #include "lzh.h" -#include "reslib.h" +#include "libs/reslib.h" static UWORD match_position, match_length; static SWORD *lson; Modified: trunk/sc2/src/sc2code/libs/decomp/lzh.h =================================================================== --- trunk/sc2/src/sc2code/libs/decomp/lzh.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/decomp/lzh.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -19,8 +19,8 @@ #ifndef _LZH_H #define _LZH_H -#include "declib.h" -#include "misc.h" +#include "libs/declib.h" +#include "libs/misc.h" /* LZSS Parameters */ Modified: trunk/sc2/src/sc2code/libs/file/dirs.c =================================================================== --- trunk/sc2/src/sc2code/libs/file/dirs.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/file/dirs.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -25,8 +25,8 @@ #include "port.h" #include "config.h" #include "filintrn.h" -#include "compiler.h" -#include "misc.h" +#include "libs/compiler.h" +#include "libs/misc.h" #include "libs/log.h" #ifdef HAVE_DRIVE_LETTERS Modified: trunk/sc2/src/sc2code/libs/file/files.c =================================================================== --- trunk/sc2/src/sc2code/libs/file/files.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/file/files.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -22,11 +22,11 @@ #include <sys/stat.h> #include <fcntl.h> #include "port.h" -#include "uio.h" +#include "libs/uio.h" #include "config.h" #include "types.h" #include "filintrn.h" -#include "misc.h" +#include "libs/misc.h" #include "libs/log.h" static int copyError(uio_Handle *srcHandle, uio_Handle *dstHandle, Modified: trunk/sc2/src/sc2code/libs/gfxlib.h =================================================================== --- trunk/sc2/src/sc2code/libs/gfxlib.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/gfxlib.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -19,8 +19,8 @@ #ifndef _GFXLIB_H #define _GFXLIB_H -#include "compiler.h" -#include "reslib.h" +#include "libs/compiler.h" +#include "libs/reslib.h" typedef struct context_desc CONTEXT_DESC; typedef struct frame_desc FRAME_DESC; Modified: trunk/sc2/src/sc2code/libs/graphics/drawable.c =================================================================== --- trunk/sc2/src/sc2code/libs/graphics/drawable.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/graphics/drawable.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -17,7 +17,7 @@ */ #include "gfxintrn.h" -#include "misc.h" +#include "libs/misc.h" #include "tfb_draw.h" #include "units.h" #include "libs/mathlib.h" Modified: trunk/sc2/src/sc2code/libs/graphics/drawcmd.h =================================================================== --- trunk/sc2/src/sc2code/libs/graphics/drawcmd.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/graphics/drawcmd.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -19,7 +19,7 @@ #ifndef DRAWCMD_H #define DRAWCMD_H -#include "graphics/tfb_draw.h" +#include "libs/graphics/tfb_draw.h" enum { Modified: trunk/sc2/src/sc2code/libs/graphics/frame.c =================================================================== --- trunk/sc2/src/sc2code/libs/graphics/frame.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/graphics/frame.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -17,7 +17,6 @@ */ #include "gfxintrn.h" -#include "declib.h" #include "gfx_common.h" #include "tfb_draw.h" #include "tfb_prim.h" Modified: trunk/sc2/src/sc2code/libs/graphics/gfxintrn.h =================================================================== --- trunk/sc2/src/sc2code/libs/graphics/gfxintrn.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/graphics/gfxintrn.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -22,8 +22,8 @@ #include <stdio.h> #include <string.h> -#include "gfxlib.h" -#include "reslib.h" +#include "libs/gfxlib.h" +#include "libs/reslib.h" #include "context.h" #include "drawable.h" #include "font.h" Modified: trunk/sc2/src/sc2code/libs/graphics/sdl/3do_blt.c =================================================================== --- trunk/sc2/src/sc2code/libs/graphics/sdl/3do_blt.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/graphics/sdl/3do_blt.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -19,7 +19,7 @@ #ifdef GFXMODULE_SDL #include "sdl_common.h" -#include "graphics/tfb_draw.h" +#include "libs/graphics/tfb_draw.h" #include "libs/log.h" static void Modified: trunk/sc2/src/sc2code/libs/graphics/sdl/3do_funcs.c =================================================================== --- trunk/sc2/src/sc2code/libs/graphics/sdl/3do_funcs.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/graphics/sdl/3do_funcs.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -23,8 +23,8 @@ #include "opengl.h" #include "primitives.h" #include "units.h" -#include "graphics/drawcmd.h" -#include "graphics/tfb_draw.h" +#include "libs/graphics/drawcmd.h" +#include "libs/graphics/tfb_draw.h" int batch_depth = 0; Modified: trunk/sc2/src/sc2code/libs/graphics/sdl/bbox.h =================================================================== --- trunk/sc2/src/sc2code/libs/graphics/sdl/bbox.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/graphics/sdl/bbox.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -14,9 +14,9 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "gfxlib.h" -#include "graphics/tfb_draw.h" -#include "graphics/gfx_common.h" +#include "libs/gfxlib.h" +#include "libs/graphics/tfb_draw.h" +#include "libs/graphics/gfx_common.h" #ifndef _BBOX_H_ #define _BBOX_H_ Modified: trunk/sc2/src/sc2code/libs/graphics/sdl/rotozoom.c =================================================================== --- trunk/sc2/src/sc2code/libs/graphics/sdl/rotozoom.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/graphics/sdl/rotozoom.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -13,7 +13,7 @@ #include <stdlib.h> #include <string.h> -#include "misc.h" +#include "libs/misc.h" #include "port.h" #include "rotozoom.h" Modified: trunk/sc2/src/sc2code/libs/graphics/sdl/sdl_common.c =================================================================== --- trunk/sc2/src/sc2code/libs/graphics/sdl/sdl_common.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/graphics/sdl/sdl_common.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -32,7 +32,7 @@ #include "libs/uio.h" #include "libs/log.h" #include "controls.h" -#include "vidlib.h" +#include "libs/vidlib.h" // XXX: Should not be included from here. #include "uqmdebug.h" #include SDL_INCLUDE(SDL_thread.h) Modified: trunk/sc2/src/sc2code/libs/graphics/tfb_draw.h =================================================================== --- trunk/sc2/src/sc2code/libs/graphics/tfb_draw.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/graphics/tfb_draw.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -40,7 +40,7 @@ UBYTE unused; } TFB_Palette; -#include "graphics/gfx_common.h" +#include "libs/graphics/gfx_common.h" #include "cmap.h" typedef struct tfb_image Modified: trunk/sc2/src/sc2code/libs/graphics/tfb_prim.h =================================================================== --- trunk/sc2/src/sc2code/libs/graphics/tfb_prim.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/graphics/tfb_prim.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "gfxlib.h" +#include "libs/gfxlib.h" #include "tfb_draw.h" Modified: trunk/sc2/src/sc2code/libs/graphics/widgets.c =================================================================== --- trunk/sc2/src/sc2code/libs/graphics/widgets.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/graphics/widgets.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -14,10 +14,10 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "graphics/gfx_common.h" -#include "graphics/widgets.h" +#include "gfx_common.h" +#include "widgets.h" #include "colors.h" -#include "strlib.h" +#include "libs/strlib.h" #include "setup.h" #include "units.h" Modified: trunk/sc2/src/sc2code/libs/inplib.h =================================================================== --- trunk/sc2/src/sc2code/libs/inplib.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/inplib.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -20,7 +20,7 @@ #define _INPLIB_H #include <stddef.h> -#include "compiler.h" +#include "libs/compiler.h" #include "libs/uio.h" typedef DWORD INPUT_STATE; Modified: trunk/sc2/src/sc2code/libs/input/inpintrn.h =================================================================== --- trunk/sc2/src/sc2code/libs/input/inpintrn.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/input/inpintrn.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -19,7 +19,7 @@ #ifndef _INPINTRN_H #define _INPINTRN_H -#include "inplib.h" +#include "libs/inplib.h" #endif /* _INPINTRN_H */ Modified: trunk/sc2/src/sc2code/libs/input/sdl/input.c =================================================================== --- trunk/sc2/src/sc2code/libs/input/sdl/input.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/input/sdl/input.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -24,7 +24,7 @@ #include "libs/input/input_common.h" #include "libs/input/sdl/vcontrol.h" #include "libs/input/sdl/keynames.h" -#include "misc.h" +#include "libs/misc.h" #include "controls.h" #include "libs/file.h" #include "libs/log.h" Modified: trunk/sc2/src/sc2code/libs/input/sdl/vcontrol.c =================================================================== --- trunk/sc2/src/sc2code/libs/input/sdl/vcontrol.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/input/sdl/vcontrol.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -20,7 +20,7 @@ #include <string.h> #include <ctype.h> #include "vcontrol.h" -#include "misc.h" +#include "libs/misc.h" #include "keynames.h" #include "libs/log.h" #include "libs/reslib.h" Modified: trunk/sc2/src/sc2code/libs/list/list.c =================================================================== --- trunk/sc2/src/sc2code/libs/list/list.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/list/list.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -25,7 +25,7 @@ # include "list.h" #endif -#include "misc.h" +#include "libs/misc.h" #define malloc HMalloc #define free HFree #define realloc HRealloc Modified: trunk/sc2/src/sc2code/libs/math/mthintrn.h =================================================================== --- trunk/sc2/src/sc2code/libs/math/mthintrn.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/math/mthintrn.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -19,7 +19,7 @@ #ifndef _MTHINTRN_H #define _MTHINTRN_H -#include "mathlib.h" +#include "libs/mathlib.h" #endif /* _MTHINTRN_H */ Modified: trunk/sc2/src/sc2code/libs/mathlib.h =================================================================== --- trunk/sc2/src/sc2code/libs/mathlib.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/mathlib.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -19,7 +19,7 @@ #ifndef _MATHLIB_H #define _MATHLIB_H -#include "compiler.h" +#include "libs/compiler.h" #include "math/random.h" extern COUNT square_root (DWORD value); Modified: trunk/sc2/src/sc2code/libs/memlib.h =================================================================== --- trunk/sc2/src/sc2code/libs/memlib.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/memlib.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -19,7 +19,7 @@ #ifndef _MEMLIB_H #define _MEMLIB_H -#include "compiler.h" +#include "libs/compiler.h" extern BOOLEAN mem_init (void); extern BOOLEAN mem_uninit (void); Modified: trunk/sc2/src/sc2code/libs/memory/w_memlib.c =================================================================== --- trunk/sc2/src/sc2code/libs/memory/w_memlib.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/memory/w_memlib.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -24,7 +24,7 @@ //#include "tool.h" //#include "utils.h" //#include "pcwin.h" -#include "compiler.h" +#include "libs/compiler.h" #ifdef LEGACY_HANDLE_ALLOCATOR #include "libs/threadlib.h" #endif Modified: trunk/sc2/src/sc2code/libs/reslib.h =================================================================== --- trunk/sc2/src/sc2code/libs/reslib.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/reslib.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -20,9 +20,9 @@ #define _RESLIB_H //#include <stdio.h> -#include "compiler.h" +#include "libs/compiler.h" #include "port.h" -#include "misc.h" +#include "libs/misc.h" #include "libs/uio.h" typedef struct resource_index_desc RESOURCE_INDEX_DESC; @@ -59,6 +59,7 @@ BOOLEAN res_CloseResFile (uio_Stream *fp); BOOLEAN DeleteResFile (uio_DirHandle *dir, const char *filename); +RESOURCE_INDEX InitResourceSystem (void); void UninitResourceSystem (void); BOOLEAN InstallResTypeVectors (const char *res_type, ResourceLoadFun *loadFun, ResourceFreeFun *freeFun, ResourceStringFun *stringFun); void *res_GetResource (RESOURCE res); Modified: trunk/sc2/src/sc2code/libs/resource/direct.c =================================================================== --- trunk/sc2/src/sc2code/libs/resource/direct.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/resource/direct.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -17,7 +17,7 @@ */ #include "libs/strings/strintrn.h" -#include "misc.h" +#include "libs/misc.h" #include "port.h" #include "libs/uio.h" #include <sys/stat.h> Modified: trunk/sc2/src/sc2code/libs/resource/index.h =================================================================== --- trunk/sc2/src/sc2code/libs/resource/index.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/resource/index.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -20,7 +20,7 @@ #define _INDEX_H #include <stdio.h> -#include "reslib.h" +#include "libs/reslib.h" #include "libs/uio/charhashtable.h" typedef struct resource_handlers Modified: trunk/sc2/src/sc2code/libs/resource/loadres.c =================================================================== --- trunk/sc2/src/sc2code/libs/resource/loadres.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/resource/loadres.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -17,7 +17,7 @@ */ #include "resintrn.h" -#include "declib.h" +#include "libs/declib.h" void * GetResourceData (uio_Stream *fp, DWORD length) Modified: trunk/sc2/src/sc2code/libs/resource/propfile.c =================================================================== --- trunk/sc2/src/sc2code/libs/resource/propfile.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/resource/propfile.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -21,7 +21,7 @@ #include <ctype.h> #include "libs/log.h" #include "propfile.h" -#include "reslib.h" +#include "libs/reslib.h" void PropFile_from_string (char *d, PROPERTY_HANDLER handler, const char *prefix) Modified: trunk/sc2/src/sc2code/libs/resource/propfile.h =================================================================== --- trunk/sc2/src/sc2code/libs/resource/propfile.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/resource/propfile.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -19,7 +19,7 @@ #ifndef PROPFILE_H_ #define PROPFILE_H_ -#include "uio.h" +#include "libs/uio.h" typedef void (*PROPERTY_HANDLER) (const char *, const char *); Modified: trunk/sc2/src/sc2code/libs/resource/resinit.c =================================================================== --- trunk/sc2/src/sc2code/libs/resource/resinit.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/resource/resinit.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -17,7 +17,7 @@ */ #include "resintrn.h" -#include "misc.h" +#include "libs/misc.h" #include "options.h" #include "nameref.h" #include "types.h" Modified: trunk/sc2/src/sc2code/libs/resource/resintrn.h =================================================================== --- trunk/sc2/src/sc2code/libs/resource/resintrn.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/resource/resintrn.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -20,7 +20,7 @@ #define _RESINTRN_H #include <string.h> -#include "reslib.h" +#include "libs/reslib.h" #include "index.h" ResourceDesc *lookupResourceDesc (RESOURCE_INDEX idx, RESOURCE res); Modified: trunk/sc2/src/sc2code/libs/sndlib.h =================================================================== --- trunk/sc2/src/sc2code/libs/sndlib.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/sndlib.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -19,7 +19,7 @@ #ifndef _SNDLIB_H #define _SNDLIB_H -#include "strlib.h" +#include "libs/strlib.h" typedef STRING_TABLE SOUND_REF; typedef STRING SOUND; Modified: trunk/sc2/src/sc2code/libs/sound/decoders/aiffaud.c =================================================================== --- trunk/sc2/src/sc2code/libs/sound/decoders/aiffaud.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/sound/decoders/aiffaud.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -31,7 +31,7 @@ #include <string.h> #include "port.h" #include "types.h" -#include "uio.h" +#include "libs/uio.h" #include "endian_uqm.h" #include "libs/misc.h" #include "libs/log.h" Modified: trunk/sc2/src/sc2code/libs/sound/decoders/decoder.h =================================================================== --- trunk/sc2/src/sc2code/libs/sound/decoders/decoder.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/sound/decoders/decoder.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -23,7 +23,7 @@ #include "port.h" #include "types.h" -#include "uio.h" +#include "libs/uio.h" #ifndef OVCODEC_NONE # ifdef _MSC_VER Modified: trunk/sc2/src/sc2code/libs/sound/decoders/dukaud.c =================================================================== --- trunk/sc2/src/sc2code/libs/sound/decoders/dukaud.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/sound/decoders/dukaud.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -23,7 +23,7 @@ #include "libs/misc.h" #include "port.h" #include "types.h" -#include "uio.h" +#include "libs/uio.h" #include "dukaud.h" #include "decoder.h" #include "endian_uqm.h" Modified: trunk/sc2/src/sc2code/libs/sound/decoders/modaud.c =================================================================== --- trunk/sc2/src/sc2code/libs/sound/decoders/modaud.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/sound/decoders/modaud.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -24,7 +24,7 @@ #include "port.h" #include "types.h" #include "endian_uqm.h" -#include "uio.h" +#include "libs/uio.h" #include "decoder.h" #include "libs/sound/audiocore.h" #include "libs/log.h" Modified: trunk/sc2/src/sc2code/libs/sound/decoders/oggaud.c =================================================================== --- trunk/sc2/src/sc2code/libs/sound/decoders/oggaud.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/sound/decoders/oggaud.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -24,7 +24,7 @@ #include "libs/log.h" #include "port.h" #include "types.h" -#include "uio.h" +#include "libs/uio.h" #include "decoder.h" #ifdef OVCODEC_TREMOR # include <tremor/ivorbiscodec.h> Modified: trunk/sc2/src/sc2code/libs/sound/decoders/wav.c =================================================================== --- trunk/sc2/src/sc2code/libs/sound/decoders/wav.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/sound/decoders/wav.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -22,7 +22,7 @@ #include <errno.h> #include "port.h" #include "types.h" -#include "uio.h" +#include "libs/uio.h" #include "endian_uqm.h" #include "libs/misc.h" #include "libs/log.h" Modified: trunk/sc2/src/sc2code/libs/sound/fileinst.c =================================================================== --- trunk/sc2/src/sc2code/libs/sound/fileinst.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/sound/fileinst.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -18,7 +18,7 @@ #include "sndintrn.h" #include "options.h" -#include "reslib.h" +#include "libs/reslib.h" #include <string.h> Modified: trunk/sc2/src/sc2code/libs/sound/music.c =================================================================== --- trunk/sc2/src/sc2code/libs/sound/music.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/sound/music.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -15,7 +15,7 @@ */ #include <string.h> -#include "file.h" +#include "libs/file.h" #include "options.h" #include "sound.h" #include "libs/reslib.h" Modified: trunk/sc2/src/sc2code/libs/sound/sndintrn.h =================================================================== --- trunk/sc2/src/sc2code/libs/sound/sndintrn.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/sound/sndintrn.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -20,8 +20,8 @@ #define _SNDINTRN_H #include <stdio.h> -#include "sndlib.h" -#include "reslib.h" +#include "libs/sndlib.h" +#include "libs/reslib.h" extern void *_GetMusicData (uio_Stream *fp, DWORD length); extern BOOLEAN _ReleaseMusicData (void *handle); Modified: trunk/sc2/src/sc2code/libs/sound/sound.h =================================================================== --- trunk/sc2/src/sc2code/libs/sound/sound.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/sound/sound.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -17,7 +17,7 @@ #ifndef _UQM_SOUND_H // try avoiding collisions on id #define _UQM_SOUND_H -#include "misc.h" +#include "libs/misc.h" #include "sndintrn.h" #include "audiocore.h" #include "decoders/decoder.h" Modified: trunk/sc2/src/sc2code/libs/sound/trackplayer.h =================================================================== --- trunk/sc2/src/sc2code/libs/sound/trackplayer.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/sound/trackplayer.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -19,7 +19,7 @@ #ifndef TRACKPLAYER_H #define TRACKPLAYER_H -#include "compiler.h" +#include "libs/compiler.h" typedef void (*TFB_TrackCB) (void); Modified: trunk/sc2/src/sc2code/libs/strings/sfileins.c =================================================================== --- trunk/sc2/src/sc2code/libs/strings/sfileins.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/strings/sfileins.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -18,7 +18,7 @@ #include "port.h" #include "strintrn.h" -#include "uio.h" +#include "libs/uio.h" #include "libs/reslib.h" Modified: trunk/sc2/src/sc2code/libs/strings/strings.c =================================================================== --- trunk/sc2/src/sc2code/libs/strings/strings.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/strings/strings.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -17,7 +17,7 @@ */ #include "strintrn.h" -#include "misc.h" +#include "libs/misc.h" STRING_TABLE AllocStringTable (int num_entries, int flags) Modified: trunk/sc2/src/sc2code/libs/strings/strintrn.h =================================================================== --- trunk/sc2/src/sc2code/libs/strings/strintrn.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/strings/strintrn.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -21,8 +21,8 @@ #include <stdio.h> #include <string.h> -#include "strlib.h" -#include "reslib.h" +#include "libs/strlib.h" +#include "libs/reslib.h" struct string_table_entry { Modified: trunk/sc2/src/sc2code/libs/strings/unicode.c =================================================================== --- trunk/sc2/src/sc2code/libs/strings/unicode.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/strings/unicode.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -20,7 +20,7 @@ #include <stddef.h> #include <stdio.h> #include <string.h> -#include "strlib.h" +#include "libs/strlib.h" #include "libs/log.h" Modified: trunk/sc2/src/sc2code/libs/strlib.h =================================================================== --- trunk/sc2/src/sc2code/libs/strlib.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/strlib.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -19,7 +19,7 @@ #ifndef _STRLIB_H #define _STRLIB_H -#include "compiler.h" +#include "libs/compiler.h" #include "port.h" #include "libs/uio.h" Modified: trunk/sc2/src/sc2code/libs/threads/sdl/sdlthreads.c =================================================================== --- trunk/sc2/src/sc2code/libs/threads/sdl/sdlthreads.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/threads/sdl/sdlthreads.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -15,7 +15,7 @@ */ #include <stdlib.h> -#include "misc.h" +#include "libs/misc.h" #include "sdlthreads.h" #ifdef PROFILE_THREADS #include <signal.h> Modified: trunk/sc2/src/sc2code/libs/video/vfileins.c =================================================================== --- trunk/sc2/src/sc2code/libs/video/vfileins.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/video/vfileins.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "vidlib.h" +#include "libs/vidlib.h" #include "video.h" VIDEO_REF Modified: trunk/sc2/src/sc2code/libs/video/video.h =================================================================== --- trunk/sc2/src/sc2code/libs/video/video.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/video/video.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -18,8 +18,8 @@ #define _UQM_VIDEO_H #include "options.h" -#include "misc.h" -#include "vidlib.h" +#include "libs/misc.h" +#include "libs/vidlib.h" #include "libs/graphics/tfb_draw.h" #include "types.h" #include "videodec.h" Modified: trunk/sc2/src/sc2code/libs/video/videodec.h =================================================================== --- trunk/sc2/src/sc2code/libs/video/videodec.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/libs/video/videodec.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -17,9 +17,9 @@ #ifndef _VIDEODEC_H #define _VIDEODEC_H -#include "vidlib.h" +#include "libs/vidlib.h" #include "libs/video/video.h" -#include "reslib.h" +#include "libs/reslib.h" // forward-declare typedef struct tfb_videodecoder TFB_VideoDecoder; Modified: trunk/sc2/src/sc2code/load.c =================================================================== --- trunk/sc2/src/sc2code/load.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/load.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -21,9 +21,9 @@ #include "load.h" #include "build.h" -#include "declib.h" +#include "libs/declib.h" #include "encount.h" -#include "file.h" +#include "libs/file.h" #include "globdata.h" #include "load.h" #include "options.h" Modified: trunk/sc2/src/sc2code/loadship.c =================================================================== --- trunk/sc2/src/sc2code/loadship.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/loadship.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -22,6 +22,7 @@ #include "globdata.h" #include "nameref.h" #include "races.h" +#include "init.h" static RESOURCE code_resources[] = { NULL_RESOURCE, Modified: trunk/sc2/src/sc2code/melee.c =================================================================== --- trunk/sc2/src/sc2code/melee.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/melee.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -19,12 +19,13 @@ #include "melee.h" #include "build.h" +#include "status.h" #include "colors.h" #include "comm.h" // for getLineWithinWidth #include "cons_res.h" #include "controls.h" -#include "file.h" +#include "libs/file.h" #include "fmv.h" #include "gamestr.h" #include "globdata.h" Modified: trunk/sc2/src/sc2code/misc.c =================================================================== --- trunk/sc2/src/sc2code/misc.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/misc.c 2009-10-08 16:23:21 UTC (rev 3198) @@ -19,6 +19,8 @@ #include "element.h" #include "init.h" #include "races.h" +#include "ship.h" +#include "status.h" #include "setup.h" #include "sounds.h" #include "weapon.h" Modified: trunk/sc2/src/sc2code/nameref.h =================================================================== --- trunk/sc2/src/sc2code/nameref.h 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/nameref.h 2009-10-08 16:23:21 UTC (rev 3198) @@ -19,7 +19,7 @@ #ifndef _NAMEREF_H #define _NAMEREF_H -#include "reslib.h" +#include "libs/reslib.h" #define LoadCodeRes LoadCodeResInstance #define LoadGraphic (DRAWABLE)LoadGraphicInstance Modified: trunk/sc2/src/sc2code/netplay/checksum.c =================================================================== --- trunk/sc2/src/sc2code/netplay/checksum.c 2009-10-08 14:35:44 UTC (rev 3197) +++ trunk/sc2/src/sc2code/netplay/checksum.c 2009-10-08 16:23:21... [truncated message content] |
From: <av...@us...> - 2009-10-09 16:29:16
|
Revision: 3211 http://sc2.svn.sourceforge.net/sc2/?rev=3211&view=rev Author: avolkov Date: 2009-10-09 16:29:06 +0000 (Fri, 09 Oct 2009) Log Message: ----------- Source tree reorg, stage 1: finished moving libs/, moved src/msvc++/ to build/msvc6/; build files updated Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/INSTALL.msvc trunk/sc2/src/..\build\msvc6/UrQuanMasters.dsp trunk/sc2/src/Makeinfo trunk/sc2/src/config.h trunk/sc2/src/sc2code/Makeinfo Added Paths: ----------- trunk/sc2/src/..\build\msvc6/ trunk/sc2/src/config_vc6.h Removed Paths: ------------- trunk/sc2/src/..\build\msvc6/config.h trunk/sc2/src/msvc++/ Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2009-10-09 15:26:18 UTC (rev 3210) +++ trunk/sc2/ChangeLog 2009-10-09 16:29:06 UTC (rev 3211) @@ -1,4 +1,6 @@ Changes towards version 0.7: +- Source tree reorg: libs/ moved out of sc2code/, msvc++/ moved to + build/msvc6/ - Coredev - Druuge no longer turn hostile after attempting a salvage (bug #1013) - Alex - Process subtitles correctly with no timestamp file (bug #1060) - Alex - Lander will no longer hang when killed on planets with a lot of Modified: trunk/sc2/INSTALL.msvc =================================================================== --- trunk/sc2/INSTALL.msvc 2009-10-09 15:26:18 UTC (rev 3210) +++ trunk/sc2/INSTALL.msvc 2009-10-09 16:29:06 UTC (rev 3211) @@ -105,7 +105,7 @@ 5. Set up the The Ur-Quan Masters project in Visual C++ 5.1. Import the VC6 .dsp file: -- Open C:\Build\sc2\src\msvc++\ and double-click on "UrQuanMasters.dsp". +- Open C:\Build\sc2\build\msvc6\ and double-click on "UrQuanMasters.dsp". Visual C++ 2005 Express Edition will start. Confirm when it asks to convert the VC6 .dsp file. Modified: trunk/sc2/src/..\build\msvc6/UrQuanMasters.dsp =================================================================== --- trunk/sc2/src/msvc++/UrQuanMasters.dsp 2009-10-09 15:26:18 UTC (rev 3210) +++ trunk/sc2/src/..\build\msvc6/UrQuanMasters.dsp 2009-10-09 16:29:06 UTC (rev 3211) @@ -44,7 +44,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I ".." /I "..\sc2code" /I "..\regex" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "HAVE_JOYSTICK" /D "NETPLAY" /D "ZLIB_DLL" /D "USE_INTERNAL_MIKMOD" /D "USE_PLATFORM_ACCEL" /FD /c +# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "..\..\src" /I "..\..\src\sc2code" /I "..\..\src\regex" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "HAVE_JOYSTICK" /D "NETPLAY" /D "ZLIB_DLL" /D "USE_INTERNAL_MIKMOD" /D "USE_PLATFORM_ACCEL" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" @@ -74,7 +74,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I ".." /I "..\sc2code" /I "..\regex" /D "DEBUG" /D "_DEBUG" /D "DEBUG_TRACK_SEM" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "HAVE_JOYSTICK" /D "NETPLAY" /D "ZLIB_DLL" /D "USE_INTERNAL_MIKMOD" /D "USE_PLATFORM_ACCEL" /FR /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "..\..\src" /I "..\..\src\sc2code" /I "..\..\src\regex" /D "DEBUG" /D "_DEBUG" /D "DEBUG_TRACK_SEM" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "HAVE_JOYSTICK" /D "NETPLAY" /D "ZLIB_DLL" /D "USE_INTERNAL_MIKMOD" /D "USE_PLATFORM_ACCEL" /FR /FD /GZ /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" @@ -100,9 +100,9 @@ # PROP Intermediate_Dir "Debug_NoAccel" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W3 /GX /Zi /Od /I "." /I ".." /I "..\sc2code" /I "..\sc2code\libs" /I "..\sc2code\ships" /I "..\regex" /D "DEBUG" /D "_DEBUG" /D "DEBUG_TRACK_SEM" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "ZLIB_DLL" /D "USE_PLATFORM_ACCEL" /FR /FD /GZ /c +# ADD BASE CPP /nologo /W3 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I ".." /I "..\sc2code" /I "..\regex" /D "DEBUG" /D "_DEBUG" /D "DEBUG_TRACK_SEM" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "HAVE_JOYSTICK" /D "NETPLAY" /D "ZLIB_DLL" /D "USE_INTERNAL_MIKMOD" /FR /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "..\..\src" /I "..\..\src\sc2code" /I "..\..\src\regex" /D "DEBUG" /D "_DEBUG" /D "DEBUG_TRACK_SEM" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "HAVE_JOYSTICK" /D "NETPLAY" /D "ZLIB_DLL" /D "USE_INTERNAL_MIKMOD" /FR /FD /GZ /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" @@ -128,9 +128,9 @@ # PROP Intermediate_Dir "Release_NoAccel" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /GX /Zi /O2 /I "." /I ".." /I "..\sc2code" /I "..\sc2code\libs" /I "..\sc2code\ships" /I "..\regex" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "ZLIB_DLL" /D "USE_PLATFORM_ACCEL" /FD /c +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I ".." /I "..\sc2code" /I "..\regex" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "HAVE_JOYSTICK" /D "NETPLAY" /D "ZLIB_DLL" /D "USE_INTERNAL_MIKMOD" /FR /FD /c +# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "..\..\src" /I "..\..\src\sc2code" /I "..\..\src\regex" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "HAVE_JOYSTICK" /D "NETPLAY" /D "ZLIB_DLL" /D "USE_INTERNAL_MIKMOD" /FR /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" @@ -162,15 +162,15 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\getopt\getopt.c +SOURCE=..\..\src\getopt\getopt.c # End Source File # Begin Source File -SOURCE=..\getopt\getopt.h +SOURCE=..\..\src\getopt\getopt.h # End Source File # Begin Source File -SOURCE=..\getopt\getopt1.c +SOURCE=..\..\src\getopt\getopt1.c # End Source File # End Group # Begin Group "regex" @@ -178,32 +178,29 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\regex\regcomp.ci +SOURCE=..\..\src\regex\regcomp.ci # End Source File # Begin Source File -SOURCE=..\regex\regex.c +SOURCE=..\..\src\regex\regex.c # End Source File # Begin Source File -SOURCE=..\regex\regex.h +SOURCE=..\..\src\regex\regex.h # End Source File # Begin Source File -SOURCE=..\regex\regex_internal.ci +SOURCE=..\..\src\regex\regex_internal.ci # End Source File # Begin Source File -SOURCE=..\regex\regex_internal.h +SOURCE=..\..\src\regex\regex_internal.h # End Source File # Begin Source File -SOURCE=..\regex\regexec.ci +SOURCE=..\..\src\regex\regexec.ci # End Source File # End Group -# Begin Group "sc2code" - -# PROP Default_Filter "" # Begin Group "libs" # PROP Default_Filter "" @@ -212,19 +209,19 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\callback\alarm.c +SOURCE=..\..\src\libs\callback\alarm.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\callback\alarm.h +SOURCE=..\..\src\libs\callback\alarm.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\callback\callback.c +SOURCE=..\..\src\libs\callback\callback.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\callback\callback.h +SOURCE=..\..\src\libs\callback\callback.h # End Source File # End Group # Begin Group "decomp" @@ -232,19 +229,19 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\decomp\lzdecode.c +SOURCE=..\..\src\libs\decomp\lzdecode.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\decomp\lzencode.c +SOURCE=..\..\src\libs\decomp\lzencode.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\decomp\lzh.h +SOURCE=..\..\src\libs\decomp\lzh.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\decomp\update.c +SOURCE=..\..\src\libs\decomp\update.c # End Source File # End Group # Begin Group "file" @@ -252,15 +249,15 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\file\dirs.c +SOURCE=..\..\src\libs\file\dirs.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\file\files.c +SOURCE=..\..\src\libs\file\files.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\file\filintrn.h +SOURCE=..\..\src\libs\file\filintrn.h # End Source File # End Group # Begin Group "graphics" @@ -271,264 +268,264 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\2xscalers.c +SOURCE=..\..\src\libs\graphics\sdl\2xscalers.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\2xscalers.h +SOURCE=..\..\src\libs\graphics\sdl\2xscalers.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\2xscalers_3dnow.c +SOURCE=..\..\src\libs\graphics\sdl\2xscalers_3dnow.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\2xscalers_mmx.c +SOURCE=..\..\src\libs\graphics\sdl\2xscalers_mmx.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\2xscalers_mmx.h +SOURCE=..\..\src\libs\graphics\sdl\2xscalers_mmx.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\2xscalers_sse.c +SOURCE=..\..\src\libs\graphics\sdl\2xscalers_sse.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\3do_blt.c +SOURCE=..\..\src\libs\graphics\sdl\3do_blt.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\3do_funcs.c +SOURCE=..\..\src\libs\graphics\sdl\3do_funcs.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\3do_getbody.c +SOURCE=..\..\src\libs\graphics\sdl\3do_getbody.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\bbox.c +SOURCE=..\..\src\libs\graphics\sdl\bbox.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\bbox.h +SOURCE=..\..\src\libs\graphics\sdl\bbox.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\biadv2x.c +SOURCE=..\..\src\libs\graphics\sdl\biadv2x.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\bilinear2x.c +SOURCE=..\..\src\libs\graphics\sdl\bilinear2x.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\canvas.c +SOURCE=..\..\src\libs\graphics\sdl\canvas.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\dcqueue.c +SOURCE=..\..\src\libs\graphics\sdl\dcqueue.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\dcqueue.h +SOURCE=..\..\src\libs\graphics\sdl\dcqueue.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\hq2x.c +SOURCE=..\..\src\libs\graphics\sdl\hq2x.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\nearest2x.c +SOURCE=..\..\src\libs\graphics\sdl\nearest2x.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\opengl.c +SOURCE=..\..\src\libs\graphics\sdl\opengl.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\opengl.h +SOURCE=..\..\src\libs\graphics\sdl\opengl.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\primitives.c +SOURCE=..\..\src\libs\graphics\sdl\primitives.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\primitives.h +SOURCE=..\..\src\libs\graphics\sdl\primitives.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\pure.c +SOURCE=..\..\src\libs\graphics\sdl\pure.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\pure.h +SOURCE=..\..\src\libs\graphics\sdl\pure.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\rndzoom.c +SOURCE=..\..\src\libs\graphics\sdl\rndzoom.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\rotozoom.c +SOURCE=..\..\src\libs\graphics\sdl\rotozoom.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\rotozoom.h +SOURCE=..\..\src\libs\graphics\sdl\rotozoom.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\scaleint.h +SOURCE=..\..\src\libs\graphics\sdl\scaleint.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\scalemmx.h +SOURCE=..\..\src\libs\graphics\sdl\scalemmx.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\scalers.c +SOURCE=..\..\src\libs\graphics\sdl\scalers.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\scalers.h +SOURCE=..\..\src\libs\graphics\sdl\scalers.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\sdl_common.c +SOURCE=..\..\src\libs\graphics\sdl\sdl_common.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\sdl_common.h +SOURCE=..\..\src\libs\graphics\sdl\sdl_common.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\sdluio.c +SOURCE=..\..\src\libs\graphics\sdl\sdluio.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\sdluio.h +SOURCE=..\..\src\libs\graphics\sdl\sdluio.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\triscan2x.c +SOURCE=..\..\src\libs\graphics\sdl\triscan2x.c # End Source File # End Group # Begin Source File -SOURCE=..\sc2code\libs\graphics\boxint.c +SOURCE=..\..\src\libs\graphics\boxint.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\clipline.c +SOURCE=..\..\src\libs\graphics\clipline.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\cmap.c +SOURCE=..\..\src\libs\graphics\cmap.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\cmap.h +SOURCE=..\..\src\libs\graphics\cmap.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\context.c +SOURCE=..\..\src\libs\graphics\context.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\context.h +SOURCE=..\..\src\libs\graphics\context.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\display.h +SOURCE=..\..\src\libs\graphics\display.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\drawable.c +SOURCE=..\..\src\libs\graphics\drawable.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\drawable.h +SOURCE=..\..\src\libs\graphics\drawable.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\drawcmd.h +SOURCE=..\..\src\libs\graphics\drawcmd.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\filegfx.c +SOURCE=..\..\src\libs\graphics\filegfx.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\font.c +SOURCE=..\..\src\libs\graphics\font.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\font.h +SOURCE=..\..\src\libs\graphics\font.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\frame.c +SOURCE=..\..\src\libs\graphics\frame.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\gfx_common.c +SOURCE=..\..\src\libs\graphics\gfx_common.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\gfx_common.h +SOURCE=..\..\src\libs\graphics\gfx_common.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\gfxintrn.h +SOURCE=..\..\src\libs\graphics\gfxintrn.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\gfxother.h +SOURCE=..\..\src\libs\graphics\gfxother.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\intersec.c +SOURCE=..\..\src\libs\graphics\intersec.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\loaddisp.c +SOURCE=..\..\src\libs\graphics\loaddisp.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\pixmap.c +SOURCE=..\..\src\libs\graphics\pixmap.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\prim.h +SOURCE=..\..\src\libs\graphics\prim.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\resgfx.c +SOURCE=..\..\src\libs\graphics\resgfx.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\tfb_draw.c +SOURCE=..\..\src\libs\graphics\tfb_draw.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\tfb_draw.h +SOURCE=..\..\src\libs\graphics\tfb_draw.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\tfb_prim.c +SOURCE=..\..\src\libs\graphics\tfb_prim.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\tfb_prim.h +SOURCE=..\..\src\libs\graphics\tfb_prim.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\widgets.c +SOURCE=..\..\src\libs\graphics\widgets.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\widgets.h +SOURCE=..\..\src\libs\graphics\widgets.h # End Source File # End Group # Begin Group "heap" @@ -536,11 +533,11 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\heap\heap.c +SOURCE=..\..\src\libs\heap\heap.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\heap\heap.h +SOURCE=..\..\src\libs\heap\heap.h # End Source File # End Group # Begin Group "input" @@ -551,44 +548,44 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\input\sdl\input.c +SOURCE=..\..\src\libs\input\sdl\input.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\input\sdl\input.h +SOURCE=..\..\src\libs\input\sdl\input.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\input\sdl\keynames.c +SOURCE=..\..\src\libs\input\sdl\keynames.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\input\sdl\keynames.h +SOURCE=..\..\src\libs\input\sdl\keynames.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\input\sdl\vcontrol.c +SOURCE=..\..\src\libs\input\sdl\vcontrol.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\input\sdl\vcontrol.h +SOURCE=..\..\src\libs\input\sdl\vcontrol.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\input\sdl\vcontrol_malloc.h +SOURCE=..\..\src\libs\input\sdl\vcontrol_malloc.h # End Source File # End Group # Begin Source File -SOURCE=..\sc2code\libs\input\inpintrn.h +SOURCE=..\..\src\libs\input\inpintrn.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\input\input_common.c +SOURCE=..\..\src\libs\input\input_common.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\input\input_common.h +SOURCE=..\..\src\libs\input\input_common.h # End Source File # End Group # Begin Group "list" @@ -596,11 +593,11 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\list\list.c +SOURCE=..\..\src\libs\list\list.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\list\list.h +SOURCE=..\..\src\libs\list\list.h # End Source File # End Group # Begin Group "log" @@ -608,11 +605,11 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\log\uqmlog.c +SOURCE=..\..\src\libs\log\uqmlog.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\log\uqmlog.h +SOURCE=..\..\src\libs\log\uqmlog.h # End Source File # End Group # Begin Group "math" @@ -620,23 +617,23 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\math\mthintrn.h +SOURCE=..\..\src\libs\math\mthintrn.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\math\random.c +SOURCE=..\..\src\libs\math\random.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\math\random.h +SOURCE=..\..\src\libs\math\random.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\math\random2.c +SOURCE=..\..\src\libs\math\random2.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\math\sqrt.c +SOURCE=..\..\src\libs\math\sqrt.c # End Source File # End Group # Begin Group "md5" @@ -644,11 +641,11 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\md5\md5.c +SOURCE=..\..\src\libs\md5\md5.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\md5\md5.h +SOURCE=..\..\src\libs\md5\md5.h # End Source File # End Group # Begin Group "memory" @@ -656,7 +653,7 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\memory\w_memlib.c +SOURCE=..\..\src\libs\memory\w_memlib.c # End Source File # End Group # Begin Group "resource" @@ -664,47 +661,47 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\resource\direct.c +SOURCE=..\..\src\libs\resource\direct.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\resource\filecntl.c +SOURCE=..\..\src\libs\resource\filecntl.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\resource\getres.c +SOURCE=..\..\src\libs\resource\getres.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\resource\index.h +SOURCE=..\..\src\libs\resource\index.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\resource\loadres.c +SOURCE=..\..\src\libs\resource\loadres.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\resource\propfile.c +SOURCE=..\..\src\libs\resource\propfile.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\resource\propfile.h +SOURCE=..\..\src\libs\resource\propfile.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\resource\resinit.c +SOURCE=..\..\src\libs\resource\resinit.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\resource\resintrn.h +SOURCE=..\..\src\libs\resource\resintrn.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\resource\stringbank.c +SOURCE=..\..\src\libs\resource\stringbank.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\resource\stringbank.h +SOURCE=..\..\src\libs\resource\stringbank.h # End Source File # End Group # Begin Group "sound" @@ -715,11 +712,11 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\sound\openal\audiodrv_openal.c +SOURCE=..\..\src\libs\sound\openal\audiodrv_openal.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\openal\audiodrv_openal.h +SOURCE=..\..\src\libs\sound\openal\audiodrv_openal.h # End Source File # End Group # Begin Group "decoders" @@ -727,51 +724,51 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\sound\decoders\aiffaud.c +SOURCE=..\..\src\libs\sound\decoders\aiffaud.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\decoders\aiffaud.h +SOURCE=..\..\src\libs\sound\decoders\aiffaud.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\decoders\decoder.c +SOURCE=..\..\src\libs\sound\decoders\decoder.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\decoders\decoder.h +SOURCE=..\..\src\libs\sound\decoders\decoder.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\decoders\dukaud.c +SOURCE=..\..\src\libs\sound\decoders\dukaud.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\decoders\dukaud.h +SOURCE=..\..\src\libs\sound\decoders\dukaud.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\decoders\modaud.c +SOURCE=..\..\src\libs\sound\decoders\modaud.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\decoders\modaud.h +SOURCE=..\..\src\libs\sound\decoders\modaud.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\decoders\oggaud.c +SOURCE=..\..\src\libs\sound\decoders\oggaud.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\decoders\oggaud.h +SOURCE=..\..\src\libs\sound\decoders\oggaud.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\decoders\wav.c +SOURCE=..\..\src\libs\sound\decoders\wav.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\decoders\wav.h +SOURCE=..\..\src\libs\sound\decoders\wav.h # End Source File # End Group # Begin Group "mixer" @@ -782,11 +779,11 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\sound\mixer\sdl\audiodrv_sdl.c +SOURCE=..\..\src\libs\sound\mixer\sdl\audiodrv_sdl.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\mixer\sdl\audiodrv_sdl.h +SOURCE=..\..\src\libs\sound\mixer\sdl\audiodrv_sdl.h # End Source File # End Group # Begin Group "nosound" @@ -794,81 +791,81 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\sound\mixer\nosound\audiodrv_nosound.c +SOURCE=..\..\src\libs\sound\mixer\nosound\audiodrv_nosound.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\mixer\nosound\audiodrv_nosound.h +SOURCE=..\..\src\libs\sound\mixer\nosound\audiodrv_nosound.h # End Source File # End Group # Begin Source File -SOURCE=..\sc2code\libs\sound\mixer\mixer.c +SOURCE=..\..\src\libs\sound\mixer\mixer.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\mixer\mixer.h +SOURCE=..\..\src\libs\sound\mixer\mixer.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\mixer\mixerint.h +SOURCE=..\..\src\libs\sound\mixer\mixerint.h # End Source File # End Group # Begin Source File -SOURCE=..\sc2code\libs\sound\audiocore.c +SOURCE=..\..\src\libs\sound\audiocore.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\audiocore.h +SOURCE=..\..\src\libs\sound\audiocore.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\fileinst.c +SOURCE=..\..\src\libs\sound\fileinst.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\music.c +SOURCE=..\..\src\libs\sound\music.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\resinst.c +SOURCE=..\..\src\libs\sound\resinst.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\sfx.c +SOURCE=..\..\src\libs\sound\sfx.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\sndintrn.h +SOURCE=..\..\src\libs\sound\sndintrn.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\sound.c +SOURCE=..\..\src\libs\sound\sound.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\sound.h +SOURCE=..\..\src\libs\sound\sound.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\stream.c +SOURCE=..\..\src\libs\sound\stream.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\stream.h +SOURCE=..\..\src\libs\sound\stream.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\trackint.h +SOURCE=..\..\src\libs\sound\trackint.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\trackplayer.c +SOURCE=..\..\src\libs\sound\trackplayer.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\trackplayer.h +SOURCE=..\..\src\libs\sound\trackplayer.h # End Source File # End Group # Begin Group "strings" @@ -876,27 +873,27 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\strings\getstr.c +SOURCE=..\..\src\libs\strings\getstr.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\strings\sfileins.c +SOURCE=..\..\src\libs\strings\sfileins.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\strings\sresins.c +SOURCE=..\..\src\libs\strings\sresins.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\strings\strings.c +SOURCE=..\..\src\libs\strings\strings.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\strings\strintrn.h +SOURCE=..\..\src\libs\strings\strintrn.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\strings\unicode.c +SOURCE=..\..\src\libs\strings\unicode.c # End Source File # End Group # Begin Group "video" @@ -904,51 +901,51 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\video\dukvid.c +SOURCE=..\..\src\libs\video\dukvid.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\video\dukvid.h +SOURCE=..\..\src\libs\video\dukvid.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\video\legacyplayer.c +SOURCE=..\..\src\libs\video\legacyplayer.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\video\vfileins.c +SOURCE=..\..\src\libs\video\vfileins.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\video\video.c +SOURCE=..\..\src\libs\video\video.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\video\video.h +SOURCE=..\..\src\libs\video\video.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\video\videodec.c +SOURCE=..\..\src\libs\video\videodec.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\video\videodec.h +SOURCE=..\..\src\libs\video\videodec.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\video\vidintrn.h +SOURCE=..\..\src\libs\video\vidintrn.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\video\vidplayer.c +SOURCE=..\..\src\libs\video\vidplayer.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\video\vidplayer.h +SOURCE=..\..\src\libs\video\vidplayer.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\video\vresins.c +SOURCE=..\..\src\libs\video\vresins.c # End Source File # End Group # Begin Group "threads" @@ -959,20 +956,20 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\threads\sdl\sdlthreads.c +SOURCE=..\..\src\libs\threads\sdl\sdlthreads.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\threads\sdl\sdlthreads.h +SOURCE=..\..\src\libs\threads\sdl\sdlthreads.h # End Source File # End Group # Begin Source File -SOURCE=..\sc2code\libs\threads\thrcommon.c +SOURCE=..\..\src\libs\threads\thrcommon.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\threads\thrcommon.h +SOURCE=..\..\src\libs\threads\thrcommon.h # End Source File # End Group # Begin Group "time" @@ -983,20 +980,20 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\time\sdl\sdltime.c +SOURCE=..\..\src\libs\time\sdl\sdltime.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\time\sdl\sdltime.h +SOURCE=..\..\src\libs\time\sdl\sdltime.h # End Source File # End Group # Begin Source File -SOURCE=..\sc2code\libs\time\timecommon.c +SOURCE=..\..\src\libs\time\timecommon.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\time\timecommon.h +SOURCE=..\..\src\libs\time\timecommon.h # End Source File # End Group # Begin Group "task" @@ -1004,7 +1001,7 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\task\tasklib.c +SOURCE=..\..\src\libs\task\tasklib.c # End Source File # End Group # Begin Group "uio" @@ -1015,11 +1012,11 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\uio\stdio\stdio.c +SOURCE=..\..\src\libs\uio\stdio\stdio.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\stdio\stdio.h +SOURCE=..\..\src\libs\uio\stdio\stdio.h # End Source File # End Group # Begin Group "zip" @@ -1027,24 +1024,24 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\uio\zip\zip.c +SOURCE=..\..\src\libs\uio\zip\zip.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\zip\zip.h +SOURCE=..\..\src\libs\uio\zip\zip.h # End Source File # End Group # Begin Source File -SOURCE=..\sc2code\libs\uio\charhashtable.c +SOURCE=..\..\src\libs\uio\charhashtable.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\charhashtable.h +SOURCE=..\..\src\libs\uio\charhashtable.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\debug.c +SOURCE=..\..\src\libs\uio\debug.c !IF "$(CFG)" == "UrQuanMasters - Win32 Release" @@ -1064,47 +1061,47 @@ # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\debug.h +SOURCE=..\..\src\libs\uio\debug.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\defaultfs.c +SOURCE=..\..\src\libs\uio\defaultfs.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\defaultfs.h +SOURCE=..\..\src\libs\uio\defaultfs.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\fileblock.c +SOURCE=..\..\src\libs\uio\fileblock.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\fileblock.h +SOURCE=..\..\src\libs\uio\fileblock.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\fstypes.c +SOURCE=..\..\src\libs\uio\fstypes.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\fstypes.h +SOURCE=..\..\src\libs\uio\fstypes.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\getint.h +SOURCE=..\..\src\libs\uio\getint.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\gphys.c +SOURCE=..\..\src\libs\uio\gphys.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\gphys.h +SOURCE=..\..\src\libs\uio\gphys.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\hashtable.c +SOURCE=..\..\src\libs\uio\hashtable.c !IF "$(CFG)" == "UrQuanMasters - Win32 Release" @@ -1129,43 +1126,43 @@ # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\hashtable.h +SOURCE=..\..\src\libs\uio\hashtable.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\io.c +SOURCE=..\..\src\libs\uio\io.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\io.h +SOURCE=..\..\src\libs\uio\io.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\ioaux.c +SOURCE=..\..\src\libs\uio\ioaux.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\ioaux.h +SOURCE=..\..\src\libs\uio\ioaux.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\iointrn.h +SOURCE=..\..\src\libs\uio\iointrn.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\match.c +SOURCE=..\..\src\libs\uio\match.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\match.h +SOURCE=..\..\src\libs\uio\match.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\mem.h +SOURCE=..\..\src\libs\uio\mem.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\memdebug.c +SOURCE=..\..\src\libs\uio\memdebug.c !IF "$(CFG)" == "UrQuanMasters - Win32 Release" @@ -1190,71 +1187,71 @@ # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\memdebug.h +SOURCE=..\..\src\libs\uio\memdebug.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\mount.c +SOURCE=..\..\src\libs\uio\mount.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\mount.h +SOURCE=..\..\src\libs\uio\mount.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\mounttree.c +SOURCE=..\..\src\libs\uio\mounttree.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\mounttree.h +SOURCE=..\..\src\libs\uio\mounttree.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\paths.c +SOURCE=..\..\src\libs\uio\paths.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\paths.h +SOURCE=..\..\src\libs\uio\paths.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\physical.c +SOURCE=..\..\src\libs\uio\physical.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\physical.h +SOURCE=..\..\src\libs\uio\physical.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\types.h +SOURCE=..\..\src\libs\uio\types.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\uioport.h +SOURCE=..\..\src\libs\uio\uioport.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\uiostream.c +SOURCE=..\..\src\libs\uio\uiostream.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\uiostream.h +SOURCE=..\..\src\libs\uio\uiostream.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\uioutils.c +SOURCE=..\..\src\libs\uio\uioutils.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\uioutils.h +SOURCE=..\..\src\libs\uio\uioutils.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\utils.c +SOURCE=..\..\src\libs\uio\utils.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\utils.h +SOURCE=..\..\src\libs\uio\utils.h # End Source File # End Group # Begin Group "mikmod" @@ -1262,103 +1259,103 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\mikmod\drv_nos.c +SOURCE=..\..\src\libs\mikmod\drv_nos.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\load_it.c +SOURCE=..\..\src\libs\mikmod\load_it.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\load_mod.c +SOURCE=..\..\src\libs\mikmod\load_mod.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\load_s3m.c +SOURCE=..\..\src\libs\mikmod\load_s3m.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\load_stm.c +SOURCE=..\..\src\libs\mikmod\load_stm.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\load_xm.c +SOURCE=..\..\src\libs\mikmod\load_xm.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\mdreg.c +SOURCE=..\..\src\libs\mikmod\mdreg.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\mdriver.c +SOURCE=..\..\src\libs\mikmod\mdriver.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\mikmod.h +SOURCE=..\..\src\libs\mikmod\mikmod.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\mikmod_build.h +SOURCE=..\..\src\libs\mikmod\mikmod_build.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\mikmod_internals.h +SOURCE=..\..\src\libs\mikmod\mikmod_internals.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\mloader.c +SOURCE=..\..\src\libs\mikmod\mloader.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\mlreg.c +SOURCE=..\..\src\libs\mikmod\mlreg.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\mlutil.c +SOURCE=..\..\src\libs\mikmod\mlutil.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\mmalloc.c +SOURCE=..\..\src\libs\mikmod\mmalloc.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\mmerror.c +SOURCE=..\..\src\libs\mikmod\mmerror.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\mmio.c +SOURCE=..\..\src\libs\mikmod\mmio.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\mplayer.c +SOURCE=..\..\src\libs\mikmod\mplayer.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\munitrk.c +SOURCE=..\..\src\libs\mikmod\munitrk.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\mwav.c +SOURCE=..\..\src\libs\mikmod\mwav.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\npertab.c +SOURCE=..\..\src\libs\mikmod\npertab.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\sloader.c +SOURCE=..\..\src\libs\mikmod\sloader.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\virtch.c +SOURCE=..\..\src\libs\mikmod\virtch.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\virtch2.c +SOURCE=..\..\src\libs\mikmod\virtch2.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\virtch_common.c +SOURCE=..\..\src\libs\mikmod\virtch_common.c # End Source File # End Group # Begin Group "network" @@ -1369,27 +1366,27 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\network\connect\connect.c +SOURCE=..\..\src\libs\network\connect\connect.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\connect\connect.h +SOURCE=..\..\src\libs\network\connect\connect.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\connect\listen.c +SOURCE=..\..\src\libs\network\connect\listen.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\connect\listen.h +SOURCE=..\..\src\libs\network\connect\listen.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\connect\resolve.c +SOURCE=..\..\src\libs\network\connect\resolve.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\connect\resolve.h +SOURCE=..\..\src\libs\network\connect\resolve.h # End Source File # End Group # Begin Group "netmanager" @@ -1397,31 +1394,31 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\network\netmanager\ndesc.c +SOURCE=..\..\src\libs\network\netmanager\ndesc.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\netmanager\ndesc.h +SOURCE=..\..\src\libs\network\netmanager\ndesc.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\netmanager\ndindex.ci +SOURCE=..\..\src\libs\network\netmanager\ndindex.ci # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\netmanager\netmanager.h +SOURCE=..\..\src\libs\network\netmanager\netmanager.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\netmanager\netmanager_common.ci +SOURCE=..\..\src\libs\network\netmanager\netmanager_common.ci # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\netmanager\netmanager_win.c +SOURCE=..\..\src\libs\network\netmanager\netmanager_win.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\netmanager\netmanager_win.h +SOURCE=..\..\src\libs\network\netmanager\netmanager_win.h # End Source File # End Group # Begin Group "socket" @@ -1429,143 +1426,146 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\network\socket\socket.c +SOURCE=..\..\src\libs\network\socket\socket.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\socket\socket.h +SOURCE=..\..\src\libs\network\socket\socket.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\socket\socket_win.c +SOURCE=..\..\src\libs\network\socket\socket_win.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\socket\socket_win.h +SOURCE=..\..\src\libs\network\socket\socket_win.h # End Source File # End Group # Begin Source File -SOURCE=..\sc2code\libs\network\bytesex.h +SOURCE=..\..\src\libs\network\bytesex.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\netport.c +SOURCE=..\..\src\libs\network\netport.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\netport.h +SOURCE=..\..\src\libs\network\netport.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\network.h +SOURCE=..\..\src\libs\network\network.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\network_win.c +SOURCE=..\..\src\libs\network\network_win.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\wspiapiwrap.h +SOURCE=..\..\src\libs\network\wspiapiwrap.h # End Source File # End Group # Begin Source File -SOURCE=..\sc2code\libs\alarm.h +SOURCE=..\..\src\libs\alarm.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\callback.h +SOURCE=..\..\src\libs\callback.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\compiler.h +SOURCE=..\..\src\libs\compiler.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\declib.h +SOURCE=..\..\src\libs\declib.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\file.h +SOURCE=..\..\src\libs\file.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\gfxlib.h +SOURCE=..\..\src\libs\gfxlib.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\heap.h +SOURCE=..\..\src\libs\heap.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\inplib.h +SOURCE=..\..\src\libs\inplib.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\list.h +SOURCE=..\..\src\libs\list.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\log.h +SOURCE=..\..\src\libs\log.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mathlib.h +SOURCE=..\..\src\libs\mathlib.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\md5.h +SOURCE=..\..\src\libs\md5.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\memlib.h +SOURCE=..\..\src\libs\memlib.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\misc.h +SOURCE=..\..\src\libs\misc.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\net.h +SOURCE=..\..\src\libs\net.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\platform.h +SOURCE=..\..\src\libs\platform.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\reslib.h +SOURCE=..\..\src\libs\reslib.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sndlib.h +SOURCE=..\..\src\libs\sndlib.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\strlib.h +SOURCE=..\..\src\libs\strlib.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\tasklib.h +SOURCE=..\..\src\libs\tasklib.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\threadlib.h +SOURCE=..\..\src\libs\threadlib.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\timelib.h +SOURCE=..\..\src\libs\timelib.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio.h +SOURCE=..\..\src\libs\uio.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\vidlib.h +SOURCE=..\..\src\libs\vidlib.h # End Source File # End Group +# Begin Group "sc2code" + +# PROP Default_Filter "" # Begin Group "comm" # PROP Default_Filter "" @@ -1574,35 +1574,35 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\comm\arilou\arilouc.c +SOURCE=..\..\src\sc2code\comm\arilou\arilouc.c # End Source File # Begin Source File -SOURCE=..\sc2code\comm\arilou\igfxres.h +SOURCE=..\..\src\sc2code\comm\arilou\igfxres.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\arilou\imusicre.h +SOURCE=..\..\src\sc2code\comm\arilou\imusicre.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\arilou\istrtab.h +SOURCE=..\..\src\sc2code\comm\arilou\istrtab.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\arilou\resinst.h +SOURCE=..\..\src\sc2code\comm\arilou\resinst.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\arilou\respkg.h +SOURCE=..\..\src\sc2code\comm\arilou\respkg.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\arilou\restypes.h +SOURCE=..\..\src\sc2code\comm\arilou\restypes.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\arilou\strings.h +SOURCE=..\..\src\sc2code\comm\arilou\strings.h # End Source File # End Group # Begin Group "blackur.comm" @@ -1610,35 +1610,35 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\comm\blackur\blackurc.c +SOURCE=..\..\src\sc2code\comm\blackur\blackurc.c # End Source File # Begin Source File -SOURCE=..\sc2code\comm\blackur\igfxres.h +SOURCE=..\..\src\sc2code\comm\blackur\igfxres.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\blackur\imusicre.h +SOURCE=..\..\src\sc2code\comm\blackur\imusicre.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\blackur\istrtab.h +SOURCE=..\..\src\sc2code\comm\blackur\istrtab.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\blackur\resinst.h +SOURCE=..\..\src\sc2code\comm\blackur\resinst.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\blackur\respkg.h +SOURCE=..\..\src\sc2code\comm\blackur\respkg.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\blackur\restypes.h +SOURCE=..\..\src\sc2code\comm\blackur\restypes.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\blackur\strings.h +SOURCE=..\..\src\sc2code\comm\blackur\strings.h # End Source File # End Group # Begin Group "chmmr.comm" @@ -1646,35 +1646,35 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\comm\chmmr\chmmrc.c +SOURCE=..\..\src\sc2code\comm\chmmr\chmmrc.c # End Source File # Begin Source File -SOURCE=..\sc2code\comm\chmmr\igfxres.h +SOURCE=..\..\src\sc2code\comm\chmmr\igfxres.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\chmmr\imusicre.h +SOURCE=..\..\src\sc2code\comm\chmmr\imusicre.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\chmmr\istrtab.h +SOURCE=..\..\src\sc2code\comm\chmmr\istrtab.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\chmmr\resinst.h +SOURCE=..\..\src\sc2code\comm\chmmr\resinst.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\chmmr\respkg.h +SOURCE=..\..\src\sc2code\comm\chmmr\respkg.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\chmmr\restypes.h +SOURCE=..\..\src\sc2code\comm\chmmr\restypes.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\chmmr\strings.h +SOURCE=..\..\src\sc2code\comm\chmmr\strings.h # End Source File # End Group # Begin Group "comandr.comm" @@ -1682,35 +1682,35 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\comm\comandr\comandr.c +SOURCE=..\..\src\sc2code\comm\comandr\comandr.c # End Source File # Begin Source File -SOURCE=..\sc2code\comm\comandr\igfxres.h +SOURCE=..\..\src\sc2code\comm\comandr\igfxres.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\comandr\imusicre.h +SOURCE=..\..\src\sc2code\comm\comandr\imusicre.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\comandr\istrtab.h +SOURCE=..\..\src\sc2code\comm\comandr\istrtab.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\comandr\resinst.h +SOURCE=..\..\src\sc2code\comm\comandr\resinst.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\comandr\respkg.h +SOURCE=..\..\src\sc2code\comm\comandr\respkg.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\comandr\restypes.h +SOURCE=..\..\src\sc2code\comm\comandr\restypes.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\comandr\strings.h +SOURCE=..\..\src\sc2code\comm\comandr\strings.h # End Source File # End Group # Begin Group "druuge.comm" @@ -1718,35 +1718,35 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\comm\druuge\druugec.c +SOURCE=..\..\src\sc2code\comm\druuge\druugec.c # End Source File # Begin Source File -SOURCE=..\sc2code\comm\druuge\igfxres.h +SOURCE=..\..\src\sc2code\comm\druuge\igfxres.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\druuge\imusicre.h +SOURCE=..\..\src\sc2code\comm\druuge\imusicre.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\druuge\istrtab.h +SOURCE=..\..\src\sc2code\comm\druuge\istrtab.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\druuge\resinst.h +SOURCE=..\..\src\sc2code\comm\druuge\resinst.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\druuge\respkg.h +SOURCE=..\..\src\sc2code\comm\druuge\respkg.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\druuge\restypes.h +SOURCE=..\..\src\sc2code\comm\druuge\restypes.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\druuge\strings.h +SOURCE=..\..\src\sc2code\comm\druuge\strings.h # End Source File # End Group # Begin Group "ilwrath.comm" @@ -1754,35 +1754,35 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\comm\ilwrath\igfxres.h +SOURCE=..\..\src\sc2code\comm\ilwrath\igfxres.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\ilwrath\ilwrathc.c +SOURCE=..\..\src\sc2code\comm\ilwrath\ilwrathc.c # End Source File # Begin Source File -SOURCE=..\sc2code\comm\ilwrath\imusicre.h +SOURCE=..\..\src\sc2code\comm\ilwrath\imusicre.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\ilwrath\istrtab.h +SOURCE=..\..\src\sc2code\comm\ilwrath\istrtab.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\ilwrath\resinst.h +SOURCE=..\..\src\sc2code\comm\ilwrath\resinst.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\ilwrath\respkg.h +SOURCE=..\..\src\sc2code\comm\ilwrath\respkg.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\ilwrath\restypes.h +SOURCE=..\..\src\sc2code\comm\ilwrath\restypes.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\ilwrath\strings.h +SOURCE=..\..\src\sc2code\comm\ilwrath\strings.h # End Source File # End Group # Begin Group "melnorm.comm" @@ -1790,35 +1790,35 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\comm\melnorm\igfxres.h +SOURCE=..\..\src\sc2code\comm\melnorm\igfxres.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\melnorm\imusicre.h +SOURCE=..\..\src\sc2code\comm\melnorm\imusicre.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\melnorm\istrtab.h +SOURCE=..\..\src\sc2code\comm\melnorm\istrtab.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\melnorm\melnorm.c +SOURCE=..\..\src\sc2code\comm\melnorm\melnorm.c # End Source File # Begin Source File -SOURCE=..\sc2code\comm\melnorm\resinst.h +SOURCE=..\..\src\sc2code\comm\melnorm\resinst.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\melnorm\respkg.h +SOURCE=..\..\src\sc2code\comm\melnorm\respkg.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\melnorm\restypes.h +SOURCE=..\..\src\sc2code\comm\melnorm\restypes.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\melnorm\strings.h +SOURCE=..\..\src\sc2code\comm\melnorm\strings.h # End Source File # End Group # Begin Group "mycon.comm" @@ -1826,35 +1826,35 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\comm\mycon\igfxres.h +SOURCE=..\..\src\sc2code\comm\mycon\igfxres.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\mycon\imusicre.h +SOURCE=..\..\src\sc2code\comm\mycon\imusicre.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\mycon\istrtab.h +SOURCE=..\..\src\sc2code\comm\mycon\istrtab.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\mycon\myconc.c +SOURCE=..\..\src\sc2code\comm\mycon\myconc.c # End Source File # Begin Source File -SOURCE=..\sc2code\comm\mycon\resinst.h +SOURCE=..\..\src\sc2code\comm\mycon\resinst.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\mycon\respkg.h +SOURCE=..\..\src\sc2code\comm\mycon\respkg.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\mycon\restypes.h +SOURCE=..\..\src\sc2code\comm\mycon\restypes.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\mycon\strings.h +SOURCE=..\..\src\sc2code\comm\mycon\strings.h # End Source File # End Group # Begin Group "orz.comm" @@ -1862,35 +1862,35 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\comm\orz\igfxres.h +SOURCE=..\..\src\sc2code\comm\orz\igfxres.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\orz\imusicre.h +SOURCE=..\..\src\sc2code\comm\orz\imusicre.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\orz\istrtab.h +SOURCE=..\..\src\sc2code\comm\orz\istrtab.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\orz\orzc.c +SOURCE=..\..\src\sc2code\comm\orz\orzc.c # End Source File # Begin Source File -SOURCE=..\sc2code\comm\orz\resinst.h +SOURCE=..\..\src\sc2code\comm\orz\resinst.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\orz\respkg.h +SOURCE=..\..\src\sc2code\comm\orz\respkg.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\orz\restypes.h +SOURCE=..\..\src\sc2code\comm\orz\restypes.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\orz\strings.h +SOURCE=..\..\src\sc2code\comm\orz\strings.h # End Source File # End Group # Begin Group "pkunk.comm" @@ -1898,35 +1898,35 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\comm\pkunk\igfxres.h +SOURCE=..\..\src\sc2code\comm\pkunk\igfxres.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\pkunk\imusicre.h +SOURCE=..\..\src\sc2code\comm\pkunk\imusicre.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\pkunk\istrtab.h +SOURCE=..\..\src\sc2code\comm\pkunk\istrtab.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\pkunk\pkunkc.c +SOURCE=..\..\src\sc2code\comm\pkunk\pkunkc.c # End Source File # Begin Source File -SOURCE=..\sc2code\comm\pkunk\resinst.h +SOURCE=..\..\src\sc2code\comm\pkunk\resinst.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\pkunk\respkg.h +SOURCE=..\..\src\sc2code\comm\pkunk\respkg.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\pkunk\restypes.h +SOURCE=..\..\src\sc2code\comm\pkunk\restypes.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\pkunk\strings.h +SOURCE=..\..\src\sc2code\comm\pkunk\strings.h # End Source File # End Group # Begin Group "rebel.comm" @@ -1934,11 +1934,11 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\comm\rebel\rebel.c +SOURCE=..\..\src\sc2code\comm\rebel\rebel.c # End Source File # Begin Source File -SOURCE=..\sc2code\comm\rebel\strings.h +SOURCE=..\..\src\sc2code\comm\rebel\strings.h # End Source File # End Group # Begin Group "shofixt.comm" @@ -1946,35 +1946,35 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\comm\shofixt\igfxres.h +SOURCE=..\..\src\sc2code\comm\shofixt\igfxres.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\shofixt\imusicre.h +SOURCE=..\..\src\sc2code\comm\shofixt\imusicre.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\shofixt\istrtab.h +SOURCE=..\..\src\sc2code\comm\shofixt\istrtab.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\shofixt\resinst.h +SOURCE=..\..\src\sc2code\comm\shofixt\resinst.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\shofixt\respkg.h +SOURCE=..\..\src\sc2code\comm\shofixt\respkg.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\shofixt\restypes.h +SOURCE=..\..\src\sc2code\comm\shofixt\restypes.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\shofixt\shofixt.c +SOURCE=..\..\src\sc2code\comm\shofixt\shofixt.c # End Source File # Begin Source File -SOURCE=..\sc2code\comm\shofixt\strings.h +SOURCE=..\..\src\sc2code\comm\shofixt\strings.h # End Source File # End Group # Begin Group "slyhome.comm" @@ -1982,35 +1982,35 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\comm\slyhome\igfxres.h +SOURCE=..\..\src\sc2code\comm\slyhome\igfxres.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\slyhome\imusicre.h +SOURCE=..\..\src\sc2code\comm\slyhome\imusicre.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\slyhome\istrtab.h +SOURCE=..\..\src\sc2code\comm\slyhome\istrtab.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\slyhome\resinst.h +SOURCE=..\..\src\sc2code\comm\slyhome\re... [truncated message content] |
From: <av...@us...> - 2009-10-09 17:18:54
|
Revision: 3214 http://sc2.svn.sourceforge.net/sc2/?rev=3214&view=rev Author: avolkov Date: 2009-10-09 17:18:45 +0000 (Fri, 09 Oct 2009) Log Message: ----------- Source tree reorg, stage 2: finished renaming sc2code/ to uqm/; build files updated Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/Makeproject trunk/sc2/build/msvc6/UrQuanMasters.dsp trunk/sc2/src/Makeinfo Added Paths: ----------- trunk/sc2/build/msvc6/ trunk/sc2/src/uqm.c Removed Paths: ------------- trunk/sc2/build/msvc++/ trunk/sc2/build/msvc6/config.h trunk/sc2/src/starcon2.c Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2009-10-09 16:52:53 UTC (rev 3213) +++ trunk/sc2/ChangeLog 2009-10-09 17:18:45 UTC (rev 3214) @@ -1,6 +1,6 @@ Changes towards version 0.7: - Source tree reorg: libs/ moved out of sc2code/, msvc++/ moved to - build/msvc6/ - Coredev + build/msvc6/, src/sc2code/ renamed to src/uqm/ - Coredev - Druuge no longer turn hostile after attempting a salvage (bug #1013) - Alex - Process subtitles correctly with no timestamp file (bug #1060) - Alex - Lander will no longer hang when killed on planets with a lot of Modified: trunk/sc2/Makeproject =================================================================== --- trunk/sc2/Makeproject 2009-10-09 16:52:53 UTC (rev 3213) +++ trunk/sc2/Makeproject 2009-10-09 17:18:45 UTC (rev 3214) @@ -16,7 +16,7 @@ uqm_NAME="$uqm_NAME.exe" ;; esac -uqm_CFLAGS="$uqm_CFLAGS -Isrc -Isrc/sc2code" +uqm_CFLAGS="$uqm_CFLAGS -Isrc -Isrc/uqm" if [ "$uqm_HAVE_REGEX" = 0 ]; then uqm_CFLAGS="$uqm_CFLAGS -Isrc/regex" fi Modified: trunk/sc2/build/msvc6/UrQuanMasters.dsp =================================================================== --- trunk/sc2/build/msvc++/UrQuanMasters.dsp 2009-10-09 16:52:53 UTC (rev 3213) +++ trunk/sc2/build/msvc6/UrQuanMasters.dsp 2009-10-09 17:18:45 UTC (rev 3214) @@ -44,7 +44,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I ".." /I "..\sc2code" /I "..\regex" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "HAVE_JOYSTICK" /D "NETPLAY" /D "ZLIB_DLL" /D "USE_INTERNAL_MIKMOD" /D "USE_PLATFORM_ACCEL" /FD /c +# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "..\..\src" /I "..\..\src\uqm" /I "..\..\src\regex" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "HAVE_JOYSTICK" /D "NETPLAY" /D "ZLIB_DLL" /D "USE_INTERNAL_MIKMOD" /D "USE_PLATFORM_ACCEL" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" @@ -74,7 +74,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I ".." /I "..\sc2code" /I "..\regex" /D "DEBUG" /D "_DEBUG" /D "DEBUG_TRACK_SEM" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "HAVE_JOYSTICK" /D "NETPLAY" /D "ZLIB_DLL" /D "USE_INTERNAL_MIKMOD" /D "USE_PLATFORM_ACCEL" /FR /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "..\..\src" /I "..\..\src\uqm" /I "..\..\src\regex" /D "DEBUG" /D "_DEBUG" /D "DEBUG_TRACK_SEM" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "HAVE_JOYSTICK" /D "NETPLAY" /D "ZLIB_DLL" /D "USE_INTERNAL_MIKMOD" /D "USE_PLATFORM_ACCEL" /FR /FD /GZ /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" @@ -100,9 +100,9 @@ # PROP Intermediate_Dir "Debug_NoAccel" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W3 /GX /Zi /Od /I "." /I ".." /I "..\sc2code" /I "..\sc2code\libs" /I "..\sc2code\ships" /I "..\regex" /D "DEBUG" /D "_DEBUG" /D "DEBUG_TRACK_SEM" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "ZLIB_DLL" /D "USE_PLATFORM_ACCEL" /FR /FD /GZ /c +# ADD BASE CPP /nologo /W3 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I ".." /I "..\sc2code" /I "..\regex" /D "DEBUG" /D "_DEBUG" /D "DEBUG_TRACK_SEM" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "HAVE_JOYSTICK" /D "NETPLAY" /D "ZLIB_DLL" /D "USE_INTERNAL_MIKMOD" /FR /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "..\..\src" /I "..\..\src\uqm" /I "..\..\src\regex" /D "DEBUG" /D "_DEBUG" /D "DEBUG_TRACK_SEM" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "HAVE_JOYSTICK" /D "NETPLAY" /D "ZLIB_DLL" /D "USE_INTERNAL_MIKMOD" /FR /FD /GZ /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" @@ -128,9 +128,9 @@ # PROP Intermediate_Dir "Release_NoAccel" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /GX /Zi /O2 /I "." /I ".." /I "..\sc2code" /I "..\sc2code\libs" /I "..\sc2code\ships" /I "..\regex" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "ZLIB_DLL" /D "USE_PLATFORM_ACCEL" /FD /c +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I ".." /I "..\sc2code" /I "..\regex" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "HAVE_JOYSTICK" /D "NETPLAY" /D "ZLIB_DLL" /D "USE_INTERNAL_MIKMOD" /FR /FD /c +# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "..\..\src" /I "..\..\src\uqm" /I "..\..\src\regex" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "HAVE_JOYSTICK" /D "NETPLAY" /D "ZLIB_DLL" /D "USE_INTERNAL_MIKMOD" /FR /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" @@ -162,15 +162,15 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\getopt\getopt.c +SOURCE=..\..\src\getopt\getopt.c # End Source File # Begin Source File -SOURCE=..\getopt\getopt.h +SOURCE=..\..\src\getopt\getopt.h # End Source File # Begin Source File -SOURCE=..\getopt\getopt1.c +SOURCE=..\..\src\getopt\getopt1.c # End Source File # End Group # Begin Group "regex" @@ -178,32 +178,29 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\regex\regcomp.ci +SOURCE=..\..\src\regex\regcomp.ci # End Source File # Begin Source File -SOURCE=..\regex\regex.c +SOURCE=..\..\src\regex\regex.c # End Source File # Begin Source File -SOURCE=..\regex\regex.h +SOURCE=..\..\src\regex\regex.h # End Source File # Begin Source File -SOURCE=..\regex\regex_internal.ci +SOURCE=..\..\src\regex\regex_internal.ci # End Source File # Begin Source File -SOURCE=..\regex\regex_internal.h +SOURCE=..\..\src\regex\regex_internal.h # End Source File # Begin Source File -SOURCE=..\regex\regexec.ci +SOURCE=..\..\src\regex\regexec.ci # End Source File # End Group -# Begin Group "sc2code" - -# PROP Default_Filter "" # Begin Group "libs" # PROP Default_Filter "" @@ -212,19 +209,19 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\callback\alarm.c +SOURCE=..\..\src\libs\callback\alarm.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\callback\alarm.h +SOURCE=..\..\src\libs\callback\alarm.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\callback\callback.c +SOURCE=..\..\src\libs\callback\callback.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\callback\callback.h +SOURCE=..\..\src\libs\callback\callback.h # End Source File # End Group # Begin Group "decomp" @@ -232,19 +229,19 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\decomp\lzdecode.c +SOURCE=..\..\src\libs\decomp\lzdecode.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\decomp\lzencode.c +SOURCE=..\..\src\libs\decomp\lzencode.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\decomp\lzh.h +SOURCE=..\..\src\libs\decomp\lzh.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\decomp\update.c +SOURCE=..\..\src\libs\decomp\update.c # End Source File # End Group # Begin Group "file" @@ -252,15 +249,15 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\file\dirs.c +SOURCE=..\..\src\libs\file\dirs.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\file\files.c +SOURCE=..\..\src\libs\file\files.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\file\filintrn.h +SOURCE=..\..\src\libs\file\filintrn.h # End Source File # End Group # Begin Group "graphics" @@ -271,264 +268,264 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\2xscalers.c +SOURCE=..\..\src\libs\graphics\sdl\2xscalers.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\2xscalers.h +SOURCE=..\..\src\libs\graphics\sdl\2xscalers.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\2xscalers_3dnow.c +SOURCE=..\..\src\libs\graphics\sdl\2xscalers_3dnow.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\2xscalers_mmx.c +SOURCE=..\..\src\libs\graphics\sdl\2xscalers_mmx.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\2xscalers_mmx.h +SOURCE=..\..\src\libs\graphics\sdl\2xscalers_mmx.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\2xscalers_sse.c +SOURCE=..\..\src\libs\graphics\sdl\2xscalers_sse.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\3do_blt.c +SOURCE=..\..\src\libs\graphics\sdl\3do_blt.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\3do_funcs.c +SOURCE=..\..\src\libs\graphics\sdl\3do_funcs.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\3do_getbody.c +SOURCE=..\..\src\libs\graphics\sdl\3do_getbody.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\bbox.c +SOURCE=..\..\src\libs\graphics\sdl\bbox.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\bbox.h +SOURCE=..\..\src\libs\graphics\sdl\bbox.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\biadv2x.c +SOURCE=..\..\src\libs\graphics\sdl\biadv2x.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\bilinear2x.c +SOURCE=..\..\src\libs\graphics\sdl\bilinear2x.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\canvas.c +SOURCE=..\..\src\libs\graphics\sdl\canvas.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\dcqueue.c +SOURCE=..\..\src\libs\graphics\sdl\dcqueue.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\dcqueue.h +SOURCE=..\..\src\libs\graphics\sdl\dcqueue.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\hq2x.c +SOURCE=..\..\src\libs\graphics\sdl\hq2x.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\nearest2x.c +SOURCE=..\..\src\libs\graphics\sdl\nearest2x.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\opengl.c +SOURCE=..\..\src\libs\graphics\sdl\opengl.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\opengl.h +SOURCE=..\..\src\libs\graphics\sdl\opengl.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\primitives.c +SOURCE=..\..\src\libs\graphics\sdl\primitives.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\primitives.h +SOURCE=..\..\src\libs\graphics\sdl\primitives.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\pure.c +SOURCE=..\..\src\libs\graphics\sdl\pure.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\pure.h +SOURCE=..\..\src\libs\graphics\sdl\pure.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\rndzoom.c +SOURCE=..\..\src\libs\graphics\sdl\rndzoom.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\rotozoom.c +SOURCE=..\..\src\libs\graphics\sdl\rotozoom.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\rotozoom.h +SOURCE=..\..\src\libs\graphics\sdl\rotozoom.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\scaleint.h +SOURCE=..\..\src\libs\graphics\sdl\scaleint.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\scalemmx.h +SOURCE=..\..\src\libs\graphics\sdl\scalemmx.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\scalers.c +SOURCE=..\..\src\libs\graphics\sdl\scalers.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\scalers.h +SOURCE=..\..\src\libs\graphics\sdl\scalers.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\sdl_common.c +SOURCE=..\..\src\libs\graphics\sdl\sdl_common.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\sdl_common.h +SOURCE=..\..\src\libs\graphics\sdl\sdl_common.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\sdluio.c +SOURCE=..\..\src\libs\graphics\sdl\sdluio.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\sdluio.h +SOURCE=..\..\src\libs\graphics\sdl\sdluio.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\sdl\triscan2x.c +SOURCE=..\..\src\libs\graphics\sdl\triscan2x.c # End Source File # End Group # Begin Source File -SOURCE=..\sc2code\libs\graphics\boxint.c +SOURCE=..\..\src\libs\graphics\boxint.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\clipline.c +SOURCE=..\..\src\libs\graphics\clipline.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\cmap.c +SOURCE=..\..\src\libs\graphics\cmap.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\cmap.h +SOURCE=..\..\src\libs\graphics\cmap.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\context.c +SOURCE=..\..\src\libs\graphics\context.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\context.h +SOURCE=..\..\src\libs\graphics\context.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\display.h +SOURCE=..\..\src\libs\graphics\display.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\drawable.c +SOURCE=..\..\src\libs\graphics\drawable.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\drawable.h +SOURCE=..\..\src\libs\graphics\drawable.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\drawcmd.h +SOURCE=..\..\src\libs\graphics\drawcmd.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\filegfx.c +SOURCE=..\..\src\libs\graphics\filegfx.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\font.c +SOURCE=..\..\src\libs\graphics\font.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\font.h +SOURCE=..\..\src\libs\graphics\font.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\frame.c +SOURCE=..\..\src\libs\graphics\frame.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\gfx_common.c +SOURCE=..\..\src\libs\graphics\gfx_common.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\gfx_common.h +SOURCE=..\..\src\libs\graphics\gfx_common.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\gfxintrn.h +SOURCE=..\..\src\libs\graphics\gfxintrn.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\gfxother.h +SOURCE=..\..\src\libs\graphics\gfxother.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\intersec.c +SOURCE=..\..\src\libs\graphics\intersec.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\loaddisp.c +SOURCE=..\..\src\libs\graphics\loaddisp.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\pixmap.c +SOURCE=..\..\src\libs\graphics\pixmap.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\prim.h +SOURCE=..\..\src\libs\graphics\prim.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\resgfx.c +SOURCE=..\..\src\libs\graphics\resgfx.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\tfb_draw.c +SOURCE=..\..\src\libs\graphics\tfb_draw.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\tfb_draw.h +SOURCE=..\..\src\libs\graphics\tfb_draw.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\tfb_prim.c +SOURCE=..\..\src\libs\graphics\tfb_prim.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\tfb_prim.h +SOURCE=..\..\src\libs\graphics\tfb_prim.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\widgets.c +SOURCE=..\..\src\libs\graphics\widgets.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\graphics\widgets.h +SOURCE=..\..\src\libs\graphics\widgets.h # End Source File # End Group # Begin Group "heap" @@ -536,11 +533,11 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\heap\heap.c +SOURCE=..\..\src\libs\heap\heap.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\heap\heap.h +SOURCE=..\..\src\libs\heap\heap.h # End Source File # End Group # Begin Group "input" @@ -551,44 +548,44 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\input\sdl\input.c +SOURCE=..\..\src\libs\input\sdl\input.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\input\sdl\input.h +SOURCE=..\..\src\libs\input\sdl\input.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\input\sdl\keynames.c +SOURCE=..\..\src\libs\input\sdl\keynames.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\input\sdl\keynames.h +SOURCE=..\..\src\libs\input\sdl\keynames.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\input\sdl\vcontrol.c +SOURCE=..\..\src\libs\input\sdl\vcontrol.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\input\sdl\vcontrol.h +SOURCE=..\..\src\libs\input\sdl\vcontrol.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\input\sdl\vcontrol_malloc.h +SOURCE=..\..\src\libs\input\sdl\vcontrol_malloc.h # End Source File # End Group # Begin Source File -SOURCE=..\sc2code\libs\input\inpintrn.h +SOURCE=..\..\src\libs\input\inpintrn.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\input\input_common.c +SOURCE=..\..\src\libs\input\input_common.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\input\input_common.h +SOURCE=..\..\src\libs\input\input_common.h # End Source File # End Group # Begin Group "list" @@ -596,11 +593,11 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\list\list.c +SOURCE=..\..\src\libs\list\list.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\list\list.h +SOURCE=..\..\src\libs\list\list.h # End Source File # End Group # Begin Group "log" @@ -608,11 +605,11 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\log\uqmlog.c +SOURCE=..\..\src\libs\log\uqmlog.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\log\uqmlog.h +SOURCE=..\..\src\libs\log\uqmlog.h # End Source File # End Group # Begin Group "math" @@ -620,23 +617,23 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\math\mthintrn.h +SOURCE=..\..\src\libs\math\mthintrn.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\math\random.c +SOURCE=..\..\src\libs\math\random.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\math\random.h +SOURCE=..\..\src\libs\math\random.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\math\random2.c +SOURCE=..\..\src\libs\math\random2.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\math\sqrt.c +SOURCE=..\..\src\libs\math\sqrt.c # End Source File # End Group # Begin Group "md5" @@ -644,11 +641,11 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\md5\md5.c +SOURCE=..\..\src\libs\md5\md5.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\md5\md5.h +SOURCE=..\..\src\libs\md5\md5.h # End Source File # End Group # Begin Group "memory" @@ -656,7 +653,7 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\memory\w_memlib.c +SOURCE=..\..\src\libs\memory\w_memlib.c # End Source File # End Group # Begin Group "resource" @@ -664,47 +661,47 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\resource\direct.c +SOURCE=..\..\src\libs\resource\direct.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\resource\filecntl.c +SOURCE=..\..\src\libs\resource\filecntl.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\resource\getres.c +SOURCE=..\..\src\libs\resource\getres.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\resource\index.h +SOURCE=..\..\src\libs\resource\index.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\resource\loadres.c +SOURCE=..\..\src\libs\resource\loadres.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\resource\propfile.c +SOURCE=..\..\src\libs\resource\propfile.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\resource\propfile.h +SOURCE=..\..\src\libs\resource\propfile.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\resource\resinit.c +SOURCE=..\..\src\libs\resource\resinit.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\resource\resintrn.h +SOURCE=..\..\src\libs\resource\resintrn.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\resource\stringbank.c +SOURCE=..\..\src\libs\resource\stringbank.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\resource\stringbank.h +SOURCE=..\..\src\libs\resource\stringbank.h # End Source File # End Group # Begin Group "sound" @@ -715,11 +712,11 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\sound\openal\audiodrv_openal.c +SOURCE=..\..\src\libs\sound\openal\audiodrv_openal.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\openal\audiodrv_openal.h +SOURCE=..\..\src\libs\sound\openal\audiodrv_openal.h # End Source File # End Group # Begin Group "decoders" @@ -727,51 +724,51 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\sound\decoders\aiffaud.c +SOURCE=..\..\src\libs\sound\decoders\aiffaud.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\decoders\aiffaud.h +SOURCE=..\..\src\libs\sound\decoders\aiffaud.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\decoders\decoder.c +SOURCE=..\..\src\libs\sound\decoders\decoder.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\decoders\decoder.h +SOURCE=..\..\src\libs\sound\decoders\decoder.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\decoders\dukaud.c +SOURCE=..\..\src\libs\sound\decoders\dukaud.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\decoders\dukaud.h +SOURCE=..\..\src\libs\sound\decoders\dukaud.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\decoders\modaud.c +SOURCE=..\..\src\libs\sound\decoders\modaud.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\decoders\modaud.h +SOURCE=..\..\src\libs\sound\decoders\modaud.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\decoders\oggaud.c +SOURCE=..\..\src\libs\sound\decoders\oggaud.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\decoders\oggaud.h +SOURCE=..\..\src\libs\sound\decoders\oggaud.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\decoders\wav.c +SOURCE=..\..\src\libs\sound\decoders\wav.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\decoders\wav.h +SOURCE=..\..\src\libs\sound\decoders\wav.h # End Source File # End Group # Begin Group "mixer" @@ -782,11 +779,11 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\sound\mixer\sdl\audiodrv_sdl.c +SOURCE=..\..\src\libs\sound\mixer\sdl\audiodrv_sdl.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\mixer\sdl\audiodrv_sdl.h +SOURCE=..\..\src\libs\sound\mixer\sdl\audiodrv_sdl.h # End Source File # End Group # Begin Group "nosound" @@ -794,81 +791,81 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\sound\mixer\nosound\audiodrv_nosound.c +SOURCE=..\..\src\libs\sound\mixer\nosound\audiodrv_nosound.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\mixer\nosound\audiodrv_nosound.h +SOURCE=..\..\src\libs\sound\mixer\nosound\audiodrv_nosound.h # End Source File # End Group # Begin Source File -SOURCE=..\sc2code\libs\sound\mixer\mixer.c +SOURCE=..\..\src\libs\sound\mixer\mixer.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\mixer\mixer.h +SOURCE=..\..\src\libs\sound\mixer\mixer.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\mixer\mixerint.h +SOURCE=..\..\src\libs\sound\mixer\mixerint.h # End Source File # End Group # Begin Source File -SOURCE=..\sc2code\libs\sound\audiocore.c +SOURCE=..\..\src\libs\sound\audiocore.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\audiocore.h +SOURCE=..\..\src\libs\sound\audiocore.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\fileinst.c +SOURCE=..\..\src\libs\sound\fileinst.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\music.c +SOURCE=..\..\src\libs\sound\music.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\resinst.c +SOURCE=..\..\src\libs\sound\resinst.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\sfx.c +SOURCE=..\..\src\libs\sound\sfx.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\sndintrn.h +SOURCE=..\..\src\libs\sound\sndintrn.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\sound.c +SOURCE=..\..\src\libs\sound\sound.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\sound.h +SOURCE=..\..\src\libs\sound\sound.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\stream.c +SOURCE=..\..\src\libs\sound\stream.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\stream.h +SOURCE=..\..\src\libs\sound\stream.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\trackint.h +SOURCE=..\..\src\libs\sound\trackint.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\trackplayer.c +SOURCE=..\..\src\libs\sound\trackplayer.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sound\trackplayer.h +SOURCE=..\..\src\libs\sound\trackplayer.h # End Source File # End Group # Begin Group "strings" @@ -876,27 +873,27 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\strings\getstr.c +SOURCE=..\..\src\libs\strings\getstr.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\strings\sfileins.c +SOURCE=..\..\src\libs\strings\sfileins.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\strings\sresins.c +SOURCE=..\..\src\libs\strings\sresins.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\strings\strings.c +SOURCE=..\..\src\libs\strings\strings.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\strings\strintrn.h +SOURCE=..\..\src\libs\strings\strintrn.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\strings\unicode.c +SOURCE=..\..\src\libs\strings\unicode.c # End Source File # End Group # Begin Group "video" @@ -904,51 +901,51 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\video\dukvid.c +SOURCE=..\..\src\libs\video\dukvid.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\video\dukvid.h +SOURCE=..\..\src\libs\video\dukvid.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\video\legacyplayer.c +SOURCE=..\..\src\libs\video\legacyplayer.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\video\vfileins.c +SOURCE=..\..\src\libs\video\vfileins.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\video\video.c +SOURCE=..\..\src\libs\video\video.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\video\video.h +SOURCE=..\..\src\libs\video\video.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\video\videodec.c +SOURCE=..\..\src\libs\video\videodec.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\video\videodec.h +SOURCE=..\..\src\libs\video\videodec.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\video\vidintrn.h +SOURCE=..\..\src\libs\video\vidintrn.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\video\vidplayer.c +SOURCE=..\..\src\libs\video\vidplayer.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\video\vidplayer.h +SOURCE=..\..\src\libs\video\vidplayer.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\video\vresins.c +SOURCE=..\..\src\libs\video\vresins.c # End Source File # End Group # Begin Group "threads" @@ -959,20 +956,20 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\threads\sdl\sdlthreads.c +SOURCE=..\..\src\libs\threads\sdl\sdlthreads.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\threads\sdl\sdlthreads.h +SOURCE=..\..\src\libs\threads\sdl\sdlthreads.h # End Source File # End Group # Begin Source File -SOURCE=..\sc2code\libs\threads\thrcommon.c +SOURCE=..\..\src\libs\threads\thrcommon.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\threads\thrcommon.h +SOURCE=..\..\src\libs\threads\thrcommon.h # End Source File # End Group # Begin Group "time" @@ -983,20 +980,20 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\time\sdl\sdltime.c +SOURCE=..\..\src\libs\time\sdl\sdltime.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\time\sdl\sdltime.h +SOURCE=..\..\src\libs\time\sdl\sdltime.h # End Source File # End Group # Begin Source File -SOURCE=..\sc2code\libs\time\timecommon.c +SOURCE=..\..\src\libs\time\timecommon.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\time\timecommon.h +SOURCE=..\..\src\libs\time\timecommon.h # End Source File # End Group # Begin Group "task" @@ -1004,7 +1001,7 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\task\tasklib.c +SOURCE=..\..\src\libs\task\tasklib.c # End Source File # End Group # Begin Group "uio" @@ -1015,11 +1012,11 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\uio\stdio\stdio.c +SOURCE=..\..\src\libs\uio\stdio\stdio.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\stdio\stdio.h +SOURCE=..\..\src\libs\uio\stdio\stdio.h # End Source File # End Group # Begin Group "zip" @@ -1027,24 +1024,24 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\uio\zip\zip.c +SOURCE=..\..\src\libs\uio\zip\zip.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\zip\zip.h +SOURCE=..\..\src\libs\uio\zip\zip.h # End Source File # End Group # Begin Source File -SOURCE=..\sc2code\libs\uio\charhashtable.c +SOURCE=..\..\src\libs\uio\charhashtable.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\charhashtable.h +SOURCE=..\..\src\libs\uio\charhashtable.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\debug.c +SOURCE=..\..\src\libs\uio\debug.c !IF "$(CFG)" == "UrQuanMasters - Win32 Release" @@ -1064,47 +1061,47 @@ # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\debug.h +SOURCE=..\..\src\libs\uio\debug.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\defaultfs.c +SOURCE=..\..\src\libs\uio\defaultfs.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\defaultfs.h +SOURCE=..\..\src\libs\uio\defaultfs.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\fileblock.c +SOURCE=..\..\src\libs\uio\fileblock.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\fileblock.h +SOURCE=..\..\src\libs\uio\fileblock.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\fstypes.c +SOURCE=..\..\src\libs\uio\fstypes.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\fstypes.h +SOURCE=..\..\src\libs\uio\fstypes.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\getint.h +SOURCE=..\..\src\libs\uio\getint.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\gphys.c +SOURCE=..\..\src\libs\uio\gphys.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\gphys.h +SOURCE=..\..\src\libs\uio\gphys.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\hashtable.c +SOURCE=..\..\src\libs\uio\hashtable.c !IF "$(CFG)" == "UrQuanMasters - Win32 Release" @@ -1129,43 +1126,43 @@ # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\hashtable.h +SOURCE=..\..\src\libs\uio\hashtable.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\io.c +SOURCE=..\..\src\libs\uio\io.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\io.h +SOURCE=..\..\src\libs\uio\io.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\ioaux.c +SOURCE=..\..\src\libs\uio\ioaux.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\ioaux.h +SOURCE=..\..\src\libs\uio\ioaux.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\iointrn.h +SOURCE=..\..\src\libs\uio\iointrn.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\match.c +SOURCE=..\..\src\libs\uio\match.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\match.h +SOURCE=..\..\src\libs\uio\match.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\mem.h +SOURCE=..\..\src\libs\uio\mem.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\memdebug.c +SOURCE=..\..\src\libs\uio\memdebug.c !IF "$(CFG)" == "UrQuanMasters - Win32 Release" @@ -1190,71 +1187,71 @@ # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\memdebug.h +SOURCE=..\..\src\libs\uio\memdebug.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\mount.c +SOURCE=..\..\src\libs\uio\mount.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\mount.h +SOURCE=..\..\src\libs\uio\mount.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\mounttree.c +SOURCE=..\..\src\libs\uio\mounttree.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\mounttree.h +SOURCE=..\..\src\libs\uio\mounttree.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\paths.c +SOURCE=..\..\src\libs\uio\paths.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\paths.h +SOURCE=..\..\src\libs\uio\paths.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\physical.c +SOURCE=..\..\src\libs\uio\physical.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\physical.h +SOURCE=..\..\src\libs\uio\physical.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\types.h +SOURCE=..\..\src\libs\uio\types.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\uioport.h +SOURCE=..\..\src\libs\uio\uioport.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\uiostream.c +SOURCE=..\..\src\libs\uio\uiostream.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\uiostream.h +SOURCE=..\..\src\libs\uio\uiostream.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\uioutils.c +SOURCE=..\..\src\libs\uio\uioutils.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\uioutils.h +SOURCE=..\..\src\libs\uio\uioutils.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\utils.c +SOURCE=..\..\src\libs\uio\utils.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio\utils.h +SOURCE=..\..\src\libs\uio\utils.h # End Source File # End Group # Begin Group "mikmod" @@ -1262,103 +1259,103 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\mikmod\drv_nos.c +SOURCE=..\..\src\libs\mikmod\drv_nos.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\load_it.c +SOURCE=..\..\src\libs\mikmod\load_it.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\load_mod.c +SOURCE=..\..\src\libs\mikmod\load_mod.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\load_s3m.c +SOURCE=..\..\src\libs\mikmod\load_s3m.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\load_stm.c +SOURCE=..\..\src\libs\mikmod\load_stm.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\load_xm.c +SOURCE=..\..\src\libs\mikmod\load_xm.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\mdreg.c +SOURCE=..\..\src\libs\mikmod\mdreg.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\mdriver.c +SOURCE=..\..\src\libs\mikmod\mdriver.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\mikmod.h +SOURCE=..\..\src\libs\mikmod\mikmod.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\mikmod_build.h +SOURCE=..\..\src\libs\mikmod\mikmod_build.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\mikmod_internals.h +SOURCE=..\..\src\libs\mikmod\mikmod_internals.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\mloader.c +SOURCE=..\..\src\libs\mikmod\mloader.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\mlreg.c +SOURCE=..\..\src\libs\mikmod\mlreg.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\mlutil.c +SOURCE=..\..\src\libs\mikmod\mlutil.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\mmalloc.c +SOURCE=..\..\src\libs\mikmod\mmalloc.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\mmerror.c +SOURCE=..\..\src\libs\mikmod\mmerror.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\mmio.c +SOURCE=..\..\src\libs\mikmod\mmio.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\mplayer.c +SOURCE=..\..\src\libs\mikmod\mplayer.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\munitrk.c +SOURCE=..\..\src\libs\mikmod\munitrk.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\mwav.c +SOURCE=..\..\src\libs\mikmod\mwav.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\npertab.c +SOURCE=..\..\src\libs\mikmod\npertab.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\sloader.c +SOURCE=..\..\src\libs\mikmod\sloader.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\virtch.c +SOURCE=..\..\src\libs\mikmod\virtch.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\virtch2.c +SOURCE=..\..\src\libs\mikmod\virtch2.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mikmod\virtch_common.c +SOURCE=..\..\src\libs\mikmod\virtch_common.c # End Source File # End Group # Begin Group "network" @@ -1369,27 +1366,27 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\network\connect\connect.c +SOURCE=..\..\src\libs\network\connect\connect.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\connect\connect.h +SOURCE=..\..\src\libs\network\connect\connect.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\connect\listen.c +SOURCE=..\..\src\libs\network\connect\listen.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\connect\listen.h +SOURCE=..\..\src\libs\network\connect\listen.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\connect\resolve.c +SOURCE=..\..\src\libs\network\connect\resolve.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\connect\resolve.h +SOURCE=..\..\src\libs\network\connect\resolve.h # End Source File # End Group # Begin Group "netmanager" @@ -1397,31 +1394,31 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\network\netmanager\ndesc.c +SOURCE=..\..\src\libs\network\netmanager\ndesc.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\netmanager\ndesc.h +SOURCE=..\..\src\libs\network\netmanager\ndesc.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\netmanager\ndindex.ci +SOURCE=..\..\src\libs\network\netmanager\ndindex.ci # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\netmanager\netmanager.h +SOURCE=..\..\src\libs\network\netmanager\netmanager.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\netmanager\netmanager_common.ci +SOURCE=..\..\src\libs\network\netmanager\netmanager_common.ci # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\netmanager\netmanager_win.c +SOURCE=..\..\src\libs\network\netmanager\netmanager_win.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\netmanager\netmanager_win.h +SOURCE=..\..\src\libs\network\netmanager\netmanager_win.h # End Source File # End Group # Begin Group "socket" @@ -1429,143 +1426,146 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\libs\network\socket\socket.c +SOURCE=..\..\src\libs\network\socket\socket.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\socket\socket.h +SOURCE=..\..\src\libs\network\socket\socket.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\socket\socket_win.c +SOURCE=..\..\src\libs\network\socket\socket_win.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\socket\socket_win.h +SOURCE=..\..\src\libs\network\socket\socket_win.h # End Source File # End Group # Begin Source File -SOURCE=..\sc2code\libs\network\bytesex.h +SOURCE=..\..\src\libs\network\bytesex.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\netport.c +SOURCE=..\..\src\libs\network\netport.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\netport.h +SOURCE=..\..\src\libs\network\netport.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\network.h +SOURCE=..\..\src\libs\network\network.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\network_win.c +SOURCE=..\..\src\libs\network\network_win.c # End Source File # Begin Source File -SOURCE=..\sc2code\libs\network\wspiapiwrap.h +SOURCE=..\..\src\libs\network\wspiapiwrap.h # End Source File # End Group # Begin Source File -SOURCE=..\sc2code\libs\alarm.h +SOURCE=..\..\src\libs\alarm.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\callback.h +SOURCE=..\..\src\libs\callback.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\compiler.h +SOURCE=..\..\src\libs\compiler.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\declib.h +SOURCE=..\..\src\libs\declib.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\file.h +SOURCE=..\..\src\libs\file.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\gfxlib.h +SOURCE=..\..\src\libs\gfxlib.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\heap.h +SOURCE=..\..\src\libs\heap.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\inplib.h +SOURCE=..\..\src\libs\inplib.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\list.h +SOURCE=..\..\src\libs\list.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\log.h +SOURCE=..\..\src\libs\log.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\mathlib.h +SOURCE=..\..\src\libs\mathlib.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\md5.h +SOURCE=..\..\src\libs\md5.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\memlib.h +SOURCE=..\..\src\libs\memlib.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\misc.h +SOURCE=..\..\src\libs\misc.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\net.h +SOURCE=..\..\src\libs\net.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\platform.h +SOURCE=..\..\src\libs\platform.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\reslib.h +SOURCE=..\..\src\libs\reslib.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\sndlib.h +SOURCE=..\..\src\libs\sndlib.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\strlib.h +SOURCE=..\..\src\libs\strlib.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\tasklib.h +SOURCE=..\..\src\libs\tasklib.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\threadlib.h +SOURCE=..\..\src\libs\threadlib.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\timelib.h +SOURCE=..\..\src\libs\timelib.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\uio.h +SOURCE=..\..\src\libs\uio.h # End Source File # Begin Source File -SOURCE=..\sc2code\libs\vidlib.h +SOURCE=..\..\src\libs\vidlib.h # End Source File # End Group +# Begin Group "uqm" + +# PROP Default_Filter "" # Begin Group "comm" # PROP Default_Filter "" @@ -1574,35 +1574,35 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\comm\arilou\arilouc.c +SOURCE=..\..\src\uqm\comm\arilou\arilouc.c # End Source File # Begin Source File -SOURCE=..\sc2code\comm\arilou\igfxres.h +SOURCE=..\..\src\uqm\comm\arilou\igfxres.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\arilou\imusicre.h +SOURCE=..\..\src\uqm\comm\arilou\imusicre.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\arilou\istrtab.h +SOURCE=..\..\src\uqm\comm\arilou\istrtab.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\arilou\resinst.h +SOURCE=..\..\src\uqm\comm\arilou\resinst.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\arilou\respkg.h +SOURCE=..\..\src\uqm\comm\arilou\respkg.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\arilou\restypes.h +SOURCE=..\..\src\uqm\comm\arilou\restypes.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\arilou\strings.h +SOURCE=..\..\src\uqm\comm\arilou\strings.h # End Source File # End Group # Begin Group "blackur.comm" @@ -1610,35 +1610,35 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\comm\blackur\blackurc.c +SOURCE=..\..\src\uqm\comm\blackur\blackurc.c # End Source File # Begin Source File -SOURCE=..\sc2code\comm\blackur\igfxres.h +SOURCE=..\..\src\uqm\comm\blackur\igfxres.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\blackur\imusicre.h +SOURCE=..\..\src\uqm\comm\blackur\imusicre.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\blackur\istrtab.h +SOURCE=..\..\src\uqm\comm\blackur\istrtab.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\blackur\resinst.h +SOURCE=..\..\src\uqm\comm\blackur\resinst.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\blackur\respkg.h +SOURCE=..\..\src\uqm\comm\blackur\respkg.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\blackur\restypes.h +SOURCE=..\..\src\uqm\comm\blackur\restypes.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\blackur\strings.h +SOURCE=..\..\src\uqm\comm\blackur\strings.h # End Source File # End Group # Begin Group "chmmr.comm" @@ -1646,35 +1646,35 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\comm\chmmr\chmmrc.c +SOURCE=..\..\src\uqm\comm\chmmr\chmmrc.c # End Source File # Begin Source File -SOURCE=..\sc2code\comm\chmmr\igfxres.h +SOURCE=..\..\src\uqm\comm\chmmr\igfxres.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\chmmr\imusicre.h +SOURCE=..\..\src\uqm\comm\chmmr\imusicre.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\chmmr\istrtab.h +SOURCE=..\..\src\uqm\comm\chmmr\istrtab.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\chmmr\resinst.h +SOURCE=..\..\src\uqm\comm\chmmr\resinst.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\chmmr\respkg.h +SOURCE=..\..\src\uqm\comm\chmmr\respkg.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\chmmr\restypes.h +SOURCE=..\..\src\uqm\comm\chmmr\restypes.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\chmmr\strings.h +SOURCE=..\..\src\uqm\comm\chmmr\strings.h # End Source File # End Group # Begin Group "comandr.comm" @@ -1682,35 +1682,35 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\comm\comandr\comandr.c +SOURCE=..\..\src\uqm\comm\comandr\comandr.c # End Source File # Begin Source File -SOURCE=..\sc2code\comm\comandr\igfxres.h +SOURCE=..\..\src\uqm\comm\comandr\igfxres.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\comandr\imusicre.h +SOURCE=..\..\src\uqm\comm\comandr\imusicre.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\comandr\istrtab.h +SOURCE=..\..\src\uqm\comm\comandr\istrtab.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\comandr\resinst.h +SOURCE=..\..\src\uqm\comm\comandr\resinst.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\comandr\respkg.h +SOURCE=..\..\src\uqm\comm\comandr\respkg.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\comandr\restypes.h +SOURCE=..\..\src\uqm\comm\comandr\restypes.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\comandr\strings.h +SOURCE=..\..\src\uqm\comm\comandr\strings.h # End Source File # End Group # Begin Group "druuge.comm" @@ -1718,35 +1718,35 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\comm\druuge\druugec.c +SOURCE=..\..\src\uqm\comm\druuge\druugec.c # End Source File # Begin Source File -SOURCE=..\sc2code\comm\druuge\igfxres.h +SOURCE=..\..\src\uqm\comm\druuge\igfxres.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\druuge\imusicre.h +SOURCE=..\..\src\uqm\comm\druuge\imusicre.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\druuge\istrtab.h +SOURCE=..\..\src\uqm\comm\druuge\istrtab.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\druuge\resinst.h +SOURCE=..\..\src\uqm\comm\druuge\resinst.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\druuge\respkg.h +SOURCE=..\..\src\uqm\comm\druuge\respkg.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\druuge\restypes.h +SOURCE=..\..\src\uqm\comm\druuge\restypes.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\druuge\strings.h +SOURCE=..\..\src\uqm\comm\druuge\strings.h # End Source File # End Group # Begin Group "ilwrath.comm" @@ -1754,35 +1754,35 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\comm\ilwrath\igfxres.h +SOURCE=..\..\src\uqm\comm\ilwrath\igfxres.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\ilwrath\ilwrathc.c +SOURCE=..\..\src\uqm\comm\ilwrath\ilwrathc.c # End Source File # Begin Source File -SOURCE=..\sc2code\comm\ilwrath\imusicre.h +SOURCE=..\..\src\uqm\comm\ilwrath\imusicre.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\ilwrath\istrtab.h +SOURCE=..\..\src\uqm\comm\ilwrath\istrtab.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\ilwrath\resinst.h +SOURCE=..\..\src\uqm\comm\ilwrath\resinst.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\ilwrath\respkg.h +SOURCE=..\..\src\uqm\comm\ilwrath\respkg.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\ilwrath\restypes.h +SOURCE=..\..\src\uqm\comm\ilwrath\restypes.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\ilwrath\strings.h +SOURCE=..\..\src\uqm\comm\ilwrath\strings.h # End Source File # End Group # Begin Group "melnorm.comm" @@ -1790,35 +1790,35 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\comm\melnorm\igfxres.h +SOURCE=..\..\src\uqm\comm\melnorm\igfxres.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\melnorm\imusicre.h +SOURCE=..\..\src\uqm\comm\melnorm\imusicre.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\melnorm\istrtab.h +SOURCE=..\..\src\uqm\comm\melnorm\istrtab.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\melnorm\melnorm.c +SOURCE=..\..\src\uqm\comm\melnorm\melnorm.c # End Source File # Begin Source File -SOURCE=..\sc2code\comm\melnorm\resinst.h +SOURCE=..\..\src\uqm\comm\melnorm\resinst.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\melnorm\respkg.h +SOURCE=..\..\src\uqm\comm\melnorm\respkg.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\melnorm\restypes.h +SOURCE=..\..\src\uqm\comm\melnorm\restypes.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\melnorm\strings.h +SOURCE=..\..\src\uqm\comm\melnorm\strings.h # End Source File # End Group # Begin Group "mycon.comm" @@ -1826,35 +1826,35 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\comm\mycon\igfxres.h +SOURCE=..\..\src\uqm\comm\mycon\igfxres.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\mycon\imusicre.h +SOURCE=..\..\src\uqm\comm\mycon\imusicre.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\mycon\istrtab.h +SOURCE=..\..\src\uqm\comm\mycon\istrtab.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\mycon\myconc.c +SOURCE=..\..\src\uqm\comm\mycon\myconc.c # End Source File # Begin Source File -SOURCE=..\sc2code\comm\mycon\resinst.h +SOURCE=..\..\src\uqm\comm\mycon\resinst.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\mycon\respkg.h +SOURCE=..\..\src\uqm\comm\mycon\respkg.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\mycon\restypes.h +SOURCE=..\..\src\uqm\comm\mycon\restypes.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\mycon\strings.h +SOURCE=..\..\src\uqm\comm\mycon\strings.h # End Source File # End Group # Begin Group "orz.comm" @@ -1862,35 +1862,35 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\comm\orz\igfxres.h +SOURCE=..\..\src\uqm\comm\orz\igfxres.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\orz\imusicre.h +SOURCE=..\..\src\uqm\comm\orz\imusicre.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\orz\istrtab.h +SOURCE=..\..\src\uqm\comm\orz\istrtab.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\orz\orzc.c +SOURCE=..\..\src\uqm\comm\orz\orzc.c # End Source File # Begin Source File -SOURCE=..\sc2code\comm\orz\resinst.h +SOURCE=..\..\src\uqm\comm\orz\resinst.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\orz\respkg.h +SOURCE=..\..\src\uqm\comm\orz\respkg.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\orz\restypes.h +SOURCE=..\..\src\uqm\comm\orz\restypes.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\orz\strings.h +SOURCE=..\..\src\uqm\comm\orz\strings.h # End Source File # End Group # Begin Group "pkunk.comm" @@ -1898,35 +1898,35 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\comm\pkunk\igfxres.h +SOURCE=..\..\src\uqm\comm\pkunk\igfxres.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\pkunk\imusicre.h +SOURCE=..\..\src\uqm\comm\pkunk\imusicre.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\pkunk\istrtab.h +SOURCE=..\..\src\uqm\comm\pkunk\istrtab.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\pkunk\pkunkc.c +SOURCE=..\..\src\uqm\comm\pkunk\pkunkc.c # End Source File # Begin Source File -SOURCE=..\sc2code\comm\pkunk\resinst.h +SOURCE=..\..\src\uqm\comm\pkunk\resinst.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\pkunk\respkg.h +SOURCE=..\..\src\uqm\comm\pkunk\respkg.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\pkunk\restypes.h +SOURCE=..\..\src\uqm\comm\pkunk\restypes.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\pkunk\strings.h +SOURCE=..\..\src\uqm\comm\pkunk\strings.h # End Source File # End Group # Begin Group "rebel.comm" @@ -1934,11 +1934,11 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\comm\rebel\rebel.c +SOURCE=..\..\src\uqm\comm\rebel\rebel.c # End Source File # Begin Source File -SOURCE=..\sc2code\comm\rebel\strings.h +SOURCE=..\..\src\uqm\comm\rebel\strings.h # End Source File # End Group # Begin Group "shofixt.comm" @@ -1946,35 +1946,35 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\comm\shofixt\igfxres.h +SOURCE=..\..\src\uqm\comm\shofixt\igfxres.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\shofixt\imusicre.h +SOURCE=..\..\src\uqm\comm\shofixt\imusicre.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\shofixt\istrtab.h +SOURCE=..\..\src\uqm\comm\shofixt\istrtab.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\shofixt\resinst.h +SOURCE=..\..\src\uqm\comm\shofixt\resinst.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\shofixt\respkg.h +SOURCE=..\..\src\uqm\comm\shofixt\respkg.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\shofixt\restypes.h +SOURCE=..\..\src\uqm\comm\shofixt\restypes.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\shofixt\shofixt.c +SOURCE=..\..\src\uqm\comm\shofixt\shofixt.c # End Source File # Begin Source File -SOURCE=..\sc2code\comm\shofixt\strings.h +SOURCE=..\..\src\uqm\comm\shofixt\strings.h # End Source File # End Group # Begin Group "slyhome.comm" @@ -1982,35 +1982,35 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\sc2code\comm\slyhome\igfxres.h +SOURCE=..\..\src\uqm\comm\slyhome\igfxres.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\slyhome\imusicre.h +SOURCE=..\..\src\uqm\comm\slyhome\imusicre.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\slyhome\istrtab.h +SOURCE=..\..\src\uqm\comm\slyhome\istrtab.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\slyhome\resinst.h +SOURCE=..\..\src\uqm\comm\slyhome\resinst.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\slyhome\respkg.h +SOURCE=..\..\src\uqm\comm\slyhome\respkg.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\slyhome\restypes.h +SOURCE=..\..\src\uqm\comm\slyhome\restypes.h # End Source File # Begin Source File -SOURCE=..\sc2code\comm\slyhome\slyhome.c +SOURCE=..\..\src\uqm\comm\slyhome\slyhome.c # End Source File # Begin Source File -SOURCE=..\sc2code\comm\slyhome\strings.h +SOURCE=..\..\src\uqm\comm\slyhome\strings.h # End Source File # End Group # Begin Group ... [truncated message content] |
From: <av...@us...> - 2009-10-09 20:38:41
|
Revision: 3215 http://sc2.svn.sourceforge.net/sc2/?rev=3215&view=rev Author: avolkov Date: 2009-10-09 20:38:29 +0000 (Fri, 09 Oct 2009) Log Message: ----------- Source tree reorg: Normalized #include paths after the dir moves Modified Paths: -------------- trunk/sc2/Makeproject trunk/sc2/build/msvc6/UrQuanMasters.dsp trunk/sc2/src/libs/graphics/drawable.c trunk/sc2/src/libs/graphics/sdl/3do_funcs.c trunk/sc2/src/libs/graphics/sdl/sdl_common.c trunk/sc2/src/libs/graphics/tfb_draw.c trunk/sc2/src/libs/graphics/widgets.c trunk/sc2/src/libs/input/sdl/input.c trunk/sc2/src/libs/resource/resinit.c trunk/sc2/src/libs/sound/trackplayer.c trunk/sc2/src/libs/video/video.c trunk/sc2/src/libs/video/vidplayer.c trunk/sc2/src/uqm/comm/arilou/arilouc.c trunk/sc2/src/uqm/comm/blackur/blackurc.c trunk/sc2/src/uqm/comm/chmmr/chmmrc.c trunk/sc2/src/uqm/comm/comandr/comandr.c trunk/sc2/src/uqm/comm/commall.h trunk/sc2/src/uqm/comm/druuge/druugec.c trunk/sc2/src/uqm/comm/ilwrath/ilwrathc.c trunk/sc2/src/uqm/comm/melnorm/melnorm.c trunk/sc2/src/uqm/comm/mycon/myconc.c trunk/sc2/src/uqm/comm/orz/orzc.c trunk/sc2/src/uqm/comm/pkunk/pkunkc.c trunk/sc2/src/uqm/comm/rebel/rebel.c trunk/sc2/src/uqm/comm/shofixt/shofixt.c trunk/sc2/src/uqm/comm/slyhome/slyhome.c trunk/sc2/src/uqm/comm/slyland/slyland.c trunk/sc2/src/uqm/comm/spahome/spahome.c trunk/sc2/src/uqm/comm/spathi/spathic.c trunk/sc2/src/uqm/comm/starbas/starbas.c trunk/sc2/src/uqm/comm/supox/supoxc.c trunk/sc2/src/uqm/comm/syreen/syreenc.c trunk/sc2/src/uqm/comm/talkpet/talkpet.c trunk/sc2/src/uqm/comm/thradd/thraddc.c trunk/sc2/src/uqm/comm/umgah/umgahc.c trunk/sc2/src/uqm/comm/urquan/urquanc.c trunk/sc2/src/uqm/comm/utwig/utwigc.c trunk/sc2/src/uqm/comm/vux/vuxc.c trunk/sc2/src/uqm/comm/yehat/yehatc.c trunk/sc2/src/uqm/comm/zoqfot/zoqfotc.c trunk/sc2/src/uqm/netplay/checksum.c trunk/sc2/src/uqm/netplay/checksum.h trunk/sc2/src/uqm/netplay/netmelee.c trunk/sc2/src/uqm/netplay/netmisc.c trunk/sc2/src/uqm/netplay/netmisc.h trunk/sc2/src/uqm/netplay/notify.h trunk/sc2/src/uqm/netplay/packethandlers.c trunk/sc2/src/uqm/netplay/packetsenders.h trunk/sc2/src/uqm/planets/calc.c trunk/sc2/src/uqm/planets/cargo.c trunk/sc2/src/uqm/planets/devices.c trunk/sc2/src/uqm/planets/genall.h trunk/sc2/src/uqm/planets/genburv.c trunk/sc2/src/uqm/planets/genchmmr.c trunk/sc2/src/uqm/planets/gencol.c trunk/sc2/src/uqm/planets/gendru.c trunk/sc2/src/uqm/planets/genilw.c trunk/sc2/src/uqm/planets/genmel.c trunk/sc2/src/uqm/planets/genmyc.c trunk/sc2/src/uqm/planets/genorz.c trunk/sc2/src/uqm/planets/genpet.c trunk/sc2/src/uqm/planets/genpku.c trunk/sc2/src/uqm/planets/genrain.c trunk/sc2/src/uqm/planets/gensam.c trunk/sc2/src/uqm/planets/genshof.c trunk/sc2/src/uqm/planets/gensly.c trunk/sc2/src/uqm/planets/gensol.c trunk/sc2/src/uqm/planets/genspa.c trunk/sc2/src/uqm/planets/gensup.c trunk/sc2/src/uqm/planets/gensyr.c trunk/sc2/src/uqm/planets/genthrad.c trunk/sc2/src/uqm/planets/genutw.c trunk/sc2/src/uqm/planets/genvault.c trunk/sc2/src/uqm/planets/genvux.c trunk/sc2/src/uqm/planets/genwreck.c trunk/sc2/src/uqm/planets/genyeh.c trunk/sc2/src/uqm/planets/genzoq.c trunk/sc2/src/uqm/planets/lander.c trunk/sc2/src/uqm/planets/lander.h trunk/sc2/src/uqm/planets/orbits.c trunk/sc2/src/uqm/planets/oval.c trunk/sc2/src/uqm/planets/pl_stuff.c trunk/sc2/src/uqm/planets/planets.c trunk/sc2/src/uqm/planets/planets.h trunk/sc2/src/uqm/planets/plangen.c trunk/sc2/src/uqm/planets/pstarmap.c trunk/sc2/src/uqm/planets/report.c trunk/sc2/src/uqm/planets/roster.c trunk/sc2/src/uqm/planets/scan.c trunk/sc2/src/uqm/planets/solarsys.c trunk/sc2/src/uqm/planets/sundata.h trunk/sc2/src/uqm/ships/androsyn/androsyn.c trunk/sc2/src/uqm/ships/arilou/arilou.c trunk/sc2/src/uqm/ships/blackurq/blackurq.c trunk/sc2/src/uqm/ships/chenjesu/chenjesu.c trunk/sc2/src/uqm/ships/chmmr/chmmr.c trunk/sc2/src/uqm/ships/druuge/druuge.c trunk/sc2/src/uqm/ships/human/human.c trunk/sc2/src/uqm/ships/ilwrath/ilwrath.c trunk/sc2/src/uqm/ships/lastbat/lastbat.c trunk/sc2/src/uqm/ships/melnorme/melnorme.c trunk/sc2/src/uqm/ships/mmrnmhrm/mmrnmhrm.c trunk/sc2/src/uqm/ships/mycon/mycon.c trunk/sc2/src/uqm/ships/orz/orz.c trunk/sc2/src/uqm/ships/pkunk/pkunk.c trunk/sc2/src/uqm/ships/probe/probe.c trunk/sc2/src/uqm/ships/ship.h trunk/sc2/src/uqm/ships/shofixti/shofixti.c trunk/sc2/src/uqm/ships/sis_ship/sis_ship.c trunk/sc2/src/uqm/ships/slylandr/slylandr.c trunk/sc2/src/uqm/ships/spathi/spathi.c trunk/sc2/src/uqm/ships/supox/supox.c trunk/sc2/src/uqm/ships/syreen/syreen.c trunk/sc2/src/uqm/ships/thradd/thradd.c trunk/sc2/src/uqm/ships/umgah/umgah.c trunk/sc2/src/uqm/ships/urquan/urquan.c trunk/sc2/src/uqm/ships/utwig/utwig.c trunk/sc2/src/uqm/ships/vux/vux.c trunk/sc2/src/uqm/ships/yehat/yehat.c trunk/sc2/src/uqm/ships/zoqfot/zoqfot.c trunk/sc2/src/uqm.c Modified: trunk/sc2/Makeproject =================================================================== --- trunk/sc2/Makeproject 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/Makeproject 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,7 +16,7 @@ uqm_NAME="$uqm_NAME.exe" ;; esac -uqm_CFLAGS="$uqm_CFLAGS -Isrc -Isrc/uqm" +uqm_CFLAGS="$uqm_CFLAGS -Isrc" if [ "$uqm_HAVE_REGEX" = 0 ]; then uqm_CFLAGS="$uqm_CFLAGS -Isrc/regex" fi Modified: trunk/sc2/build/msvc6/UrQuanMasters.dsp =================================================================== --- trunk/sc2/build/msvc6/UrQuanMasters.dsp 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/build/msvc6/UrQuanMasters.dsp 2009-10-09 20:38:29 UTC (rev 3215) @@ -44,7 +44,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "..\..\src" /I "..\..\src\uqm" /I "..\..\src\regex" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "HAVE_JOYSTICK" /D "NETPLAY" /D "ZLIB_DLL" /D "USE_INTERNAL_MIKMOD" /D "USE_PLATFORM_ACCEL" /FD /c +# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "..\..\src" /I "..\..\src\regex" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "HAVE_JOYSTICK" /D "NETPLAY" /D "ZLIB_DLL" /D "USE_INTERNAL_MIKMOD" /D "USE_PLATFORM_ACCEL" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" @@ -74,7 +74,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "..\..\src" /I "..\..\src\uqm" /I "..\..\src\regex" /D "DEBUG" /D "_DEBUG" /D "DEBUG_TRACK_SEM" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "HAVE_JOYSTICK" /D "NETPLAY" /D "ZLIB_DLL" /D "USE_INTERNAL_MIKMOD" /D "USE_PLATFORM_ACCEL" /FR /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "..\..\src" /I "..\..\src\regex" /D "DEBUG" /D "_DEBUG" /D "DEBUG_TRACK_SEM" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "HAVE_JOYSTICK" /D "NETPLAY" /D "ZLIB_DLL" /D "USE_INTERNAL_MIKMOD" /D "USE_PLATFORM_ACCEL" /FR /FD /GZ /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" @@ -100,9 +100,9 @@ # PROP Intermediate_Dir "Debug_NoAccel" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE CPP /nologo /W3 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "..\..\src" /I "..\..\src\uqm" /I "..\..\src\regex" /D "DEBUG" /D "_DEBUG" /D "DEBUG_TRACK_SEM" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "HAVE_JOYSTICK" /D "NETPLAY" /D "ZLIB_DLL" /D "USE_INTERNAL_MIKMOD" /FR /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "..\..\src" /I "..\..\src\regex" /D "DEBUG" /D "_DEBUG" /D "DEBUG_TRACK_SEM" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "HAVE_JOYSTICK" /D "NETPLAY" /D "ZLIB_DLL" /D "USE_INTERNAL_MIKMOD" /FR /FD /GZ /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" @@ -128,9 +128,9 @@ # PROP Intermediate_Dir "Release_NoAccel" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "..\..\src" /I "..\..\src\uqm" /I "..\..\src\regex" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "HAVE_JOYSTICK" /D "NETPLAY" /D "ZLIB_DLL" /D "USE_INTERNAL_MIKMOD" /FR /FD /c +# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "..\..\src" /I "..\..\src\regex" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "HAVE_JOYSTICK" /D "NETPLAY" /D "ZLIB_DLL" /D "USE_INTERNAL_MIKMOD" /FR /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" @@ -4425,11 +4425,11 @@ # End Source File # Begin Source File -SOURCE=..\..\src\uqm.c +SOURCE=..\..\src\types.h # End Source File # Begin Source File -SOURCE=..\..\src\types.h +SOURCE=..\..\src\uqm.c # End Source File # Begin Source File @@ -4569,7 +4569,7 @@ # PROP Default_Filter "" # Begin Source File -SOURCE=..\..\src\res\kohr-ah1.ico +SOURCE="..\..\src\res\kohr-ah1.ico" # End Source File # Begin Source File @@ -4581,19 +4581,19 @@ # End Source File # Begin Source File -SOURCE=..\..\src\res\ur-quan-icon-alpha.ico +SOURCE="..\..\src\res\ur-quan-icon-alpha.ico" # End Source File # Begin Source File -SOURCE=..\..\src\res\ur-quan-icon-std.ico +SOURCE="..\..\src\res\ur-quan-icon-std.ico" # End Source File # Begin Source File -SOURCE=..\..\src\res\ur-quan1.ico +SOURCE="..\..\src\res\ur-quan1.ico" # End Source File # Begin Source File -SOURCE=..\..\src\res\ur-quan2.ico +SOURCE="..\..\src\res\ur-quan2.ico" # End Source File # Begin Source File Modified: trunk/sc2/src/libs/graphics/drawable.c =================================================================== --- trunk/sc2/src/libs/graphics/drawable.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/libs/graphics/drawable.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -19,9 +19,10 @@ #include "gfxintrn.h" #include "libs/misc.h" #include "tfb_draw.h" -#include "units.h" #include "libs/mathlib.h" #include "gfxother.h" +// XXX: we should not include anything from uqm/ inside libs/ +#include "uqm/units.h" FRAME _CurFramePtr; Modified: trunk/sc2/src/libs/graphics/sdl/3do_funcs.c =================================================================== --- trunk/sc2/src/libs/graphics/sdl/3do_funcs.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/libs/graphics/sdl/3do_funcs.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -22,9 +22,10 @@ #include "pure.h" #include "opengl.h" #include "primitives.h" -#include "units.h" #include "libs/graphics/drawcmd.h" #include "libs/graphics/tfb_draw.h" +// XXX: we should not include anything from uqm/ inside libs/ +#include "uqm/units.h" int batch_depth = 0; Modified: trunk/sc2/src/libs/graphics/sdl/sdl_common.c =================================================================== --- trunk/sc2/src/libs/graphics/sdl/sdl_common.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/libs/graphics/sdl/sdl_common.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -31,10 +31,10 @@ #include "port.h" #include "libs/uio.h" #include "libs/log.h" -#include "controls.h" #include "libs/vidlib.h" - // XXX: Should not be included from here. -#include "uqmdebug.h" +// XXX: we should not include anything from uqm/ inside libs/ +#include "uqm/controls.h" +#include "uqm/uqmdebug.h" #include SDL_INCLUDE(SDL_thread.h) SDL_Surface *SDL_Video; Modified: trunk/sc2/src/libs/graphics/tfb_draw.c =================================================================== --- trunk/sc2/src/libs/graphics/tfb_draw.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/libs/graphics/tfb_draw.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -17,8 +17,9 @@ #include "gfx_common.h" #include "tfb_draw.h" #include "drawcmd.h" -#include "units.h" #include "libs/log.h" +// XXX: we should not include anything from uqm/ inside libs/ +#include "uqm/units.h" static const HOT_SPOT NullHs = {0, 0}; Modified: trunk/sc2/src/libs/graphics/widgets.c =================================================================== --- trunk/sc2/src/libs/graphics/widgets.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/libs/graphics/widgets.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,10 +16,11 @@ #include "gfx_common.h" #include "widgets.h" -#include "colors.h" #include "libs/strlib.h" -#include "setup.h" -#include "units.h" +// XXX: we should not include anything from uqm/ inside libs/ +#include "uqm/colors.h" +#include "uqm/setup.h" +#include "uqm/units.h" WIDGET *widget_focus = NULL; Modified: trunk/sc2/src/libs/input/sdl/input.c =================================================================== --- trunk/sc2/src/libs/input/sdl/input.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/libs/input/sdl/input.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -25,11 +25,12 @@ #include "libs/input/sdl/vcontrol.h" #include "libs/input/sdl/keynames.h" #include "libs/misc.h" -#include "controls.h" #include "libs/file.h" #include "libs/log.h" #include "libs/reslib.h" #include "options.h" +// XXX: we should not include anything from uqm/ inside libs/ +#include "uqm/controls.h" #define KBDBUFSIZE (1 << 8) Modified: trunk/sc2/src/libs/resource/resinit.c =================================================================== --- trunk/sc2/src/libs/resource/resinit.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/libs/resource/resinit.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -19,17 +19,17 @@ #include "resintrn.h" #include "libs/misc.h" #include "options.h" -#include "nameref.h" #include "types.h" #include "libs/log.h" #include "libs/gfxlib.h" #include "libs/reslib.h" #include "libs/sndlib.h" #include "libs/vidlib.h" -#include "coderes.h" #include "propfile.h" #include <ctype.h> #include <stdlib.h> +// XXX: we should not include anything from uqm/ inside libs/ +#include "uqm/coderes.h" static RESOURCE_INDEX allocResourceIndex (void) { Modified: trunk/sc2/src/libs/sound/trackplayer.c =================================================================== --- trunk/sc2/src/libs/sound/trackplayer.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/libs/sound/trackplayer.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -18,10 +18,13 @@ #include "libs/sound/trackplayer.h" #include "libs/sound/trackint.h" #include "libs/log.h" -#include "comm.h" #include "options.h" #include <ctype.h> #include <stdlib.h> +#include <string.h> +#include <memory.h> +// XXX: we should not include anything from uqm/ inside libs/ +#include "uqm/comm.h" static int track_count; //total number of subtitle tracks Modified: trunk/sc2/src/libs/video/video.c =================================================================== --- trunk/sc2/src/libs/video/video.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/libs/video/video.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,9 +16,10 @@ #include "video.h" -#include "setup.h" #include "vidplayer.h" #include "libs/inplib.h" +// XXX: we should not include anything from uqm/ inside libs/ +#include "uqm/setup.h" #define NULL_VIDEO_REF (0) Modified: trunk/sc2/src/libs/video/vidplayer.c =================================================================== --- trunk/sc2/src/libs/video/vidplayer.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/libs/video/vidplayer.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,13 +16,14 @@ #include "vidplayer.h" -#include "controls.h" -#include "settings.h" -#include "setup.h" -#include "sounds.h" #include "libs/graphics/gfx_common.h" #include "libs/graphics/tfb_draw.h" #include "libs/log.h" +// XXX: we should not include anything from uqm/ inside libs/ +#include "uqm/controls.h" +#include "uqm/settings.h" +#include "uqm/setup.h" +#include "uqm/sounds.h" // video callbacks static void vp_BeginFrame (TFB_VideoDecoder*); Modified: trunk/sc2/src/uqm/comm/arilou/arilouc.c =================================================================== --- trunk/sc2/src/uqm/comm/arilou/arilouc.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/comm/arilou/arilouc.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,11 +16,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "comm/commall.h" -#include "comm/arilou/resinst.h" -#include "comm/arilou/strings.h" +#include "../commall.h" +#include "resinst.h" +#include "strings.h" -#include "gameev.h" +#include "uqm/gameev.h" static LOCDATA arilou_desc = Modified: trunk/sc2/src/uqm/comm/blackur/blackurc.c =================================================================== --- trunk/sc2/src/uqm/comm/blackur/blackurc.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/comm/blackur/blackurc.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,9 +16,9 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "comm/commall.h" -#include "comm/blackur/resinst.h" -#include "comm/blackur/strings.h" +#include "../commall.h" +#include "resinst.h" +#include "strings.h" static LOCDATA blackurq_desc = { Modified: trunk/sc2/src/uqm/comm/chmmr/chmmrc.c =================================================================== --- trunk/sc2/src/uqm/comm/chmmr/chmmrc.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/comm/chmmr/chmmrc.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,11 +16,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "comm/commall.h" -#include "comm/chmmr/resinst.h" -#include "comm/chmmr/strings.h" +#include "../commall.h" +#include "resinst.h" +#include "strings.h" -#include "build.h" +#include "uqm/build.h" static LOCDATA chmmr_desc = Modified: trunk/sc2/src/uqm/comm/comandr/comandr.c =================================================================== --- trunk/sc2/src/uqm/comm/comandr/comandr.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/comm/comandr/comandr.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,10 +16,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "setup.h" -#include "comm/commall.h" -#include "comm/comandr/resinst.h" -#include "comm/comandr/strings.h" +#include "../commall.h" +#include "resinst.h" +#include "strings.h" + +#include "uqm/setup.h" #include "libs/graphics/gfx_common.h" static LOCDATA commander_desc = Modified: trunk/sc2/src/uqm/comm/commall.h =================================================================== --- trunk/sc2/src/uqm/comm/commall.h 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/comm/commall.h 2009-10-09 20:38:29 UTC (rev 3215) @@ -17,10 +17,10 @@ #ifndef _COMMALL_H #define _COMMALL_H -#include "colors.h" -#include "comm.h" -#include "commglue.h" -#include "encount.h" +#include "uqm/colors.h" +#include "uqm/comm.h" +#include "uqm/commglue.h" +#include "uqm/encount.h" #include "libs/reslib.h" #endif /* _COMMALL_H */ Modified: trunk/sc2/src/uqm/comm/druuge/druugec.c =================================================================== --- trunk/sc2/src/uqm/comm/druuge/druugec.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/comm/druuge/druugec.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,12 +16,12 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "comm/commall.h" -#include "comm/druuge/resinst.h" -#include "comm/druuge/strings.h" +#include "../commall.h" +#include "resinst.h" +#include "strings.h" -#include "build.h" -#include "setup.h" +#include "uqm/build.h" +#include "uqm/setup.h" static LOCDATA druuge_desc = Modified: trunk/sc2/src/uqm/comm/ilwrath/ilwrathc.c =================================================================== --- trunk/sc2/src/uqm/comm/ilwrath/ilwrathc.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/comm/ilwrath/ilwrathc.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,11 +16,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "comm/commall.h" -#include "comm/ilwrath/resinst.h" -#include "comm/ilwrath/strings.h" +#include "../commall.h" +#include "resinst.h" +#include "strings.h" -#include "gameev.h" +#include "uqm/gameev.h" static LOCDATA ilwrath_desc = Modified: trunk/sc2/src/uqm/comm/melnorm/melnorm.c =================================================================== --- trunk/sc2/src/uqm/comm/melnorm/melnorm.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/comm/melnorm/melnorm.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,13 +16,13 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "comm/commall.h" -#include "comm/melnorm/resinst.h" -#include "comm/melnorm/strings.h" +#include "../commall.h" +#include "resinst.h" +#include "strings.h" -#include "gameev.h" -#include "setup.h" -#include "shipcont.h" +#include "uqm/gameev.h" +#include "uqm/setup.h" +#include "uqm/shipcont.h" #include "libs/inplib.h" #include "libs/mathlib.h" Modified: trunk/sc2/src/uqm/comm/mycon/myconc.c =================================================================== --- trunk/sc2/src/uqm/comm/mycon/myconc.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/comm/mycon/myconc.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,11 +16,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "comm/commall.h" -#include "comm/mycon/resinst.h" -#include "comm/mycon/strings.h" +#include "../commall.h" +#include "resinst.h" +#include "strings.h" -#include "gameev.h" +#include "uqm/gameev.h" #include "libs/mathlib.h" Modified: trunk/sc2/src/uqm/comm/orz/orzc.c =================================================================== --- trunk/sc2/src/uqm/comm/orz/orzc.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/comm/orz/orzc.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,12 +16,13 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "comm/commall.h" -#include "comm/orz/resinst.h" -#include "comm/orz/strings.h" -#include "build.h" +#include "../commall.h" +#include "resinst.h" +#include "strings.h" +#include "uqm/build.h" + static LOCDATA orz_desc = { NULL, /* init_encounter_func */ Modified: trunk/sc2/src/uqm/comm/pkunk/pkunkc.c =================================================================== --- trunk/sc2/src/uqm/comm/pkunk/pkunkc.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/comm/pkunk/pkunkc.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,12 +16,12 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "comm/commall.h" -#include "comm/pkunk/resinst.h" -#include "comm/pkunk/strings.h" +#include "../commall.h" +#include "resinst.h" +#include "strings.h" -#include "build.h" -#include "gameev.h" +#include "uqm/build.h" +#include "uqm/gameev.h" static LOCDATA pkunk_desc = Modified: trunk/sc2/src/uqm/comm/rebel/rebel.c =================================================================== --- trunk/sc2/src/uqm/comm/rebel/rebel.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/comm/rebel/rebel.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,11 +16,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "comm/commall.h" -#include "comm/yehat/resinst.h" -#include "comm/rebel/strings.h" +#include "../commall.h" +#include "../yehat/resinst.h" +#include "strings.h" -#include "build.h" +#include "uqm/build.h" static LOCDATA yehat_desc = Modified: trunk/sc2/src/uqm/comm/shofixt/shofixt.c =================================================================== --- trunk/sc2/src/uqm/comm/shofixt/shofixt.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/comm/shofixt/shofixt.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,11 +16,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "comm/commall.h" -#include "comm/shofixt/resinst.h" -#include "comm/shofixt/strings.h" +#include "../commall.h" +#include "resinst.h" +#include "strings.h" -#include "gameev.h" +#include "uqm/gameev.h" static LOCDATA shofixti_desc = Modified: trunk/sc2/src/uqm/comm/slyhome/slyhome.c =================================================================== --- trunk/sc2/src/uqm/comm/slyhome/slyhome.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/comm/slyhome/slyhome.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,12 +16,13 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "gameev.h" -#include "comm/commall.h" -#include "comm/slyhome/resinst.h" -#include "comm/slyhome/strings.h" +#include "../commall.h" +#include "resinst.h" +#include "strings.h" +#include "uqm/gameev.h" + static LOCDATA slylandro_desc = { NULL, /* init_encounter_func */ Modified: trunk/sc2/src/uqm/comm/slyland/slyland.c =================================================================== --- trunk/sc2/src/uqm/comm/slyland/slyland.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/comm/slyland/slyland.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,15 +16,15 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "comm/commall.h" -#include "comm/slyland/resinst.h" -#include "comm/slyland/strings.h" +#include "../commall.h" +#include "resinst.h" +#include "strings.h" + #include "options.h" +#include "uqm/battle.h" +#include "uqm/setup.h" -#include "battle.h" -#include "setup.h" - static LOCDATA slylandro_desc = { NULL, /* init_encounter_func */ Modified: trunk/sc2/src/uqm/comm/spahome/spahome.c =================================================================== --- trunk/sc2/src/uqm/comm/spahome/spahome.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/comm/spahome/spahome.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,12 +16,12 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "comm/commall.h" -#include "comm/spathi/resinst.h" -#include "comm/spahome/strings.h" +#include "../commall.h" +#include "../spathi/resinst.h" +#include "strings.h" -#include "build.h" -#include "gameev.h" +#include "uqm/build.h" +#include "uqm/gameev.h" static LOCDATA spahome_desc = Modified: trunk/sc2/src/uqm/comm/spathi/spathic.c =================================================================== --- trunk/sc2/src/uqm/comm/spathi/spathic.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/comm/spathi/spathic.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,11 +16,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "comm/commall.h" -#include "comm/spathi/resinst.h" -#include "comm/spathi/strings.h" +#include "../commall.h" +#include "resinst.h" +#include "strings.h" -#include "build.h" +#include "uqm/build.h" static LOCDATA spathi_desc = Modified: trunk/sc2/src/uqm/comm/starbas/starbas.c =================================================================== --- trunk/sc2/src/uqm/comm/starbas/starbas.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/comm/starbas/starbas.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,13 +16,13 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "comm/commall.h" -#include "comm/comandr/resinst.h" -#include "comm/starbas/strings.h" +#include "../commall.h" +#include "../comandr/resinst.h" +#include "strings.h" -#include "build.h" -#include "setup.h" -#include "shipcont.h" +#include "uqm/build.h" +#include "uqm/setup.h" +#include "uqm/shipcont.h" #include "libs/graphics/gfx_common.h" #include "libs/inplib.h" #include "libs/mathlib.h" Modified: trunk/sc2/src/uqm/comm/supox/supoxc.c =================================================================== --- trunk/sc2/src/uqm/comm/supox/supoxc.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/comm/supox/supoxc.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,11 +16,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "comm/commall.h" -#include "comm/supox/resinst.h" -#include "comm/supox/strings.h" +#include "../commall.h" +#include "resinst.h" +#include "strings.h" -#include "build.h" +#include "uqm/build.h" static LOCDATA supox_desc = Modified: trunk/sc2/src/uqm/comm/syreen/syreenc.c =================================================================== --- trunk/sc2/src/uqm/comm/syreen/syreenc.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/comm/syreen/syreenc.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,14 +16,14 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "comm/commall.h" -#include "comm/syreen/resinst.h" -#include "comm/syreen/strings.h" +#include "../commall.h" +#include "resinst.h" +#include "strings.h" + #include "libs/sound/sound.h" +#include "uqm/build.h" -#include "build.h" - static LOCDATA syreen_desc = { NULL, /* init_encounter_func */ Modified: trunk/sc2/src/uqm/comm/talkpet/talkpet.c =================================================================== --- trunk/sc2/src/uqm/comm/talkpet/talkpet.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/comm/talkpet/talkpet.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,11 +16,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "comm/commall.h" -#include "comm/talkpet/resinst.h" -#include "comm/talkpet/strings.h" +#include "../commall.h" +#include "resinst.h" +#include "strings.h" -#include "build.h" +#include "uqm/build.h" static LOCDATA talkpet_desc = { Modified: trunk/sc2/src/uqm/comm/thradd/thraddc.c =================================================================== --- trunk/sc2/src/uqm/comm/thradd/thraddc.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/comm/thradd/thraddc.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,12 +16,12 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "comm/commall.h" -#include "comm/thradd/resinst.h" -#include "comm/thradd/strings.h" +#include "../commall.h" +#include "resinst.h" +#include "strings.h" -#include "build.h" -#include "gameev.h" +#include "uqm/build.h" +#include "uqm/gameev.h" static LOCDATA thradd_desc = Modified: trunk/sc2/src/uqm/comm/umgah/umgahc.c =================================================================== --- trunk/sc2/src/uqm/comm/umgah/umgahc.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/comm/umgah/umgahc.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,11 +16,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "comm/commall.h" -#include "comm/umgah/resinst.h" -#include "comm/umgah/strings.h" +#include "../commall.h" +#include "resinst.h" +#include "strings.h" -#include "build.h" +#include "uqm/build.h" static LOCDATA umgah_desc = Modified: trunk/sc2/src/uqm/comm/urquan/urquanc.c =================================================================== --- trunk/sc2/src/uqm/comm/urquan/urquanc.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/comm/urquan/urquanc.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,9 +16,9 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "comm/commall.h" -#include "comm/urquan/resinst.h" -#include "comm/urquan/strings.h" +#include "../commall.h" +#include "resinst.h" +#include "strings.h" static LOCDATA urquan_desc = { Modified: trunk/sc2/src/uqm/comm/utwig/utwigc.c =================================================================== --- trunk/sc2/src/uqm/comm/utwig/utwigc.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/comm/utwig/utwigc.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,12 +16,12 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "comm/commall.h" -#include "comm/utwig/resinst.h" -#include "comm/utwig/strings.h" +#include "../commall.h" +#include "resinst.h" +#include "strings.h" -#include "build.h" -#include "gameev.h" +#include "uqm/build.h" +#include "uqm/gameev.h" static LOCDATA utwig_desc = Modified: trunk/sc2/src/uqm/comm/vux/vuxc.c =================================================================== --- trunk/sc2/src/uqm/comm/vux/vuxc.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/comm/vux/vuxc.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,9 +16,9 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "comm/commall.h" -#include "comm/vux/resinst.h" -#include "comm/vux/strings.h" +#include "../commall.h" +#include "resinst.h" +#include "strings.h" static LOCDATA vux_desc = { Modified: trunk/sc2/src/uqm/comm/yehat/yehatc.c =================================================================== --- trunk/sc2/src/uqm/comm/yehat/yehatc.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/comm/yehat/yehatc.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,12 +16,12 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "comm/commall.h" -#include "comm/yehat/resinst.h" -#include "comm/yehat/strings.h" +#include "../commall.h" +#include "resinst.h" +#include "strings.h" -#include "build.h" -#include "gameev.h" +#include "uqm/build.h" +#include "uqm/gameev.h" #include "libs/mathlib.h" Modified: trunk/sc2/src/uqm/comm/zoqfot/zoqfotc.c =================================================================== --- trunk/sc2/src/uqm/comm/zoqfot/zoqfotc.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/comm/zoqfot/zoqfotc.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,12 +16,12 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "comm/commall.h" -#include "comm/zoqfot/resinst.h" -#include "comm/zoqfot/strings.h" +#include "../commall.h" +#include "resinst.h" +#include "strings.h" -#include "build.h" -#include "gameev.h" +#include "uqm/build.h" +#include "uqm/gameev.h" #define ZOQ_FG_COLOR WHITE_COLOR Modified: trunk/sc2/src/uqm/netplay/checksum.c =================================================================== --- trunk/sc2/src/uqm/netplay/checksum.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/netplay/checksum.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -28,7 +28,7 @@ // for DUMP_CRC_OPS #include "netconnection.h" #include "netmelee.h" -#include "tactrans.h" +#include "../tactrans.h" // for new_ship #include "libs/log.h" #include "libs/mathlib.h" Modified: trunk/sc2/src/uqm/netplay/checksum.h =================================================================== --- trunk/sc2/src/uqm/netplay/checksum.h 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/netplay/checksum.h 2009-10-09 20:38:29 UTC (rev 3215) @@ -28,7 +28,7 @@ #include "netplay.h" #include "crc.h" -#include "element.h" +#include "../element.h" #include "libs/gfxlib.h" #include "netconnection.h" Modified: trunk/sc2/src/uqm/netplay/netmelee.c =================================================================== --- trunk/sc2/src/uqm/netplay/netmelee.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/netplay/netmelee.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -21,22 +21,22 @@ #include "libs/callback.h" #include "libs/log.h" #include "libs/net.h" -#include "netplay/netinput.h" -#include "netplay/netmisc.h" -#include "netplay/netsend.h" -#include "netplay/notify.h" -#include "netplay/packetq.h" -#include "netplay/proto/npconfirm.h" -#include "netplay/proto/ready.h" -#include "netplay/proto/reset.h" +#include "netinput.h" +#include "netmisc.h" +#include "netsend.h" +#include "notify.h" +#include "packetq.h" +#include "proto/npconfirm.h" +#include "proto/ready.h" +#include "proto/reset.h" -#include "battlecontrols.h" +#include "../battlecontrols.h" // for NetworkInputContext -#include "controls.h" +#include "../controls.h" // for BATTLE_INPUT_STATE -#include "init.h" +#include "../init.h" // for NUM_PLAYERS -#include "globdata.h" +#include "../globdata.h" // for GLOBAL #include <errno.h> Modified: trunk/sc2/src/uqm/netplay/netmisc.c =================================================================== --- trunk/sc2/src/uqm/netplay/netmisc.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/netplay/netmisc.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -23,7 +23,7 @@ #include "packetsenders.h" #include "proto/ready.h" -#include "melee.h" +#include "../melee.h" // For feedback functions. #include <stdlib.h> Modified: trunk/sc2/src/uqm/netplay/netmisc.h =================================================================== --- trunk/sc2/src/uqm/netplay/netmisc.h 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/netplay/netmisc.h 2009-10-09 20:38:29 UTC (rev 3215) @@ -25,7 +25,7 @@ #include "netstate.h" #include "types.h" -#include "battle.h" +#include "../battle.h" // for BattleFrameCounter, BATTLE_FRAME_RATE struct BattleStateData { Modified: trunk/sc2/src/uqm/netplay/notify.h =================================================================== --- trunk/sc2/src/uqm/netplay/notify.h 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/netplay/notify.h 2009-10-09 20:38:29 UTC (rev 3215) @@ -22,7 +22,7 @@ #include "netplay.h" // for NETPLAY_CHECKSUM #include "netconnection.h" -#include "controls.h" +#include "../controls.h" // for BATTLE_INPUT_STATE #ifdef NETPLAY_CHECKSUM # include "checksum.h" Modified: trunk/sc2/src/uqm/netplay/packethandlers.c =================================================================== --- trunk/sc2/src/uqm/netplay/packethandlers.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/netplay/packethandlers.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -31,15 +31,15 @@ #include "proto/reset.h" #include "libs/log.h" -#include "controls.h" +#include "../controls.h" // for BATTLE_INPUT_STATE -#include "init.h" +#include "../init.h" // for NUM_PLAYERS -#include "globdata.h" +#include "../globdata.h" // for GLOBAL -#include "melee.h" +#include "../melee.h" // for various update functions. -#include "pickmele.h" +#include "../pickmele.h" // for various update functions. #include "libs/mathlib.h" // for TFB_SeedRandom Modified: trunk/sc2/src/uqm/netplay/packetsenders.h =================================================================== --- trunk/sc2/src/uqm/netplay/packetsenders.h 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/netplay/packetsenders.h 2009-10-09 20:38:29 UTC (rev 3215) @@ -24,7 +24,7 @@ #include "netconnection.h" #include "packet.h" -#include "controls.h" +#include "../controls.h" // for BATTLE_INPUT_STATE void sendInit(NetConnection *conn); Modified: trunk/sc2/src/uqm/planets/calc.c =================================================================== --- trunk/sc2/src/uqm/planets/calc.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/planets/calc.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -17,7 +17,7 @@ */ /* ----------------------------- INCLUDES ---------------------------- */ -#include "encount.h" +#include "../encount.h" #include "libs/mathlib.h" #include "libs/log.h" /* -------------------------------- DATA -------------------------------- */ Modified: trunk/sc2/src/uqm/planets/cargo.c =================================================================== --- trunk/sc2/src/uqm/planets/cargo.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/planets/cargo.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,13 +16,13 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "colors.h" -#include "controls.h" -#include "gamestr.h" -#include "shipcont.h" -#include "setup.h" -#include "sounds.h" -#include "util.h" +#include "../colors.h" +#include "../controls.h" +#include "../gamestr.h" +#include "../shipcont.h" +#include "../setup.h" +#include "../sounds.h" +#include "../util.h" void Modified: trunk/sc2/src/uqm/planets/devices.c =================================================================== --- trunk/sc2/src/uqm/planets/devices.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/planets/devices.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,18 +16,18 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "build.h" -#include "encount.h" -#include "gamestr.h" -#include "controls.h" -#include "settings.h" -#include "shipcont.h" -#include "load.h" -#include "setup.h" -#include "state.h" -#include "grpinfo.h" -#include "sounds.h" -#include "util.h" +#include "../build.h" +#include "../encount.h" +#include "../gamestr.h" +#include "../controls.h" +#include "../settings.h" +#include "../shipcont.h" +#include "../load.h" +#include "../setup.h" +#include "../state.h" +#include "../grpinfo.h" +#include "../sounds.h" +#include "../util.h" #include "libs/strlib.h" Modified: trunk/sc2/src/uqm/planets/genall.h =================================================================== --- trunk/sc2/src/uqm/planets/genall.h 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/planets/genall.h 2009-10-09 20:38:29 UTC (rev 3215) @@ -17,8 +17,11 @@ #ifndef _GENALL_H #define _GENALL_H -#include "planets/planets.h" +#include "planets.h" #include "libs/compiler.h" +#include "../globdata.h" +#include "../nameref.h" +#include "../resinst.h" #endif /* _GENALL_H */ Modified: trunk/sc2/src/uqm/planets/genburv.c =================================================================== --- trunk/sc2/src/uqm/planets/genburv.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/planets/genburv.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,10 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "globdata.h" -#include "nameref.h" -#include "resinst.h" -#include "planets/genall.h" +#include "genall.h" #include "libs/mathlib.h" Modified: trunk/sc2/src/uqm/planets/genchmmr.c =================================================================== --- trunk/sc2/src/uqm/planets/genchmmr.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/planets/genchmmr.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,16 +16,13 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "build.h" -#include "encount.h" -#include "globdata.h" +#include "genall.h" #include "lander.h" -#include "nameref.h" -#include "resinst.h" -#include "setup.h" -#include "state.h" -#include "sounds.h" -#include "planets/genall.h" +#include "../build.h" +#include "../encount.h" +#include "../setup.h" +#include "../state.h" +#include "../sounds.h" #include "libs/mathlib.h" Modified: trunk/sc2/src/uqm/planets/gencol.c =================================================================== --- trunk/sc2/src/uqm/planets/gencol.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/planets/gencol.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,11 +16,10 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "build.h" -#include "globdata.h" -#include "state.h" -#include "grpinfo.h" -#include "planets/genall.h" +#include "genall.h" +#include "../build.h" +#include "../state.h" +#include "../grpinfo.h" void Modified: trunk/sc2/src/uqm/planets/gendru.c =================================================================== --- trunk/sc2/src/uqm/planets/gendru.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/planets/gendru.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,15 +16,12 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "build.h" -#include "encount.h" -#include "globdata.h" +#include "genall.h" #include "lander.h" -#include "ipdisp.h" -#include "nameref.h" -#include "resinst.h" -#include "state.h" -#include "planets/genall.h" +#include "../build.h" +#include "../encount.h" +#include "../ipdisp.h" +#include "../state.h" #include "libs/mathlib.h" Modified: trunk/sc2/src/uqm/planets/genilw.c =================================================================== --- trunk/sc2/src/uqm/planets/genilw.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/planets/genilw.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,14 +16,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "build.h" -#include "encount.h" -#include "globdata.h" -#include "ipdisp.h" -#include "nameref.h" -#include "resinst.h" -#include "state.h" -#include "planets/genall.h" +#include "genall.h" +#include "../build.h" +#include "../encount.h" +#include "../ipdisp.h" +#include "../state.h" #include "libs/mathlib.h" Modified: trunk/sc2/src/uqm/planets/genmel.c =================================================================== --- trunk/sc2/src/uqm/planets/genmel.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/planets/genmel.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,11 +16,10 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "build.h" -#include "encount.h" -#include "globdata.h" -#include "state.h" -#include "planets/genall.h" +#include "genall.h" +#include "../build.h" +#include "../encount.h" +#include "../state.h" #include "libs/log.h" Modified: trunk/sc2/src/uqm/planets/genmyc.c =================================================================== --- trunk/sc2/src/uqm/planets/genmyc.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/planets/genmyc.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,15 +16,12 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "build.h" -#include "encount.h" -#include "globdata.h" -#include "ipdisp.h" -#include "nameref.h" -#include "resinst.h" -#include "setup.h" -#include "state.h" -#include "planets/genall.h" +#include "genall.h" +#include "../build.h" +#include "../encount.h" +#include "../ipdisp.h" +#include "../setup.h" +#include "../state.h" #include "libs/mathlib.h" Modified: trunk/sc2/src/uqm/planets/genorz.c =================================================================== --- trunk/sc2/src/uqm/planets/genorz.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/planets/genorz.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,17 +16,14 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "build.h" -#include "encount.h" -#include "globdata.h" +#include "genall.h" #include "lander.h" -#include "ipdisp.h" -#include "nameref.h" -#include "resinst.h" -#include "setup.h" -#include "state.h" -#include "sounds.h" -#include "planets/genall.h" +#include "../build.h" +#include "../encount.h" +#include "../ipdisp.h" +#include "../setup.h" +#include "../state.h" +#include "../sounds.h" #include "libs/mathlib.h" Modified: trunk/sc2/src/uqm/planets/genpet.c =================================================================== --- trunk/sc2/src/uqm/planets/genpet.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/planets/genpet.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,15 +16,12 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "build.h" -#include "encount.h" -#include "globdata.h" -#include "ipdisp.h" -#include "nameref.h" -#include "resinst.h" -#include "setup.h" -#include "state.h" -#include "planets/genall.h" +#include "genall.h" +#include "../build.h" +#include "../encount.h" +#include "../ipdisp.h" +#include "../setup.h" +#include "../state.h" #include "libs/mathlib.h" Modified: trunk/sc2/src/uqm/planets/genpku.c =================================================================== --- trunk/sc2/src/uqm/planets/genpku.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/planets/genpku.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,15 +16,12 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "build.h" -#include "encount.h" -#include "globdata.h" +#include "genall.h" #include "lander.h" -#include "ipdisp.h" -#include "nameref.h" -#include "resinst.h" -#include "state.h" -#include "planets/genall.h" +#include "../build.h" +#include "../encount.h" +#include "../ipdisp.h" +#include "../state.h" #include "libs/mathlib.h" Modified: trunk/sc2/src/uqm/planets/genrain.c =================================================================== --- trunk/sc2/src/uqm/planets/genrain.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/planets/genrain.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,9 +16,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "encount.h" -#include "globdata.h" -#include "planets/genall.h" +#include "genall.h" +#include "../encount.h" void Modified: trunk/sc2/src/uqm/planets/gensam.c =================================================================== --- trunk/sc2/src/uqm/planets/gensam.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/planets/gensam.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,14 +16,12 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "build.h" -#include "encount.h" -#include "globdata.h" -#include "resinst.h" -#include "races.h" -#include "state.h" -#include "grpinfo.h" -#include "planets/genall.h" +#include "genall.h" +#include "../build.h" +#include "../encount.h" +#include "../races.h" +#include "../state.h" +#include "../grpinfo.h" #include "libs/mathlib.h" Modified: trunk/sc2/src/uqm/planets/genshof.c =================================================================== --- trunk/sc2/src/uqm/planets/genshof.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/planets/genshof.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,11 +16,10 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "build.h" -#include "globdata.h" -#include "state.h" -#include "grpinfo.h" -#include "planets/genall.h" +#include "genall.h" +#include "../build.h" +#include "../state.h" +#include "../grpinfo.h" static void Modified: trunk/sc2/src/uqm/planets/gensly.c =================================================================== --- trunk/sc2/src/uqm/planets/gensly.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/planets/gensly.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,9 +16,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "encount.h" -#include "resinst.h" -#include "planets/genall.h" +#include "genall.h" +#include "../encount.h" void Modified: trunk/sc2/src/uqm/planets/gensol.c =================================================================== --- trunk/sc2/src/uqm/planets/gensol.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/planets/gensol.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,18 +16,15 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "build.h" -#include "gamestr.h" -#include "globdata.h" +#include "genall.h" #include "lander.h" #include "lifeform.h" -#include "nameref.h" -#include "races.h" -#include "resinst.h" -#include "state.h" -#include "grpinfo.h" -#include "encount.h" -#include "planets/genall.h" +#include "../build.h" +#include "../gamestr.h" +#include "../races.h" +#include "../state.h" +#include "../grpinfo.h" +#include "../encount.h" #include "libs/mathlib.h" Modified: trunk/sc2/src/uqm/planets/genspa.c =================================================================== --- trunk/sc2/src/uqm/planets/genspa.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/planets/genspa.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,15 +16,12 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "build.h" -#include "encount.h" -#include "globdata.h" -#include "ipdisp.h" +#include "genall.h" #include "lifeform.h" -#include "nameref.h" -#include "resinst.h" -#include "state.h" -#include "planets/genall.h" +#include "../build.h" +#include "../encount.h" +#include "../ipdisp.h" +#include "../state.h" #include "libs/mathlib.h" Modified: trunk/sc2/src/uqm/planets/gensup.c =================================================================== --- trunk/sc2/src/uqm/planets/gensup.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/planets/gensup.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,15 +16,12 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "build.h" -#include "encount.h" -#include "globdata.h" +#include "genall.h" #include "lander.h" -#include "ipdisp.h" -#include "nameref.h" -#include "resinst.h" -#include "state.h" -#include "planets/genall.h" +#include "../build.h" +#include "../encount.h" +#include "../ipdisp.h" +#include "../state.h" #include "libs/mathlib.h" void Modified: trunk/sc2/src/uqm/planets/gensyr.c =================================================================== --- trunk/sc2/src/uqm/planets/gensyr.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/planets/gensyr.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,9 +16,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "encount.h" -#include "resinst.h" -#include "planets/genall.h" +#include "genall.h" +#include "../encount.h" static void Modified: trunk/sc2/src/uqm/planets/genthrad.c =================================================================== --- trunk/sc2/src/uqm/planets/genthrad.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/planets/genthrad.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,15 +16,12 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "build.h" -#include "encount.h" -#include "globdata.h" -#include "ipdisp.h" -#include "nameref.h" -#include "resinst.h" -#include "setup.h" -#include "state.h" -#include "planets/genall.h" +#include "genall.h" +#include "../build.h" +#include "../encount.h" +#include "../ipdisp.h" +#include "../setup.h" +#include "../state.h" #include "libs/mathlib.h" Modified: trunk/sc2/src/uqm/planets/genutw.c =================================================================== --- trunk/sc2/src/uqm/planets/genutw.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/planets/genutw.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,15 +16,12 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "build.h" -#include "encount.h" -#include "globdata.h" -#include "ipdisp.h" -#include "nameref.h" -#include "resinst.h" -#include "setup.h" -#include "state.h" -#include "planets/genall.h" +#include "genall.h" +#include "../build.h" +#include "../encount.h" +#include "../ipdisp.h" +#include "../setup.h" +#include "../state.h" #include "libs/mathlib.h" void Modified: trunk/sc2/src/uqm/planets/genvault.c =================================================================== --- trunk/sc2/src/uqm/planets/genvault.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/planets/genvault.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,13 +16,10 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "encount.h" -#include "globdata.h" +#include "genall.h" #include "lander.h" -#include "nameref.h" -#include "resinst.h" -#include "setup.h" -#include "planets/genall.h" +#include "../encount.h" +#include "../setup.h" #include "libs/mathlib.h" Modified: trunk/sc2/src/uqm/planets/genvux.c =================================================================== --- trunk/sc2/src/uqm/planets/genvux.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/planets/genvux.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,18 +16,15 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "build.h" -#include "encount.h" -#include "globdata.h" +#include "genall.h" #include "lander.h" -#include "ipdisp.h" #include "lifeform.h" -#include "nameref.h" -#include "resinst.h" -#include "setup.h" -#include "state.h" -#include "sounds.h" -#include "planets/genall.h" +#include "../build.h" +#include "../encount.h" +#include "../ipdisp.h" +#include "../setup.h" +#include "../state.h" +#include "../sounds.h" #include "libs/mathlib.h" Modified: trunk/sc2/src/uqm/planets/genwreck.c =================================================================== --- trunk/sc2/src/uqm/planets/genwreck.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/planets/genwreck.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,11 +16,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "globdata.h" +#include "genall.h" #include "lander.h" -#include "nameref.h" -#include "resinst.h" -#include "planets/genall.h" #include "libs/mathlib.h" Modified: trunk/sc2/src/uqm/planets/genyeh.c =================================================================== --- trunk/sc2/src/uqm/planets/genyeh.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/planets/genyeh.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,14 +16,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "build.h" -#include "encount.h" -#include "globdata.h" -#include "ipdisp.h" -#include "nameref.h" -#include "resinst.h" -#include "state.h" -#include "planets/genall.h" +#include "genall.h" +#include "../build.h" +#include "../encount.h" +#include "../ipdisp.h" +#include "../state.h" #include "libs/mathlib.h" Modified: trunk/sc2/src/uqm/planets/genzoq.c =================================================================== --- trunk/sc2/src/uqm/planets/genzoq.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/planets/genzoq.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -16,14 +16,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "build.h" -#include "encount.h" -#include "globdata.h" -#include "nameref.h" -#include "resinst.h" -#include "state.h" -#include "grpinfo.h" -#include "planets/genall.h" +#include "genall.h" +#include "../build.h" +#include "../encount.h" +#include "../state.h" +#include "../grpinfo.h" #include "libs/mathlib.h" Modified: trunk/sc2/src/uqm/planets/lander.c =================================================================== --- trunk/sc2/src/uqm/planets/lander.c 2009-10-09 17:18:45 UTC (rev 3214) +++ trunk/sc2/src/uqm/planets/lander.c 2009-10-09 20:38:29 UTC (rev 3215) @@ -18,19 +18,19 @@ #include "lander.h" -#include "cons_res.h" -#include "controls.h" -#include "colors.h" -#include "encount.h" -#include "process.h" -#include "gamestr.h" #include "lifeform.h" #include "scan.h" -#include "nameref.h" -#include "resinst.h" -#include "setup.h" -#include "sounds.h" -#include "element.h" +#include "../cons_res.h" +#include "../controls.h" +#include "../colors.h" +#include "../encount.h" +#include "../process.h" +#include "../gamestr.h" +#include "../nameref.h" +#include "../resinst.h" +#include "../setup.h" +#include "../sounds.h" +#include "../element.h" #include "libs/graphics/gfx_common.h" #include "libs/math... [truncated message content] |
From: <av...@us...> - 2009-10-18 16:53:34
|
Revision: 3228 http://sc2.svn.sourceforge.net/sc2/?rev=3228&view=rev Author: avolkov Date: 2009-10-18 16:53:27 +0000 (Sun, 18 Oct 2009) Log Message: ----------- Trackplayer rewrite; fixes several obscure bugs; SpliceTrack() still a mess Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/src/libs/sound/music.c trunk/sc2/src/libs/sound/stream.c trunk/sc2/src/libs/sound/trackint.h trunk/sc2/src/libs/sound/trackplayer.c trunk/sc2/src/libs/sound/trackplayer.h trunk/sc2/src/options.c trunk/sc2/src/uqm/comm.c trunk/sc2/src/uqm/comm.h trunk/sc2/src/uqm/commanim.c trunk/sc2/src/uqm/confirm.c trunk/sc2/src/uqm/oscill.c trunk/sc2/src/uqm/setup.c trunk/sc2/src/uqm/util.c Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2009-10-17 21:56:16 UTC (rev 3227) +++ trunk/sc2/ChangeLog 2009-10-18 16:53:27 UTC (rev 3228) @@ -1,4 +1,5 @@ Changes towards version 0.7: +- Trackplayer rewrite; fixed many bugs - Alex - Source tree reorg: libs/ moved out of sc2code/, msvc++/ moved to build/msvc6/, src/sc2code/ renamed to src/uqm/ - Coredev - Druuge no longer turn hostile after attempting a salvage (bug #1013) - Alex Modified: trunk/sc2/src/libs/sound/music.c =================================================================== --- trunk/sc2/src/libs/sound/music.c 2009-10-17 21:56:16 UTC (rev 3227) +++ trunk/sc2/src/libs/sound/music.c 2009-10-18 16:53:27 UTC (rev 3228) @@ -34,8 +34,8 @@ if (pmus) { LockMutex (soundSource[MUSIC_SOURCE].stream_mutex); - PlayStream ((*pmus), MUSIC_SOURCE, Continuous, - speechVolumeScale == 0.0f, true); + // Always scope the music data, we may need it + PlayStream ((*pmus), MUSIC_SOURCE, Continuous, true, true); UnlockMutex (soundSource[MUSIC_SOURCE].stream_mutex); curMusicRef = MusicRef; @@ -104,6 +104,7 @@ if (pmus) { LockMutex (soundSource[SPEECH_SOURCE].stream_mutex); + // Do not need to scope the music-as-speech as of now PlayStream (*pmus, SPEECH_SOURCE, false, false, true); UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex); Modified: trunk/sc2/src/libs/sound/stream.c =================================================================== --- trunk/sc2/src/libs/sound/stream.c 2009-10-17 21:56:16 UTC (rev 3227) +++ trunk/sc2/src/libs/sound/stream.c 2009-10-18 16:53:27 UTC (rev 3228) @@ -102,7 +102,10 @@ soundSource[source].sbuf_size = pos + PAD_SCOPE_BYTES; soundSource[source].sbuf_start = pos; soundSource[source].sbuf_lasttime = GetTimeCounter (); - soundSource[source].start_time = (sint32)GetTimeCounter () - offset; + // Adjust the start time so it looks like the stream has been playing + // from the very beginning + soundSource[source].start_time = GetTimeCounter () - offset; + soundSource[source].pause_time = 0; soundSource[source].stream_should_be_playing = TRUE; audio_SourcePlay (soundSource[source].handle); } @@ -110,6 +113,8 @@ void StopStream (uint32 source) { + StopSource (source); + soundSource[source].stream_should_be_playing = FALSE; soundSource[source].sample = NULL; @@ -122,20 +127,28 @@ soundSource[source].sbuf_start = 0; soundSource[source].sbuf_size = 0; soundSource[source].sbuf_offset = 0; - - StopSource (source); + soundSource[source].pause_time = 0; } void PauseStream (uint32 source) { soundSource[source].stream_should_be_playing = FALSE; + if (!soundSource[source].pause_time) + soundSource[source].pause_time = GetTimeCounter (); audio_SourcePause (soundSource[source].handle); } void ResumeStream (uint32 source) { + if (soundSource[source].pause_time) + { // Adjust the start time so it looks like the stream has + // been playing all this time non-stop + soundSource[source].start_time += GetTimeCounter () + - soundSource[source].pause_time; + } + soundSource[source].pause_time = 0; soundSource[source].stream_should_be_playing = TRUE; audio_SourcePlay (soundSource[source].handle); } @@ -504,29 +517,35 @@ long energy; - if (speechVolumeScale != 0.0f) - { // Use speech waveform when speech is enabled - source_num = SPEECH_SOURCE; + // Prefer speech to music + source_num = SPEECH_SOURCE; + source = &soundSource[source_num]; + LockMutex (source->stream_mutex); + if (speechVolumeScale != 0.0f && (!source->sample || + !source->sample->decoder || !source->sample->decoder->is_null)) + { // Use speech waveform, since it's available // Step is picked experimentally. Using step of 1 sample at 11025Hz, // because human speech is mostly in the low frequencies, and it looks // better this way. step = 1; - } else if (musicVolumeScale != 0.0f) - { // Use music waveform when speech is disabled + { // We do not have speech -- use music waveform + UnlockMutex (source->stream_mutex); source_num = MUSIC_SOURCE; + source = &soundSource[source_num]; + LockMutex (source->stream_mutex); + // Step is picked experimentally. Using step of 4 samples at 11025Hz. // It looks better this way. step = 4; } else - { + { // We do not have anything usable + UnlockMutex (source->stream_mutex); return 0; } - source = &soundSource[source_num]; - LockMutex (source->stream_mutex); if (!PlayingStream (source_num) || !source->sample || !source->sample->decoder || !source->sbuffer || source->sbuf_size == 0) Modified: trunk/sc2/src/libs/sound/trackint.h =================================================================== --- trunk/sc2/src/libs/sound/trackint.h 2009-10-17 21:56:16 UTC (rev 3227) +++ trunk/sc2/src/libs/sound/trackint.h 2009-10-18 16:53:27 UTC (rev 3228) @@ -17,28 +17,23 @@ #ifndef TRACKINT_H #define TRACKINT_H -typedef struct tfb_soundchain +struct tfb_soundchunk { - TFB_SoundDecoder *decoder; // points at the decoder to read from - float start_time; - int tag_me; - uint32 track_num; - UNICODE *text; - TFB_TrackCB callback; - struct tfb_soundchain *next; -} TFB_SoundChain; + TFB_SoundDecoder *decoder; // decoder for this chunk + float start_time; // relative time from track start + int tag_me; // set for chunks with subtitles + uint32 track_num; // logical track #, comm code needs this + UNICODE *text; // subtitle text + TFB_TrackCB callback; // comm callback, executed on chunk start + struct tfb_soundchunk *next; +}; -typedef struct tfb_soundchaindata -{ - TFB_SoundChain *read_chain_ptr; // points to chain read poistion - TFB_SoundChain *play_chain_ptr; // points to chain playing position +typedef struct tfb_soundchunk TFB_SoundChunk; -} TFB_SoundChainData; +TFB_SoundChunk *create_SoundChunk (TFB_SoundDecoder *decoder, float start_time); +void destroy_SoundChunk_list (TFB_SoundChunk *chain); +TFB_SoundChunk *find_next_page (TFB_SoundChunk *cur); +TFB_SoundChunk *find_prev_page (TFB_SoundChunk *cur); -extern TFB_SoundChain *chain_head; -TFB_SoundChain *create_soundchain (TFB_SoundDecoder *decoder, float startTime); -void destroy_soundchain (TFB_SoundChain *chain); -TFB_SoundChain *get_chain_previous (TFB_SoundChain *head, TFB_SoundChain *current); - #endif // TRACKINT_H Modified: trunk/sc2/src/libs/sound/trackplayer.c =================================================================== --- trunk/sc2/src/libs/sound/trackplayer.c 2009-10-17 21:56:16 UTC (rev 3227) +++ trunk/sc2/src/libs/sound/trackplayer.c 2009-10-18 16:53:27 UTC (rev 3228) @@ -16,7 +16,7 @@ #include "sound.h" #include "libs/sound/trackplayer.h" -#include "libs/sound/trackint.h" +#include "trackint.h" #include "libs/log.h" #include "libs/memlib.h" #include "options.h" @@ -24,43 +24,66 @@ #include <stdlib.h> #include <string.h> #include <memory.h> -// XXX: we should not include anything from uqm/ inside libs/ -#include "uqm/comm.h" -static int track_count; //total number of subtitle tracks -static int cur_track; //currently playing subtitle track -static UNICODE *cur_page = 0; //current page of subtitle track -static int no_page_break = 0; -static int track_pos_changed = 0; // set whenever ff, frev is enabled +static int track_count; // total number of tracks +static int no_page_break; // set when combining several tracks into one -static TFB_SoundSample *sound_sample = NULL; -TFB_SoundChain *chain_head = NULL; //first decoder in linked list -static TFB_SoundChain *chain_tail = NULL; //last decoder in linked list -static TFB_SoundChain *last_sub = NULL; //last element in the chain with a subtitle +// The one and only sample we play. Track switching is done by modifying +// this sample while it is playing. StreamDecoderTaskFunc() picks up the +// changes *mostly* seamlessly (keyword: mostly). +// This is technically a hack, but a decent one ;) +static TFB_SoundSample *sound_sample; -static Mutex track_mutex; //protects cur_track and track_count -void recompute_track_pos (TFB_SoundSample *sample, TFB_SoundChain *head, - sint32 offset); -static bool is_sample_playing(TFB_SoundSample* samp); +static volatile uint32 tracks_length; // total length of tracks in game units -void destroy_sound_sample (TFB_SoundSample *sample); +static TFB_SoundChunk *chunks_head; // first decoder in linked list +static TFB_SoundChunk *chunks_tail; // last decoder in linked list +static TFB_SoundChunk *last_sub; // last chunk in the list with a subtitle +static TFB_SoundChunk *cur_chunk; // currently playing chunk +static TFB_SoundChunk *cur_sub_chunk; // currently displayed subtitle chunk + +// Accesses to cur_chunk and cur_sub_chunk are guarded by stream_mutex, +// because these should only be accesses by the DoInput and the +// stream player threads. Any other accesses would go unguarded. +// Other data structures are unguarded and should only be accessed from +// the DoInput thread at certain times, i.e. nothing can be modified +// between StartTrack() and JumpTrack()/StopTrack() calls. +// Use caution when changing code, as you may need to guard other data +// structures the same way. + +static void seek_track (sint32 offset); +static void destroy_SoundSample (TFB_SoundSample *sample); + // stream callbacks -static bool OnTrackStart (TFB_SoundSample* sample); +static bool OnStreamStart (TFB_SoundSample* sample); static bool OnChunkEnd (TFB_SoundSample* sample, audio_Object buffer); -static void OnTrackEnd (TFB_SoundSample* sample); -static void OnTrackTag (TFB_SoundSample* sample, TFB_SoundTag* tag); +static void OnStreamEnd (TFB_SoundSample* sample); +static void OnBufferTag (TFB_SoundSample* sample, TFB_SoundTag* tag); static TFB_SoundCallbacks trackCBs = { - OnTrackStart, + OnStreamStart, OnChunkEnd, - OnTrackEnd, - OnTrackTag, + OnStreamEnd, + OnBufferTag, NULL }; +static inline sint32 +chunk_end_time (TFB_SoundChunk *chunk) +{ + return (sint32) ((chunk->start_time + chunk->decoder->length) + * ONE_SECOND); +} + +static inline sint32 +tracks_end_time (void) +{ + return chunk_end_time (chunks_tail); +} + //JumpTrack currently aborts the current track. However, it doesn't clear the //data-structures as StopTrack does. this allows for rewind even after the //track has finished playing @@ -68,123 +91,83 @@ void JumpTrack (void) { - TFB_SoundChainData* scd; - uint32 cur_time; - sint32 total_length = (sint32)((chain_tail->start_time + - chain_tail->decoder->length) * (float)ONE_SECOND); - if (!sound_sample) - return; + return; // nothing to skip - scd = (TFB_SoundChainData*) sound_sample->data; - LockMutex (soundSource[SPEECH_SOURCE].stream_mutex); - PauseStream (SPEECH_SOURCE); - cur_time = GetTimeCounter(); - soundSource[SPEECH_SOURCE].start_time = - (sint32)cur_time - total_length; - track_pos_changed = 1; - scd->play_chain_ptr = chain_tail; - recompute_track_pos (sound_sample, chain_head, total_length + 1); + seek_track (tracks_length + 1); UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex); + PlayingTrack(); } -//advance to the next track and start playing -// we no longer support advancing tracks this way. Instead this should just start playing -// a stream. +// This should just start playing a stream void PlayTrack (void) { - TFB_SoundChainData* scd; + if (!sound_sample) + return; // nothing to play + LockMutex (soundSource[SPEECH_SOURCE].stream_mutex); + tracks_length = tracks_end_time (); + // decoder will be set in OnStreamStart() + cur_chunk = chunks_head; + // Always scope the speech data, we may need it + PlayStream (sound_sample, SPEECH_SOURCE, false, true, true); + UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex); +} + +void +PauseTrack (void) +{ if (!sound_sample) - return; + return; // nothing to pause - scd = (TFB_SoundChainData*) sound_sample->data; - - if (scd->read_chain_ptr || sound_sample->decoder) - { - LockMutex (soundSource[SPEECH_SOURCE].stream_mutex); - PlayStream (sound_sample, - SPEECH_SOURCE, false, - speechVolumeScale != 0.0f, !track_pos_changed); - track_pos_changed = 0; - UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex); - } + LockMutex (soundSource[SPEECH_SOURCE].stream_mutex); + PauseStream (SPEECH_SOURCE); + UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex); } -// ResumeTrack should resume a paused track, or start a stopped track, and do nothing -// for a playing track +// ResumeTrack should resume a paused track, and do nothing for a playing track void ResumeTrack (void) { - TFB_SoundChainData* scd; + audio_IntVal state; if (!sound_sample) + return; // nothing to resume + + LockMutex (soundSource[SPEECH_SOURCE].stream_mutex); + + if (!cur_chunk) + { // not playing anything, so no resuming + UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex); return; + } - scd = (TFB_SoundChainData*) sound_sample->data; + audio_GetSourcei (soundSource[SPEECH_SOURCE].handle, audio_SOURCE_STATE, &state); + if (state == audio_PAUSED) + ResumeStream (SPEECH_SOURCE); - if (scd->read_chain_ptr || sound_sample->decoder) - { - // Only try to start the track if there is something to play - audio_IntVal state; - BOOLEAN playing; - - LockMutex (soundSource[SPEECH_SOURCE].stream_mutex); - audio_GetSourcei (soundSource[SPEECH_SOURCE].handle, audio_SOURCE_STATE, &state); - playing = PlayingStream (SPEECH_SOURCE); - if (!track_pos_changed && !playing && state == audio_PAUSED) - { - /*adjust start time so the slider doesn't go crazy*/ - soundSource[SPEECH_SOURCE].start_time += GetTimeCounter () - soundSource[SPEECH_SOURCE].pause_time; - ResumeStream (SPEECH_SOURCE); - UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex); - } - else if (! playing) - { - UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex); - PlayTrack (); - } - else - { - UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex); - } - } + UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex); } COUNT PlayingTrack (void) { - // this is not a great way to detect whether the track is playing, - // but as it should work during fast-forward/rewind, 'PlayingStream' can't be used -// if (track_count == 0) -// return ((COUNT)~0); - if (sound_sample && is_sample_playing (sound_sample)) - { - int last_track; - UNICODE *last_page; - LockMutex (track_mutex); - last_track = cur_track; - last_page = cur_page; - UnlockMutex (track_mutex); - if (do_subtitles (last_page)) - { - return cur_track + 1; - } - else - { - COUNT result; + // This ignores the paused state and simply returns what track + // *should* be playing + COUNT result = 0; // default is none - LockMutex (soundSource[SPEECH_SOURCE].stream_mutex); - result = (PlayingStream (SPEECH_SOURCE) ? (COUNT)(last_track + 1) : 0); - UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex); - return result; - } - } + if (!sound_sample) + return 0; // not playing anything - return (0); + LockMutex (soundSource[SPEECH_SOURCE].stream_mutex); + if (cur_chunk) + result = cur_chunk->track_num + 1; + UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex); + + return result; } void @@ -192,115 +175,117 @@ { LockMutex (soundSource[SPEECH_SOURCE].stream_mutex); StopStream (SPEECH_SOURCE); + track_count = 0; + tracks_length = 0; + cur_chunk = NULL; + cur_sub_chunk = NULL; UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex); - if (chain_head) + if (chunks_head) { - destroy_soundchain (chain_head); - chain_head = NULL; - chain_tail = NULL; + chunks_tail = NULL; + destroy_SoundChunk_list (chunks_head); + chunks_head = NULL; last_sub = NULL; } if (sound_sample) { - DestroyMutex (track_mutex); - destroy_sound_sample (sound_sample); + destroy_SoundSample (sound_sample); sound_sample = NULL; } - track_count = 0; - cur_track = 0; - cur_page = 0; - do_subtitles ((void *)~0); } -static bool -is_sample_playing (TFB_SoundSample* sample) -{ - TFB_SoundChainData* scd = (TFB_SoundChainData*) sample->data; - - return (scd->read_chain_ptr && scd->play_chain_ptr) - || (!scd->read_chain_ptr && sample->decoder); -} - static void -DoTrackTag (TFB_SoundChain *chain) +DoTrackTag (TFB_SoundChunk *chunk) { - LockMutex (track_mutex); - if (chain->callback) - chain->callback (); - cur_track = chain->track_num; - cur_page = chain->text; - UnlockMutex (track_mutex); + if (chunk->callback) + chunk->callback (); + cur_sub_chunk = chunk; } +// This func is called by PlayStream() when stream is about +// to start. We have a chance to tweak the stream here. +// This is called on the DoInput thread. static bool -OnTrackStart (TFB_SoundSample* sample) +OnStreamStart (TFB_SoundSample* sample) { - TFB_SoundChainData* scd = (TFB_SoundChainData*) sample->data; + if (sample != sound_sample) + return false; // Huh? Why did we get called on this? - if (!scd->read_chain_ptr && !sample->decoder) - return false; + if (!cur_chunk) + return false; // Stream shouldn't be playing at all - if (scd->read_chain_ptr) - { - sample->decoder = scd->read_chain_ptr->decoder; - sample->offset = (sint32) (scd->read_chain_ptr->start_time * (float)ONE_SECOND); - } - else - sample->offset = 0; + // Adjust the sample to play what we want + sample->decoder = cur_chunk->decoder; + sample->offset = (sint32) (cur_chunk->start_time * ONE_SECOND); - scd->play_chain_ptr = scd->read_chain_ptr; + if (cur_chunk->tag_me) + DoTrackTag (cur_chunk); - if (scd->read_chain_ptr && scd->read_chain_ptr->tag_me) - DoTrackTag(scd->read_chain_ptr); - return true; } +// This func is called by StreamDecoderTaskFunc() when the last buffer +// of the current chunk has been decoded (not when it has been *played*). +// This is called on the stream task thread. static bool OnChunkEnd (TFB_SoundSample* sample, audio_Object buffer) { - TFB_SoundChainData* scd = (TFB_SoundChainData*) sample->data; + if (sample != sound_sample) + return false; // Huh? Why did we get called on this? - if (!scd->read_chain_ptr || !scd->read_chain_ptr->next) + if (!cur_chunk || !cur_chunk->next) + { // all chunks and tracks are done return false; + } - scd->read_chain_ptr = scd->read_chain_ptr->next; - sample->decoder = scd->read_chain_ptr->decoder; + // Move on to the next chunk + cur_chunk = cur_chunk->next; + // Adjust the sample to play what we want + sample->decoder = cur_chunk->decoder; SoundDecoder_Rewind (sample->decoder); + log_add (log_Info, "Switching to stream %s at pos %d", sample->decoder->filename, sample->decoder->start_sample); - if (sample->buffer_tag && scd->read_chain_ptr->tag_me) - { - TFB_TagBuffer (sample, buffer, scd->read_chain_ptr); + if (cur_chunk->tag_me) + { // Tag the last buffer of the chunk with the next chunk + TFB_TagBuffer (sample, buffer, cur_chunk); } return true; } +// This func is called by StreamDecoderTaskFunc() when stream has ended +// This is called on the stream task thread. static void -OnTrackEnd (TFB_SoundSample* sample) +OnStreamEnd (TFB_SoundSample* sample) { - TFB_SoundChainData* scd = (TFB_SoundChainData*) sample->data; + if (sample != sound_sample) + return; // Huh? Why did we get called on this? - sample->decoder = NULL; - scd->read_chain_ptr = NULL; + cur_chunk = NULL; + cur_sub_chunk = NULL; } +// This func is called by StreamDecoderTaskFunc() when a tagged buffer +// has finished playing. +// This is called on the stream task thread. static void -OnTrackTag (TFB_SoundSample* sample, TFB_SoundTag* tag) +OnBufferTag (TFB_SoundSample* sample, TFB_SoundTag* tag) { - TFB_SoundChainData* scd = (TFB_SoundChainData*) sample->data; - TFB_SoundChain* chain = (TFB_SoundChain*) tag->data; + TFB_SoundChunk* chunk = (TFB_SoundChunk*) tag->data; + if (sample != sound_sample) + return; // Huh? Why did we get called on this? + TFB_ClearBufferTag (tag); - DoTrackTag (chain); - - scd->play_chain_ptr = scd->read_chain_ptr; + DoTrackTag (chunk); } -int +// Parse the timestamps string into an int array. +// Rerturns number of timestamps parsed. +static int GetTimeStamps (UNICODE *TimeStamps, sint32 *time_stamps) { int pos; @@ -384,7 +369,7 @@ return; } - if (!sound_sample || !chain_tail) + if (!sound_sample || !chunks_tail) { log_add (log_Warning, "SpliceMultiTrack(): Cannot be called before SpliceTrack()"); return; @@ -404,8 +389,8 @@ track_decs[tracks]->format); SoundDecoder_DecodeAll (track_decs[tracks]); - chain_tail->next = create_soundchain (track_decs[tracks], sound_sample->length); - chain_tail = chain_tail->next; + chunks_tail->next = create_SoundChunk (track_decs[tracks], sound_sample->length); + chunks_tail = chunks_tail->next; sound_sample->length += track_decs[tracks]->length; } else @@ -436,7 +421,7 @@ SpliceTrack (UNICODE *TrackName, UNICODE *TrackText, UNICODE *TimeStamp, TFB_TrackCB cb) { static UNICODE last_track_name[128] = ""; - static unsigned long startTime = 0; + static unsigned long dec_offset = 0; #define MAX_PAGES 50 UNICODE *pages[MAX_PAGES]; sint32 time_stamps[MAX_PAGES]; @@ -484,30 +469,31 @@ // Add the rest of the pages for (page = 1; page < num_pages; ++page) { - if (last_sub->next) + TFB_SoundChunk *next_sub = find_next_page (last_sub); + if (next_sub) { // nodes prepared by previous call, just fill in the subs - last_sub = last_sub->next; - last_sub->text = pages[page]; + next_sub->text = pages[page]; + last_sub = next_sub; } else { // probably no timestamps were provided, so need more work TFB_SoundDecoder *decoder = SoundDecoder_Load (contentDir, - last_track_name, 4096, startTime, time_stamps[page]); + last_track_name, 4096, dec_offset, time_stamps[page]); if (!decoder) { log_add (log_Warning, "SpliceTrack(): couldn't load %s", TrackName); break; } - startTime += (unsigned long)(decoder->length * 1000); - chain_tail->next = create_soundchain (decoder, sound_sample->length); - chain_tail = chain_tail->next; - chain_tail->tag_me = 1; - chain_tail->track_num = track_count - 1; - chain_tail->text = pages[page]; - chain_tail->callback = cb; - // We have to tag only one page with a callback - cb = NULL; - last_sub = chain_tail; + dec_offset += (unsigned long)(decoder->length * 1000); + chunks_tail->next = create_SoundChunk (decoder, sound_sample->length); + chunks_tail = chunks_tail->next; + chunks_tail->tag_me = 1; + chunks_tail->track_num = track_count - 1; + chunks_tail->text = pages[page]; + chunks_tail->callback = cb; + // TODO: We may have to tag only one page with a callback + //cb = NULL; + last_sub = chunks_tail; sound_sample->length += decoder->length; } } @@ -562,12 +548,12 @@ num_timestamps = num_pages; } - startTime = 0; + // Reset the offset for the new track + dec_offset = 0; for (page = 0; page < num_timestamps; ++page) { - static float old_volume = 0.0f; TFB_SoundDecoder *decoder = SoundDecoder_Load (contentDir, - TrackName, 4096, startTime, time_stamps[page]); + TrackName, 4096, dec_offset, time_stamps[page]); if (!decoder) { log_add (log_Warning, "SpliceTrack(): couldn't load %s", TrackName); @@ -576,275 +562,246 @@ if (!sound_sample) { - TFB_SoundChainData* scd = HCalloc (sizeof (TFB_SoundChainData)); - track_mutex = CreateMutex ("trackplayer mutex", SYNC_CLASS_TOPLEVEL | SYNC_CLASS_AUDIO); - sound_sample = (TFB_SoundSample *) HMalloc (sizeof (TFB_SoundSample)); - sound_sample->data = scd; + sound_sample = HCalloc (sizeof (*sound_sample)); sound_sample->callbacks = trackCBs; sound_sample->num_buffers = 8; sound_sample->buffer_tag = HCalloc (sizeof (TFB_SoundTag) * sound_sample->num_buffers); - sound_sample->buffer = HMalloc (sizeof (audio_Object) * sound_sample->num_buffers); - sound_sample->decoder = decoder; + sound_sample->buffer = HCalloc (sizeof (audio_Object) * sound_sample->num_buffers); sound_sample->length = 0; audio_GenBuffers (sound_sample->num_buffers, sound_sample->buffer); - chain_head = create_soundchain (decoder, 0.0); - chain_tail = chain_head; - scd->read_chain_ptr = chain_head; - scd->play_chain_ptr = NULL; + chunks_head = create_SoundChunk (decoder, 0.0); + chunks_tail = chunks_head; } else { - chain_tail->next = create_soundchain (decoder, sound_sample->length); - chain_tail = chain_tail->next; + chunks_tail->next = create_SoundChunk (decoder, sound_sample->length); + chunks_tail = chunks_tail->next; } - startTime += (unsigned long)(decoder->length * 1000); + dec_offset += (unsigned long)(decoder->length * 1000); #if 0 log_add (log_Debug, "page (%d of %d): %d ts: %d", page, num_pages, - startTime, time_stamps[page]); + dec_offset, time_stamps[page]); #endif - if (decoder->is_null) - { - if (speechVolumeScale != 0.0f) - { - /* No voice ogg available so zeroing speech volume to - ensure proper operation of oscilloscope and music fading */ - old_volume = speechVolumeScale; - speechVolumeScale = 0.0f; - log_add (log_Warning, "SpliceTrack(): no voice ogg" - " available so setting speech volume to zero"); - } - } - else if (old_volume != 0.0f && speechVolumeScale != old_volume) - { - /* This time voice ogg is there */ - log_add (log_Warning, "SpliceTrack(): restoring speech volume"); - speechVolumeScale = old_volume; - old_volume = 0.0f; - } - sound_sample->length += decoder->length; if (!no_page_break) { - chain_tail->tag_me = 1; - // chain_tail->tag.value = (void *)(((track_count - 1) << 8) | page); - chain_tail->track_num = track_count - 1; + chunks_tail->tag_me = 1; + chunks_tail->track_num = track_count - 1; if (page < num_pages) { - chain_tail->text = pages[page]; - last_sub = chain_tail; + chunks_tail->text = pages[page]; + last_sub = chunks_tail; } - chain_tail->callback = cb; - // We have to tag only one page with a callback - cb = NULL; + chunks_tail->callback = cb; + // TODO: We may have to tag only one page with a callback + //cb = NULL; } no_page_break = 0; } } } -void -PauseTrack (void) +// This function figures out the chunk that should be playing based on +// 'offset' into the total playing time of all tracks. It then sets +// the speech source's sample to the necessary decoder and seeks the +// decoder to the proper point. +// XXX: This means that whatever speech has already been queued on the +// source will continue playing, so we may need some small timing +// adjustments. It may be simpler to just call PlayStream(). +static void +seek_track (sint32 offset) { - if (sound_sample && sound_sample->decoder) - { - LockMutex (soundSource[SPEECH_SOURCE].stream_mutex); - PauseStream (SPEECH_SOURCE); - soundSource[SPEECH_SOURCE].pause_time = GetTimeCounter (); - UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex); - } -} + TFB_SoundChunk *cur; + TFB_SoundChunk *last_tag = NULL; -void -recompute_track_pos (TFB_SoundSample *sample, TFB_SoundChain *head, sint32 offset) -{ - TFB_SoundChainData* scd; - TFB_SoundChain *cur = head; + if (!sound_sample) + return; // nothing to recompute - if (! sample) - return; + if (offset < 0) + offset = 0; + else if ((uint32)offset > tracks_length) + offset = tracks_length + 1; - scd = (TFB_SoundChainData*) sample->data; - - while (cur->next && - (sint32)(cur->next->start_time * (float)ONE_SECOND) < offset) + // Adjusting the stream start time is the only way we can arbitrarily + // seek the stream right now + soundSource[SPEECH_SOURCE].start_time = GetTimeCounter () - offset; + + // Find the chunk that should be playing at this time offset + for (cur = chunks_head; cur && offset >= chunk_end_time (cur); + cur = cur->next) { + // .. looking for the last callback as we go along + // XXX: this effectively set the last point where Fot is looking at. + // TODO: this should be somehow changed if we implement more + // callbacks, like Melnorme trading, offloading at Starbase, etc. if (cur->tag_me) - DoTrackTag (cur); - cur = cur->next; + last_tag = cur; } - if (cur->tag_me) - DoTrackTag (cur); - if ((sint32)((cur->start_time + cur->decoder->length) * (float)ONE_SECOND) < offset) + + if (cur) { - scd->read_chain_ptr = NULL; - sample->decoder = NULL; + cur_chunk = cur; + SoundDecoder_Seek (cur->decoder, (uint32) (((float)offset / ONE_SECOND + - cur->start_time) * 1000)); + sound_sample->decoder = cur->decoder; + + if (cur->tag_me) + last_tag = cur; + if (last_tag) + DoTrackTag (last_tag); } else - { - scd->read_chain_ptr = cur; - SoundDecoder_Seek(scd->read_chain_ptr->decoder, - (uint32)(1000 * (offset / (float)ONE_SECOND - cur->start_time))); + { // The offset is beyond the length of all tracks + StopStream (SPEECH_SOURCE); + cur_chunk = NULL; + cur_sub_chunk = NULL; } } +static sint32 +get_current_track_pos (void) +{ + sint32 start_time = soundSource[SPEECH_SOURCE].start_time; + sint32 pos = GetTimeCounter () - start_time; + if (pos < 0) + pos = 0; + else if ((uint32)pos > tracks_length) + pos = tracks_length; + return pos; +} + void FastReverse_Smooth (void) { - if (sound_sample) - { - sint32 offset; - uint32 cur_time; - sint32 total_length = (sint32)((chain_tail->start_time + - chain_tail->decoder->length) * (float)ONE_SECOND); - LockMutex (soundSource[SPEECH_SOURCE].stream_mutex); - PauseStream (SPEECH_SOURCE); - cur_time = GetTimeCounter(); - track_pos_changed = 1; - if ((sint32)cur_time - soundSource[SPEECH_SOURCE].start_time > total_length) - soundSource[SPEECH_SOURCE].start_time = - (sint32)cur_time - total_length; + sint32 offset; - soundSource[SPEECH_SOURCE].start_time += ACCEL_SCROLL_SPEED; - if (soundSource[SPEECH_SOURCE].start_time > (sint32)cur_time) - { - soundSource[SPEECH_SOURCE].start_time = cur_time; - offset = 0; - } - else - offset = cur_time - soundSource[SPEECH_SOURCE].start_time; - recompute_track_pos (sound_sample, chain_head, offset); - UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex); - PlayingTrack(); + if (!sound_sample) + return; // nothing is playing, so.. bye! - } + LockMutex (soundSource[SPEECH_SOURCE].stream_mutex); + + offset = get_current_track_pos (); + offset -= ACCEL_SCROLL_SPEED; + seek_track (offset); + + // Restart the stream in case it ended previously + if (!PlayingStream (SPEECH_SOURCE)) + PlayStream (sound_sample, SPEECH_SOURCE, false, true, false); + UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex); } void -FastReverse_Page (void) +FastForward_Smooth (void) { - if (sound_sample) - { - TFB_SoundChainData* scd = (TFB_SoundChainData*) sound_sample->data; - TFB_SoundChain *prev; + sint32 offset; - LockMutex (soundSource[SPEECH_SOURCE].stream_mutex); - prev = get_chain_previous (chain_head, scd->play_chain_ptr); - if (prev) - { - scd->read_chain_ptr = prev; - PlayStream (sound_sample, - SPEECH_SOURCE, false, - speechVolumeScale != 0.0f, true); - } - UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex); - } + if (!sound_sample) + return; // nothing is playing, so.. bye! + + LockMutex (soundSource[SPEECH_SOURCE].stream_mutex); + + offset = get_current_track_pos (); + offset += ACCEL_SCROLL_SPEED; + seek_track (offset); + + UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex); } void -FastForward_Smooth (void) +FastReverse_Page (void) { - if (sound_sample) - { - sint32 offset; - uint32 cur_time; - sint32 total_length = (sint32)((chain_tail->start_time + - chain_tail->decoder->length) * (float)ONE_SECOND); - LockMutex (soundSource[SPEECH_SOURCE].stream_mutex); - PauseStream (SPEECH_SOURCE); - cur_time = GetTimeCounter(); - soundSource[SPEECH_SOURCE].start_time -= ACCEL_SCROLL_SPEED; - if ((sint32)cur_time - soundSource[SPEECH_SOURCE].start_time > total_length) - soundSource[SPEECH_SOURCE].start_time = - (sint32)cur_time - total_length - 1; - offset = cur_time - soundSource[SPEECH_SOURCE].start_time; - track_pos_changed = 1; - recompute_track_pos (sound_sample, chain_head, offset); - UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex); - PlayingTrack (); + TFB_SoundChunk *prev; + + if (!sound_sample) + return; // nothing is playing, so.. bye! + + LockMutex (soundSource[SPEECH_SOURCE].stream_mutex); + prev = find_prev_page (cur_sub_chunk); + if (prev) + { // Set the chunk to be played + cur_chunk = prev; + cur_sub_chunk = prev; + // Decoder will be set in OnStreamStart() + PlayStream (sound_sample, SPEECH_SOURCE, false, true, true); } + UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex); } -int +void FastForward_Page (void) { - if (sound_sample) - { - TFB_SoundChainData* scd = (TFB_SoundChainData*) sound_sample->data; - TFB_SoundChain *cur = scd->play_chain_ptr; + TFB_SoundChunk *next; - LockMutex (soundSource[SPEECH_SOURCE].stream_mutex); - while (cur->next && !cur->next->tag_me) - cur = cur->next; - if (cur->next) - { - scd->read_chain_ptr = cur->next; - PlayStream (sound_sample, - SPEECH_SOURCE, false, - speechVolumeScale != 0.0f, true); - UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex); - return TRUE; - } - else //means there are no more pages left - { - UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex); - return FALSE; - } + if (!sound_sample) + return; // nothing is playing, so.. bye! + + LockMutex (soundSource[SPEECH_SOURCE].stream_mutex); + next = find_next_page (cur_sub_chunk); + if (next) + { // Set the chunk to be played + cur_chunk = next; + cur_sub_chunk = next; + // Decoder will be set in OnStreamStart() + PlayStream (sound_sample, SPEECH_SOURCE, false, true, true); } - return TRUE; + else + { // End of the tracks (pun intended) + seek_track (tracks_length + 1); + } + UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex); } -// tells current position of streaming speech +// Tells current position of streaming speech in the units +// specified by the caller. +// This is normally called on the ambient_anim_task thread. int -GetSoundInfo (int max_len) +GetTrackPosition (int in_units) { - uint32 length, offset; + uint32 offset; + uint32 length = tracks_length; + // detach from the static one, otherwise, we can race for + // it and thus divide by 0 + + if (!sound_sample || length == 0) + return 0; // nothing is playing + LockMutex (soundSource[SPEECH_SOURCE].stream_mutex); - if (soundSource[SPEECH_SOURCE].sample) - { - length = (uint32) (soundSource[SPEECH_SOURCE].sample->length * (float)ONE_SECOND); - offset = (uint32) (GetTimeCounter () - soundSource[SPEECH_SOURCE].start_time); - } - else - { - UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex); - return (0); - } + offset = get_current_track_pos (); UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex); - if (offset > length) - return max_len; - return (int)(max_len * offset / length); + + return in_units * offset / length; } -TFB_SoundChain * -create_soundchain (TFB_SoundDecoder *decoder, float startTime) +TFB_SoundChunk * +create_SoundChunk (TFB_SoundDecoder *decoder, float start_time) { - TFB_SoundChain *chain; - chain = HMalloc (sizeof (TFB_SoundChain)); - chain->decoder = decoder; - chain->next = NULL; - chain->start_time = startTime; - chain->tag_me = 0; - chain->text = 0; - return chain; + TFB_SoundChunk *chunk; + chunk = HMalloc (sizeof (TFB_SoundChunk)); + chunk->decoder = decoder; + chunk->next = NULL; + chunk->start_time = start_time; + chunk->tag_me = 0; + chunk->text = 0; + return chunk; } void -destroy_soundchain (TFB_SoundChain *chain) +destroy_SoundChunk_list (TFB_SoundChunk *chunk) { - TFB_SoundChain *next = NULL; - for ( ; chain; chain = next) + TFB_SoundChunk *next = NULL; + for ( ; chunk; chunk = next) { - next = chain->next; - if (chain->decoder) - SoundDecoder_Free (chain->decoder); - HFree (chain->text); - HFree (chain); + next = chunk->next; + if (chunk->decoder) + SoundDecoder_Free (chunk->decoder); + HFree (chunk->text); + HFree (chunk); } } -void -destroy_sound_sample (TFB_SoundSample *sample) +static void +destroy_SoundSample (TFB_SoundSample *sample) { if (sample->buffer) { @@ -856,20 +813,78 @@ HFree (sample); } -TFB_SoundChain * -get_chain_previous (TFB_SoundChain *head, TFB_SoundChain *current) +// Returns the next chunk with a subtitle +TFB_SoundChunk * +find_next_page (TFB_SoundChunk *cur) { - TFB_SoundChain *prev, *last_valid = NULL; - prev = head; - if (prev == current) - return prev; - while (prev->next) + if (!cur) + return NULL; + for (cur = cur->next; cur && !cur->tag_me; cur = cur->next) + ; + return cur; +} + +// Returns the previous chunk with a subtitle. +// cur == 0 is treated as end of the list. +TFB_SoundChunk * +find_prev_page (TFB_SoundChunk *cur) +{ + TFB_SoundChunk *prev; + TFB_SoundChunk *last_valid = chunks_head; + + if (cur == chunks_head) + return cur; // cannot go below the first track + + for (prev = chunks_head; prev && prev != cur; prev = prev->next) { if (prev->tag_me) last_valid = prev; - if (prev->next == current) - return last_valid; - prev = prev->next; } - return head; + return last_valid; } + + +// External access to the chunks list +SUBTITLE_REF +GetFirstTrackSubtitle (void) +{ + return chunks_head; +} + +// External access to the chunks list +SUBTITLE_REF +GetNextTrackSubtitle (SUBTITLE_REF LastRef) +{ + if (!LastRef) + return NULL; // enumeration already ended + + return find_next_page (LastRef); +} + +// External access to the chunk subtitles +const UNICODE * +GetTrackSubtitleText (SUBTITLE_REF SubRef) +{ + if (!SubRef) + return NULL; + + return SubRef->text; +} + +// External access to currently active subtitle text +// Returns NULL is none is active +const UNICODE * +GetTrackSubtitle (void) +{ + const UNICODE *cur_sub = NULL; + + if (!sound_sample) + return NULL; // not playing anything + + LockMutex (soundSource[SPEECH_SOURCE].stream_mutex); + if (cur_sub_chunk) + cur_sub = cur_sub_chunk->text; + UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex); + + return cur_sub; +} Modified: trunk/sc2/src/libs/sound/trackplayer.h =================================================================== --- trunk/sc2/src/libs/sound/trackplayer.h 2009-10-17 21:56:16 UTC (rev 3227) +++ trunk/sc2/src/libs/sound/trackplayer.h 2009-10-18 16:53:27 UTC (rev 3228) @@ -21,22 +21,33 @@ #include "libs/compiler.h" - typedef void (*TFB_TrackCB) (void); #define ACCEL_SCROLL_SPEED 300 -void ResumeTrack(void); -void PauseTrack(void); -COUNT PlayingTrack(void); -void JumpTrack(void); -void FastForward_Smooth(void); -int FastForward_Page(void); -void FastReverse_Smooth(void); -void FastReverse_Page(void); -void StopTrack(void); -void SpliceTrack(UNICODE *filespec, UNICODE *textspec, UNICODE *TimeStamp, TFB_TrackCB cb); -void SpliceMultiTrack (UNICODE *TrackNames[], UNICODE *TrackText); -int GetSoundInfo (int max_len); +extern void PlayTrack (void); +extern void StopTrack (void); +extern void JumpTrack (void); +extern void PauseTrack (void); +extern void ResumeTrack (void); +extern COUNT PlayingTrack (void); +extern void FastReverse_Smooth (void); +extern void FastForward_Smooth (void); +extern void FastReverse_Page (void); +extern void FastForward_Page (void); + +extern void SpliceTrack (UNICODE *filespec, UNICODE *textspec, UNICODE *TimeStamp, TFB_TrackCB cb); +extern void SpliceMultiTrack (UNICODE *TrackNames[], UNICODE *TrackText); + +extern int GetTrackPosition (int in_units); + +typedef struct tfb_soundchunk *SUBTITLE_REF; + +extern SUBTITLE_REF GetFirstTrackSubtitle (void); +extern SUBTITLE_REF GetNextTrackSubtitle (SUBTITLE_REF LastRef); +extern const UNICODE *GetTrackSubtitleText (SUBTITLE_REF SubRef); + +extern const UNICODE *GetTrackSubtitle (void); + #endif Modified: trunk/sc2/src/options.c =================================================================== --- trunk/sc2/src/options.c 2009-10-17 21:56:16 UTC (rev 3227) +++ trunk/sc2/src/options.c 2009-10-18 16:53:27 UTC (rev 3228) @@ -507,6 +507,7 @@ loadAddon (const char *addon) { uio_DirHandle *addonsDir, *addonDir; + int numLoaded; addonsDir = uio_openDirRelative (contentDir, "addons", 0); if (addonsDir == NULL) @@ -525,11 +526,12 @@ return FALSE; } - loadIndices (addonDir); + numLoaded = loadIndices (addonDir); uio_closeDir (addonDir); uio_closeDir (addonsDir); - return TRUE; + + return (numLoaded > 0); } void Modified: trunk/sc2/src/uqm/comm.c =================================================================== --- trunk/sc2/src/uqm/comm.c 2009-10-17 21:56:16 UTC (rev 3227) +++ trunk/sc2/src/uqm/comm.c 2009-10-18 16:53:27 UTC (rev 3228) @@ -38,7 +38,7 @@ #include "libs/graphics/gfx_common.h" #include "libs/inplib.h" #include "libs/sound/sound.h" -#include "libs/sound/trackint.h" +#include "libs/sound/trackplayer.h" #include "libs/log.h" #include <ctype.h> @@ -76,21 +76,29 @@ } ENCOUNTER_STATE; static ENCOUNTER_STATE *pCurInputState; -static SUBTITLE_STATE subtitle_state = DONE_SUBTITLE; -static Mutex subtitle_mutex; -TEXT SubtitleText; +// Mutex guards accesses to SubtitleText, last_subtitle and clear_subtitles. +static Mutex subtitle_mutex; +// These vars are indirectly accessed by the ambient_anim_task +static volatile BOOLEAN clear_subtitles; +static TEXT SubtitleText; static const UNICODE * volatile last_subtitle; -CONTEXT TextCacheContext; -FRAME TextCacheFrame; +static CONTEXT TextCacheContext; +static FRAME TextCacheFrame; +volatile BOOLEAN ClearSummary; + RECT CommWndRect = { // default values; actually inited by HailAlien() {SIS_ORG_X, SIS_ORG_Y}, {0, 0} }; +static void ClearSubtitles (void); +static void CheckSubtitles (void); + + /* _count_lines - sees how many lines a given input string would take to * display given the line wrapping information */ @@ -432,9 +440,6 @@ DestroyMutex (subtitle_mutex); } -volatile BOOLEAN ClearSummary; -static volatile BOOLEAN ClearSubtitle; - static void RefreshResponses (ENCOUNTER_STATE *pES) { @@ -488,8 +493,6 @@ static void FeedbackPlayerPhrase (UNICODE *pStr) { - last_subtitle = NULL; - SetContext (SpaceContext); BatchGraphics (); @@ -551,52 +554,54 @@ DWORD TimeIn; COUNT which_track; FRAME F; - BOOLEAN passed = TRUE; + BOOLEAN rewind = FALSE; TimeIn = GetTimeCounter (); ContinuityBreak = FALSE; F = CommData.AlienFrame; if (wait_track == 0) - { + { // Restarting with a rewind wait_track = (COUNT)~0; which_track = (COUNT)~0; - goto Rewind; + rewind = TRUE; } which_track = PlayingTrack (); - if (which_track == 0) + if (which_track == 0 && !rewind) { // initial start of player if (wait_track == 1 || wait_track == (COUNT)~0) { - ResumeTrack (); UnlockMutex (GraphicsLock); + PlayTrack (); do { TaskSwitch (); - LockMutex (GraphicsLock); which_track = PlayingTrack (); - UnlockMutex (GraphicsLock); } while (!which_track); LockMutex (GraphicsLock); } } else if (which_track <= wait_track) + { // XXX: I don't know why this is here, but it is not harmful. + // We never actually pause in comm. ResumeTrack (); + } do { + BOOLEAN left = FALSE; + BOOLEAN right = FALSE; + if (GLOBAL (CurrentActivity) & CHECK_ABORT) + { + which_track = 0; // abort break; + } UnlockMutex (GraphicsLock); - /* FIXME: is this a remnant of 128-tick clock? - * with 120-tick clock this will sleep for 1 tick -- - * for 1/120th of a second; if ONE_SECOND is upgraded - * it will probably sleep for 2/120th of a second. - * Might need to be fixed. - */ + // XXX: Executing this loop 64 times a second is a bit extreme SleepThreadUntil (TimeIn + (ONE_SECOND / 64)); TimeIn = GetTimeCounter (); #if DEMO_MODE || CREATE_JOURNAL @@ -608,79 +613,74 @@ LockMutex (GraphicsLock); if (PulsedInputState.menu[KEY_MENU_CANCEL]) { - SetSliderImage (SetAbsFrameIndex (ActivityFrame, 8)); JumpTrack (); - CommData.AlienFrame = F; - do_subtitles ((void *)~0); - return (FALSE); + which_track = 0; // player stopped + break; } - if (which_track) + CheckSubtitles (); + + if (optSmoothScroll == OPT_PC) { - BOOLEAN left = FALSE; - BOOLEAN right = FALSE; + left = PulsedInputState.menu[KEY_MENU_LEFT]; + right = PulsedInputState.menu[KEY_MENU_RIGHT]; + } + else if (optSmoothScroll == OPT_3DO) + { + left = ImmediateInputState.menu[KEY_MENU_LEFT]; + right = ImmediateInputState.menu[KEY_MENU_RIGHT]; + } + + if (right) + { + SetSliderImage (SetAbsFrameIndex (ActivityFrame, 3)); if (optSmoothScroll == OPT_PC) - { - left = PulsedInputState.menu[KEY_MENU_LEFT]; - right = PulsedInputState.menu[KEY_MENU_RIGHT]; - } + FastForward_Page (); else if (optSmoothScroll == OPT_3DO) - { - left = ImmediateInputState.menu[KEY_MENU_LEFT]; - right = ImmediateInputState.menu[KEY_MENU_RIGHT]; - } - if (right) - { - SetSliderImage (SetAbsFrameIndex (ActivityFrame, 3)); - if (optSmoothScroll == OPT_PC && !FastForward_Page ()) - { - SetSliderImage (SetAbsFrameIndex (ActivityFrame, 8)); - JumpTrack (); - CommData.AlienFrame = F; - do_subtitles ((void *)~0); - return (FALSE); - } - else if (optSmoothScroll == OPT_3DO) - FastForward_Smooth (); - ContinuityBreak = TRUE; - CommData.AlienFrame = 0; - } - else if (left) - { -Rewind: - SetSliderImage (SetAbsFrameIndex (ActivityFrame, 4)); - if (optSmoothScroll == OPT_PC) - FastReverse_Page (); - else if (optSmoothScroll == OPT_3DO) - FastReverse_Smooth (); - ContinuityBreak = TRUE; - CommData.AlienFrame = 0; - } - else if (ContinuityBreak) - { - SetSliderImage (SetAbsFrameIndex (ActivityFrame, 2)); - which_track = PlayingTrack (); - if (which_track && which_track <= wait_track) - { - if (optSmoothScroll == OPT_3DO) - ResumeTrack (); - } - else - { - ContinuityBreak = FALSE; - passed = (which_track != 0); - break; - } - ContinuityBreak = FALSE; - } - else if (which_track == wait_track || wait_track == (COUNT)~0) - CommData.AlienFrame = F; + FastForward_Smooth (); + ContinuityBreak = TRUE; + // XXX: Ugly hack: This causes all animations (talking and ambient) + // in ambient_anim_task to stop progressing. I see no reason why + // the animations cannot continue while seeking. This hack has + // spawned a multitude of workarounds in the comm code, and IMHO + // should be removed. + CommData.AlienFrame = 0; } - } while (ContinuityBreak - || ((which_track = PlayingTrack ()) && which_track <= wait_track)); + else if (left || rewind) + { + rewind = FALSE; + SetSliderImage (SetAbsFrameIndex (ActivityFrame, 4)); + if (optSmoothScroll == OPT_PC) + FastReverse_Page (); + else if (optSmoothScroll == OPT_3DO) + FastReverse_Smooth (); + ContinuityBreak = TRUE; + // XXX: See ugly hack discussion above + CommData.AlienFrame = 0; + } + else if (ContinuityBreak) + { + // This is only done once the seeking is over (in the smooth + // scroll case, once the user releases the seek button) + ContinuityBreak = FALSE; + SetSliderImage (SetAbsFrameIndex (ActivityFrame, 2)); + } + else + { // XXX: See ugly hack discussion above + // Additionally, this used to have a buggy guard condition, which + // would cause the animations to remain paused in a couple cases + // after seeking back to the beginning. + // Broken cases were: Syreen "several hours later" and Starbase + // VUX Beast analysis by the scientist. + CommData.AlienFrame = F; + } + + which_track = PlayingTrack (); + } while (ContinuityBreak || (which_track && which_track <= wait_track)); + CommData.AlienFrame = F; - do_subtitles ((void *)~0); + ClearSubtitles (); if (!which_track || wait_track == (COUNT)~0) { // reached the end @@ -688,7 +688,9 @@ return (FALSE); } - return (passed); + // We can only get here when we got to the requested track + // without ending or aborting + return TRUE; } static BOOLEAN @@ -848,7 +850,7 @@ // extended state BOOLEAN Initialized; BOOLEAN PrintNext; - const TFB_SoundChain *NextSub; + SUBTITLE_REF NextSub; const UNICODE *LeftOver; } SUMMARY_STATE; @@ -863,7 +865,7 @@ if (!pSS->Initialized) { pSS->PrintNext = TRUE; - pSS->NextSub = chain_head; + pSS->NextSub = GetFirstTrackSubtitle (); pSS->LeftOver = NULL; pSS->MenuRepeatDelay = 0; pSS->InputFunc = DoConvSummary; @@ -912,7 +914,7 @@ oldFont = SetContextFont (TinyFont); for (row = 0; row < MAX_SUMM_ROWS && pSS->NextSub; - ++row, pSS->NextSub = pSS->NextSub->next) + ++row, pSS->NextSub = GetNextTrackSubtitle (pSS->NextSub)) { const unsigned char *next; @@ -923,7 +925,7 @@ } else { - t.pStr = pSS->NextSub->text; + t.pStr = GetTrackSubtitleText (pSS->NextSub); if (!t.pStr) continue; } @@ -995,6 +997,7 @@ LockMutex (GraphicsLock); FeedbackPlayerPhrase (pES->phrase_buf); StopTrack (); + ClearSubtitles (); SetSliderImage (SetAbsFrameIndex (ActivityFrame, 2)); UnlockMutex (GraphicsLock); @@ -1181,7 +1184,7 @@ UnlockMutex (GraphicsLock); FlushColorXForms (); - ClearSubtitle = FALSE; + ClearSubtitles (); StopMusic (); StopSound (); @@ -1378,8 +1381,6 @@ return 0; #endif - last_subtitle = NULL; - LockMutex (GraphicsLock); if (LastActivity & CHECK_LOAD) @@ -1654,62 +1655,6 @@ } } -SUBTITLE_STATE -do_subtitles (UNICODE *pStr) -{ - static UNICODE *last_page = NULL; - LockMutex (subtitle_mutex); - if (pStr == 0) - { - subtitle_state = DONE_SUBTITLE; - UnlockMutex (subtitle_mutex); - return (subtitle_state); - } - else if (pStr == (void *)~0) - { - subtitle_state = WAIT_SUBTITLE; - } - else - { - if (last_page == pStr) - { - UnlockMutex (subtitle_mutex); - return (subtitle_state); - } - subtitle_state = READ_SUBTITLE; - ClearSubtitle = TRUE; - } - last_page = pStr; - - switch (subtitle_state) - { - case READ_SUBTITLE: - { - /* Baseline may be updated by the ZFP */ - SubtitleText.baseline = CommData.AlienTextBaseline; - SubtitleText.align = CommData.AlienTextAlign; - SubtitleText.pStr = pStr; - SubtitleText.CharCount = (COUNT)~0; - subtitle_state = WAIT_SUBTITLE; - break; - } - case WAIT_SUBTITLE: - { - subtitle_state = DONE_SUBTITLE; - ClearSubtitle = TRUE; - } - case DONE_SUBTITLE: - break; - default: - // Should not happen - assert(false); - break; - } - UnlockMutex (subtitle_mutex); - - return (subtitle_state); -} - void RedrawSubtitles (void) { @@ -1718,23 +1663,60 @@ if (!optSubtitles) return; - t = SubtitleText; - add_text (1, &t); + LockMutex (subtitle_mutex); + if (SubtitleText.pStr) + { + t = SubtitleText; + add_text (1, &t); + } + UnlockMutex (subtitle_mutex); } -// Sets ClearSubtitle, returning the old value. The current subtitle state -// is also returned, through sub_state +// Returns clear_subtitles and resets it BOOLEAN -SetClearSubtitle (BOOLEAN flag, SUBTITLE_STATE *sub_state) +HaveSubtitlesChanged (void) { - BOOLEAN oldClearSubtitle; + BOOLEAN ret; LockMutex (subtitle_mutex); - oldClearSubtitle = ClearSubtitle; - *sub_state = subtitle_state; - ClearSubtitle = flag; + ret = clear_subtitles; + clear_subtitles = FALSE; UnlockMutex (subtitle_mutex); - return oldClearSubtitle; + return ret; } +static void +ClearSubtitles (void) +{ + LockMutex (subtitle_mutex); + clear_subtitles = TRUE; + last_subtitle = NULL; + SubtitleText.pStr = NULL; + SubtitleText.CharCount = 0; + UnlockMutex (subtitle_mutex); +} + +static void +CheckSubtitles (void) +{ + const UNICODE *pStr; + + pStr = GetTrackSubtitle (); + + LockMutex (subtitle_mutex); + if (pStr != SubtitleText.pStr) + { // Subtitles changed + clear_subtitles = TRUE; + // Baseline may be updated by the ZFP + SubtitleText.baseline = CommData.AlienTextBaseline; + SubtitleText.align = CommData.AlienTextAlign; + SubtitleText.pStr = pStr; + // may have been cleared too + if (pStr) + SubtitleText.CharCount = (COUNT)~0; + else + SubtitleText.CharCount = 0; + } + UnlockMutex (subtitle_mutex); +} Modified: trunk/sc2/src/uqm/comm.h =================================================================== --- trunk/sc2/src/uqm/comm.h 2009-10-17 21:56:16 UTC (rev 3227) +++ trunk/sc2/src/uqm/comm.h 2009-10-18 16:53:27 UTC (rev 3228) @@ -21,16 +21,6 @@ #include "libs/compiler.h" #include "libs/gfxlib.h" - -typedef enum -{ - DONE_SUBTITLE, - NEXT_SUBTITLE, - READ_SUBTITLE, - SPACE_SUBTITLE, - WAIT_SUBTITLE, -} SUBTITLE_STATE; - #ifdef COMM_INTERNAL #define SLIDER_Y 107 @@ -38,8 +28,7 @@ #include "commanim.h" -void DrawAlienFrame (FRAME aframe, SEQUENCE *pSeq); -BOOLEAN SetClearSubtitle (BOOLEAN flag, SUBTITLE_STATE *sub_state); +extern void DrawAlienFrame (FRAME aframe, SEQUENCE *pSeq); extern LOCDATA CommData; extern volatile BOOLEAN ClearSummary; @@ -48,11 +37,11 @@ extern void init_communication (void); extern void uninit_communication (void); -extern SUBTITLE_STATE do_subtitles (UNICODE *pStr); extern void AlienTalkSegue (COUNT wait_track); BOOLEAN getLineWithinWidth(TEXT *pText, const unsigned char **startNext, SIZE maxWidth, COUNT maxChars); -void RedrawSubtitles (void); +extern void RedrawSubtitles (void); +extern BOOLEAN HaveSubtitlesChanged (void); extern RECT CommWndRect; /* comm window rect */ Modified: trunk/sc2/src/uqm/commanim.c =================================================================== --- trunk/sc2/src/uqm/commanim.c 2009-10-17 21:56:16 UTC (rev 3227) +++ trunk/sc2/src/uqm/commanim.c 2009-10-18 16:53:27 UTC (rev 3228) @@ -454,15 +454,15 @@ { CONTEXT OldContext; BOOLEAN CheckSub = FALSE; - BOOLEAN ClearSub; - SUBTITLE_STATE sub_state; + BOOLEAN SubtitleChange; - ClearSub = SetClearSubtitle (FALSE, &sub_state); + // Clearing any active subtitles counts as 'change' + SubtitleChange = HaveSubtitlesChanged (); OldContext = SetContext (TaskContext); if (ColorChange || ClearSummary) - { + { // Redraw the whole comm screen FRAME F; F = CommData.AlienFrame; CommData.AlienFrame = CommFrame; @@ -470,16 +470,16 @@ &Sequencer[CommData.NumAnimations - 1]); CommData.AlienFrame = F; CheckSub = TRUE; - ClearSub = ClearSummary; + SubtitleChange = ClearSummary; ColorChange = FALSE; ClearSummary = FALSE; } - if (Change || ClearSub) + if (Change || SubtitleChange) { STAMP s; s.origin.x = -SAFE_X; s.origin.y = 0; - if (ClearSub) + if (SubtitleChange) { s.frame = CommFrame; DrawStamp (&s); @@ -487,14 +487,14 @@ i = CommData.NumAnimations; while (i--) { - if (ClearSub || FrameChanged[i]) + if (SubtitleChange || FrameChanged[i]) { s.frame = AnimFrame[i]; DrawStamp (&s); FrameChanged[i] = 0; } } - if (ClearSub && TransitionFrame) + if (SubtitleChange && TransitionFrame) { s.frame = TransitionFrame; DrawStamp (&s); @@ -515,7 +515,7 @@ CheckSub = TRUE; } - if (CheckSub && sub_state >= SPACE_SUBTITLE) + if (CheckSub) RedrawSubtitles (); SetContext (OldContext); @@ -534,7 +534,7 @@ } Task -StartCommAnimTask(void) +StartCommAnimTask (void) { return AssignTask (ambient_anim_task, 3072, "ambient animations"); } Modified: trunk/sc2/src/uqm/confirm.c =================================================================== --- trunk/sc2/src/uqm/confirm.c 2009-10-17 21:56:16 UTC (rev 3227) +++ trunk/sc2/src/uqm/confirm.c 2009-10-18 16:53:27 UTC (rev 3228) @@ -18,7 +18,6 @@ #include "controls.h" #include "commglue.h" -#include "comm.h" #include "colors.h" #include "settings.h" #include "setup.h" @@ -180,11 +179,7 @@ !(LastActivity & CHECK_RESTART)) ResumeGameClock (); if (CommData.ConversationPhrases && PlayingTrack ()) - { ResumeTrack (); - if (CommData.AlienTransitionDesc.AnimFlags & TALK_DONE) - do_subtitles ((void *)~0); - } return (result); } Modified: trunk/sc2/src/uqm/oscill.c =================================================================== --- trunk/sc2/src/uqm/oscill.c 2009-10-17 21:56:16 UTC (rev 3227) +++ trunk/sc2/src/uqm/oscill.c 2009-10-18 16:53:27 UTC (rev 3228) @@ -156,7 +156,7 @@ if (sliderDisabled) return; - offs = GetSoundInfo (sliderSpace); + offs = GetTrackPosition (sliderSpace); if (offs != last_offs || sliderChanged) { sliderChanged = FALSE; Modified: trunk/sc2/src/uqm/setup.c =================================================================== --- trunk/sc2/src/uqm/setup.c 2009-10-17 21:56:16 UTC (rev 3227) +++ trunk/sc2/src/uqm/setup.c 2009-10-18 16:53:27 UTC (rev 3228) @@ -33,6 +33,7 @@ #include "libs/uio.h" #include "libs/file.h" #include "libs/graphics/gfx_common.h" +#include "libs/sound/sound.h" #include "libs/threadlib.h" #include "libs/vidlib.h" #include "libs/log.h" @@ -120,7 +121,9 @@ loadAddon ("3domusic"); } - loadAddon ("3dovoice"); /* Always try to use voice data */ + /* Always try to use voice data */ + if (!loadAddon ("3dovoice")) + speechVolumeScale = 0.0f; // XXX: need better no-speech indicator if (optPrecursorsMusic) { Modified: trunk/sc2/src/uqm/util.c =================================================================== --- trunk/sc2/src/uqm/util.c 2009-10-17 21:56:16 UTC (rev 3227) +++ trunk/sc2/src/uqm/util.c 2009-10-18 16:53:27 UTC (rev 3228) @@ -17,7 +17,6 @@ */ #include "commglue.h" -#include "comm.h" #include "controls.h" #include "util.h" #include "setup.h" @@ -224,11 +223,7 @@ LOBYTE (GLOBAL (CurrentActivity)) != WON_LAST_BATTLE) ResumeGameClock (); if (CommData.ConversationPhrases && PlayingTrack ()) - { ResumeTrack (); - if (CommData.AlienTransitionDesc.AnimFlags & TALK_DONE) - do_subtitles ((void *)~0); - } UnlockMutex (GraphicsLock); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Mee...@us...> - 2009-10-23 19:51:48
|
Revision: 3235 http://sc2.svn.sourceforge.net/sc2/?rev=3235&view=rev Author: Meep-Eep Date: 2009-10-23 19:51:33 +0000 (Fri, 23 Oct 2009) Log Message: ----------- Make DoPopupWindow() work over faded out screens. Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/src/libs/gfxlib.h trunk/sc2/src/libs/graphics/sdl/sdl_common.c trunk/sc2/src/libs/graphics/widgets.c trunk/sc2/src/libs/graphics/widgets.h trunk/sc2/src/uqm/confirm.c trunk/sc2/src/uqm/setupmenu.c Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2009-10-21 20:21:25 UTC (rev 3234) +++ trunk/sc2/ChangeLog 2009-10-23 19:51:33 UTC (rev 3235) @@ -1,4 +1,5 @@ Changes towards version 0.7: +- Make DoPopupWindow() work over faded out screens. - SvdB - Trackplayer rewrite; fixed many bugs - Alex - Source tree reorg: libs/ moved out of sc2code/, msvc++/ moved to build/msvc6/, src/sc2code/ renamed to src/uqm/ - Coredev Modified: trunk/sc2/src/libs/gfxlib.h =================================================================== --- trunk/sc2/src/libs/gfxlib.h 2009-10-21 20:21:25 UTC (rev 3234) +++ trunk/sc2/src/libs/gfxlib.h 2009-10-23 19:51:33 UTC (rev 3235) @@ -246,7 +246,7 @@ #define GetColorMapAddress GetStringAddress #define GetColorMapContents GetStringContents -void SetSystemRect (RECT *pRect); +void SetSystemRect (const RECT *pRect); void ClearSystemRect (void); #endif /* _GFXLIB_H */ Modified: trunk/sc2/src/libs/graphics/sdl/sdl_common.c =================================================================== --- trunk/sc2/src/libs/graphics/sdl/sdl_common.c 2009-10-21 20:21:25 UTC (rev 3234) +++ trunk/sc2/src/libs/graphics/sdl/sdl_common.c 2009-10-23 19:51:33 UTC (rev 3235) @@ -221,7 +221,7 @@ static SDL_Rect system_box; void -SetSystemRect (RECT *r) +SetSystemRect (const RECT *r) { system_box_active = TRUE; system_box.x = r->corner.x; Modified: trunk/sc2/src/libs/graphics/widgets.c =================================================================== --- trunk/sc2/src/libs/graphics/widgets.c 2009-10-21 20:21:25 UTC (rev 3234) +++ trunk/sc2/src/libs/graphics/widgets.c 2009-10-23 19:51:33 UTC (rev 3235) @@ -79,8 +79,10 @@ UnbatchGraphics (); } +// windowRect, if not NULL, will be filled with the dimensions of the +// window drawn. void -DrawLabelAsWindow (WIDGET_LABEL *label) +DrawLabelAsWindow (WIDGET_LABEL *label, RECT *windowRect) { COLOR oldfg = SetContextForeGroundColor (WIDGET_DIALOG_TEXT_COLOR); FONT oldfont = 0; @@ -129,6 +131,16 @@ if (oldfont) SetContextFont (oldfont); SetContextForeGroundColor (oldfg); + + if (windowRect != NULL) { + // Add the outer border added by DrawShadowedBox. + // XXX: It may be nicer to add a border size parameter to + // DrawShadowedBox, instead of assuming 2 here. + windowRect->corner.x = r.corner.x - 2; + windowRect->corner.y = r.corner.y - 2; + windowRect->extent.width = r.extent.width + 4; + windowRect->extent.height = r.extent.height + 4; + } } void Modified: trunk/sc2/src/libs/graphics/widgets.h =================================================================== --- trunk/sc2/src/libs/graphics/widgets.h 2009-10-21 20:21:25 UTC (rev 3234) +++ trunk/sc2/src/libs/graphics/widgets.h 2009-10-23 19:51:33 UTC (rev 3235) @@ -176,7 +176,7 @@ } WIDGET_CONTROLENTRY; void DrawShadowedBox (RECT *r, COLOR bg, COLOR dark, COLOR medium); -void DrawLabelAsWindow (WIDGET_LABEL *label); +void DrawLabelAsWindow (WIDGET_LABEL *label, RECT *windowRect); void Widget_SetWindowColors (COLOR bg, COLOR dark, COLOR medium); FONT Widget_SetFont (FONT newFont); Modified: trunk/sc2/src/uqm/confirm.c =================================================================== --- trunk/sc2/src/uqm/confirm.c 2009-10-21 20:21:25 UTC (rev 3234) +++ trunk/sc2/src/uqm/confirm.c 2009-10-23 19:51:33 UTC (rev 3235) @@ -211,6 +211,7 @@ FRAME F; CONTEXT oldContext; RECT oldRect; + RECT windowRect; POPUP_STATE state; MENU_SOUND_FLAGS s0, s1; @@ -250,7 +251,8 @@ Widget_SetFont (StarConFont); Widget_SetWindowColors (SHADOWBOX_BACKGROUND_COLOR, SHADOWBOX_DARK_COLOR, SHADOWBOX_MEDIUM_COLOR); - DrawLabelAsWindow (&label); + DrawLabelAsWindow (&label, &windowRect); + SetSystemRect (&windowRect); GetMenuSounds (&s0, &s1); SetMenuSounds (MENU_SOUND_NONE, MENU_SOUND_NONE); @@ -258,6 +260,7 @@ state.InputFunc = DoPopup; DoInput (&state, TRUE); + ClearSystemRect (); DrawStamp (&s); DestroyDrawable (ReleaseDrawable (s.frame)); SetContextClipRect (&oldRect); Modified: trunk/sc2/src/uqm/setupmenu.c =================================================================== --- trunk/sc2/src/uqm/setupmenu.c 2009-10-21 20:21:25 UTC (rev 3234) +++ trunk/sc2/src/uqm/setupmenu.c 2009-10-23 19:51:33 UTC (rev 3235) @@ -586,7 +586,7 @@ int index = widget->highlighted; FlushInput (); - DrawLabelAsWindow (&labels[3]); + DrawLabelAsWindow (&labels[3], NULL); RebindInputState (template, control, index); populate_editkeys (template); FlushInput (); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2009-10-24 22:22:11
|
Revision: 3247 http://sc2.svn.sourceforge.net/sc2/?rev=3247&view=rev Author: avolkov Date: 2009-10-24 22:22:02 +0000 (Sat, 24 Oct 2009) Log Message: ----------- We cannot rely on SDL_DisplayFormatAlpha(). Our code assumed things which may not be true on a Mac w/ SDL 1.2.14. This fix is also applicable to all platforms Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/src/libs/graphics/sdl/pure.c trunk/sc2/src/libs/graphics/sdl/scalers.c trunk/sc2/src/libs/graphics/sdl/sdl_common.c Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2009-10-24 21:53:05 UTC (rev 3246) +++ trunk/sc2/ChangeLog 2009-10-24 22:22:02 UTC (rev 3247) @@ -1,4 +1,6 @@ Changes towards version 0.7: +- Fix for weird colors problem on MacOSX w/ SDL 1.2.14; also improves + overall compatibility on all platforms - Alex - Unix build system cleanups, fix detection of SDL, libmikmod, pthread - SvdB - Make DoPopupWindow() work over faded out screens. - SvdB - Trackplayer rewrite; fixed many bugs - Alex Modified: trunk/sc2/src/libs/graphics/sdl/pure.c =================================================================== --- trunk/sc2/src/libs/graphics/sdl/pure.c 2009-10-24 21:53:05 UTC (rev 3246) +++ trunk/sc2/src/libs/graphics/sdl/pure.c 2009-10-24 22:22:02 UTC (rev 3247) @@ -73,11 +73,63 @@ return *screen == 0 ? -1 : 0; } +// We cannot rely on SDL_DisplayFormatAlpha() anymore. It can return +// formats that we do not expect (SDL v1.2.14 on Mac OSX). Mac likes +// ARGB surfaces, but SDL_DisplayFormatAlpha thinks that only RGBA are fast. +// This is a generic replacement that gives what we want. +static void +CalcAlphaFormat (const SDL_PixelFormat* video, SDL_PixelFormat* ours) +{ + int valid = 0; + + // We use 32-bit surfaces internally + ours->BitsPerPixel = 32; + + // Try to get as close to the video format as possible + if (video->BitsPerPixel == 15 || video->BitsPerPixel == 16) + { // At least match the channel order + ours->Rshift = video->Rshift / 5 * 8; + ours->Gshift = video->Gshift / 5 * 8; + ours->Bshift = video->Bshift / 5 * 8; + valid = 1; + } + else if (video->BitsPerPixel == 24 || video->BitsPerPixel == 32) + { + // We can only use channels aligned on byte boundary + if (video->Rshift % 8 == 0 && video->Gshift % 8 == 0 + && video->Bshift % 8 == 0) + { // Match RGB in video + ours->Rshift = video->Rshift; + ours->Gshift = video->Gshift; + ours->Bshift = video->Bshift; + valid = 1; + } + } + + if (valid) + { // For alpha, use the unoccupied byte + ours->Ashift = 48 - (ours->Rshift + ours->Gshift + ours->Bshift); + // Set channels according to byte positions + ours->Rmask = 0xff << ours->Rshift; + ours->Gmask = 0xff << ours->Gshift; + ours->Bmask = 0xff << ours->Bshift; + ours->Amask = 0xff << ours->Ashift; + return; + } + + // Fallback case. It does not matter what we set, but SDL likes + // Alpha to be the highest. + ours->Rmask = 0x000000ff; + ours->Gmask = 0x0000ff00; + ours->Bmask = 0x00ff0000; + ours->Amask = 0xff000000; +} + int TFB_Pure_ConfigureVideo (int driver, int flags, int width, int height, int togglefullscreen) { int i, videomode_flags; - SDL_Surface *temp_surf; + SDL_PixelFormat conv_fmt; GraphicsDriver = driver; @@ -120,13 +172,28 @@ } else { + const SDL_Surface *video = SDL_GetVideoSurface (); + const SDL_PixelFormat* fmt = video->format; + + ScreenColorDepth = fmt->BitsPerPixel; log_add (log_Info, "Set the resolution to: %ix%ix%i", - SDL_GetVideoSurface()->w, SDL_GetVideoSurface()->h, - SDL_GetVideoSurface()->format->BitsPerPixel); - ScreenColorDepth = SDL_GetVideoSurface()->format->BitsPerPixel; + video->w, video->h, ScreenColorDepth); + log_add (log_Info, " Video: R %08x, G %08x, B %08x, A %08x", + fmt->Rmask, fmt->Gmask, fmt->Bmask, fmt->Amask); if (togglefullscreen) + { + // NOTE: We cannot change the format_conv_surf now because we + // have already loaded lots of graphics and changing it now + // will only lead to chaos. + // Just check if channel order has changed significantly + CalcAlphaFormat (fmt, &conv_fmt); + fmt = format_conv_surf->format; + if (conv_fmt.Rmask != fmt->Rmask || conv_fmt.Bmask != fmt->Bmask) + log_add (log_Warning, "Warning: pixel format has changed " + "significantly. Rendering will be slow."); return 0; + } } // Create a 32bpp surface in a compatible format which will supply @@ -136,27 +203,23 @@ SDL_FreeSurface (format_conv_surf); format_conv_surf = NULL; } - temp_surf = SDL_CreateRGBSurface (SDL_SWSURFACE, 0, 0, 32, - 0x00ff0000, 0x0000ff00, 0x000000ff, 0x00000000); - if (temp_surf) - { // acquire a fast compatible format from SDL - format_conv_surf = SDL_DisplayFormatAlpha (temp_surf); - if (!format_conv_surf || - format_conv_surf->format->BitsPerPixel != 32) - { // absolute fallback case - format_conv_surf = SDL_CreateRGBSurface (SDL_SWSURFACE, 0, 0, 32, - 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000); - } - SDL_FreeSurface (temp_surf); - } + CalcAlphaFormat (SDL_Video->format, &conv_fmt); + format_conv_surf = SDL_CreateRGBSurface (SDL_SWSURFACE, 0, 0, + conv_fmt.BitsPerPixel, conv_fmt.Rmask, conv_fmt.Gmask, + conv_fmt.Bmask, conv_fmt.Amask); if (!format_conv_surf) { log_add (log_Error, "Couldn't create format_conv_surf: %s", SDL_GetError()); return -1; } + else + { + const SDL_PixelFormat* fmt = format_conv_surf->format; + log_add (log_Info, " Internal: R %08x, G %08x, B %08x, A %08x", + fmt->Rmask, fmt->Gmask, fmt->Bmask, fmt->Amask); + } - for (i = 0; i < TFB_GFX_NUMSCREENS; i++) { if (0 != ReInit_Screen (&SDL_Screens[i], format_conv_surf, @@ -278,8 +341,9 @@ backbuffer = fade_temp; // we can scale directly onto SDL_Video if video is compatible - if (SDL_Video->format->BitsPerPixel == - SDL_Screen->format->BitsPerPixel) + if (SDL_Video->format->BitsPerPixel == SDL_Screen->format->BitsPerPixel + && SDL_Video->format->Rmask == SDL_Screen->format->Rmask + && SDL_Video->format->Bmask == SDL_Screen->format->Bmask) scalebuffer = SDL_Video; else scalebuffer = scaled_display; Modified: trunk/sc2/src/libs/graphics/sdl/scalers.c =================================================================== --- trunk/sc2/src/libs/graphics/sdl/scalers.c 2009-10-24 21:53:05 UTC (rev 3246) +++ trunk/sc2/src/libs/graphics/sdl/scalers.c 2009-10-24 22:22:02 UTC (rev 3247) @@ -250,18 +250,18 @@ if (Scale_Platform == SCALEPLAT_NULL) { // Plain C versions - if (fmt->Rmask == 0xff000000) + if (fmt->Rmask == 0xff000000 && fmt->Bmask == 0x0000ff00) Scale_Platform = SCALEPLAT_C_RGBA; - else if (fmt->Rmask == 0x00ff0000) + else if (fmt->Rmask == 0x00ff0000 && fmt->Bmask == 0x000000ff) Scale_Platform = SCALEPLAT_C_ARGB; - else if (fmt->Rmask == 0x0000ff00) + else if (fmt->Rmask == 0x0000ff00 && fmt->Bmask == 0xff000000) Scale_Platform = SCALEPLAT_C_BGRA; - else if (fmt->Rmask == 0x000000ff) + else if (fmt->Rmask == 0x000000ff && fmt->Bmask == 0x00ff0000) Scale_Platform = SCALEPLAT_C_ABGR; else { // use slowest default - log_add (log_Warning, "Scale_PrepPlatform(): " - "unknown Red mask (0x%08x)", fmt->Rmask); + log_add (log_Warning, "Scale_PrepPlatform(): unknown masks " + "(Red %08x, Blue %08x)", fmt->Rmask, fmt->Bmask); Scale_Platform = SCALEPLAT_C; } Modified: trunk/sc2/src/libs/graphics/sdl/sdl_common.c =================================================================== --- trunk/sc2/src/libs/graphics/sdl/sdl_common.c 2009-10-24 21:53:05 UTC (rev 3246) +++ trunk/sc2/src/libs/graphics/sdl/sdl_common.c 2009-10-24 22:22:02 UTC (rev 3247) @@ -185,6 +185,7 @@ TFB_UninitGraphics (void) { Uninit_DrawCommandQueue (); + // TODO: Uninit whatever the drivers have set up for us SDL_Quit (); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2009-10-25 22:21:21
|
Revision: 3252 http://sc2.svn.sourceforge.net/sc2/?rev=3252&view=rev Author: avolkov Date: 2009-10-25 22:21:08 +0000 (Sun, 25 Oct 2009) Log Message: ----------- Native message box on MacOSX; platform-specific separation of box drivers Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/src/libs/log/Makeinfo trunk/sc2/src/libs/log/uqmlog.c trunk/sc2/src/libs/log/uqmlog.h Added Paths: ----------- trunk/sc2/src/libs/log/loginternal.h trunk/sc2/src/libs/log/msgbox.h trunk/sc2/src/libs/log/msgbox_macosx.m trunk/sc2/src/libs/log/msgbox_stub.c trunk/sc2/src/libs/log/msgbox_win.c Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2009-10-25 01:17:36 UTC (rev 3251) +++ trunk/sc2/ChangeLog 2009-10-25 22:21:08 UTC (rev 3252) @@ -1,4 +1,5 @@ Changes towards version 0.7: +- Added a native error box for MacOSX (like we have for Windows) - Alex - Fix for weird colors problem on MacOSX w/ SDL 1.2.14; also improves overall compatibility on all platforms - Alex - Unix build system cleanups, fix detection of SDL, libmikmod, pthread - SvdB Modified: trunk/sc2/src/libs/log/Makeinfo =================================================================== --- trunk/sc2/src/libs/log/Makeinfo 2009-10-25 01:17:36 UTC (rev 3251) +++ trunk/sc2/src/libs/log/Makeinfo 2009-10-25 22:21:08 UTC (rev 3252) @@ -1 +1,13 @@ uqm_CFILES="uqmlog.c" + +case "$HOST_SYSTEM" in + Darwin) + uqm_MFILES="msgbox_macosx.m" + ;; + MINGW32*|CYGWIN*) + uqm_CFILES="$uqm_CFILES msgbox_win.c" + ;; + *) + uqm_CFILES="$uqm_CFILES msgbox_stub.c" + ;; +esac Added: trunk/sc2/src/libs/log/loginternal.h =================================================================== --- trunk/sc2/src/libs/log/loginternal.h (rev 0) +++ trunk/sc2/src/libs/log/loginternal.h 2009-10-25 22:21:08 UTC (rev 3252) @@ -0,0 +1,24 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef UQM_LOGINTERNAL_H_INCL__ +#define UQM_LOGINTERNAL_H_INCL__ + +#include <stdio.h> + +extern FILE *streamOut; + +#endif /* UQM_LOGINTERNAL_H_INCL__ */ Property changes on: trunk/sc2/src/libs/log/loginternal.h ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/sc2/src/libs/log/msgbox.h =================================================================== --- trunk/sc2/src/libs/log/msgbox.h (rev 0) +++ trunk/sc2/src/libs/log/msgbox.h 2009-10-25 22:21:08 UTC (rev 3252) @@ -0,0 +1,23 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef UQM_MSGBOX_H_INCL__ +#define UQM_MSGBOX_H_INCL__ + +extern void log_displayBox (const /*UTF-8*/char *title, int isError, + const /*UTF-8*/char *msg); + +#endif /* UQM_MSGBOX_H_INCL__ */ Property changes on: trunk/sc2/src/libs/log/msgbox.h ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/sc2/src/libs/log/msgbox_macosx.m =================================================================== --- trunk/sc2/src/libs/log/msgbox_macosx.m (rev 0) +++ trunk/sc2/src/libs/log/msgbox_macosx.m 2009-10-25 22:21:08 UTC (rev 3252) @@ -0,0 +1,37 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#import <Cocoa/Cocoa.h> +#import "msgbox.h" + +void +log_displayBox (const /*UTF-8*/char *title, int isError, + const /*UTF-8*/char *msg) +{ + NSString *titleStr = [NSString stringWithUTF8String:title]; + NSString *msgStr = [NSString stringWithUTF8String:msg]; + + if (!titleStr || !msgStr) + return; // Oops, out of memory? + + if (isError) + NSRunCriticalAlertPanel (titleStr, msgStr, nil, nil, nil); + else + NSRunInformationalAlertPanel (titleStr, msgStr, nil, nil, nil); + + // titleStr and msgStr are autoreleased +} + Property changes on: trunk/sc2/src/libs/log/msgbox_macosx.m ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/sc2/src/libs/log/msgbox_stub.c =================================================================== --- trunk/sc2/src/libs/log/msgbox_stub.c (rev 0) +++ trunk/sc2/src/libs/log/msgbox_stub.c 2009-10-25 22:21:08 UTC (rev 3252) @@ -0,0 +1,34 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include "msgbox.h" +#include "loginternal.h" + +void +log_displayBox (const /*UTF-8*/char *title, int isError, + const /*UTF-8*/char *msg) +{ + // We do not know how to display a box. Perhaps it's done with a + // hefty dose of pixie dust, or perhaps with a hammer and nails. + // So just inform the user of our predicament + fprintf (streamOut, "Do not know how to display %s box\n", + isError ? "an error" : "a"); + + // Suppress the compiler warnings in any case. + (void)title; + (void)msg; +} + Property changes on: trunk/sc2/src/libs/log/msgbox_stub.c ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/sc2/src/libs/log/msgbox_win.c =================================================================== --- trunk/sc2/src/libs/log/msgbox_win.c (rev 0) +++ trunk/sc2/src/libs/log/msgbox_win.c 2009-10-25 22:21:08 UTC (rev 3252) @@ -0,0 +1,67 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include "msgbox.h" +#define WIN32_LEAN_AND_MEAN +#include <windows.h> +#include <stdlib.h> +#include <malloc.h> + + +// Converts a UTF-8 string to Windows WideChar. +// Caller is responsible for free()ing the returned string. +static LPWSTR +toWideChar (const /*UTF-8*/char *str) +{ + int cch; + LPWSTR wstr; + + cch = MultiByteToWideChar (CP_UTF8, 0, str, -1, NULL, 0); + if (cch == 0) + return NULL; // failed, probably no UTF8 converter + + wstr = malloc (cch * sizeof (WCHAR)); + if (!wstr) + return NULL; // out of memory + + cch = MultiByteToWideChar (CP_UTF8, 0, str, -1, wstr, cch); + if (cch == 0) + { // Failed. It should not fail here if it succeeded just above, + // but it did. Not much can be done about it. + free (wstr); + return NULL; + } + + return wstr; +} + +void +log_displayBox (const /*UTF-8*/char *title, int isError, + const /*UTF-8*/char *msg) +{ + LPWSTR swTitle = toWideChar (title); + LPWSTR swMsg = toWideChar (msg); + UINT uType = isError ? MB_ICONWARNING : MB_ICONINFORMATION; + + if (swTitle && swMsg) + MessageBoxW (NULL, swMsg, swTitle, uType); + else // Could not convert; let's try ASCII, though it may look ugly + MessageBoxA (NULL, msg, title, uType); + + free (swTitle); + free (swMsg); +} + Property changes on: trunk/sc2/src/libs/log/msgbox_win.c ___________________________________________________________________ Added: svn:eol-style + native Modified: trunk/sc2/src/libs/log/uqmlog.c =================================================================== --- trunk/sc2/src/libs/log/uqmlog.c 2009-10-25 01:17:36 UTC (rev 3251) +++ trunk/sc2/src/libs/log/uqmlog.c 2009-10-25 22:21:08 UTC (rev 3252) @@ -15,6 +15,8 @@ */ #include "uqmlog.h" +#include "loginternal.h" +#include "msgbox.h" #include <string.h> #include <stdio.h> #include <stdarg.h> @@ -48,14 +50,13 @@ static bool showBox = true; static bool errorBox = true; -static FILE *streamOut; +FILE *streamOut; static volatile int qlock = 0; static Mutex qmutex; static void exitCallback (void); static void displayLog (bool isError); -static void displayBox (const char *title, bool isError, const char *msg); static void lockQueue (void) @@ -324,45 +325,6 @@ *p = '\0'; - displayBox ("The Ur-Quan Masters", isError, msgBuf); + log_displayBox ("The Ur-Quan Masters", isError, msgBuf); } - -#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64) - -extern int __stdcall MessageBoxA (void *hWnd, const char* lpText, - const char* lpCaption, uint32 uType); - -#define MB_ICONEXCLAMATION 0x00000030L -#define MB_ICONASTERISK 0x00000040L - -static void -displayBox (const char *title, bool isError, const char *msg) -{ - MessageBoxA (0, msg, title, - isError ? MB_ICONEXCLAMATION : MB_ICONASTERISK); -} - -#elif defined(__APPLE__) - -static void -displayBox (const char *title, bool isError, const char *msg) -{ - (void) title; - (void) isError; - (void) msg; - // do something here -} - -#else - -static void -displayBox (const char *title, bool isError, const char *msg) -{ - (void) title; - (void) isError; - (void) msg; - // do nothing here -} - -#endif /* OS disjunction */ Modified: trunk/sc2/src/libs/log/uqmlog.h =================================================================== --- trunk/sc2/src/libs/log/uqmlog.h 2009-10-25 01:17:36 UTC (rev 3251) +++ trunk/sc2/src/libs/log/uqmlog.h 2009-10-25 22:21:08 UTC (rev 3252) @@ -14,8 +14,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef _UQMLOG_H -#define _UQMLOG_H +#ifndef UQMLOG_H_INCL__ +#define UQMLOG_H_INCL__ #include "port.h" #include "types.h" @@ -56,5 +56,4 @@ VPRINTF_FUNCTION(2); -#endif /* _UQMLOG_H */ - +#endif /* UQMLOG_H_INCL__ */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2009-10-26 18:33:00
|
Revision: 3254 http://sc2.svn.sourceforge.net/sc2/?rev=3254&view=rev Author: avolkov Date: 2009-10-26 18:32:48 +0000 (Mon, 26 Oct 2009) Log Message: ----------- Fixed the Syreen 'several hours later' timing; bug #1011 Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/content/addons/3dovoice/syreen/syreen.ts Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2009-10-26 18:25:56 UTC (rev 3253) +++ trunk/sc2/ChangeLog 2009-10-26 18:32:48 UTC (rev 3254) @@ -1,4 +1,5 @@ Changes towards version 0.7: +- Fixed the Syreen lights-out scene timing (bug #1011) - Alex - Added a native error box for MacOSX (like we have for Windows) - Alex - Fix for weird colors problem on MacOSX w/ SDL 1.2.14; also improves overall compatibility on all platforms - Alex Modified: trunk/sc2/content/addons/3dovoice/syreen/syreen.ts =================================================================== --- trunk/sc2/content/addons/3dovoice/syreen/syreen.ts 2009-10-26 18:25:56 UTC (rev 3253) +++ trunk/sc2/content/addons/3dovoice/syreen/syreen.ts 2009-10-26 18:32:48 UTC (rev 3254) @@ -126,6 +126,6 @@ #(THEN_LET_ME_TEACH) 2533 #(not_much_more_to_say) #(THEN_STOP_TALKING) 3935 -#(LATER) 1993,751,691 +#(LATER) #(SEX_GOODBYE) 3925,1843,3876,6299 #(OUT_TAKES) 5500,5500,5000,5000,4000,3000,5500 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2009-10-26 20:59:32
|
Revision: 3256 http://sc2.svn.sourceforge.net/sc2/?rev=3256&view=rev Author: avolkov Date: 2009-10-26 20:59:14 +0000 (Mon, 26 Oct 2009) Log Message: ----------- Revert graphics settings entirely when a mode switch fails; bug #1056 Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/src/libs/graphics/sdl/sdl_common.c Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2009-10-26 19:49:18 UTC (rev 3255) +++ trunk/sc2/ChangeLog 2009-10-26 20:59:14 UTC (rev 3256) @@ -1,4 +1,5 @@ Changes towards version 0.7: +- Revert gfx settings entirely when a mode switch fails (bug #1056) - Alex - Fixed the Syreen lights-out scene timing (bug #1011) - Alex - Added a native error box for MacOSX (like we have for Windows) - Alex - Fix for weird colors problem on MacOSX w/ SDL 1.2.14; also improves Modified: trunk/sc2/src/libs/graphics/sdl/sdl_common.c =================================================================== --- trunk/sc2/src/libs/graphics/sdl/sdl_common.c 2009-10-26 19:49:18 UTC (rev 3255) +++ trunk/sc2/src/libs/graphics/sdl/sdl_common.c 2009-10-26 20:59:14 UTC (rev 3256) @@ -860,16 +860,18 @@ case TFB_DRAWCOMMANDTYPE_REINITVIDEO: { int oldDriver = GraphicsDriver; + int oldFlags = GfxFlags; + int oldWidth = ScreenWidthActual; + int oldHeight = ScreenHeightActual; if (TFB_ReInitGraphics (DC.data.reinitvideo.driver, DC.data.reinitvideo.flags, DC.data.reinitvideo.width, DC.data.reinitvideo.height)) { log_add (log_Error, "Could not provide requested mode: " "reverting to last known driver."); - if (TFB_ReInitGraphics (oldDriver, - DC.data.reinitvideo.flags, - DC.data.reinitvideo.width, - DC.data.reinitvideo.height)) + // We don't know what exactly failed, so roll it all back + if (TFB_ReInitGraphics (oldDriver, oldFlags, + oldWidth, oldHeight)) { log_add (log_Fatal, "Couldn't reinit at that point either. " This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2009-10-28 05:00:22
|
Revision: 3259 http://sc2.svn.sourceforge.net/sc2/?rev=3259&view=rev Author: avolkov Date: 2009-10-28 05:00:07 +0000 (Wed, 28 Oct 2009) Log Message: ----------- Do not try an orbital insertion when the ship is not moving; bug #648 Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/src/uqm/cyborg.c trunk/sc2/src/uqm/velocity.h Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2009-10-27 18:41:12 UTC (rev 3258) +++ trunk/sc2/ChangeLog 2009-10-28 05:00:07 UTC (rev 3259) @@ -1,4 +1,5 @@ Changes towards version 0.7: +- Fixed AI ship not moving on warp in (bug #648) - Alex - Revert gfx settings entirely when a mode switch fails (bug #1056) - Alex - Fixed the Syreen lights-out scene timing (bug #1011) - Alex - Added a native error box for MacOSX (like we have for Windows) - Alex Modified: trunk/sc2/src/uqm/cyborg.c =================================================================== --- trunk/sc2/src/uqm/cyborg.c 2009-10-27 18:41:12 UTC (rev 3258) +++ trunk/sc2/src/uqm/cyborg.c 2009-10-28 05:00:07 UTC (rev 3259) @@ -1124,13 +1124,14 @@ ed.facing = ARCTAN (-dx, -dy); if (UltraManeuverable) ed.MoveState = AVOID; - else + else // Try a gravity whip ed.MoveState = ENTICE; ObjectsOfConcern[GRAVITY_MASS_INDEX] = ed; } - else if (!UltraManeuverable) - { + else if (!UltraManeuverable && + !IsVelocityZero (&Ship.velocity)) + { // Try an orbital insertion, don't thrust ++Ship.thrust_wait; if (Ship.turn_wait) ShipMoved = TRUE; Modified: trunk/sc2/src/uqm/velocity.h =================================================================== --- trunk/sc2/src/uqm/velocity.h 2009-10-27 18:41:12 UTC (rev 3258) +++ trunk/sc2/src/uqm/velocity.h 2009-10-28 05:00:07 UTC (rev 3259) @@ -45,6 +45,14 @@ extern void DeltaVelocityComponents (VELOCITY_DESC *velocityptr, SIZE dx, SIZE dy); +static inline BOOLEAN +IsVelocityZero (VELOCITY_DESC *vptr) +{ + return vptr->vector.width == 0 && vptr->vector.height == 0 && + vptr->incr.width == 0 && vptr->incr.height == 0 && + vptr->fract.width == 0 && vptr->fract.height == 0; +} + static inline DWORD VelocitySquared (SIZE dx, SIZE dy) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |