2582 Commits

Author SHA1 Message Date
mcmartin e94b959c9d Threadlib refactoring, phase 2.
This is a near-total reorganization.  Full details will appear in
doc/devel/threads when that document is completed.


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1257 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-23 16:33:50 +00:00
mcmartin eea57e89d5 Threadlib refactoring, phase 1
All constructs, save Mutexes, can carry names.  (Mutexes will carry them
once HMalloc doesn't require a Mutex.)

All constructs are now opaque to the game logic.  Some limited upcalls
will be added in phase 2 so that the game logic can initialize some
thread-local data in a backend-independent way.

DEBUG_TRACK_SEM is gone.  In its place are NAMED_SYNCHRO (which names
synchronization constructs) and TRACK_CONTENTION (which reports when
threads go to sleep because of synchronization constructs.)  Again,
Mutexes are immune.

A lot of conditionally compiled code in the threadlib was collated,
dramatically reducing the number of preprocessing directives.

The exposed (threadlib.h) and backend (sdlthreads.h) APIs match one
another more closely now, further reducing the level of preprocessor
work required.


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1255 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-21 09:21:23 +00:00
mcmartin 51aa717fc6 Migrated the GraphicsLock to an ordinary mutex; it is used exclusively
for maintaining critical sections.


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1253 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-20 07:38:23 +00:00
avolkov 3e17b20d47 Relevant video routines moved to libs/video
(video playback support phase 2)


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1252 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-20 01:28:32 +00:00
avolkov 6fba824435 Added video player and .duk audio/video decoders;
Code will attempt playing intro and victory movies
(video playback support phase 2)


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1251 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-20 01:20:21 +00:00
avolkov fc49c38865 Added video player and .duk video decoder;
Code will attempt playing intro and victory movies
(video playback support phase 2)


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1250 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-20 01:17:21 +00:00
avolkov 4031518aa5 Added video player
(video playback support phase 2)


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1249 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-20 01:15:52 +00:00
avolkov 1e08b8a527 Added video player and .duk video decoder
(video playback support phase 2)


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1248 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-20 01:15:03 +00:00
avolkov d8a815db68 Added .duk audio decoder
(video playback support phase 2)


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1247 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-20 01:11:37 +00:00
avolkov 3decaeaf7a Video playback support phase 2
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1246 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-20 01:09:01 +00:00
avolkov 49fbd74ed4 Better forward-declare version
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1245 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-19 15:37:53 +00:00
meep-eep 5e99935bd9 Removed unnecessary memset() after calloc().
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1244 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-19 03:44:13 +00:00
meep-eep 1344c87460 Extra fallback for the unlikely case that $HOME isn't set on a unix
system (fixes 493).


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1243 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-19 03:15:00 +00:00
meep-eep 3652e93ad8 Accept spaces in argument to '--contentdir'.
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1242 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-19 01:07:47 +00:00
gewlitys 9b96b8d9b8 A few updates to the save/load menu (bug #291), from Paxtez
1) The boxes and text is drawn in the same batch as the rest of the summary, so
the fade-in's now have the text and it doesn't appear a split second later.
2) Widens the rects to closer match the PC version (4 of 4 people polled
prefered the new look.
3) Adds a little bound check for when the SAVES_PER_PAGE doesn't divide evenly
into MAXED_SAVED_GAMES
4) Expands the black rect to cover the safe-x expanded bars.
5) When displaying more then 99 saves will display 3 digits.


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1241 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-18 20:51:01 +00:00
avolkov f8090b478c warning fix
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1240 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-18 19:44:44 +00:00
avolkov f1e355898a Buffer tagging and trackplayer chaining abstraction;
Trackplayer-specific code is separated from the streamer and
is done in callbacks; buffer-tagging is also callback-driven;
(movie playback support phase 1)


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1238 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-18 10:02:10 +00:00
avolkov e00ce8ec3b Thraddash dialog fix (bug #486)
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1236 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-15 17:13:31 +00:00
gewlitys 490108dfe6 FIxes additional problems found in bug #476, from chmmravatar
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1235 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-15 16:38:04 +00:00
mcmartin c967decff0 Unified the recursive mutex implementations in MixSDL and DCQ code
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1233 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-14 02:23:08 +00:00
mcmartin e9c78782e7 Introduction and first deployment of CrossThreadMutex
CrossThreadMutex has the semantics for locking that we actually want, as
opposed to Semaphores, which are "close enough" but fail dramatically on
double-unlocks.  The clock and graphics locks have been shifted over to
CTMs, but a few still remain (and will be replaced later).


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1232 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-13 17:54:20 +00:00
gewlitys a8ed3da9d4 Load/save icons don't flash anymore when in savegame menu (part of bug
#291), from Paxtez


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1231 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-13 16:21:12 +00:00
gewlitys 9a3b53d291 Savegame slot now defaults to the last one used during one execution of
uqm (bug #477), from chmmravatar


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1230 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-13 16:06:57 +00:00
gewlitys b8f4f7dfe9 Fixed one-pixel glitch in shipyard when scrapping (bug #461), from
Paxtez


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1229 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-13 15:51:03 +00:00
gewlitys fc5f75dbb9 Adjusted subtitle timings when there are no oggs (part of bug #362),
from chmmravatar


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1228 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-13 15:41:14 +00:00
gewlitys 50a80d6f63 Fixed crash in conversation summary and ffw/frew problem when selling
data to Melnorme (bug #476), from chmmravatar


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1227 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-13 15:08:51 +00:00
mcmartin 3358c8e571 XFormControl synchronized with mutexes instead of semaphores
Like w_memlib, these are always unlocked at procedure boundaries, so
shifting to Mutexes is safe.


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1226 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-13 07:30:35 +00:00
mcmartin 96e1f955a0 Control memory with a mutex instead of a semaphore
Mutex locks, unlike semaphore locks, cannot fail, but they must stay
within their thread.  The memory lock is unlocked at all procedure
boundaries; thus, it is safe to use a normal mutex.


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1225 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-13 07:10:43 +00:00
mcmartin ddee2625cb DCQ synchronization handled with Mutexes now
This may help bug #359.  (Using a Mutex is safe, because checks were
already in place to ensure that only the thread that locked the DCQ can
ever unlock it.)


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1224 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-13 06:55:07 +00:00
mcmartin e71c28744c Regularized lock and unlock calls on the Graphics and Clock semaphores
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1223 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-13 06:10:10 +00:00
meep-eep f198ca6d11 Removed a memory leak in error handling.
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1222 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-12 23:28:33 +00:00
mcmartin ace6ecaa5b Flush input after selecting "Navigate"
This fixes some menu/thrust confusion that broke autopilot (bug #475)


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1221 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-10 11:09:37 +00:00
gewlitys 7af90d69d0 bumped version to 0.31
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1220 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-09 15:45:52 +00:00
avolkov 352659de13 Fix ships in solar system getting displaced after having visited a planet (bug #365)
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1217 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-08 22:32:10 +00:00
avolkov 73870cbf66 Fix collisions/encounters with "invisible" fleeing ships (bug #319)
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1216 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-08 22:25:00 +00:00
avolkov 57d0ca0ada VC 'const qualifier' warning fix
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1215 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-08 22:08:13 +00:00
avolkov 3b82982a0d Quit confirmation fixes, phase 3: font effect save/restore
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1213 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-08 21:59:32 +00:00
avolkov 0f0317b60b Quit confirmation fixes, phase 2:
lander reports, conversation summaries, outtakes, end credits
bugs #454, #465, #466


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1212 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-08 21:55:47 +00:00
avolkov 0d411167af Quit confirmation fixes, phase 2:
lander reports, conversation summaries, outtakes, end credits
bugs #454, #465, #466


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1211 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-08 21:50:19 +00:00
avolkov 9fd9791d45 Quit confirmation fixes, phase 1
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1210 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-08 20:58:15 +00:00
mcmartin 536b0aa1e6 Removed the obsolete "register" annotations (#460) -Michael
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1209 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-08 00:06:14 +00:00
meep-eep 1bfb57c525 Dirty hack to not show a warning for "ignored.key". Temporary until
the new resource system.


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1199 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-05 04:14:40 +00:00
meep-eep e328972f6a Fixed a harmless (as far as UQM is concerned) bug which caused unjustified
warnings with .zip files generated from DOS/Windows.

Fixed a potentially memory-corrupting bug when in a .zip file a subdir
is described before a dir higher in the dir hierarchy.

Fixed a bug where the path to a file was only partially printed in
an fprintf used in error handling. (harmless)

Renamed some functions to better reflect their functionality.


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1197 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-05 03:12:19 +00:00
mcmartin 0e8e94bcd1 RUs properly cleared in savegame display (#463, Paxtez, chmmravatar)
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1194 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-04 21:32:06 +00:00
avolkov 3956a0c587 Minor PC-style Quit menu fix
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1193 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-04 06:34:37 +00:00
avolkov 295ed7d1d6 Logistics and formatting corrections;
Passing UNDEFINED_DELTA where it is not necessary causes an unwanted redraw.
Partially fixes bug #461/2.


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1192 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-03 20:04:37 +00:00
gewlitys 2e665d8b8f Fix for #461 part one, from Paxtez
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1191 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-03 15:57:54 +00:00
meep-eep 67e3dda431 Expanding environment variables first.
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1188 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-03 04:38:29 +00:00
meep-eep 8681ac764a Fixed problems with Windows path which include a drive letter.
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1187 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-03 02:59:30 +00:00
meep-eep 37f22ae10e Fixed little bug.
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1186 8092fc87-c524-0410-9efc-e669fe64eaf9
2003-09-03 02:53:26 +00:00