Update to 0.3.
This commit is contained in:
parent
bad300c0c0
commit
244ec336d3
@ -1,23 +1,27 @@
|
||||
# $OpenBSD: Makefile,v 1.3 2003/07/25 11:04:30 jolan Exp $
|
||||
# $OpenBSD: Makefile,v 1.4 2003/09/24 07:57:33 jolan Exp $
|
||||
|
||||
# 64-bit issues, unaligned memory access
|
||||
ONLY_FOR_ARCHS= i386 macppc
|
||||
|
||||
COMMENT= "ur-quan masters: sdl port of star control 2"
|
||||
COMMENT-content= "ur-quan masters: minimal content"
|
||||
COMMENT-3domusic= "ur-quan masters: 3DO music content"
|
||||
COMMENT-voice= "ur-quan masters: speech content"
|
||||
|
||||
VER= 0.2
|
||||
VER= 0.3
|
||||
DISTNAME= uqm-${VER}-source
|
||||
CATEGORIES= games x11
|
||||
PDIST= ${DISTNAME}.tgz
|
||||
CDIST= uqm-${VER}-content.zip
|
||||
MDIST= uqm-${VER}-3domusic.zip
|
||||
VDIST= uqm-${VER}-voice.zip
|
||||
DISTFILES= ${PDIST} ${CDIST}
|
||||
SUPDISTFILES= ${MDIST} ${VDIST}
|
||||
DIST_SUBDIR= uqm
|
||||
CATEGORIES= games x11
|
||||
PKGNAME= uqm-${VER}p0
|
||||
PKGNAME= uqm-${VER}
|
||||
PKGNAME-3domusic= uqm-3domusic-${VER}
|
||||
PKGNAME-content= uqm-content-${VER}
|
||||
PKGNAME-voice= uqm-voice-${VER}
|
||||
EXTRACT_ONLY= ${PDIST}
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=sc2/}
|
||||
|
||||
HOMEPAGE= http://sc2.sourceforge.net/
|
||||
@ -37,28 +41,40 @@ NO_REGRESS= Yes
|
||||
USE_GMAKE= Yes
|
||||
USE_X11= Yes
|
||||
|
||||
PSEUDO_FLAVORS= no_3domusic no_voice
|
||||
PSEUDO_FLAVORS= 3domusic voice
|
||||
FLAVOR?=
|
||||
MULTI_PACKAGES= -content
|
||||
.if !${FLAVOR:L:Mno_3domusic}
|
||||
|
||||
MULTI_PACKAGES=
|
||||
.if ${FLAVOR:L:M3domusic}
|
||||
DISTFILES+= ${MDIST}
|
||||
MULTI_PACKAGES+=-3domusic
|
||||
.endif
|
||||
.if !${FLAVOR:L:Mno_voice}
|
||||
.if ${FLAVOR:L:Mvoice}
|
||||
DISTFILES+= ${VDIST}
|
||||
MULTI_PACKAGES+=-voice
|
||||
.endif
|
||||
|
||||
SUBPACKAGE?=
|
||||
|
||||
.if defined(PACKAGING)
|
||||
. if ${SUBPACKAGE} == "-3dmusic"
|
||||
RUN_DEPENDS= ::games/uqm
|
||||
. endif
|
||||
. if ${SUBPACKAGE} == "-voice"
|
||||
RUN_DEPENDS= ::games/uqm
|
||||
. endif
|
||||
.endif
|
||||
|
||||
WRKSRC= ${WRKDIR}/${PKGNAME}
|
||||
|
||||
do-configure:
|
||||
.if (${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "i386" || \
|
||||
${MACHINE_ARCH} == "vax")
|
||||
@sed -e "s|@PREFIX@|${PREFIX}|g" ${FILESDIR}/config.h-lilendian \
|
||||
> ${WRKSRC}/src/config.h
|
||||
@sed -e "s|@PREFIX@|${PREFIX}|g ; s|@ENDIAN@|undef|g" \
|
||||
${FILESDIR}/config.h > ${WRKSRC}/src/config.h
|
||||
.else
|
||||
@sed -e "s|@PREFIX@|${PREFIX}|g" ${FILESDIR}/config.h-bigendian \
|
||||
> ${WRKSRC}/src/config.h
|
||||
@sed -e "s|@PREFIX@|${PREFIX}|g ; s|@ENDIAN|define|g" \
|
||||
${FILESDIR}/config.h > ${WRKSRC}/src/config.h
|
||||
.endif
|
||||
@sed -e "s|@CC@|${CC}|g ; s|@CFLAGS@|${CFLAGS}|g ; \
|
||||
s|@LOCALBASE@|${LOCALBASE}|g ; s|@PREFIX@|${PREFIX}|g ; \
|
||||
@ -68,28 +84,23 @@ do-configure:
|
||||
do-build:
|
||||
cd ${WRKBUILD}; ./build.sh uqm
|
||||
|
||||
pre-install:
|
||||
@mkdir -p ${WRKDIST}/content
|
||||
.for R in androsyn arilou blackurq chenjesu chmmr druuge human ilwrath \
|
||||
melnorme mmrnmhrm mycon orz pkunk shofixti slylandr spathi supox \
|
||||
syreen thradd umgah urquan utwig vux yehat zoqfot
|
||||
@mv ${WRKDIR}/${R} ${WRKDIST}/content
|
||||
@mv ${WRKDIR}/${R}.shp ${WRKDIST}/content
|
||||
.endfor
|
||||
.for E in comm ipanims lastbat{,.sc2} lbm melee probe{,.sc2} sis{_ship,.dat} \
|
||||
slides starcon{.key,.ndx,.txt} version
|
||||
@mv ${WRKDIR}/${E} ${WRKDIST}/content
|
||||
.endfor
|
||||
@mv ${WRKDIR}/*.con ${WRKDIST}/content
|
||||
|
||||
do-install:
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/uqm
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/uqm
|
||||
${INSTALL_DATA} ${WRKSRC}/doc/users/manual.txt ${PREFIX}/share/doc/uqm
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/uqm ${PREFIX}/bin
|
||||
@cp -R ${WRKDIST}/content/* ${PREFIX}/share/uqm
|
||||
|
||||
post-install:
|
||||
@find ${PREFIX}/share/uqm -type f -print0 | xargs -0 chmod 444
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/uqm/content/packages/addons
|
||||
${INSTALL_DATA} ${WRKBUILD}/doc/users/manual.txt \
|
||||
${PREFIX}/share/doc/uqm
|
||||
${INSTALL_DATA} ${WRKBUILD}/content/version \
|
||||
${PREFIX}/share/uqm/content
|
||||
${INSTALL_DATA} ${FULLDISTDIR}/${CDIST} \
|
||||
${PREFIX}/share/uqm/content/packages
|
||||
.if ${FLAVOR:L:M3domusic}
|
||||
${INSTALL_DATA} ${FULLDISTDIR}/${MDIST} \
|
||||
${PREFIX}/share/uqm/content/packages
|
||||
.endif
|
||||
.if ${FLAVOR:L:Mvoice}
|
||||
${INSTALL_DATA} ${FULLDISTDIR}/${VDIST} \
|
||||
${PREFIX}/share/uqm/content/packages
|
||||
.endif
|
||||
${INSTALL_PROGRAM} ${WRKBUILD}/uqm ${PREFIX}/bin
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,12 +1,12 @@
|
||||
MD5 (uqm-0.2-3domusic.zip) = f7760aa305b743304504e04df742f57e
|
||||
MD5 (uqm-0.2-content.zip) = ad4de1c9318d9196ebf332d935bb6032
|
||||
MD5 (uqm-0.2-source.tgz) = 8b95dda6ed73802cee18a44f56322076
|
||||
MD5 (uqm-0.2-voice.zip) = f7213e8db6ca4bca4ddfdeed8a7ca0d6
|
||||
RMD160 (uqm-0.2-3domusic.zip) = 0cd7a2b75a799344c79db406f1b8d995dc8939a7
|
||||
RMD160 (uqm-0.2-content.zip) = fc3b50a01a18c368edea16c8990bbc7600cc91d1
|
||||
RMD160 (uqm-0.2-source.tgz) = 453065429cb7d90194b6922ff36f27fdd5413988
|
||||
RMD160 (uqm-0.2-voice.zip) = c8f971bf0d0bb6419686fe280da102936427cfbd
|
||||
SHA1 (uqm-0.2-3domusic.zip) = 9aaaf1961f82226c78ca8dd3871404e761413e11
|
||||
SHA1 (uqm-0.2-content.zip) = 3773bb13742f750793d9518c7254c5509117ee14
|
||||
SHA1 (uqm-0.2-source.tgz) = 031d9d6041768ddf4ee63fe3e0760d9b72c78864
|
||||
SHA1 (uqm-0.2-voice.zip) = fd867d15f740674bee46254fa555a67faec53645
|
||||
MD5 (uqm/uqm-0.3-3domusic.zip) = 9073251b0d96393441f0b40016010576
|
||||
MD5 (uqm/uqm-0.3-content.zip) = b17bb7b54df03b2d0ae3a23b91382b27
|
||||
MD5 (uqm/uqm-0.3-source.tgz) = 6abcdc3caf7efd3bd978332743ee7568
|
||||
MD5 (uqm/uqm-0.3-voice.zip) = 9a44f0037d05c453b9e570b88b12595f
|
||||
RMD160 (uqm/uqm-0.3-3domusic.zip) = db8abac494f450f0a430663095cf3f070e2d228c
|
||||
RMD160 (uqm/uqm-0.3-content.zip) = 5eba7d470ce147a190202bc38a4cf008af256139
|
||||
RMD160 (uqm/uqm-0.3-source.tgz) = 79cddf73e0448a4a7d9785612ac8ff4361b1ceea
|
||||
RMD160 (uqm/uqm-0.3-voice.zip) = 6b8051cc81d21d8096b157a3efa44f002595b9af
|
||||
SHA1 (uqm/uqm-0.3-3domusic.zip) = 285d137f8e638c26c14cb836c3d60a0945ddc2e6
|
||||
SHA1 (uqm/uqm-0.3-content.zip) = 41e7d68b1317d766d804e690f399d7d11a3b8912
|
||||
SHA1 (uqm/uqm-0.3-source.tgz) = 3e1c8560dc05f2e02c0ac38eed7cbd4ca5a58602
|
||||
SHA1 (uqm/uqm-0.3-voice.zip) = 9afd1afed7a1fe36717b0cb1b9efe08784ea983b
|
||||
|
@ -15,19 +15,21 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
COMPILE="@CC@"
|
||||
COMPILE=@CC@
|
||||
MKDEPEND="@CC@ -MM"
|
||||
MAKE="gmake"
|
||||
uqm_CFLAGS="@CFLAGS@ -I@LOCALBASE@/include/SDL -I@LOCALBASE@/include -D_REENTRANT -DGFXMODULE_SDL -DSOUNDMODULE_SDL"
|
||||
uqm_LDFLAGS=" -L@LOCALBASE@/lib -L@X11BASE@/lib -lSDL -lm -lX11 -lXext -lusbhid -lSDL -pthread -lusbhid -lSDL_image -lvorbisfile -lvorbis"
|
||||
uqm_CFLAGS="@CFLAGS@ -I@LOCALBASE@/include/SDL -D_REENTRANT -DGFXMODULE_SDL -DSOUNDMODULE_SDL -I@LOCALBASE@/include -DHAVE_ZIP=1"
|
||||
uqm_LDFLAGS="-L@LOCALBASE@/lib -L@X11BASE@/lib -lSDL -pthread -lm -lX11 -lXext -lusbhid -lSDL_image -lvorbisfile -lvorbis -lz"
|
||||
DEBUG="0"
|
||||
uqm_INSTALL_BINDIR="@PREFIX@/bin/"
|
||||
uqm_INSTALL_LIBDIR="@PREFIX@/share/uqm/"
|
||||
uqm_INSTALL_LIBDIR="@PREFIX@/bin/"
|
||||
uqm_INSTALL_SHAREDIR="@PREFIX@/share/"
|
||||
|
||||
# Exported variables are available from all the Makeinfo files
|
||||
# Non-exported files only where build.vars is explicitely included.
|
||||
uqm_SOUNDMODULE="mixsdl"
|
||||
uqm_HAVE_OPENGL="0"
|
||||
uqm_USE_ZIP_IO="1"
|
||||
WINDRES=""
|
||||
export uqm_SOUNDMODULE uqm_HAVE_OPENGL WINDRES
|
||||
export uqm_SOUNDMODULE uqm_HAVE_OPENGL uqm_USE_ZIP_IO WINDRES
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
#define _CONFIG_H
|
||||
|
||||
/* Directory where the UQM game data is located */
|
||||
#define CONTENTDIR "@PREFIX@/share/uqm/"
|
||||
#define CONTENTDIR "@PREFIX@/share/uqm/content"
|
||||
|
||||
/* Directory where game data will be stored */
|
||||
#define USERDIR "~/.uqm/"
|
||||
@ -29,7 +29,7 @@
|
||||
#define CONFIGDIR USERDIR
|
||||
|
||||
/* Defined if words are stored with the most significant byte first */
|
||||
#define WORDS_BIGENDIAN
|
||||
#@ENDIAN@ WORDS_BIGENDIAN
|
||||
|
||||
/* Defined if your system has strupr of its own */
|
||||
#undef HAVE_STRUPR
|
@ -1,44 +0,0 @@
|
||||
/* This file contains some compile-time configuration options for *nix
|
||||
* systems.
|
||||
* src/config.h is generated from src/config.h.in by build.sh
|
||||
* For windows, you'll have to edit src/msvc++/config.h manually
|
||||
* if you want anything else than the defaults.
|
||||
*/
|
||||
|
||||
#ifdef WIN32
|
||||
/* If we're compiling in windows, we want the other config.h */
|
||||
# include "msvc++/config.h"
|
||||
#endif
|
||||
|
||||
#ifndef _CONFIG_H
|
||||
#define _CONFIG_H
|
||||
|
||||
/* Directory where the UQM game data is located */
|
||||
#define CONTENTDIR "@PREFIX@/share/uqm/"
|
||||
|
||||
/* Directory where game data will be stored */
|
||||
#define USERDIR "~/.uqm/"
|
||||
|
||||
/* Directory where supermelee teams will be stored */
|
||||
#define MELEEDIR USERDIR "teams/"
|
||||
|
||||
/* Directory where save games will be stored */
|
||||
#define SAVEDIR USERDIR "save/"
|
||||
|
||||
/* Directory where config files will be stored */
|
||||
#define CONFIGDIR USERDIR
|
||||
|
||||
/* Defined if words are stored with the most significant byte first */
|
||||
#undef WORDS_BIGENDIAN
|
||||
|
||||
/* Defined if your system has strupr of its own */
|
||||
#undef HAVE_STRUPR
|
||||
|
||||
/* Defined if your system has stricmp of its own */
|
||||
#undef HAVE_STRICMP
|
||||
|
||||
/* Defined if your system has getopt.h */
|
||||
#define HAVE_GETOPT_H
|
||||
|
||||
#endif /* _CONFIG_H */
|
||||
|
@ -1,21 +0,0 @@
|
||||
$OpenBSD: patch-src_sc2code_libs_graphics_tfb_draw_c,v 1.1.1.1 2003/04/11 09:12:52 wilfried Exp $
|
||||
--- src/sc2code/libs/graphics/tfb_draw.c.orig Fri Feb 14 18:17:16 2003
|
||||
+++ src/sc2code/libs/graphics/tfb_draw.c Tue Mar 4 01:16:07 2003
|
||||
@@ -197,14 +197,14 @@ void
|
||||
TFB_DrawScreen_WaitForSignal (void)
|
||||
{
|
||||
TFB_DrawCommand DrawCommand;
|
||||
+ int channel;
|
||||
DrawCommand.Type = TFB_DRAWCOMMANDTYPE_SENDSIGNAL;
|
||||
- // We need to lock the mutex before enqueueing the DC to prevent races
|
||||
- LockSignalMutex ();
|
||||
Lock_DCQ (1);
|
||||
+ channel = FindSignalChannel ();
|
||||
TFB_BatchReset ();
|
||||
TFB_EnqueueDrawCommand(&DrawCommand);
|
||||
Unlock_DCQ();
|
||||
- WaitForSignal ();
|
||||
+ WaitForSignal (channel);
|
||||
}
|
||||
|
||||
void
|
@ -1,20 +0,0 @@
|
||||
$OpenBSD: patch-src_sc2code_libs_threadlib_h,v 1.1.1.1 2003/04/11 09:12:52 wilfried Exp $
|
||||
--- src/sc2code/libs/threadlib.h.orig Fri Feb 14 18:17:16 2003
|
||||
+++ src/sc2code/libs/threadlib.h Tue Mar 4 01:04:00 2003
|
||||
@@ -137,13 +137,14 @@ typedef void *CondVar;
|
||||
extern CondVar CreateCondVar (void);
|
||||
extern void DestroyCondVar (CondVar);
|
||||
extern void WaitCondVar (CondVar);
|
||||
+extern void WaitProtectedCondVar (CondVar, Mutex);
|
||||
extern void SignalCondVar (CondVar);
|
||||
extern void BroadcastCondVar (CondVar);
|
||||
|
||||
extern DWORD CurrentThreadID (void);
|
||||
|
||||
-extern void LockSignalMutex(void);
|
||||
-extern void WaitForSignal (void);
|
||||
+extern int FindSignalChannel ();
|
||||
+extern void WaitForSignal (int);
|
||||
extern void SignalThread (DWORD);
|
||||
|
||||
#endif /* _THREADLIB_H */
|
@ -1,127 +0,0 @@
|
||||
$OpenBSD: patch-src_sc2code_libs_threads_condbank_c,v 1.1.1.1 2003/04/11 09:12:52 wilfried Exp $
|
||||
--- src/sc2code/libs/threads/condbank.c.orig Sat Jan 4 10:55:31 2003
|
||||
+++ src/sc2code/libs/threads/condbank.c Tue Mar 4 01:06:16 2003
|
||||
@@ -30,12 +30,12 @@
|
||||
#define CONDVAR_BANK_SIZE 10
|
||||
|
||||
static Mutex bank_mutex;
|
||||
-static int wait = 0, signal = 0;
|
||||
|
||||
static struct {
|
||||
- Semaphore var;
|
||||
- DWORD id;
|
||||
- int used;
|
||||
+ CondVar var;
|
||||
+ DWORD id;
|
||||
+ int used;
|
||||
+ Mutex control;
|
||||
} bank[CONDVAR_BANK_SIZE];
|
||||
|
||||
void
|
||||
@@ -45,10 +45,9 @@ init_cond_bank ()
|
||||
bank_mutex = CreateMutex ();
|
||||
for (i = 0; i < CONDVAR_BANK_SIZE; i++)
|
||||
{
|
||||
- char str[20];
|
||||
- sprintf (str, "bank sem %d", i);
|
||||
- bank[i].var = CreateSemaphore (0, str);
|
||||
+ bank[i].var = CreateCondVar ();
|
||||
bank[i].id = bank[i].used = 0;
|
||||
+ bank[i].control = CreateMutex ();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,33 +58,37 @@ uninit_cond_bank ()
|
||||
for (i = 0; i < CONDVAR_BANK_SIZE; i++)
|
||||
{
|
||||
DestroyCondVar (bank[i].var);
|
||||
+ DestroyMutex (bank[i].control);
|
||||
}
|
||||
DestroyMutex (bank_mutex);
|
||||
}
|
||||
|
||||
-void
|
||||
-LockSignalMutex ()
|
||||
-{
|
||||
- LockMutex (bank_mutex);
|
||||
-}
|
||||
-void
|
||||
-WaitForSignal ()
|
||||
+int
|
||||
+FindSignalChannel ()
|
||||
{
|
||||
int i;
|
||||
- int index = -1;
|
||||
- DWORD me = CurrentThreadID ();
|
||||
+
|
||||
+ LockMutex (bank_mutex);
|
||||
for (i = 0; i < CONDVAR_BANK_SIZE; i++)
|
||||
{
|
||||
if (!bank[i].used)
|
||||
{
|
||||
- index = i;
|
||||
- break;
|
||||
+ LockMutex (bank[i].control);
|
||||
+ return i;
|
||||
}
|
||||
}
|
||||
- if (index == -1)
|
||||
+ return -1;
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+WaitForSignal (int i)
|
||||
+{
|
||||
+ DWORD me = CurrentThreadID ();
|
||||
+
|
||||
+ if (i == -1)
|
||||
{
|
||||
/* The bank is full! */
|
||||
- fprintf(stderr, "Condvar bank is full, %ul is waiting on DCQ.", me);
|
||||
+ fprintf(stderr, "Condvar bank is full, %lu is waiting on DCQ.\n", me);
|
||||
UnlockMutex (bank_mutex);
|
||||
WaitCondVar (RenderingCond);
|
||||
}
|
||||
@@ -93,12 +96,14 @@ WaitForSignal ()
|
||||
{
|
||||
bank[i].used = 1;
|
||||
bank[i].id = me;
|
||||
- // Initialize the Semaphore to a value of '0' in case it isn't already
|
||||
- while (SemaphoreValue (bank[i].var))
|
||||
- SetSemaphore (bank[i].var);
|
||||
UnlockMutex (bank_mutex);
|
||||
- // Block on Semaphore until it is cleared by the Signal
|
||||
- SetSemaphore (bank[i].var);
|
||||
+ // fprintf (stderr, "Thread %lu waiting on cond var %d (control: %p)\n", me, i, bank[i].control);
|
||||
+ WaitProtectedCondVar (bank[i].var, bank[i].control);
|
||||
+ // fprintf (stderr, "Thread %lu signaled via cond var %d\n", me, i);
|
||||
+ UnlockMutex (bank[i].control);
|
||||
+ LockMutex (bank_mutex);
|
||||
+ bank[i].used = bank[i].id = 0;
|
||||
+ UnlockMutex (bank_mutex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,14 +116,15 @@ SignalThread (DWORD id)
|
||||
{
|
||||
if (bank[i].used && bank[i].id == id)
|
||||
{
|
||||
- bank[i].id = bank[i].used = 0;
|
||||
- ResetSemaphoreOwner (bank[i].var);
|
||||
- ClearSemaphore (bank[i].var);
|
||||
- break;
|
||||
+ UnlockMutex (bank_mutex);
|
||||
+ // fprintf (stderr, "Blocking on var %d's control: %p\n", i, bank[i].control);
|
||||
+ LockMutex (bank[i].control);
|
||||
+ // fprintf (stderr, "Signaling var %d, thread %lu, control %p\n", i, id, bank[i].control);
|
||||
+ SignalCondVar (bank[i].var);
|
||||
+ UnlockMutex (bank[i].control);
|
||||
+ return;
|
||||
}
|
||||
}
|
||||
- if (i == CONDVAR_BANK_SIZE)
|
||||
- fprintf (stderr, "Warning: Couldn't find thread to signal!\n");
|
||||
+ fprintf (stderr, "Warning: Couldn't find thread to signal!\n");
|
||||
UnlockMutex (bank_mutex);
|
||||
}
|
||||
-
|
@ -1,12 +0,0 @@
|
||||
$OpenBSD: patch-src_sc2code_libs_threads_sdl_sdlthreads_h,v 1.1.1.1 2003/04/11 09:12:52 wilfried Exp $
|
||||
--- src/sc2code/libs/threads/sdl/sdlthreads.h.orig Mon Feb 3 14:12:04 2003
|
||||
+++ src/sc2code/libs/threads/sdl/sdlthreads.h Tue Mar 4 01:07:04 2003
|
||||
@@ -91,6 +91,8 @@ typedef SDL_cond *NativeCondVar;
|
||||
extern void SDLWrapper_WaitCondVar (CondVar candvar);
|
||||
#define NativeWaitCondVar(condvar) \
|
||||
SDLWrapper_WaitCondVar ((condvar))
|
||||
+#define NativeWaitProtectedCondVar(condvar, mutex) \
|
||||
+ SDL_CondWait ((condvar), (mutex))
|
||||
#define NativeSignalCondVar(condvar) \
|
||||
SDL_CondSignal ((condvar))
|
||||
#define NativeBroadcastCondVar(condvar) \
|
@ -1,68 +0,0 @@
|
||||
$OpenBSD: patch-src_sc2code_libs_threads_thrcommon_c,v 1.1.1.1 2003/04/11 09:12:52 wilfried Exp $
|
||||
--- src/sc2code/libs/threads/thrcommon.c.orig Mon Feb 3 14:12:03 2003
|
||||
+++ src/sc2code/libs/threads/thrcommon.c Tue Mar 4 01:08:36 2003
|
||||
@@ -553,6 +553,7 @@ ClearSemaphore (Semaphore sem)
|
||||
sem_name = SemMon[i].Name;
|
||||
if (SemMon[i].Thread && SemMon[i].Thread != NativeThreadID ())
|
||||
#if defined (THREAD_QUEUE) && defined (THREAD_NAMES)
|
||||
+ {
|
||||
if (ThreadNameNative (SemMon[i].Thread) == NULL)
|
||||
fprintf( stderr, "Freeing %s Semaphore in '%s' set by defunct thread '%s'!\n",
|
||||
sem_name,
|
||||
@@ -563,6 +564,7 @@ ClearSemaphore (Semaphore sem)
|
||||
sem_name,
|
||||
ThreadNameNative (NativeThreadID ()),
|
||||
ThreadNameNative (SemMon[i].Thread));
|
||||
+ }
|
||||
SemMon[i].ThreadName[0] = 0;
|
||||
#else
|
||||
fprintf (stderr, "Freeing %s Semaphore that was set by a different thread\n",
|
||||
@@ -606,27 +608,39 @@ CreateCondVar ()
|
||||
{
|
||||
return NativeCreateCondVar ();
|
||||
}
|
||||
-void DestroyCondVar (CondVar cv)
|
||||
+
|
||||
+void
|
||||
+DestroyCondVar (CondVar cv)
|
||||
{
|
||||
- NativeDestroyCondVar (cv);
|
||||
+ NativeDestroyCondVar ((CondVar)cv);
|
||||
}
|
||||
|
||||
-void WaitCondVar (CondVar cv)
|
||||
+void
|
||||
+WaitCondVar (CondVar cv)
|
||||
{
|
||||
- NativeWaitCondVar (cv);
|
||||
+ NativeWaitCondVar ((NativeCondVar)cv);
|
||||
}
|
||||
|
||||
-void SignalCondVar (CondVar cv)
|
||||
+void
|
||||
+WaitProtectedCondVar (CondVar cv, Mutex m)
|
||||
{
|
||||
- NativeSignalCondVar (cv);
|
||||
+ NativeWaitProtectedCondVar ((NativeCondVar)cv, (NativeMutex)m);
|
||||
}
|
||||
|
||||
-void BroadcastCondVar (CondVar cv)
|
||||
+void
|
||||
+SignalCondVar (CondVar cv)
|
||||
+{
|
||||
+ NativeSignalCondVar ((NativeCondVar)cv);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+BroadcastCondVar (CondVar cv)
|
||||
{
|
||||
- NativeBroadcastCondVar (cv);
|
||||
+ NativeBroadcastCondVar ((NativeCondVar)cv);
|
||||
}
|
||||
|
||||
-DWORD CurrentThreadID ()
|
||||
+DWORD
|
||||
+CurrentThreadID ()
|
||||
{
|
||||
return (DWORD)NativeThreadID ();
|
||||
}
|
@ -1,101 +0,0 @@
|
||||
$OpenBSD: patch-src_sc2code_shipyard_c,v 1.1.1.1 2003/04/11 09:12:52 wilfried Exp $
|
||||
--- src/sc2code/shipyard.c.orig Mon Feb 17 16:54:37 2003
|
||||
+++ src/sc2code/shipyard.c Fri Mar 7 00:23:39 2003
|
||||
@@ -382,49 +382,45 @@ ShowCombatShip (COUNT which_window, SHIP
|
||||
CONTEXT OldContext;
|
||||
int j;
|
||||
|
||||
- SetSemaphore (GraphicsSem);
|
||||
- OldContext = SetContext (OffScreenContext);
|
||||
- SetContextFGFrame (Screen);
|
||||
- SetContextBackGroundColor (BLACK_COLOR);
|
||||
-
|
||||
AllDoorsFinished = FALSE;
|
||||
r.corner.x = r.corner.y = 0;
|
||||
r.extent.width = SHIP_WIN_WIDTH;
|
||||
r.extent.height = SHIP_WIN_HEIGHT;
|
||||
ButtonState = AnyButtonPress (FALSE) ? 1 : 0;
|
||||
+ if (ButtonState)
|
||||
+ {
|
||||
+ while (ButtonState)
|
||||
+ if (!AnyButtonPress (FALSE))
|
||||
+ ButtonState = 0;
|
||||
+ else
|
||||
+ TaskSwitch();
|
||||
+ }
|
||||
TimeIn = GetTimeCounter ();
|
||||
|
||||
for (j = 0; (j < SHIP_WIN_FRAMES) && !AllDoorsFinished; j++)
|
||||
{
|
||||
- ClearSemaphore (GraphicsSem);
|
||||
SleepThreadUntil (TimeIn + ONE_SECOND / 24);
|
||||
TimeIn = GetTimeCounter ();
|
||||
+ if (AnyButtonPress (FALSE))
|
||||
+ {
|
||||
+ if (YankedStarShipPtr != 0)
|
||||
+ {
|
||||
+ ship_win_info[0].lfdoor_s.origin.x = 0;
|
||||
+ ship_win_info[0].rtdoor_s.origin.x = 0;
|
||||
+ }
|
||||
+ AllDoorsFinished = TRUE;
|
||||
+ while (AnyButtonPress (FALSE))
|
||||
+ TaskSwitch();
|
||||
+ }
|
||||
SetSemaphore (GraphicsSem);
|
||||
+ OldContext = SetContext (OffScreenContext);
|
||||
+ SetContextFGFrame (Screen);
|
||||
+ SetContextBackGroundColor (BLACK_COLOR);
|
||||
+
|
||||
BatchGraphics ();
|
||||
-StartFinalPass:
|
||||
pship_win_info = &ship_win_info[0];
|
||||
for (i = 0; i < num_ships; ++i)
|
||||
{
|
||||
- if (ButtonState)
|
||||
- {
|
||||
- if (!AnyButtonPress (FALSE))
|
||||
- ButtonState = 0;
|
||||
- }
|
||||
- else if (AnyButtonPress (FALSE))
|
||||
- {
|
||||
- if (YankedStarShipPtr == 0)
|
||||
- {
|
||||
- AllDoorsFinished = TRUE;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- pship_win_info->lfdoor_s.origin.x = 0;
|
||||
- pship_win_info->rtdoor_s.origin.x = 0;
|
||||
- AllDoorsFinished = TRUE;
|
||||
- }
|
||||
- goto StartFinalPass;
|
||||
- }
|
||||
-
|
||||
{
|
||||
RECT ClipRect;
|
||||
|
||||
@@ -457,11 +453,10 @@ StartFinalPass:
|
||||
}
|
||||
|
||||
UnbatchGraphics ();
|
||||
+ SetContextClipRect (NULL_PTR);
|
||||
+ SetContext (OldContext);
|
||||
+ ClearSemaphore (GraphicsSem);
|
||||
}
|
||||
-
|
||||
- SetContextClipRect (NULL_PTR);
|
||||
- SetContext (OldContext);
|
||||
- ClearSemaphore (GraphicsSem);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -668,7 +663,9 @@ DoModifyShips (INPUT_STATE InputState, P
|
||||
{
|
||||
ShowCombatShip ((COUNT)pMS->CurState, (SHIP_FRAGMENTPTR)0);
|
||||
//Reset flash rectangle
|
||||
+ SetSemaphore (GraphicsSem);
|
||||
SetFlashRect ((PRECT)~0L, (FRAME)0);
|
||||
+ ClearSemaphore (GraphicsSem);
|
||||
DrawMenuStateStrings (PM_CREW, SHIPYARD_CREW);
|
||||
|
||||
SetSemaphore (GraphicsSem);
|
@ -1 +0,0 @@
|
||||
Required content package for The Ur-Quan Masters.
|
@ -1,4 +1,11 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2003/04/11 09:12:52 wilfried Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.2 2003/09/24 07:57:34 jolan Exp $
|
||||
bin/uqm
|
||||
share/doc/uqm/manual.txt
|
||||
share/uqm/content/packages/uqm-0.3-content.zip
|
||||
share/uqm/content/version
|
||||
@exec mkdir -p %D/share/uqm/content/packages/addons
|
||||
@dirrm share/uqm/content/packages/addons
|
||||
@dirrm share/uqm/content/packages
|
||||
@dirrm share/uqm/content
|
||||
@dirrm share/uqm
|
||||
@dirrm share/doc/uqm
|
||||
|
@ -1,14 +1,2 @@
|
||||
@comment $OpenBSD: PLIST-3domusic,v 1.1 2003/07/25 11:04:30 jolan Exp $
|
||||
share/uqm/ipanims/orbit1.ogg
|
||||
share/uqm/ipanims/orbit2.ogg
|
||||
share/uqm/ipanims/orbit3.ogg
|
||||
share/uqm/ipanims/orbit4.ogg
|
||||
share/uqm/ipanims/orbit5.ogg
|
||||
share/uqm/ipanims/space.ogg
|
||||
share/uqm/lbm/arispace.ogg
|
||||
share/uqm/lbm/battle.ogg
|
||||
share/uqm/lbm/credits.ogg
|
||||
share/uqm/lbm/hyper.ogg
|
||||
share/uqm/lbm/outfit.ogg
|
||||
share/uqm/lbm/shipyard.ogg
|
||||
share/uqm/lbm/starbase.ogg
|
||||
@comment $OpenBSD: PLIST-3domusic,v 1.2 2003/09/24 07:57:34 jolan Exp $
|
||||
share/uqm/content/packages/uqm-0.3-3domusic.zip
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user