From: <Mee...@us...> - 2008-08-21 18:55:50
|
Revision: 3039 http://sc2.svn.sourceforge.net/sc2/?rev=3039&view=rev Author: Meep-Eep Date: 2008-08-21 18:55:47 +0000 (Thu, 21 Aug 2008) Log Message: ----------- More portable parameter passing. Modified Paths: -------------- trunk/sc2/Makeproject trunk/sc2/build/unix/build.config Modified: trunk/sc2/Makeproject =================================================================== --- trunk/sc2/Makeproject 2008-08-21 18:52:48 UTC (rev 3038) +++ trunk/sc2/Makeproject 2008-08-21 18:55:47 UTC (rev 3039) @@ -8,9 +8,9 @@ uqm_OBJS=obj/release/ # Directory for object files uqm_NAME=uqm # File name of executable fi -uqm_CFLAGS="$uqm_CFLAGS -I src -I src/sc2code -I src/sc2code/libs" +uqm_CFLAGS="$uqm_CFLAGS -Isrc -Isrc/sc2code -Isrc/sc2code/libs" if [ "$uqm_HAVE_REGEX" = 0 ]; then - uqm_CFLAGS="$uqm_CFLAGS -I src/regex" + uqm_CFLAGS="$uqm_CFLAGS -Isrc/regex" fi # Stuff to install under the directory for libraries, as specified during Modified: trunk/sc2/build/unix/build.config =================================================================== --- trunk/sc2/build/unix/build.config 2008-08-21 18:52:48 UTC (rev 3038) +++ trunk/sc2/build/unix/build.config 2008-08-21 18:55:47 UTC (rev 3039) @@ -347,7 +347,7 @@ # Set the content dir CONTENTDIR="${INSTALL_SHAREDIR}uqm/content" - CFLAGS="$CFLAGS -I \"$BUILD_WORK\"" + CFLAGS="$CFLAGS -I\"$BUILD_WORK\"" # Export the HAVE_ symbols to config_unix.h, using config_unix.h.in # as template (or config_win.h/config_win.h.in). This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Mee...@us...> - 2008-08-21 20:04:00
|
Revision: 3041 http://sc2.svn.sourceforge.net/sc2/?rev=3041&view=rev Author: Meep-Eep Date: 2008-08-21 20:03:54 +0000 (Thu, 21 Aug 2008) Log Message: ----------- Pthread support from Gwl. Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/build/unix/build.config trunk/sc2/build/unix/config_functions trunk/sc2/build/unix/config_proginfo_host trunk/sc2/build.vars.in trunk/sc2/src/sc2code/libs/threadlib.h trunk/sc2/src/sc2code/libs/threads/Makeinfo trunk/sc2/src/sc2code/libs/threads/thrcommon.h Added Paths: ----------- trunk/sc2/src/sc2code/libs/threads/pthread/ trunk/sc2/src/sc2code/libs/threads/pthread/Makeinfo trunk/sc2/src/sc2code/libs/threads/pthread/posixthreads.c trunk/sc2/src/sc2code/libs/threads/pthread/posixthreads.h Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2008-08-21 18:58:48 UTC (rev 3040) +++ trunk/sc2/ChangeLog 2008-08-21 20:03:54 UTC (rev 3041) @@ -1,4 +1,5 @@ Changes towards version 0.7: +- Pthread support - Gwl - Content Dirs completely reorganized; 3DO and PC segregation - Coredev - Voiceovers controlled by a synthetic '3dovoice' addon - Michael - CONVERSATION explicitly names text/voice/timestamps - Michael Modified: trunk/sc2/build/unix/build.config =================================================================== --- trunk/sc2/build/unix/build.config 2008-08-21 18:58:48 UTC (rev 3040) +++ trunk/sc2/build/unix/build.config 2008-08-21 20:03:54 UTC (rev 3041) @@ -70,7 +70,7 @@ { # Describe the menu: MENU_main_ITEMS="debug graphics sound mikmod ovcodec netplay joystick \ - ioformat accel" + ioformat accel threadlib" case "$HOST_SYSTEM" in Darwin) # Installation directory not modifiable @@ -92,6 +92,7 @@ MENU_main_ITEM_joystick_TYPE=CHOICE MENU_main_ITEM_ioformat_TYPE=CHOICE MENU_main_ITEM_accel_TYPE=CHOICE + MENU_main_ITEM_threadlib_TYPE=CHOICE MENU_main_ITEM_install_path_TYPE=MENU CHOICE_debug_OPTIONS="nodebug debug strictdebug" @@ -290,6 +291,31 @@ } CHOICE_accel_DEFAULT=asm + CHOICE_threadlib_OPTIONS="sdl pthread" + CHOICE_threadlib_TITLE="Thread library" + CHOICE_threadlib_OPTION_sdl_TITLE="SDL-controlled thread library" + CHOICE_threadlib_OPTION_sdl_ACTION="threadlib_sdl_action" + threadlib_sdl_action() { + CFLAGS="$CFLAGS -DTHREADLIB_SDL" + THREADLIB="SDL" + } + CHOICE_threadlib_OPTION_pthread_TITLE="Pthread thread library" + CHOICE_threadlib_OPTION_pthread_PRECOND="have_library pthread" + CHOICE_threadlib_OPTION_pthread_ACTION="threadlib_pthread_action" + threadlib_pthread_action() { + CFLAGS="$CFLAGS -DTHREADLIB_PTHREAD" + THREADLIB="PTHREAD" + use_library pthread + } + case "$HOST_SYSTEM" in + ARMV5|WINSCW) + CHOICE_threadlib_DEFAULT=pthread + ;; + *) + CHOICE_threadlib_DEFAULT=sdl + ;; + esac + MENU_install_path_ITEMS="install_prefix install_bindir install_libdir \ install_sharedir" MENU_install_path_TITLE="Installation paths" @@ -359,7 +385,7 @@ MAKE ECHON SED DEBUG JOYSTICK NETPLAY \ OGGVORBIS SOUNDMODULE USE_INTERNAL_MIKMOD \ HAVE_OPENGL HAVE_REGEX_H_FLAG USE_ZIP_IO \ - USE_PLATFORM_ACCEL USE_WINSOCK \ + USE_PLATFORM_ACCEL THREADLIB USE_WINSOCK \ INSTALL_LIBDIR INSTALL_BINDIR INSTALL_SHAREDIR \ REZ WINDRES $HAVE_SYMBOLS" SUBSTITUTE_FILES="build.vars" Modified: trunk/sc2/build/unix/config_functions =================================================================== --- trunk/sc2/build/unix/config_functions 2008-08-21 18:58:48 UTC (rev 3040) +++ trunk/sc2/build/unix/config_functions 2008-08-21 20:03:54 UTC (rev 3041) @@ -1007,6 +1007,10 @@ HOST_SYSTEM="QNX" ;; [Cc][Ee][Gg][Cc][Cc]) HOST_SYSTEM="cegcc" ;; + [Ww][Ii][Nn][Ss][Cc][Ww]) + HOST_SYSTEM="WINSCW" ;; + [Aa][Rr][Mm][Vv]5) + HOST_SYSTEM="ARMV5" ;; *) build_message "Warning: host type '$BUILD_HOST' unknown. Using defaults." ;; Modified: trunk/sc2/build/unix/config_proginfo_host =================================================================== --- trunk/sc2/build/unix/config_proginfo_host 2008-08-21 18:58:48 UTC (rev 3040) +++ trunk/sc2/build/unix/config_proginfo_host 2008-08-21 20:03:54 UTC (rev 3041) @@ -222,6 +222,27 @@ LIB_zlib_DEPEND_DETECT_BIN="pkgconfig" +### pthread ### +LIB_pthread_NAME="pthread" +case "$HOST_SYSTEM" in + Linux) + LIB_pthread_CFLAGS="" + LIB_pthread_LDFLAGS="" + LIB_pthread_VERSION="" + ;; + FreeBSD|OpenBSD) + LIB_pthread_CFLAGS="$(pthread-config --cflags)" + LIB_pthread_LDFLAGS="$(pthread-config --ldflags)" + LIB_pthread_VERSION="$(pthread-config --version)" + ;; + *) + LIB_pthread_CFLAGS="" + LIB_pthread_LDFLAGS="-lpthread" + LIB_pthread_VERSION="" + ;; +esac + + # Additional platform-specific libraries for networking. LIB_netlibs_NAME="Platform-specific network libraries" case "$HOST_SYSTEM" in Modified: trunk/sc2/build.vars.in =================================================================== --- trunk/sc2/build.vars.in 2008-08-21 18:58:48 UTC (rev 3040) +++ trunk/sc2/build.vars.in 2008-08-21 20:03:54 UTC (rev 3041) @@ -44,6 +44,7 @@ uqm_HAVE_OPENGL='@HAVE_OPENGL@' uqm_USE_ZIP_IO='@USE_ZIP_IO@' uqm_USE_PLATFORM_ACCEL='@USE_PLATFORM_ACCEL@' +uqm_THREADLIB='@THREADLIB@' uqm_NETPLAY='@NETPLAY@' uqm_USE_WINSOCK='@USE_WINSOCK@' DEBUG='@DEBUG@' @@ -52,4 +53,6 @@ export BUILD_SYSTEM HOST_SYSTEM DEBUG export MACRO_WIN32 MACRO___MINGW32__ export uqm_SOUNDMODULE uqm_USE_INTERNAL_MIKMOD uqm_HAVE_REGEX uqm_USE_WINSOCK -export uqm_HAVE_OPENGL uqm_USE_ZIP_IO uqm_USE_PLATFORM_ACCEL uqm_NETPLAY +export uqm_HAVE_OPENGL uqm_USE_ZIP_IO uqm_USE_PLATFORM_ACCEL uqm_THREADLIB +export uqm_NETPLAY + Modified: trunk/sc2/src/sc2code/libs/threadlib.h =================================================================== --- trunk/sc2/src/sc2code/libs/threadlib.h 2008-08-21 18:58:48 UTC (rev 3040) +++ trunk/sc2/src/sc2code/libs/threadlib.h 2008-08-21 20:03:54 UTC (rev 3041) @@ -20,8 +20,6 @@ #ifndef _THREADLIB_H #define _THREADLIB_H -#define THREADLIB SDL - #define NAMED_SYNCHRO /* Should synchronizable objects have names? */ #define TRACK_CONTENTION /* Should we report when a thread sleeps on synchronize? */ Modified: trunk/sc2/src/sc2code/libs/threads/Makeinfo =================================================================== --- trunk/sc2/src/sc2code/libs/threads/Makeinfo 2008-08-21 18:58:48 UTC (rev 3040) +++ trunk/sc2/src/sc2code/libs/threads/Makeinfo 2008-08-21 20:03:54 UTC (rev 3041) @@ -1,2 +1,9 @@ -uqm_SUBDIRS="sdl" +case "$uqm_THREADLIB" in + SDL) + uqm_SUBDIRS="sdl" + ;; + PTHREAD) + uqm_SUBDIRS="pthread" + ;; +esac uqm_CFILES="thrcommon.c" Added: trunk/sc2/src/sc2code/libs/threads/pthread/Makeinfo =================================================================== --- trunk/sc2/src/sc2code/libs/threads/pthread/Makeinfo (rev 0) +++ trunk/sc2/src/sc2code/libs/threads/pthread/Makeinfo 2008-08-21 20:03:54 UTC (rev 3041) @@ -0,0 +1 @@ +uqm_CFILES="posixthreads.c" Added: trunk/sc2/src/sc2code/libs/threads/pthread/posixthreads.c =================================================================== --- trunk/sc2/src/sc2code/libs/threads/pthread/posixthreads.c (rev 0) +++ trunk/sc2/src/sc2code/libs/threads/pthread/posixthreads.c 2008-08-21 20:03:54 UTC (rev 3041) @@ -0,0 +1,671 @@ +/* + * 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 <stdlib.h> +#include "misc.h" +#include "posixthreads.h" +#include <pthread.h> +#include <unistd.h> + +#include <semaphore.h> + +#include "libs/log/uqmlog.h" + +typedef struct _thread { + pthread_t native; +#ifdef NAMED_SYNCHRO + const char *name; +#endif + ThreadLocal *localData; + struct _thread *next; +} *TrueThread; + +static volatile TrueThread threadQueue = NULL; +static pthread_mutex_t threadQueueMutex; + +struct ThreadStartInfo +{ + ThreadFunction func; + void *data; + sem_t sem; + TrueThread thread; +}; + +void +InitThreadSystem_PT (void) +{ + pthread_mutex_init (&threadQueueMutex, NULL); +} + +void +UnInitThreadSystem_PT (void) +{ + pthread_mutex_destroy (&threadQueueMutex); +} + +static void +QueueThread (TrueThread thread) +{ + pthread_mutex_lock (&threadQueueMutex); + thread->next = threadQueue; + threadQueue = thread; + pthread_mutex_unlock (&threadQueueMutex); +} + +static void +UnQueueThread (TrueThread thread) +{ + volatile TrueThread *ptr; + + pthread_mutex_lock (&threadQueueMutex); + ptr = &threadQueue; + while (*ptr != thread) + { +#ifdef DEBUG_THREADS + if (*ptr == NULL) + { + // Should not happen. + log_add (log_Debug, "Error: Trying to remove non-present thread " + "from thread queue."); + fflush (stderr); + explode (); + } +#endif /* DEBUG_THREADS */ + ptr = &(*ptr)->next; + } + *ptr = (*ptr)->next; + pthread_mutex_unlock (&threadQueueMutex); +} + +static TrueThread +FindThreadInfo (pthread_t threadID) +{ + TrueThread ptr; + + pthread_mutex_lock (&threadQueueMutex); + ptr = threadQueue; + while (ptr) + { + if (ptr->native == threadID) + { + pthread_mutex_unlock (&threadQueueMutex); + return ptr; + } + ptr = ptr->next; + } + pthread_mutex_unlock (&threadQueueMutex); + return NULL; +} + +#ifdef NAMED_SYNCHRO +static const char * +MyThreadName (void) +{ + TrueThread t = FindThreadInfo (pthread_self()); + return t ? t->name : "Unknown (probably renderer)"; +} +#endif + +static void * +ThreadHelper (void *startInfo) { + ThreadFunction func; + void *data; + sem_t *sem; + TrueThread thread; + int result; + + //log_add (log_Debug, "ThreadHelper()"); + + func = ((struct ThreadStartInfo *) startInfo)->func; + data = ((struct ThreadStartInfo *) startInfo)->data; + sem = &((struct ThreadStartInfo *) startInfo)->sem; + + // Wait until the Thread structure is available. + if (sem_wait (sem)) + { + log_add(log_Fatal, "ThreadHelper sem_wait fail"); + exit(EXIT_FAILURE); + } + if (sem_destroy (sem)) + { + log_add(log_Fatal, "ThreadHelper sem_destroy fail"); + exit(EXIT_FAILURE); + } + + thread = ((struct ThreadStartInfo *) startInfo)->thread; + HFree (startInfo); + + result = (*func) (data); + +#ifdef DEBUG_THREADS + log_add (log_Debug, "Thread '%s' done (returned %d).", + thread->name, result); + fflush (stderr); +#endif + + UnQueueThread (thread); + DestroyThreadLocal (thread->localData); + FinishThread (thread); + /* Destroying the thread is the responsibility of ProcessThreadLifecycles() */ + return (void*)result; +} + +void +DestroyThread_PT (Thread t) +{ + HFree (t); +} + +Thread +CreateThread_PT (ThreadFunction func, void *data, SDWORD stackSize +#ifdef NAMED_SYNCHRO + , const char *name +#endif + ) +{ + TrueThread thread; + struct ThreadStartInfo *startInfo; + pthread_attr_t attr; + + + //log_add (log_Debug, "CreateThread_PT '%s'", name); + + thread = (struct _thread *) HMalloc (sizeof *thread); +#ifdef NAMED_SYNCHRO + thread->name = name; +#endif + + thread->localData = CreateThreadLocal (); + + startInfo = (struct ThreadStartInfo *) HMalloc (sizeof (*startInfo)); + startInfo->func = func; + startInfo->data = data; + if (sem_init(&startInfo->sem, 0, 0) < 0) + { + log_add (log_Fatal, "createthread seminit fail"); + exit(EXIT_FAILURE); + } + startInfo->thread = thread; + + pthread_attr_init(&attr); + if (pthread_attr_setstacksize(&attr, 75000)) + { + log_add (log_Debug, "pthread stacksize fail"); + } + if (pthread_create(&thread->native, &attr, ThreadHelper, (void *)startInfo)) + { + log_add (log_Debug, "pthread create fail"); + DestroyThreadLocal (thread->localData); + HFree (startInfo); + HFree (thread); + return NULL; + } + // The responsibility to free 'startInfo' and 'thread' is now by the new + // thread. + + QueueThread (thread); + +#ifdef DEBUG_THREADS +//#if 0 + log_add (log_Debug, "Thread '%s' created.", thread->name); + fflush (stderr); +//#endif +#endif + + // Signal to the new thread that the thread structure is ready + // and it can begin to use it. + if (sem_post (&startInfo->sem)) + { + log_add(log_Fatal, "CreateThread sem_post fail"); + exit(EXIT_FAILURE); + } + + (void) stackSize; /* Satisfying compiler (unused parameter) */ + return thread; +} + +void +SleepThread_PT (TimeCount sleepTime) +{ + usleep (sleepTime * 1000000 / ONE_SECOND); +} + +void +SleepThreadUntil_PT (TimeCount wakeTime) { + TimeCount now; + + now = GetTimeCounter (); + if (wakeTime <= now) + TaskSwitch_PT (); + else + usleep ((wakeTime - now) * 1000000 / ONE_SECOND); +} + +void +TaskSwitch_PT (void) { + usleep (1000); +} + +void +WaitThread_PT (Thread thread, int *status) { + //log_add(log_Debug, "WaitThread_PT '%s', status %x", ((TrueThread)thread)->name, status); + //pthread_join(((TrueThread)thread)->native, status); + pthread_join(((TrueThread)thread)->native, NULL); + //log_add(log_Debug, "WaitThread_PT '%s' complete", ((TrueThread)thread)->name); +} + +ThreadLocal * +GetMyThreadLocal_PT (void) +{ + TrueThread t = FindThreadInfo (pthread_self()); + return t ? t->localData : NULL; +} + +/* These are the pthread implementations of the UQM synchronization objects. */ + +/* Mutexes. */ +/* TODO. The w_memlib uses Mutexes right now, so we can't use HMalloc + * or HFree. Once that goes, this needs to change. */ + +typedef struct _mutex { + pthread_mutex_t mutex; +#ifdef TRACK_CONTENTION + pthread_t owner; +#endif +#ifdef NAMED_SYNCHRO + const char *name; + DWORD syncClass; +#endif +} Mut; + + +Mutex +#ifdef NAMED_SYNCHRO +CreateMutex_PT (const char *name, DWORD syncClass) +#else +CreateMutex_PT (void) +#endif +{ + Mut *mutex = malloc (sizeof (Mut)); + + if (mutex != NULL) + { + pthread_mutexattr_t attr; + pthread_mutexattr_init(&attr); + pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); + if (pthread_mutex_init(&mutex->mutex, &attr)) + { +#ifdef NAMED_SYNCHRO + /* logging depends on Mutexes, so we have to use the + * non-threaded version instead */ + log_add_nothread (log_Fatal, "Could not initialize mutex '%s':" + "aborting.", name); +#else + log_add_nothread (log_Fatal, "Could not initialize mutex:" + "aborting."); +#endif + exit (EXIT_FAILURE); + } + pthread_mutexattr_destroy(&attr); + +#ifdef TRACK_CONTENTION + mutex->owner = 0; +#endif +#ifdef NAMED_SYNCHRO + mutex->name = name; + mutex->syncClass = syncClass; +#endif + } + + return mutex; +} + +void +DestroyMutex_PT (Mutex m) +{ + Mut *mutex = (Mut *)m; + //log_add_nothread(log_Debug, "Destroying mutex '%s'", mutex->name); + pthread_mutex_destroy (&mutex->mutex); + free (mutex); +} + +void +LockMutex_PT (Mutex m) +{ + Mut *mutex = (Mut *)m; +#ifdef TRACK_CONTENTION + /* This code isn't really quite right; race conditions between + * check and lock remain and can produce reports of contention + * where the thread never sleeps, or fail to report in + * situations where it does. If tracking with perfect + * accuracy becomes important, the TRACK_CONTENTION mutex will + * need to handle its own wake/sleep cycles with condition + * variables (check the history of this file for the + * CrossThreadMutex code). This almost-measure is being added + * because for the most part it should suffice. */ + if (mutex->owner && (mutex->syncClass & TRACK_CONTENTION_CLASSES)) + { /* logging depends on Mutexes, so we have to use the + * non-threaded version instead */ + log_add_nothread (log_Debug, "Thread '%s' blocking on mutex '%s'", + MyThreadName (), mutex->name); + } +#endif + + while (pthread_mutex_lock (&mutex->mutex) != 0) + { + //log_add_nothread (log_Debug, "Attempt to acquire mutex '%s' failretry", mutex->name); + TaskSwitch_PT (); + } +#ifdef TRACK_CONTENTION + mutex->owner = pthread_self(); +#endif +} + +void +UnlockMutex_PT (Mutex m) +{ + Mut *mutex = (Mut *)m; +#ifdef TRACK_CONTENTION + mutex->owner = 0; +#endif + while (pthread_mutex_unlock (&mutex->mutex) != 0) + { + TaskSwitch_PT (); + } +} + +/* Semaphores. */ + +typedef struct _sem { + sem_t sem; +#ifdef NAMED_SYNCHRO + const char *name; + DWORD syncClass; +#endif +} Sem; + +Semaphore +CreateSemaphore_PT (DWORD initial +#ifdef NAMED_SYNCHRO + , const char *name, DWORD syncClass +#endif + ) +{ + Sem *sem = (Sem *) HMalloc (sizeof (struct _sem)); +#ifdef NAMED_SYNCHRO + sem->name = name; + sem->syncClass = syncClass; +#endif + + //log_add (log_Debug, "Creating semaphore '%s'", sem->name); + + if (sem_init(&sem->sem, 0, initial) < 0) + { +#ifdef NAMED_SYNCHRO + log_add (log_Fatal, "Could not initialize semaphore '%s':" + " aborting.", name); +#else + log_add (log_Fatal, "Could not initialize semaphore:" + " aborting."); +#endif + exit (EXIT_FAILURE); + } + //log_add (log_Debug, "Creating semaphore '%s' success", sem->name); + return sem; +} + +void +DestroySemaphore_PT (Semaphore s) +{ + Sem *sem = (Sem *)s; + //log_add (log_Debug, "Destroying semaphore '%s'", sem->name); + if (sem_destroy (&sem->sem)) + { + log_add (log_Debug, "Destroying semaphore '%s' failed", sem->name); + } + HFree (sem); +} + +void +SetSemaphore_PT (Semaphore s) +{ + Sem *sem = (Sem *)s; +#ifdef TRACK_CONTENTION + int contention = 0; + sem_getvalue(&sem->sem, &contention); + contention = !contention; + if (contention && (sem->syncClass & TRACK_CONTENTION_CLASSES)) + { + log_add (log_Debug, "Thread '%s' blocking on semaphore '%s'", + MyThreadName (), sem->name); + } +#endif + //log_add (log_Debug, "Attempt to set semaphore '%s'", sem->name); + while (sem_wait (&sem->sem) == -1) + { + //log_add (log_Debug, "Attempt to set semaphore '%s' failretry", sem->name); + TaskSwitch_PT (); + } + //log_add (log_Debug, "Attempt to set semaphore '%s' success", sem->name); +#ifdef TRACK_CONTENTION + if (contention && (sem->syncClass & TRACK_CONTENTION_CLASSES)) + { + log_add (log_Debug, "Thread '%s' awakens," + " released from semaphore '%s'", MyThreadName (), sem->name); + } +#endif +} + +void +ClearSemaphore_PT (Semaphore s) +{ + Sem *sem = (Sem *)s; + //log_add (log_Debug, "Attempt to clear semaphore '%s' %x", sem->name, sem); + while (sem_post (&sem->sem) == -1) + { + //log_add (log_Debug, "Attempt to clear semaphore %x failretry", sem); + TaskSwitch_PT (); + } + //log_add (log_Debug, "Attempt to clear semaphore %x success", sem); +} + +/* Recursive mutexes. Adapted from mixSDL code, which was adapted from + the original DCQ code. */ + +typedef struct _recm { + pthread_mutex_t mutex; + pthread_t thread_id; + unsigned int locks; +#ifdef NAMED_SYNCHRO + const char *name; + DWORD syncClass; +#endif +} RecM; + +RecursiveMutex +#ifdef NAMED_SYNCHRO +CreateRecursiveMutex_PT (const char *name, DWORD syncClass) +#else +CreateRecursiveMutex_PT (void) +#endif +{ + RecM *mtx = (RecM *) HMalloc (sizeof (struct _recm)); + + mtx->thread_id = 0; + if (pthread_mutex_init(&mtx->mutex, NULL)) + { +#ifdef NAMED_SYNCHRO + log_add (log_Fatal, "Could not initialize recursive " + "mutex '%s': aborting.", name); +#else + log_add (log_Fatal, "Could not initialize recursive " + "mutex: aborting."); +#endif + exit (EXIT_FAILURE); + } +#ifdef NAMED_SYNCHRO + mtx->name = name; + mtx->syncClass = syncClass; +#endif + mtx->locks = 0; + return (RecursiveMutex) mtx; +} + +void +DestroyRecursiveMutex_PT (RecursiveMutex val) +{ + RecM *mtx = (RecM *)val; + pthread_mutex_destroy(&mtx->mutex); + HFree (mtx); +} + +void +LockRecursiveMutex_PT (RecursiveMutex val) +{ + RecM *mtx = (RecM *)val; + pthread_t thread_id = pthread_self(); + if (!mtx->locks || mtx->thread_id != thread_id) + { +#ifdef TRACK_CONTENTION + if (mtx->thread_id && (mtx->syncClass & TRACK_CONTENTION_CLASSES)) + { + log_add (log_Debug, "Thread '%s' blocking on '%s'", + MyThreadName (), mtx->name); + } +#endif + while (pthread_mutex_lock (&mtx->mutex)) + TaskSwitch_PT (); + mtx->thread_id = thread_id; + } + mtx->locks++; +} + +void +UnlockRecursiveMutex_PT (RecursiveMutex val) +{ + RecM *mtx = (RecM *)val; + pthread_t thread_id = pthread_self(); + if (!mtx->locks || mtx->thread_id != thread_id) + { +#ifdef NAMED_SYNCHRO + log_add (log_Debug, "'%s' attempted to unlock %s when it " + "didn't hold it", MyThreadName (), mtx->name); +#endif + } + else + { + mtx->locks--; + if (!mtx->locks) + { + mtx->thread_id = 0; + pthread_mutex_unlock (&mtx->mutex); + } + } +} + +int +GetRecursiveMutexDepth_PT (RecursiveMutex val) +{ + RecM *mtx = (RecM *)val; + return mtx->locks; +} + +typedef struct _cond { + pthread_cond_t cond; + pthread_mutex_t mutex; +#ifdef NAMED_SYNCHRO + const char *name; + DWORD syncClass; +#endif +} cvar; + +CondVar +#ifdef NAMED_SYNCHRO +CreateCondVar_PT (const char *name, DWORD syncClass) +#else +CreateCondVar_PT (void) +#endif +{ + int err1, err2; + cvar *cv = (cvar *) HMalloc (sizeof (cvar)); + err1 = pthread_cond_init(&cv->cond, NULL); + err2 = pthread_mutex_init(&cv->mutex, NULL); + if (err1 || err2) + { +#ifdef NAMED_SYNCHRO + log_add (log_Fatal, "Could not initialize condition variable '%s':" + " aborting.", name); +#else + log_add (log_Fatal, "Could not initialize condition variable:" + " aborting."); +#endif + exit (EXIT_FAILURE); + } +#ifdef NAMED_SYNCHRO + cv->name = name; + cv->syncClass = syncClass; +#endif + return cv; +} + +void +DestroyCondVar_PT (CondVar c) +{ + cvar *cv = (cvar *) c; + pthread_cond_destroy(&cv->cond); + pthread_mutex_destroy(&cv->mutex); + HFree (cv); +} + +void +WaitCondVar_PT (CondVar c) +{ + cvar *cv = (cvar *) c; + pthread_mutex_lock (&cv->mutex); +#ifdef TRACK_CONTENTION + if (cv->syncClass & TRACK_CONTENTION_CLASSES) + { + log_add (log_Debug, "Thread '%s' waiting for signal from '%s'", + MyThreadName (), cv->name); + } +#endif + while (pthread_cond_wait (&cv->cond, &cv->mutex) != 0) + { + TaskSwitch_PT (); + } +#ifdef TRACK_CONTENTION + if (cv->syncClass & TRACK_CONTENTION_CLASSES) + { + log_add (log_Debug, "Thread '%s' received signal from '%s'," + " awakening.", MyThreadName (), cv->name); + } +#endif + pthread_mutex_unlock (&cv->mutex); +} + +void +SignalCondVar_PT (CondVar c) +{ + cvar *cv = (cvar *) c; + pthread_cond_signal(&cv->cond); +} + +void +BroadcastCondVar_PT (CondVar c) +{ + cvar *cv = (cvar *) c; + pthread_cond_broadcast(&cv->cond); +} Added: trunk/sc2/src/sc2code/libs/threads/pthread/posixthreads.h =================================================================== --- trunk/sc2/src/sc2code/libs/threads/pthread/posixthreads.h (rev 0) +++ trunk/sc2/src/sc2code/libs/threads/pthread/posixthreads.h 2008-08-21 20:03:54 UTC (rev 3041) @@ -0,0 +1,103 @@ +/* + * 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 _UQMPTHREADS_H +#define _UQMPTHREADS_H + +#include "port.h" +#include "libs/threadlib.h" + +void InitThreadSystem_PT (void); +void UnInitThreadSystem_PT (void); + +#ifdef NAMED_SYNCHRO +/* Prototypes with the "name" field */ +Thread CreateThread_PT (ThreadFunction func, void *data, SDWORD stackSize, const char *name); +Mutex CreateMutex_PT (const char *name, DWORD syncClass); +Semaphore CreateSemaphore_PT (DWORD initial, const char *name, DWORD syncClass); +RecursiveMutex CreateRecursiveMutex_PT (const char *name, DWORD syncClass); +CondVar CreateCondVar_PT (const char *name, DWORD syncClass); +#else +/* Prototypes without the "name" field. */ +Thread CreateThread_PT (ThreadFunction func, void *data, SDWORD stackSize); +Mutex CreateMutex_PT (void); +Semaphore CreateSemaphore_PT (DWORD initial); +RecursiveMutex CreateRecursiveMutex_PT (void); +CondVar CreateCondVar_PT (void); +#endif + +ThreadLocal *GetMyThreadLocal_PT (void); + +void SleepThread_PT (TimeCount sleepTime); +void SleepThreadUntil_PT (TimeCount wakeTime); +void TaskSwitch_PT (void); +void WaitThread_PT (Thread thread, int *status); +void DestroyThread_PT (Thread thread); + +void DestroyMutex_PT (Mutex m); +void LockMutex_PT (Mutex m); +void UnlockMutex_PT (Mutex m); + +void DestroySemaphore_PT (Semaphore sem); +void SetSemaphore_PT (Semaphore sem); +void ClearSemaphore_PT (Semaphore sem); + +void DestroyCondVar_PT (CondVar c); +void WaitCondVar_PT (CondVar c); +void SignalCondVar_PT (CondVar c); +void BroadcastCondVar_PT (CondVar c); + +void DestroyRecursiveMutex_PT (RecursiveMutex m); +void LockRecursiveMutex_PT (RecursiveMutex m); +void UnlockRecursiveMutex_PT (RecursiveMutex m); +int GetRecursiveMutexDepth_PT (RecursiveMutex m); + +#define NativeInitThreadSystem InitThreadSystem_PT +#define NativeUnInitThreadSystem UnInitThreadSystem_PT + +#define NativeGetMyThreadLocal GetMyThreadLocal_PT + +#define NativeCreateThread CreateThread_PT +#define NativeSleepThread SleepThread_PT +#define NativeSleepThreadUntil SleepThreadUntil_PT +#define NativeTaskSwitch TaskSwitch_PT +#define NativeWaitThread WaitThread_PT +#define NativeDestroyThread DestroyThread_PT + +#define NativeCreateMutex CreateMutex_PT +#define NativeDestroyMutex DestroyMutex_PT +#define NativeLockMutex LockMutex_PT +#define NativeUnlockMutex UnlockMutex_PT + +#define NativeCreateSemaphore CreateSemaphore_PT +#define NativeDestroySemaphore DestroySemaphore_PT +#define NativeSetSemaphore SetSemaphore_PT +#define NativeClearSemaphore ClearSemaphore_PT + +#define NativeCreateCondVar CreateCondVar_PT +#define NativeDestroyCondVar DestroyCondVar_PT +#define NativeWaitCondVar WaitCondVar_PT +#define NativeSignalCondVar SignalCondVar_PT +#define NativeBroadcastCondVar BroadcastCondVar_PT + +#define NativeCreateRecursiveMutex CreateRecursiveMutex_PT +#define NativeDestroyRecursiveMutex DestroyRecursiveMutex_PT +#define NativeLockRecursiveMutex LockRecursiveMutex_PT +#define NativeUnlockRecursiveMutex UnlockRecursiveMutex_PT +#define NativeGetRecursiveMutexDepth GetRecursiveMutexDepth_PT + +#endif /* _PTTHREAD_H */ + Modified: trunk/sc2/src/sc2code/libs/threads/thrcommon.h =================================================================== --- trunk/sc2/src/sc2code/libs/threads/thrcommon.h 2008-08-21 18:58:48 UTC (rev 3040) +++ trunk/sc2/src/sc2code/libs/threads/thrcommon.h 2008-08-21 20:03:54 UTC (rev 3041) @@ -18,9 +18,11 @@ #define _THRCOMMON_H -#if THREADLIB == SDL -#include "sdl/sdlthreads.h" -#endif /* THREADLIB == SDL */ +#if defined(THREADLIB_SDL) +# include "sdl/sdlthreads.h" +#elif defined(THREADLIB_PTHREAD) +# include "pthread/posixthreads.h" +#endif /* defined(THREADLIB_PTHREAD) */ #endif /* _THR_COMMON_H */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Mee...@us...> - 2008-08-23 12:06:23
|
Revision: 3051 http://sc2.svn.sourceforge.net/sc2/?rev=3051&view=rev Author: Meep-Eep Date: 2008-08-23 12:06:16 +0000 (Sat, 23 Aug 2008) Log Message: ----------- Split off build tools specific definitions from Makefile.build. Modified Paths: -------------- trunk/sc2/Makefile.build Added Paths: ----------- trunk/sc2/build/unix/make/ trunk/sc2/build/unix/make/buildtools-armv5 trunk/sc2/build/unix/make/buildtools-generic trunk/sc2/build/unix/make/buildtools-winscw Modified: trunk/sc2/Makefile.build =================================================================== --- trunk/sc2/Makefile.build 2008-08-23 11:55:16 UTC (rev 3050) +++ trunk/sc2/Makefile.build 2008-08-23 12:06:16 UTC (rev 3051) @@ -17,31 +17,17 @@ endef endif -define act_mkdep_c - $(MKDEP_C) $(CFLAGS) "$<" -MT "$(@D)/$(<F).o" -MF "$@" -endef +ifeq ($(HOST_SYSTEM),ARMV5) + include build/unix/make/buildtools-armv5 +else +ifeq ($(HOST_SYSTEM),WINSCW) + include build/unix/make/buildtools-winscw +else + include build/unix/make/buildtools-generic +endif +endif -define act_mkdep_m - $(MKDEP_OBJC) $(CFLAGS) "$<" -MT "$(@D)/$(<F).o" -MF "$@" -endef -define act_windres - $(WINDRES) --include-dir $(dir $<) -o "$@" "$<" -endef - -define act_cc - $(COMPILE_C) -o "$@" $(CFLAGS) "$<" -endef - -define act_objcc - $(COMPILE_OBJC) -o "$@" $(CFLAGS) "$<" -endef - -define act_link - $(LINK) -o "$@" $^ $(LDFLAGS) -endef - - default: ./build.sh uqm Added: trunk/sc2/build/unix/make/buildtools-armv5 =================================================================== --- trunk/sc2/build/unix/make/buildtools-armv5 (rev 0) +++ trunk/sc2/build/unix/make/buildtools-armv5 2008-08-23 12:06:16 UTC (rev 3051) @@ -0,0 +1,13 @@ +# Definitions for build tools for the makefile used by the UQM build system. +# This file defines the build commands for ARM tools. + +include buildtools-generic + +define act_mkdep_c + $(MKDEP_C) $(CFLAGS) -o "$(@D)/$(<F).o" "$<" --depend "$@" +endef + +define act_link + $(LINK) --create "$@".lib $^ $(LDFLAGS) +endef + Added: trunk/sc2/build/unix/make/buildtools-generic =================================================================== --- trunk/sc2/build/unix/make/buildtools-generic (rev 0) +++ trunk/sc2/build/unix/make/buildtools-generic 2008-08-23 12:06:16 UTC (rev 3051) @@ -0,0 +1,28 @@ +# Definitions for build tools for the makefile used by the UQM build system. +# This file defines the build commands for tools using a gcc-like syntax +# for arguments. + +define act_mkdep_c + $(MKDEP_C) $(CFLAGS) "$<" -MT "$(@D)/$(<F).o" -MF "$@" +endef + +define act_mkdep_m + $(MKDEP_OBJC) $(CFLAGS) "$<" -MT "$(@D)/$(<F).o" -MF "$@" +endef + +define act_windres + $(WINDRES) --include-dir $(dir $<) -o "$@" "$<" +endef + +define act_cc + $(COMPILE_C) -o "$@" $(CFLAGS) "$<" +endef + +define act_objcc + $(COMPILE_OBJC) -o "$@" $(CFLAGS) "$<" +endef + +define act_link + $(LINK) -o "$@" $^ $(LDFLAGS) +endef + Added: trunk/sc2/build/unix/make/buildtools-winscw =================================================================== --- trunk/sc2/build/unix/make/buildtools-winscw (rev 0) +++ trunk/sc2/build/unix/make/buildtools-winscw 2008-08-23 12:06:16 UTC (rev 3051) @@ -0,0 +1,12 @@ +# Definitions for build tools for the makefile used by the UQM build system. +# This file defines the build commands for Nokia CodeWarrior tools. + +include buildtools-generic + +define act_mkdep_c + $(MKDEP_C) $(CFLAGS) "$<" -o "$@.tmp" + @echo -n "$(@D)/" > $@ + @cat "$@.tmp" >> $@ + @rm -f "$@.tmp" +endef + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gew...@us...> - 2008-08-31 00:34:36
|
Revision: 3064 http://sc2.svn.sourceforge.net/sc2/?rev=3064&view=rev Author: gewlitys Date: 2008-08-31 00:34:29 +0000 (Sun, 31 Aug 2008) Log Message: ----------- Experimental support for Symbian S60 3rd edition Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/Makeproject trunk/sc2/build/unix/build.config trunk/sc2/build/unix/config_proginfo_build trunk/sc2/build/unix/config_proginfo_host trunk/sc2/build/unix/make/buildtools-armv5 trunk/sc2/src/config.h trunk/sc2/src/port.h trunk/sc2/src/sc2code/libs/graphics/sdl/rotozoom.c trunk/sc2/src/sc2code/libs/sound/decoders/modaud.c trunk/sc2/src/sc2code/libs/sound/mixer/sdl/audiodrv_sdl.c trunk/sc2/src/sc2code/planets/plangen.c trunk/sc2/src/starcon2.c Added Paths: ----------- trunk/sc2/INSTALL.symbian trunk/sc2/src/symbian/ trunk/sc2/src/symbian/bld.inf trunk/sc2/src/symbian/config.h trunk/sc2/src/symbian/icons_scalable_dc.mk trunk/sc2/src/symbian/uqm.cfg trunk/sc2/src/symbian/uqm.mmp trunk/sc2/src/symbian/uqm.pkg trunk/sc2/src/symbian/uqm.rss trunk/sc2/src/symbian/uqm.svg trunk/sc2/src/symbian/uqm_reg.rss trunk/sc2/src/symbian/uqmapp.cpp Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2008-08-30 23:59:40 UTC (rev 3063) +++ trunk/sc2/ChangeLog 2008-08-31 00:34:29 UTC (rev 3064) @@ -1,5 +1,6 @@ Changes towards version 0.7: -- Pthread support - Gwl +- Experimental support for Symbian S60 3rd edition - Mika & SvdB +- Pthread support - Mika - Content Dirs completely reorganized; 3DO and PC segregation - Coredev - Voiceovers controlled by a synthetic '3dovoice' addon - Michael - CONVERSATION explicitly names text/voice/timestamps - Michael Added: trunk/sc2/INSTALL.symbian =================================================================== --- trunk/sc2/INSTALL.symbian (rev 0) +++ trunk/sc2/INSTALL.symbian 2008-08-31 00:34:29 UTC (rev 3064) @@ -0,0 +1,86 @@ +UQM for Symbian S60 3rd ed. +=========================== + +First some general notes. These instructions might be somewhat incomplete or +unclear. If you encounter any problems or have suggestions how to improve this +document, please report them to our Bugzilla at + http://bugs.uqm.stack.nl/ + +UQM's Symbian support is currently at experimental stage and is tested only on +Nokia N73, which has too little memory to run it reliably for long time. +Reports of successes and failures on other devices are very welcome. + +Known problems: +- No OGG support so voices and 3DO music are not available. +- No netmelee. + + +Prerequisites: +-------------- + +- Platform SDK for S60 3rd ed. (MR) / 3rd ed. FP1 / 3rd ed. FP2, depending on + target hardware + * Download from http://www.forum.nokia.com/ + +- Open C plugins (if SDK is other than FP2; in FP2 those should be included already) + * Download from http://www.forum.nokia.com/main/resources/tools_and_sdks/openc_cpp/ + +- Carbide.c++ (if building for emulator) + * Download from http://www.forum.nokia.com/ + * Command line compiling must be enabled + +- ARM RealView compiler (if building for hardware) + * Commercial, see http://www.arm.com/products/DevTools/ + +- MinGW and MSYS (for build scripts) + * Download from http://www.mingw.org/ + +- Info-Zip (for building content package) + * Download from http://www.info-zip.org/Zip.html + +- SDL for S60 3rd ed. + * Download from http://koti.mbnet.fi/mertama/sdl.html + * You also need the sources from http://www.libsdl.org/ + +Building: +--------- + +1) Set up platform SDK, compilers, Open C plugins and MinGW + MSYS. + * Be sure zip and other tools are listed in path so they can be accessed + directly from command line. + +2) Subst your Symbian SDK to a new drive along the following example: + subst z: C:\Symbian\9.1\S60_3rd_MR_2 + +3) Put UQM sources inside the substed drive, if not already there. + +4) Install and build SDL, instructions are inside the package. + +5) Build a partial port of libpng and SDL_image, which are included + in UQM SVN repository at trunk/symbian/png: + cd png\group + bldmake bldfiles + abld build + +6) Open MSYS terminal. All following steps are done inside it. + +7) Two environment variables control the building, BUILD_EPOCROOT and BUILD_HOST. + + Set BUILD_EPOCROOT to point to the substed drive: + export BUILD_EPOCROOT=/z + + Set BUILD_HOST to either WINSCW (emulator) or ARMV5 (hardware), depending + for which target you want to build: + export BUILD_HOST=ARMV5 + +8) Compile (you don't need to change any options from the interactive menu): + ./build.sh uqm + +9) Install. It builds the content zip and puts everything to proper + place (WINSCW) or creates a self-signed SIS package (ARMV5): + ./build.sh uqm install + +10) If you built for ARMV5, you should now have uqm.sisx in the same directory + from where you did the build. Remember to also install SDL SIS package and + if not using FP2 SDK, Open C plugins before attempting to run UQM on actual + device. Modified: trunk/sc2/Makeproject =================================================================== --- trunk/sc2/Makeproject 2008-08-30 23:59:40 UTC (rev 3063) +++ trunk/sc2/Makeproject 2008-08-31 00:34:29 UTC (rev 3064) @@ -10,7 +10,7 @@ fi case "$HOST_SYSTEM" in ARMV5|WINSCW) - uqm_NAME="$uqm_NAME.lib" + uqm_NAME="uqm.lib" ;; MINGW32*|CYGWIN*) uqm_NAME="$uqm_NAME.exe" Modified: trunk/sc2/build/unix/build.config =================================================================== --- trunk/sc2/build/unix/build.config 2008-08-30 23:59:40 UTC (rev 3063) +++ trunk/sc2/build/unix/build.config 2008-08-31 00:34:29 UTC (rev 3064) @@ -72,7 +72,7 @@ MENU_main_ITEMS="debug graphics sound mikmod ovcodec netplay joystick \ ioformat accel threadlib" case "$HOST_SYSTEM" in - Darwin) + Darwin|WINSCW|ARMV5) # Installation directory not modifiable ;; MINGW32*|cegcc) @@ -133,35 +133,53 @@ CHOICE_debug_OPTION_strictdebug_TITLE="Debug + strict compile checks" CHOICE_debug_OPTION_strictdebug_ACTION='strictdebug_action' strictdebug_action() { - CFLAGS="$CFLAGS -O1" # This is needed for -Wunitialized - CFLAGS="$CFLAGS -W -Wall \ - -Wbad-function-cast -Wcast-qual -Wmissing-prototypes \ - -Wstrict-prototypes -Wmissing-declarations \ - -Wwrite-strings -Wimplicit -Wreturn-type -Wformat \ - -Wswitch -Wcomment -Wchar-subscripts \ - -Wparentheses -Wcast-align \ - -Winline -Wuninitialized" -# CFLAGS="$CFLAGS -Waggregate-return" - # It's not unreasonable to return structs at times. -# CFLAGS="$CFLAGS "-Wpointer-arith" - # Some standard header won't even compile with this on -# CFLAGS="$CFLAGS -Wshadow" - # This gives absurd conflicts with standard files, - # like from 'y0 and y1' -# CFLAGS="$CFLAGS -Werror" - # We shouldn't do this until we actually nail them - # all in the original code. Then we can enforce them - # on ourselves. -# CFLAGS="$CFLAGS -pedantic-errors -ansi -trigraphs" # ANSI -# CFLAGS="$CFLAGS -Wnested-externs" - # We know they're in the code, and though we'd like to get - # rid of them, they're not bugs. - CFLAGS=`echo $CFLAGS` - # Remove all the unnecessary spaces from $CFLAGS, - # for more readable messages. + case "$HOST_SYSTEM" in + WINSCW) + CFLAGS="$CFLAGS -g -O0 -W all -d DEBUG -d _DEBUG" + ;; + ARMV5) + CFLAGS="$CFLAGS -g -O0 -DDEBUG -D_DEBUG" + ;; + *) + CFLAGS="$CFLAGS -O1" # This is needed for -Wunitialized + CFLAGS="$CFLAGS -W -Wall \ + -Wbad-function-cast -Wcast-qual -Wmissing-prototypes \ + -Wstrict-prototypes -Wmissing-declarations \ + -Wwrite-strings -Wimplicit -Wreturn-type -Wformat \ + -Wswitch -Wcomment -Wchar-subscripts \ + -Wparentheses -Wcast-align \ + -Winline -Wuninitialized" +# CFLAGS="$CFLAGS -Waggregate-return" + # It's not unreasonable to return structs at times. +# CFLAGS="$CFLAGS "-Wpointer-arith" + # Some standard header won't even compile with this on +# CFLAGS="$CFLAGS -Wshadow" + # This gives absurd conflicts with standard files, + # like from 'y0 and y1' +# CFLAGS="$CFLAGS -Werror" + # We shouldn't do this until we actually nail them + # all in the original code. Then we can enforce them + # on ourselves. +# CFLAGS="$CFLAGS -pedantic-errors -ansi -trigraphs" # ANSI +# CFLAGS="$CFLAGS -Wnested-externs" + # We know they're in the code, and though we'd like to get + # rid of them, they're not bugs. + CFLAGS=`echo $CFLAGS` + # Remove all the unnecessary spaces from $CFLAGS, + # for more readable messages. + ;; + esac DEBUG=1 - } - CHOICE_debug_DEFAULT=debug + } + case "$HOST_SYSTEM" in + ARMV5|WINSCW) + CHOICE_debug_DEFAULT=nodebug + ;; + *) + CHOICE_debug_DEFAULT=debug + ;; + esac + CHOICE_graphics_OPTIONS="pure opengl" CHOICE_graphics_TITLE="OpenGL graphics support" @@ -253,7 +271,15 @@ CFLAGS="$CFLAGS -DHAVE_JOYSTICK" } CHOICE_joystick_OPTION_disabled_TITLE="disabled" - CHOICE_joystick_DEFAULT=enabled + case "$HOST_SYSTEM" in + ARMV5|WINSCW) + CHOICE_joystick_DEFAULT=disabled + ;; + *) + CHOICE_joystick_DEFAULT=enabled + ;; + esac + CHOICE_netplay_OPTIONS="none full ipv4" CHOICE_netplay_TITLE="Network Supermelee support" @@ -438,7 +464,7 @@ RFORK="src/res/darwin/${BUILD_PROJECT}.r" test -f "$TARGET_FILE" || return - + # If run from the command-line on OSX, the Window Manager # will refuse to recognize the window unless the program has # a resource fork; so we give it a small one here. When @@ -449,6 +475,20 @@ Darwin) $REZ "$RFORK" -o "$TARGET_FILE" ;; + ARMV5) + cp "$TARGET_FILE" "$BUILD_EPOCROOT/epoc32/release/armv5/urel/" + cd src/symbian + cmd \\/C bldmake bldfiles armv5 + cmd \\/C abld build armv5 urel + cd ../.. + ;; + WINSCW) + cp "$TARGET_FILE" "$BUILD_EPOCROOT/epoc32/release/winscw/udeb/" + cd src/symbian + cmd \\/C bldmake bldfiles winscw + cmd \\/C abld build winscw udeb + cd ../.. + ;; esac } @@ -469,6 +509,12 @@ echo "No installation procedure available for Windows CE." echo "Read the manual for more information." ;; + WINSCW) + uqm_install_winscw + ;; + ARMV5) + uqm_install_armv5 + ;; *) generic_install ;; @@ -543,11 +589,84 @@ cp $uqm_NAME "$INSTROOT/MacOS/The Ur-Quan Masters" } +uqm_install_winscw() { + local PRIVATE_DIR + + PRIVATE_DIR="$BUILD_EPOCROOT/epoc32/winscw/c/private/A000A0C3" + + uqm_create_symbian_content_package + + echo "Creating directory structure to $PRIVATE_DIR ..." + mkdir "$PRIVATE_DIR" + mkdir "$PRIVATE_DIR/content" + mkdir "$PRIVATE_DIR/content/packages" + mkdir "$PRIVATE_DIR/userdata" + + echo "Copying data to $PRIVATE_DIR ..." + cp content/version "$PRIVATE_DIR/content" + cp content.uqm "$PRIVATE_DIR/content/packages" + cp src/symbian/uqm.cfg "$PRIVATE_DIR/userdata" +} + +uqm_install_armv5() { + uqm_create_symbian_content_package + + cd src/symbian + cmd \\/C makekeys -cert -password asdfgh -len 2048 -dname "CN=UQM OR=Ur-Quan Masters CO=FI" uqm.key uqm.cer + cmd \\/C makesis uqm.pkg + cmd \\/C signsis -v uqm.sis uqm.sisx uqm.cer uqm.key asdfgh + mv uqm.sisx ../.. + cd ../.. +} + +uqm_create_symbian_content_package() { + if [ -e "content.uqm" ]; then + echo "Content package already exists, skipping" + return + fi + + echo "Creating content package..." + cd content + echo "Building file list..." + find . -type f -not -path '*/CVS*' -not -path '*/.svn*' -not -path './addons*' -not -name "version" >../content.lst + echo "Zipping..." + zip -q ../content.uqm -r . -i@../content.lst + cd .. + rm content.lst +} + uqm_clean() { case "$HOST_SYSTEM" in MINGW32*|CYGWIN*) rm -f "$BUILD_WORK/config_win.h" ;; + ARMV5) + local TARGET_FILE + eval TARGET_FILE="\$BUILD_WORK/\${${BUILD_PROJECT}_NAME}" + + rm -f "$BUILD_WORK/config_unix.h" + rm -f "$BUILD_EPOCROOT/epoc32/release/armv5/urel/$TARGET_FILE" + rm -f $TARGET_FILE uqm.sisx content.uqm + + cd src/symbian + cmd \\/C abld reallyclean armv5 + cmd \\/C bldmake clean + rm -f uqm.sis uqm.key uqm.cer + cd ../.. + ;; + WINSCW) + local TARGET_FILE + eval TARGET_FILE="\$BUILD_WORK/\${${BUILD_PROJECT}_NAME}" + + rm -f "$BUILD_WORK/config_unix.h" + rm -f "$BUILD_EPOCROOT/epoc32/release/winscw/udeb/$TARGET_FILE" + rm -f $TARGET_FILE content.uqm + + cd src/symbian + cmd \\/C abld reallyclean winscw + cmd \\/C bldmake clean + cd ../.. + ;; *) rm -f "$BUILD_WORK/config_unix.h" ;; Modified: trunk/sc2/build/unix/config_proginfo_build =================================================================== --- trunk/sc2/build/unix/config_proginfo_build 2008-08-30 23:59:40 UTC (rev 3063) +++ trunk/sc2/build/unix/config_proginfo_build 2008-08-31 00:34:29 UTC (rev 3064) @@ -68,7 +68,7 @@ useGccBuildTools ;; WINSCW) - EXTRA_WINSCW_FLAGS_COMPILE='-msgstyle gcc -gccinc -wchar_t off -align 4 -warnings on -w nohidevirtual,nounusedexpr -enum int -str pool -exc ms -trigraphs on -nostdinc -d _UNICODE -d __SYMBIAN32__ -d __SERIES60_30__ -d __SERIES60_3X__ -d __CW32__ -d __WINS__ -d __WINSCW__ -d __EXE__ -d __SUPPORT_CPP_EXCEPTIONS__ -I$BUILD_EPOCROOT/epoc32/include -I$BUILD_EPOCROOT/epoc32/include/stdapis -I$BUILD_EPOCROOT/epoc32/include/variant -include Symbian_OS_v9.1.hrh' + EXTRA_WINSCW_FLAGS_COMPILE="-msgstyle gcc -gccinc -dialect c99 -relax_pointers -wchar_t off -align 4 -warnings on -w nohidevirtual,nounusedexpr -enum int -str pool -exc ms -trigraphs on -nostdinc -d _UNICODE -d __SYMBIAN32__ -d __SERIES60_30__ -d __SERIES60_3X__ -d __CW32__ -d __WINS__ -d __WINSCW__ -d __EXE__ -d __SUPPORT_CPP_EXCEPTIONS__ -I$BUILD_EPOCROOT/epoc32/include -I$BUILD_EPOCROOT/epoc32/include/stdapis -I$BUILD_EPOCROOT/epoc32/include/variant -include Symbian_OS_v9.1.hrh" EXTRA_WINSCW_FLAGS_LINK='-library -msgstyle gcc -stdlib -noimplib -search' BUILDTOOL_PREPROC_C_COMMAND="\$PROG_mwccsym2_FILE -E $EXTRA_WINSCW_FLAGS_COMPILE" Modified: trunk/sc2/build/unix/config_proginfo_host =================================================================== --- trunk/sc2/build/unix/config_proginfo_host 2008-08-30 23:59:40 UTC (rev 3063) +++ trunk/sc2/build/unix/config_proginfo_host 2008-08-31 00:34:29 UTC (rev 3064) @@ -67,6 +67,16 @@ gcc -E -include SDL/SDL_version.h $LIB_SDL_CFLAGS - | \ tail -1 | tr -d ' ') ;; + WINSCW) + LIB_SDL_CFLAGS='-I$BUILD_EPOCROOT/epoc32/include/SDL' + LIB_SDL_LDFLAGS='' + LIB_SDL_VERSION='1.2.13' + ;; + ARMV5) + LIB_SDL_CFLAGS='-J$BUILD_EPOCROOT/epoc32/include/SDL' + LIB_SDL_LDFLAGS='' + LIB_SDL_VERSION='1.2.13' + ;; *) LIB_SDL_CFLAGS='$(sdl-config --cflags)' LIB_SDL_LDFLAGS='$(sdl-config --libs)' @@ -89,6 +99,10 @@ LIB_SDL_image_CFLAGS='' LIB_SDL_image_LDFLAGS="-framework SDL_image" ;; + ARMV5|WINSCW) + LIB_SDL_image_CFLAGS="$LIB_SDL_CFLAGS" + LIB_SDL_image_LDFLAGS="$LIB_SDL_LDFLAGS" + ;; *) LIB_SDL_image_CFLAGS="$LIB_SDL_CFLAGS" LIB_SDL_image_LDFLAGS="$LIB_SDL_LDFLAGS -lSDL_image" @@ -135,6 +149,9 @@ LIB_opengl_CFLAGS="" LIB_opengl_LDFLAGS="-framework OpenGL" ;; + ARMV5|WINSCW) + LIB_opengl_DETECT="false" + ;; *) LIB_opengl_CFLAGS="" LIB_opengl_LDFLAGS="-lGL" @@ -148,6 +165,11 @@ LIB_vorbis_CFLAGS="" LIB_vorbis_LDFLAGS="-lvorbis" LIB_vorbis_VERSION="" +case "$HOST_SYSTEM" in + ARMV5|WINSCW) + LIB_vorbis_DETECT="false" + ;; +esac ### Vorbisfile ### @@ -175,8 +197,15 @@ ;; esac LIB_vorbisfile_VERSION="" -LIB_vorbisfile_DETECT="try_pkgconfig_lib vorbisfile vorbisfile" -LIB_vorbisfile_DEPEND_DETECT_BIN="pkgconfig" +case "$HOST_SYSTEM" in + ARMV5|WINSCW) + LIB_vorbisfile_DETECT="false" + ;; + *) + LIB_vorbisfile_DETECT="try_pkgconfig_lib vorbisfile vorbisfile" + LIB_vorbisfile_DEPEND_DETECT_BIN="pkgconfig" + ;; +esac ### Tremor ### @@ -190,6 +219,9 @@ # Assumed values - please let me know if you can verify this. LIB_tremor_CFLAGS="" LIB_tremor_LDFLAGS="-framework Tremor" + ;; + ARMV5|WINSCW) + LIB_tremor_DETECT="false" ;; *) LIB_tremor_CFLAGS="" @@ -204,6 +236,11 @@ LIB_libmikmod_CFLAGS="$(libmikmod-config --cflags)" LIB_libmikmod_LDFLAGS="$(libmikmod-config --libs)" LIB_libmikmod_VERSION="$(libmikmod-config --version)" +case "$HOST_SYSTEM" in + ARMV5|WINSCW) + LIB_libmikmod_DETECT="false" + ;; +esac ### zlib ### @@ -213,15 +250,26 @@ MINGW32*|CYGWIN*|cegcc) LIB_zlib_LDFLAGS="-lzdll" ;; + ARMV5|WINSCW) + LIB_zlib_LDFLAGS="" + ;; *) LIB_zlib_LDFLAGS="-lz" ;; esac LIB_zlib_VERSION="" -LIB_zlib_DETECT="try_pkgconfig_lib zlib zlib" -LIB_zlib_DEPEND_DETECT_BIN="pkgconfig" +case "$HOST_SYSTEM" in + ARMV5|WINSCW) + LIB_zlib_DETECT="true" + ;; + *) + LIB_zlib_DETECT="try_pkgconfig_lib zlib zlib" + LIB_zlib_DEPEND_DETECT_BIN="pkgconfig" + ;; +esac + ### pthread ### LIB_pthread_NAME="pthread" case "$HOST_SYSTEM" in @@ -235,6 +283,11 @@ LIB_pthread_LDFLAGS="$(pthread-config --ldflags)" LIB_pthread_VERSION="$(pthread-config --version)" ;; + WINSCW|ARMV5) + LIB_pthread_CFLAGS="" + LIB_pthread_LDFLAGS="" + LIB_pthread_VERSION="" + ;; *) LIB_pthread_CFLAGS="" LIB_pthread_LDFLAGS="-lpthread" @@ -251,6 +304,9 @@ LIB_netlibs_LDFLAGS="-lsocket" LIB_netlibs_VERSION="" ;; + ARMV5|WINSCW) + LIB_netlibs_DETECT="false" + ;; esac @@ -265,6 +321,7 @@ SYMBOL_setenv_EXTRA="#include <stdlib.h>" SYMBOL_strcasecmp_EXTRA="#include <strings.h>" + SYMBOL_strcasecmp_DEFNAME="HAVE_STRCASECMP_UQM" # HAVE_STRCASECMP would conflict with SDL (SDL_config.h). Modified: trunk/sc2/build/unix/make/buildtools-armv5 =================================================================== --- trunk/sc2/build/unix/make/buildtools-armv5 2008-08-30 23:59:40 UTC (rev 3063) +++ trunk/sc2/build/unix/make/buildtools-armv5 2008-08-31 00:34:29 UTC (rev 3064) @@ -8,6 +8,6 @@ endef define act_link - $(LINK) --create "$@".lib $^ $(LDFLAGS) + $(LINK) --create "$@" $^ $(LDFLAGS) endef Modified: trunk/sc2/src/config.h =================================================================== --- trunk/sc2/src/config.h 2008-08-30 23:59:40 UTC (rev 3063) +++ trunk/sc2/src/config.h 2008-08-31 00:34:29 UTC (rev 3064) @@ -7,6 +7,8 @@ * If you want anything else than the defaults, you'll have to edit * that file manually. */ # include "msvc++/config.h" +#elif defined(__SYMBIAN32__) +# include "symbian/config.h" #elif defined (__MINGW32__) || defined (__CYGWIN__) /* If we're compiling on MS Windows using build.sh, use * config_win.h, generated from src/config_win.h.in. */ Modified: trunk/sc2/src/port.h =================================================================== --- trunk/sc2/src/port.h 2008-08-30 23:59:40 UTC (rev 3063) +++ trunk/sc2/src/port.h 2008-08-31 00:34:29 UTC (rev 3064) @@ -24,6 +24,7 @@ // Compilation related #ifdef _MSC_VER # define inline __inline +#elif defined(__SYMBIAN32__) #else # define inline __inline__ # ifdef __MINGW32__ Modified: trunk/sc2/src/sc2code/libs/graphics/sdl/rotozoom.c =================================================================== --- trunk/sc2/src/sc2code/libs/graphics/sdl/rotozoom.c 2008-08-30 23:59:40 UTC (rev 3063) +++ trunk/sc2/src/sc2code/libs/graphics/sdl/rotozoom.c 2008-08-31 00:34:29 UTC (rev 3064) @@ -19,6 +19,8 @@ #define MAX(a,b) (((a) > (b)) ? (a) : (b)) + + /* 32bit Zoomer with optional anti-aliasing by bilinear interpolation. @@ -54,13 +56,23 @@ /* * Allocate memory for row increments */ - if ((sax = (int *) alloca((dst->w + 1) * sizeof(Uint32))) == NULL) { - return (-1); - } - if ((say = (int *) alloca((dst->h + 1) * sizeof(Uint32))) == NULL) { - return (-1); - } +#ifndef __SYMBIAN32__ + if ((sax = (int *) alloca((dst->w + 1) * sizeof(Uint32))) == NULL) + return (-1); + if ((say = (int *) alloca((dst->h + 1) * sizeof(Uint32))) == NULL) + return (-1); +#else + if ((sax = (int *) HMalloc((dst->w + 1) * sizeof(Uint32))) == NULL) + return (-1); + if ((say = (int *) HMalloc((dst->h + 1) * sizeof(Uint32))) == NULL) + { + HFree(sax); + return (-1); + } +#endif + + /* * Precalculate row increments */ @@ -196,6 +208,11 @@ } +#ifdef __SYMBIAN32__ + HFree(sax); + HFree(say); +#endif + return (0); } @@ -223,12 +240,20 @@ /* * Allocate memory for row increments */ - if ((sax = (Uint32 *) alloca(dst->w * sizeof(Uint32))) == NULL) { - return (-1); - } - if ((say = (Uint32 *) alloca(dst->h * sizeof(Uint32))) == NULL) { - return (-1); - } +#ifndef __SYMBIAN32__ + if ((sax = (Uint32 *) alloca(dst->w * sizeof(Uint32))) == NULL) + return (-1); + if ((say = (Uint32 *) alloca(dst->h * sizeof(Uint32))) == NULL) + return (-1); +#else + if ((sax = (Uint32 *) HMalloc(dst->w * sizeof(Uint32))) == NULL) + return (-1); + if ((say = (Uint32 *) HMalloc(dst->h * sizeof(Uint32))) == NULL) + { + HFree(sax); + return (-1); + } +#endif /* * Precalculate row increments @@ -303,6 +328,11 @@ dp += dgap; } +#ifdef __SYMBIAN32__ + HFree(sax); + HFree(say); +#endif + return (0); } Modified: trunk/sc2/src/sc2code/libs/sound/decoders/modaud.c =================================================================== --- trunk/sc2/src/sc2code/libs/sound/decoders/modaud.c 2008-08-30 23:59:40 UTC (rev 3063) +++ trunk/sc2/src/sc2code/libs/sound/decoders/modaud.c 2008-08-31 00:34:29 UTC (rev 3064) @@ -260,7 +260,11 @@ else if (flags & audio_QUALITY_LOW) { md_mode = DMODE_SOFT_MUSIC|DMODE_STEREO|DMODE_16BITS; +#ifdef __SYMBIAN32__ + md_mixfreq = 11025; +#else md_mixfreq = 22050; +#endif md_reverb = 0; } else Modified: trunk/sc2/src/sc2code/libs/sound/mixer/sdl/audiodrv_sdl.c =================================================================== --- trunk/sc2/src/sc2code/libs/sound/mixer/sdl/audiodrv_sdl.c 2008-08-30 23:59:40 UTC (rev 3063) +++ trunk/sc2/src/sc2code/libs/sound/mixer/sdl/audiodrv_sdl.c 2008-08-31 00:34:29 UTC (rev 3064) @@ -119,7 +119,7 @@ return -1; } log_add (log_Info, "SDL audio subsystem initialized."); - + if (flags & audio_QUALITY_HIGH) { quality = MIX_QUALITY_HIGH; @@ -129,8 +129,13 @@ else if (flags & audio_QUALITY_LOW) { quality = MIX_QUALITY_LOW; +#ifdef __SYMBIAN32__ + desired.freq = 11025; + desired.samples = 4096; +#else desired.freq = 22050; desired.samples = 2048; +#endif } else { @@ -208,12 +213,12 @@ SetSFXVolume (sfxVolumeScale); SetSpeechVolume (speechVolumeScale); SetMusicVolume ((COUNT)musicVolume); - + StreamDecoderTask = AssignTask (StreamDecoderTaskFunc, 1024, "audio stream decoder"); SDL_PauseAudio (0); - + return 0; } Modified: trunk/sc2/src/sc2code/planets/plangen.c =================================================================== --- trunk/sc2/src/sc2code/planets/plangen.c 2008-08-30 23:59:40 UTC (rev 3063) +++ trunk/sc2/src/sc2code/planets/plangen.c 2008-08-31 00:34:29 UTC (rev 3064) @@ -1455,7 +1455,11 @@ }, }; +#ifndef __SYMBIAN32__ prevrow = (int *) alloca ((MAP_WIDTH * 4 + 1) * sizeof(prevrow[0])); +#else + prevrow = (int *) HMalloc ((MAP_WIDTH * 4 + 1) * sizeof(prevrow[0])); +#endif var_allow = (num_faults << SCALE_SHIFT) / AVG_VARIANCE; var_min = fault_var << SCALE_SHIFT; @@ -1592,6 +1596,10 @@ // save last row point prow[0] = elev[4][4]; } + +#ifdef __SYMBIAN32__ + HFree(prevrow); +#endif } Modified: trunk/sc2/src/starcon2.c =================================================================== --- trunk/sc2/src/starcon2.c 2008-08-30 23:59:40 UTC (rev 3063) +++ trunk/sc2/src/starcon2.c 2008-08-31 00:34:29 UTC (rev 3064) @@ -235,17 +235,17 @@ } if (res_HasKey ("config.scaler")) { - const char *optarg = res_GetString ("config.scaler"); + const char *arg = res_GetString ("config.scaler"); - if (!strcmp (optarg, "bilinear")) + if (!strcmp (arg, "bilinear")) options.gfxFlags |= TFB_GFXFLAGS_SCALE_BILINEAR; - else if (!strcmp (optarg, "biadapt")) + else if (!strcmp (arg, "biadapt")) options.gfxFlags |= TFB_GFXFLAGS_SCALE_BIADAPT; - else if (!strcmp (optarg, "biadv")) + else if (!strcmp (arg, "biadv")) options.gfxFlags |= TFB_GFXFLAGS_SCALE_BIADAPTADV; - else if (!strcmp (optarg, "triscan")) + else if (!strcmp (arg, "triscan")) options.gfxFlags |= TFB_GFXFLAGS_SCALE_TRISCAN; - else if (!strcmp (optarg, "hq")) + else if (!strcmp (arg, "hq")) options.gfxFlags |= TFB_GFXFLAGS_SCALE_HQXX; } if (res_HasKey ("config.scanlines") && res_GetBoolean ("config.scanlines")) Added: trunk/sc2/src/symbian/bld.inf =================================================================== --- trunk/sc2/src/symbian/bld.inf (rev 0) +++ trunk/sc2/src/symbian/bld.inf 2008-08-31 00:34:29 UTC (rev 3064) @@ -0,0 +1,9 @@ +PRJ_PLATFORMS + + +PRJ_EXPORTS + + +PRJ_MMPFILES +gnumakefile icons_scalable_dc.mk +uqm.mmp Added: trunk/sc2/src/symbian/config.h =================================================================== --- trunk/sc2/src/symbian/config.h (rev 0) +++ trunk/sc2/src/symbian/config.h 2008-08-31 00:34:29 UTC (rev 3064) @@ -0,0 +1,57 @@ +/* This file contains some compile-time configuration options for Symbian + */ + +#ifndef _CONFIG_H +#define _CONFIG_H + +/* Directory where the UQM game data is located */ +#define CONTENTDIR "content" + +/* Directory where game data will be stored */ +#define USERDIR "userdata" + +/* Directory where config files will be stored */ +#define CONFIGDIR USERDIR + +/* Directory where supermelee teams will be stored */ +#define MELEEDIR "userdata\\teams\\" + +/* Directory where save games will be stored */ +#define SAVEDIR "userdata\\save\\" + +/* Define if words are stored with the most significant byte first */ +#undef WORDS_BIGENDIAN + +/* Defined if your system has readdir_r of its own */ +#undef HAVE_READDIR_R + +/* Defined if your system has setenv of its own */ +#define HAVE_SETENV + +/* Defined if your system has strupr of its own */ +#undef HAVE_STRUPR + +/* Defined if your system has strcasecmp of its own */ +#define HAVE_STRCASECMP_UQM + // Not using "HAVE_STRCASECMP" as that conflicts with SDL. + +/* Defined if your system has stricmp of its own */ +#undef HAVE_STRICMP + +/* Defined if your system has getopt_long */ +#undef HAVE_GETOPT_LONG + +/* Defined if your system has iswgraph of its own*/ +#define HAVE_ISWGRAPH + +/* Defined if your system has wchar_t of its own */ +#define HAVE_WCHAR_T + +/* Defined if your system has wint_t of its own */ +#define HAVE_WINT_T + +#define HAVE__BOOL + +#define PATH_MAX _POSIX_PATH_MAX + +#endif /* _CONFIG_H */ Added: trunk/sc2/src/symbian/icons_scalable_dc.mk =================================================================== --- trunk/sc2/src/symbian/icons_scalable_dc.mk (rev 0) +++ trunk/sc2/src/symbian/icons_scalable_dc.mk 2008-08-31 00:34:29 UTC (rev 3064) @@ -0,0 +1,37 @@ +ifeq (WINS,$(findstring WINS, $(PLATFORM))) +ZDIR=$(EPOCROOT)epoc32\release\$(PLATFORM)\$(CFG)\Z +else +ZDIR=$(EPOCROOT)epoc32\data\z +endif + +TARGETDIR=$(ZDIR)\resource\apps +ICONTARGETFILENAME=$(TARGETDIR)\uqm_icon.mif + +ICONDIR= + +do_nothing : + @rem do_nothing + +MAKMAKE : do_nothing + +BLD : do_nothing + +CLEAN : do_nothing + +LIB : do_nothing + +CLEANLIB : do_nothing + +RESOURCE : + mifconv $(ICONTARGETFILENAME) \ + /c32 uqm.svg + +FREEZE : do_nothing + +SAVESPACE : do_nothing + +RELEASABLES : + @echo $(ICONTARGETFILENAME) + +FINAL : do_nothing + Added: trunk/sc2/src/symbian/uqm.cfg =================================================================== --- trunk/sc2/src/symbian/uqm.cfg (rev 0) +++ trunk/sc2/src/symbian/uqm.cfg 2008-08-31 00:34:29 UTC (rev 3064) @@ -0,0 +1,26 @@ +config.textmenu = yes +config.alwaysgl = no +config.sfxvol = 20 +config.iconicscan = no +config.pulseshield = no +config.3domusic = no +config.smoothmelee = no +config.positionalsfx = no +config.resheight = 240 +config.musicvol = 20 +config.textgradients = yes +config.reswidth = 320 +config.scaler = no +config.audiodriver = mixsdl +config.fullscreen = no +config.usegl = no +config.player2control = 3 +config.player1control = 0 +config.subtitles = yes +config.3domovies = yes +config.scanlines = no +config.showfps = no +config.speechvol = 0 +config.remixmusic = no +config.smoothscroll = no +config.audioquality = low Added: trunk/sc2/src/symbian/uqm.mmp =================================================================== --- trunk/sc2/src/symbian/uqm.mmp (rev 0) +++ trunk/sc2/src/symbian/uqm.mmp 2008-08-31 00:34:29 UTC (rev 3064) @@ -0,0 +1,43 @@ +TARGET uqm.exe +TARGETTYPE exe +UID 0 0xA000A0C3 +EPOCHEAPSIZE 1000000 50000000 +EPOCSTACKSIZE 0x13500 + +SYSTEMINCLUDE \epoc32\include \epoc32\include\stdapis + +SOURCEPATH . +SOURCE uqmapp.cpp + +START RESOURCE uqm.rss +HEADER +TARGETPATH resource\apps +LANG SC +END // RESOURCE + +START RESOURCE uqm_reg.rss +#ifdef WINSCW +TARGETPATH \private\10003a3f\apps +#else +TARGETPATH \private\10003a3f\import\apps +#endif +END + +OPTION_REPLACE ARMCC --cpu ARM926EJ-S -O3 -Otime +ALWAYS_BUILD_AS_ARM + +LIBRARY avkon.lib +LIBRARY apparc.lib +LIBRARY cone.lib +LIBRARY eikcore.lib +LIBRARY ws32.lib +LIBRARY bafl.lib +LIBRARY euser.lib +LIBRARY sdl.lib +LIBRARY libc.lib +LIBRARY libm.lib +LIBRARY libz.lib +LIBRARY libpthread.lib + +STATICLIBRARY SDL_image.lib +STATICLIBRARY uqm.lib Added: trunk/sc2/src/symbian/uqm.pkg =================================================================== --- trunk/sc2/src/symbian/uqm.pkg (rev 0) +++ trunk/sc2/src/symbian/uqm.pkg 2008-08-31 00:34:29 UTC (rev 3064) @@ -0,0 +1,26 @@ +;Language - standard language definitions +&EN + +; standard SIS file header +#{"Ur-Quan Masters"},(0xA000A0C3),1,0,0 + +;Localised Vendor name +%{"Interstellar Frungy League"} + +;Unique Vendor name +:"Interstellar Frungy League" + +;Supports Series 60 v 3.0 +[0x101F7961], 0, 0, 0, {"Series60ProductID"} + +*"uqm.key", "uqm.cer" + +;Files to install +;<source> <destination> +"\Epoc32\release\Armv5\urel\uqm.exe" - "!:\sys\bin\uqm.exe" +"\Epoc32\data\z\resource\apps\uqm.rsc" - "!:\resource\apps\uqm.rsc" +"\Epoc32\data\z\resource\apps\uqm_icon.mif" - "!:\resource\apps\uqm_icon.mif" +"\Epoc32\data\z\private\10003a3f\import\apps\uqm_reg.rsc" - "!:\private\10003a3f\import\apps\uqm_reg.rsc" +"uqm.cfg" - "c:\private\A000A0C3\userdata\uqm.cfg" +"..\..\content\version" - "c:\private\A000A0C3\content\version" +"..\..\content.uqm" - "c:\private\A000A0C3\content\packages\content.uqm" Added: trunk/sc2/src/symbian/uqm.rss =================================================================== --- trunk/sc2/src/symbian/uqm.rss (rev 0) +++ trunk/sc2/src/symbian/uqm.rss 2008-08-31 00:34:29 UTC (rev 3064) @@ -0,0 +1,26 @@ +NAME UQM + +#include <eikon.rh> +#include <avkon.rh> +#include <avkon.rsg> +#include <avkon.hrh> +#include <appinfo.rh> + +RESOURCE RSS_SIGNATURE { } + +RESOURCE TBUF { buf="UQM"; } + +RESOURCE EIK_APP_INFO + { + } + +RESOURCE LOCALISABLE_APP_INFO r_uqm_localisable_app_info + { + short_caption = "UQM"; + caption_and_icon = CAPTION_AND_ICON_INFO + { + caption = "UrQuanMasters"; + number_of_icons = 1; + icon_file = "\\resource\\apps\\uqm_icon.mif"; + }; + } Added: trunk/sc2/src/symbian/uqm.svg =================================================================== --- trunk/sc2/src/symbian/uqm.svg (rev 0) +++ trunk/sc2/src/symbian/uqm.svg 2008-08-31 00:34:29 UTC (rev 3064) @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + width="48px" height="48px" viewBox="0 0 48 48" enable-background="new 0 0 48 48" xml:space="preserve"> +<g> + <g> + <path fill="#5B5F54" d="M15,5c1.44,0.56,2.44,1.56,3,3c-0.81,0.19-0.997,1.003-2,1c-0.333,0-0.667,0-1,0 + c0.184-0.851-0.39-0.943-1-1C13.718,6.385,14.945,6.278,15,5z"/> + <path fill="#5B5F54" d="M13,15c-0.586,3.511,4.727,3.289,2,6c-2.323,2.416-2.677-1.562-5-2c0-0.667,0-1.333,0-2 + C10.437,15.77,11.28,14.946,13,15z"/> + <path fill="#B43905" d="M5,29c0.333,0,0.667,0,1,0c0.19,0.811,1.003,0.997,1,2c1.563,3.771,4.23,6.438,8,8 + c0.89,0.443,1.789,0.878,2,2c-4.236,0.236-5.083-2.917-8-4c0.184-0.852-0.39-0.943-1-1C7.549,33.118,4.461,32.872,5,29z"/> + <path fill="#03D002" d="M9,31c5.35-2.9,9.348,4.807,9,8c-4.555-0.779-5.266-5.4-9-7C9,31.667,9,31.333,9,31z"/> + <path fill="#5B5F54" d="M27,30c0.902,1.764,2.236,3.098,4,4c-0.238,1.428-1.646,1.688-2,3c-0.333,0-0.667,0-1,0 + c-0.902-1.764-2.236-3.098-4-4c0.239-1.428,1.646-1.688,2-3C26.333,30,26.667,30,27,30z"/> + <path opacity="0" fill="#EAECE6" d="M4,14c3.582-4.418,7.582-8.418,12-12C12.418,6.418,8.418,10.418,4,14z"/> + <path opacity="0" fill="#FFFFFF" d="M48,0c0,16,0,32,0,48c-16,0-32,0-48,0C0,32,0,16,0,0C16,0,32,0,48,0z M4,14 + c-0.634,3.699-2.713,5.953-2,11c4.654,0.943,6.093-6.516,10-3c-1.412,2.588-3.231,4.77-8,4c-0.664,5.33,0.582,8.751,4,10 + c0.61,0.057,1.184,0.148,1,1c0,0.333,0,0.667,0,1c2.853,1.813,4.086,5.247,10,4c0.792-3.339,2.546-9.477,7-6 + c-0.854,3.275-7.298,4.725-5,8c13.313,1.313,15.825-8.175,23-13c0.253-3.586-3.003-3.664-3-7C52.211,11.655,34.152-2.889,21,6 + c-1.286-1.714-2.068-3.932-5-4C11.582,5.582,7.582,9.582,4,14z"/> + <path fill="#21351B" d="M4,14c4.418-3.582,8.418-7.582,12-12c2.932,0.068,3.714,2.286,5,4c13.152-8.889,31.211,5.655,20,18 + c-0.003,3.336,3.253,3.414,3,7c-7.175,4.825-9.688,14.313-23,13c-2.298-3.275,4.146-4.725,5-8c-4.454-3.477-6.208,2.661-7,6 + c-5.914,1.247-7.147-2.188-10-4c0-0.333,0-0.667,0-1c2.917,1.083,3.764,4.236,8,4c0.333,0,0.667,0,1,0 + c2.208-0.125,0.425-4.242,1-6c0.89,0.615,1.789,1.208,2,0c1.313-0.354,1.573-1.762,3-2c1.764,0.902,3.098,2.236,4,4 + c-0.797,1.072-7.094,4.348-2,5c6.992-0.341,10.803-3.863,13-9c-0.354-1.313-1.762-1.572-2-3c-3.512-0.178-3.289,3.378-6,4 + c-1.764-0.902-3.098-2.236-4-4c1.241-2.092,2.908-3.759,5-5c-1.436,2.951-5.811,4.049-2,7c2.748-1.131,12.85-8.146,3-7 + c1.807-3.096,3.063-0.534,7-1c3.793-2.643,2.902-15.629-2-16c-0.529-0.804-1.043-1.624-1-3c-4.564,0.435-11.012-1.011-14,1 + c3.873,11.531-9.844,12.351-12,21c-2,0-4,0-6,0c0,0.667,0,1.333,0,2c-0.539,3.872,2.549,4.118,3,7c-3.418-1.249-4.664-4.67-4-10 + c4.769,0.77,6.588-1.412,8-4c-3.907-3.516-5.346,3.943-10,3C1.287,19.953,3.366,17.699,4,14z M18,8c1.278,0.055,1.385,1.282,3,1 + c1.074-3.808-3.845-6.732-6-4c-0.055,1.278-1.282,1.385-1,3C8.369,11.035,3.757,15.09,3,23c2.951,2.451,4.049-3.356,7-4 + c2.323,0.438,2.677,4.416,5,2c2.727-2.711-2.586-2.489-2-6c2.039-0.294,1.961-2.706,4-3c0.043-1.376-0.471-2.196-1-3 + C17.003,9.003,17.19,8.19,18,8z M21,9c-1.546,2.867-8.463,4.297-5,9C19.536,17.498,24.081,12.798,21,9z M37,28 + c3.384-0.384,1.572,4.428,6,3C42.991,27.918,38.283,23.799,37,28z"/> + <path fill="#65C11B" d="M34,6c1.725,3.276,5.275,4.724,7,8c-2.754-1.913-5.088-4.246-7-7c-1.758,0.575-5.875-1.208-6,1 + C22.684,5.654,30.9,5.834,34,6z"/> + <path fill="#65C11B" d="M31,8c4.893,2.441,6.87,7.797,10,12c-4.051,1.688-3.527-9.783-9-10C31.811,9.19,30.997,9.003,31,8z"/> + <path fill="#03D002" d="M16,9c0.529,0.804,1.043,1.624,1,3c-2.039,0.294-1.961,2.706-4,3c-1.72-0.054-2.563,0.77-3,2 + c-2.168,1.499-2.329,5.004-6,5c1.383-6.617,7.15-8.85,11-13C15.333,9,15.667,9,16,9z"/> + <path fill="#038C01" d="M15,9c-3.85,4.15-9.617,6.383-11,13c3.671,0.004,3.832-3.501,6-5c0,0.667,0,1.333,0,2 + c-2.951,0.644-4.049,6.451-7,4c0.757-7.91,5.369-11.965,11-15C14.61,8.057,15.184,8.149,15,9z"/> + <path opacity="0" fill="#FFFFFF" d="M16,18c-3.463-4.703,3.454-6.133,5-9C24.081,12.798,19.536,17.498,16,18z"/> + <path fill="#03D002" d="M38,8c4.902,0.371,5.793,13.357,2,16c-3.938,0.466-5.193-2.096-7,1c-0.333,0-0.667,0-1,0 + c-2.092,1.241-3.759,2.908-5,5c-0.333,0-0.667,0-1,0c-0.354,1.313-1.761,1.572-2,3c-1.427,0.238-1.687,1.646-3,2 + c-0.333,0-0.667,0-1,0c-2.573-1.762-4.318-4.35-7-6c1.167-1.834,2.614-3.387,4-5c3.401,1.891-1.712,3.506-1,6 + c3.094-1.236,5.508-3.184,8,0c-1.317-2.684,0.114-8.114-5-7c2.849-4.484,8.209-6.458,9-13c1.333,0,2.667,0,4,0 + c5.473,0.217,4.949,11.688,9,10c0-2,0-4,0-6c-1.725-3.276-5.275-4.724-7-8C35.764,5.714,37.098,10.709,38,8z"/> + <path fill="#038C01" d="M17,24c-1.386,1.613-2.833,3.166-4,5c2.682,1.65,4.427,4.238,7,6c0.333,0,0.667,0,1,0 + c-0.211,1.208-1.11,0.615-2,0c-0.575,1.758,1.208,5.875-1,6c0-0.667,0-1.333,0-2c0.348-3.193-3.65-10.9-9-8 + c-1.313-0.354-1.573-1.762-3-2c-0.333,0-0.667,0-1,0c0-0.667,0-1.333,0-2c2,0,4,0,6,0c2.156-8.649,15.873-9.469,12-21 + c2.988-2.011,9.436-0.565,14-1c-0.043,1.376,0.471,2.196,1,3c-0.902,2.709-2.236-2.286-4-2c-3.1-0.166-11.316-0.346-6,2 + c1,0,2,0,3,0c-0.003,1.003,0.811,1.19,1,2c-1.333,0-2.667,0-4,0c-0.791,6.542-6.151,8.516-9,13c-1.313-0.354-1.573-1.761-3-2 + C15.718,22.615,16.945,22.722,17,24z"/> + <path fill="#E6C626" d="M19,23c5.114-1.114,3.683,4.316,5,7c-2.492-3.184-4.906-1.236-8,0c-0.712-2.494,4.401-4.109,1-6 + c-0.055-1.278-1.282-1.385-1-3C17.427,21.239,17.687,22.646,19,23z"/> + <path opacity="0" fill="#FFFFFF" d="M33,25c9.85-1.146-0.252,5.869-3,7c-3.811-2.951,0.564-4.049,2-7C32.333,25,32.667,25,33,25z" + /> + <path fill="#B43905" d="M43,31c-4.428,1.428-2.616-3.384-6-3C38.283,23.799,42.991,27.918,43,31z"/> + <path fill="#E6C626" d="M7,31c3.086,2.247,5.753,4.913,8,8C11.23,37.438,8.563,34.771,7,31z"/> + <path fill="#65C11B" d="M15,39c-2.247-3.087-4.914-5.753-8-8c0.003-1.003-0.81-1.189-1-2c1.427,0.238,1.687,1.646,3,2 + c0,0.333,0,0.667,0,1c3.734,1.6,4.445,6.221,9,7c0,0.667,0,1.333,0,2c-0.333,0-0.667,0-1,0C16.789,39.878,15.89,39.443,15,39z"/> + <path fill="#038C01" d="M31,34c2.711-0.622,2.488-4.178,6-4c0.238,1.428,1.646,1.688,2,3c-4.995-1.393-9.604,5.531-13,9 + c-5.094-0.652,1.203-3.928,2-5c0.333,0,0.667,0,1,0C29.354,35.688,30.762,35.428,31,34z"/> + <path fill="#03D002" d="M39,33c-2.197,5.137-6.008,8.659-13,9C29.396,38.531,34.005,31.607,39,33z"/> + <path fill="#B43905" d="M15,5c2.155-2.732,7.074,0.192,6,4c-1.615,0.282-1.722-0.945-3-1C17.44,6.56,16.44,5.56,15,5z"/> + <path fill="#E6C626" d="M41,14c0,2,0,4,0,6c-3.13-4.203-5.107-9.559-10-12c-1,0-2,0-3,0c0.125-2.208,4.242-0.425,6-1 + C35.912,9.754,38.246,12.087,41,14z"/> + </g> +</g> +</svg> Added: trunk/sc2/src/symbian/uqm_reg.rss =================================================================== --- trunk/sc2/src/symbian/uqm_reg.rss (rev 0) +++ trunk/sc2/src/symbian/uqm_reg.rss 2008-08-31 00:34:29 UTC (rev 3064) @@ -0,0 +1,12 @@ +#include <appinfo.rh> +#include <uqm.rsg> + +UID2 KUidAppRegistrationResourceFile +UID3 0xA000A0C3 + +RESOURCE APP_REGISTRATION_INFO + { + app_file = "uqm"; + localisable_resource_file = "\\resource\\apps\\uqm"; + localisable_resource_id = R_UQM_LOCALISABLE_APP_INFO; + } Added: trunk/sc2/src/symbian/uqmapp.cpp =================================================================== --- trunk/sc2/src/symbian/uqmapp.cpp (rev 0) +++ trunk/sc2/src/symbian/uqmapp.cpp 2008-08-31 00:34:29 UTC (rev 3064) @@ -0,0 +1,260 @@ +#include <coecntrl.h> +#include <aknappui.h> +#include <aknapp.h> +#include <akndoc.h> +#include <sdlepocapi.h> +#include <aknnotewrappers.h> +#include <eikstart.h> +#include <badesca.h> +#include <stdio.h> + +const TUid KUidSdlApp={ 0xA000A0C3 }; + + +class CSDLObserver : public CBase, public MSDLObserver +{ +public: + TInt SdlEvent(TInt aEvent, TInt aParam); + TInt SdlThreadEvent(TInt aEvent, TInt aParam); +}; + +class MExitWait + { + public: + virtual void DoExit(TInt aErr) = 0; + }; + +class CExitWait : public CActive + { + public: + CExitWait(MExitWait& aWait); + void Start(); + ~CExitWait(); + private: + void RunL(); + void DoCancel(); + private: + MExitWait& iWait; + TRequestStatus* iStatusPtr; + }; + +class CSDLWin : public CCoeControl + { + public: + void ConstructL(const TRect& aRect); + RWindow& GetWindow() const; + void SetNoDraw(); + private: + void Draw(const TRect& aRect) const; + }; + +class CSdlApplication : public CAknApplication + { +private: + // from CApaApplication + CApaDocument* CreateDocumentL(); + TUid AppDllUid() const; + }; + + +class CSdlAppDocument : public CAknDocument + { +public: + CSdlAppDocument(CEikApplication& aApp): CAknDocument(aApp) { } +private: + CEikAppUi* CreateAppUiL(); + }; + + +class CSdlAppUi : public CAknAppUi, public MExitWait + { +public: + void ConstructL(); + ~CSdlAppUi(); +private: + void HandleCommandL(TInt aCommand); + void DoExit(TInt aErr); + void HandleWsEventL(const TWsEvent& aEvent, CCoeControl* aDestination); + void HandleResourceChangeL(TInt aType); +private: + CExitWait* iWait; + CSDLWin* iSDLWin; + CSDL* iSdl; + CSDLObserver* iSdlObserver; + TBool iExit; + }; + + +CExitWait::CExitWait(MExitWait& aWait) : CActive(CActive::EPriorityStandard), iWait(aWait) + { + CActiveScheduler::Add(this); + } + +CExitWait::~CExitWait() + { + Cancel(); + } + +void CExitWait::RunL() + { + if(iStatusPtr != NULL ) + iWait.DoExit(iStatus.Int()); + } + +void CExitWait::DoCancel() + { + if(iStatusPtr != NULL ) + User::RequestComplete(iStatusPtr , KErrCancel); + } + +void CExitWait::Start() + { + SetActive(); + iStatusPtr = &iStatus; + } + +void CSDLWin:: ConstructL(const TRect& aRect) + { + CreateWindowL(); + SetRect(aRect); + ActivateL(); + } + + +RWindow& CSDLWin::GetWindow() const + { + return Window(); + } + + +void CSDLWin::Draw(const TRect& /*aRect*/) const + { + CWindowGc& gc = SystemGc(); + gc.SetPenStyle(CGraphicsContext::ESolidPen); + gc.SetPenColor(KRgbBlack); + gc.SetBrushStyle(CGraphicsContext::ESolidBrush); + gc.SetBrushColor(0x000000); + gc.DrawRect(Rect()); + } + +void CSdlAppUi::ConstructL() + { + BaseConstructL(ENoScreenFurniture | EAppOrientationLandscape); + + iSDLWin = new (ELeave) CSDLWin; + iSDLWin->ConstructL(ApplicationRect()); + + iWait = new (ELeave) CExitWait(*this); + + iSdl = CSDL::NewL(CSDL::ENoFlags); + iSdlObserver = new (ELeave) CSDLObserver; + + iSdl->SetContainerWindowL( + iSDLWin->GetWindow(), + iEikonEnv->WsSession(), + *iEikonEnv->ScreenDevice()); + + iSdl->SetObserver(iSdlObserver); + + CDesC8ArrayFlat* args = new (ELeave)CDesC8ArrayFlat(10); + iSdl->CallMainL(iWait->iStatus, *args, 75000); + delete args; + + iWait->Start(); + } + +void CSdlAppUi::HandleCommandL(TInt aCommand) + { + switch(aCommand) + { + case EAknCmdExit: + case EAknSoftkeyExit: + case EEikCmdExit: + iExit = ETrue; + if(iWait == NULL || !iWait->IsActive()) + Exit(); + break; + default: + break; + } + } + +void CSdlAppUi::DoExit(TInt aErr) + { + delete iSdl; + iSdl = NULL; + + if(iExit) + Exit(); + } + +void CSdlAppUi::HandleWsEventL(const TWsEvent& aEvent, CCoeControl* aDestination) + { + if(iSdl != NULL) + iSdl->AppendWsEvent(aEvent); + CAknAppUi::HandleWsEventL(aEvent, aDestination); + } + +void CSdlAppUi::HandleResourceChangeL(TInt aType) + { + CAknAppUi::HandleResourceChangeL(aType); + + if(aType == KEikDynamicLayoutVariantSwitch) + { + iSDLWin->SetRect(ApplicationRect()); + if (iSdl) + { + iSdl->SetContainerWindowL( + iSDLWin->GetWindow(), + iEikonEnv->WsSession(), + *iEikonEnv->ScreenDevice()); + } + } + } + +CSdlAppUi::~CSdlAppUi() + { + if(iWait != NULL) + iWait->Cancel(); + delete iSdl; + delete iWait; + delete iSDLWin; + delete iSdlObserver; + } + +CEikAppUi* CSdlAppDocument::CreateAppUiL() + { + return new(ELeave) CSdlAppUi(); + } + +TUid CSdlApplication::AppDllUid() const + { + return KUidSdlApp; + } + + +CApaDocument* CSdlApplication::CreateDocumentL() + { + CSdlAppDocument* document = new (ELeave) CSdlAppDocument(*this); + return document; + } + +LOCAL_C CApaApplication* NewApplication() + { + return new CSdlApplication; + } + +GLDEF_C TInt E32Main() + { + return EikStart::RunApplication(NewApplication); + } + +TInt CSDLObserver::SdlEvent(TInt aEvent, TInt aParam) +{ + return 0; +} + +TInt CSDLObserver::SdlThreadEvent(TInt aEvent, TInt aParam) +{ + return 0; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gew...@us...> - 2008-08-31 21:27:30
|
Revision: 3067 http://sc2.svn.sourceforge.net/sc2/?rev=3067&view=rev Author: gewlitys Date: 2008-08-31 21:27:02 +0000 (Sun, 31 Aug 2008) Log Message: ----------- Added support for Symbian GCCE compiler Modified Paths: -------------- trunk/sc2/INSTALL.symbian trunk/sc2/Makefile.build trunk/sc2/Makeproject trunk/sc2/build/unix/build.config trunk/sc2/build/unix/config_functions trunk/sc2/build/unix/config_proginfo_build trunk/sc2/build/unix/config_proginfo_host trunk/sc2/src/symbian/uqm.mmp Added Paths: ----------- trunk/sc2/build/unix/make/buildtools-gcce trunk/sc2/src/symbian/uqm-armv5.pkg trunk/sc2/src/symbian/uqm-gcce.pkg Removed Paths: ------------- trunk/sc2/src/symbian/uqm.pkg Modified: trunk/sc2/INSTALL.symbian =================================================================== --- trunk/sc2/INSTALL.symbian 2008-08-31 20:49:52 UTC (rev 3066) +++ trunk/sc2/INSTALL.symbian 2008-08-31 21:27:02 UTC (rev 3067) @@ -1,5 +1,5 @@ -UQM for Symbian S60 3rd ed. -=========================== +UQM for Symbian S60 3rd edition +=============================== First some general notes. These instructions might be somewhat incomplete or unclear. If you encounter any problems or have suggestions how to improve this @@ -18,9 +18,9 @@ Prerequisites: -------------- -- Platform SDK for S60 3rd ed. (MR) / 3rd ed. FP1 / 3rd ed. FP2, depending on - target hardware +- Platform SDK for S60 3rd ed. * Download from http://www.forum.nokia.com/ + * 3rd ed. MR was used for development, FP1 and FP2 have not been tested - Open C plugins (if SDK is other than FP2; in FP2 those should be included already) * Download from http://www.forum.nokia.com/main/resources/tools_and_sdks/openc_cpp/ @@ -28,10 +28,10 @@ - Carbide.c++ (if building for emulator) * Download from http://www.forum.nokia.com/ * Command line compiling must be enabled + +- CSL ARM Toolchain or RVCT v2.2 (if building for hardware) + * GCCE included with SDK -- ARM RealView compiler (if building for hardware) - * Commercial, see http://www.arm.com/products/DevTools/ - - MinGW and MSYS (for build scripts) * Download from http://www.mingw.org/ @@ -69,18 +69,18 @@ Set BUILD_EPOCROOT to point to the substed drive: export BUILD_EPOCROOT=/z - Set BUILD_HOST to either WINSCW (emulator) or ARMV5 (hardware), depending + Set BUILD_HOST to WINSCW (emulator) or GCCE / ARMV5 (hardware), depending for which target you want to build: - export BUILD_HOST=ARMV5 + export BUILD_HOST=GCCE 8) Compile (you don't need to change any options from the interactive menu): ./build.sh uqm 9) Install. It builds the content zip and puts everything to proper - place (WINSCW) or creates a self-signed SIS package (ARMV5): + place (WINSCW) or creates a self-signed SIS package (GCCE / ARMV5): ./build.sh uqm install -10) If you built for ARMV5, you should now have uqm.sisx in the same directory - from where you did the build. Remember to also install SDL SIS package and - if not using FP2 SDK, Open C plugins before attempting to run UQM on actual - device. +10) If you built for GCCE or ARMV5, you should now have uqm.sisx in the same + directory from where you did the build. Remember to also install SDL SIS + package and if not using FP2 SDK, Open C plugins before attempting to run + UQM on actual device. Modified: trunk/sc2/Makefile.build =================================================================== --- trunk/sc2/Makefile.build 2008-08-31 20:49:52 UTC (rev 3066) +++ trunk/sc2/Makefile.build 2008-08-31 21:27:02 UTC (rev 3067) @@ -23,9 +23,13 @@ ifeq ($(HOST_SYSTEM),WINSCW) include build/unix/make/buildtools-winscw else +ifeq ($(HOST_SYSTEM),GCCE) + include build/unix/make/buildtools-gcce +else include build/unix/make/buildtools-generic endif endif +endif default: Modified: trunk/sc2/Makeproject =================================================================== --- trunk/sc2/Makeproject 2008-08-31 20:49:52 UTC (rev 3066) +++ trunk/sc2/Makeproject 2008-08-31 21:27:02 UTC (rev 3067) @@ -9,7 +9,7 @@ uqm_NAME=uqm # File name of executable fi case "$HOST_SYSTEM" in - ARMV5|WINSCW) + ARMV5|WINSCW|GCCE) uqm_NAME="uqm.lib" ;; MINGW32*|CYGWIN*) Modified: trunk/sc2/build/unix/build.config =================================================================== --- trunk/sc2/build/unix/build.config 2008-08-31 20:49:52 UTC (rev 3066) +++ trunk/sc2/build/unix/build.config 2008-08-31 21:27:02 UTC (rev 3067) @@ -72,7 +72,7 @@ MENU_main_ITEMS="debug graphics sound mikmod ovcodec netplay joystick \ ioformat accel threadlib" case "$HOST_SYSTEM" in - Darwin|WINSCW|ARMV5) + Darwin|WINSCW|ARMV5|GCCE) # Installation directory not modifiable ;; MINGW32*|cegcc) @@ -106,6 +106,9 @@ ;; ARMV5) CFLAGS="$CFLAGS -O3 -Otime -DNDEBUG" + ;; + GCCE) + CFLAGS="$CFLAGS -O3 -DNDEBUG" ;; *) CFLAGS="$CFLAGS -O3" @@ -120,9 +123,9 @@ WINSCW) CFLAGS="$CFLAGS -g -O0 -W all -d DEBUG -d _DEBUG" ;; - ARMV5) + ARMV5|GCCE) CFLAGS="$CFLAGS -g -O0 -DDEBUG -D_DEBUG" - ;; + ;; *) CFLAGS="$CFLAGS -g -O0 -W -Wall -DDEBUG" LDFLAGS="$LDFLAGS -O0" @@ -137,9 +140,9 @@ WINSCW) CFLAGS="$CFLAGS -g -O0 -W all -d DEBUG -d _DEBUG" ;; - ARMV5) + ARMV5|GCCE) CFLAGS="$CFLAGS -g -O0 -DDEBUG -D_DEBUG" - ;; + ;; *) CFLAGS="$CFLAGS -O1" # This is needed for -Wunitialized CFLAGS="$CFLAGS -W -Wall \ @@ -172,7 +175,7 @@ DEBUG=1 } case "$HOST_SYSTEM" in - ARMV5|WINSCW) + ARMV5|WINSCW|GCCE) CHOICE_debug_DEFAULT=nodebug ;; *) @@ -272,7 +275,7 @@ } CHOICE_joystick_OPTION_disabled_TITLE="disabled" case "$HOST_SYSTEM" in - ARMV5|WINSCW) + ARMV5|WINSCW|GCCE) CHOICE_joystick_DEFAULT=disabled ;; *) @@ -354,7 +357,7 @@ use_library pthread } case "$HOST_SYSTEM" in - ARMV5|WINSCW) + ARMV5|WINSCW|GCCE) CHOICE_threadlib_DEFAULT=pthread ;; *) @@ -478,17 +481,24 @@ ARMV5) cp "$TARGET_FILE" "$BUILD_EPOCROOT/epoc32/release/armv5/urel/" cd src/symbian - cmd \\/C bldmake bldfiles armv5 + cmd \\/C bldmake bldfiles cmd \\/C abld build armv5 urel cd ../.. ;; WINSCW) cp "$TARGET_FILE" "$BUILD_EPOCROOT/epoc32/release/winscw/udeb/" cd src/symbian - cmd \\/C bldmake bldfiles winscw + cmd \\/C bldmake bldfiles cmd \\/C abld build winscw udeb cd ../.. - ;; + ;; + GCCE) + cp "$TARGET_FILE" "$BUILD_EPOCROOT/epoc32/release/armv5/urel/" + cd src/symbian + cmd \\/C bldmake bldfiles + cmd \\/C abld build gcce urel + cd ../.. + ;; esac } @@ -515,6 +525,9 @@ ARMV5) uqm_install_armv5 ;; + GCCE) + uqm_install_gcce + ;; *) generic_install ;; @@ -613,12 +626,23 @@ cd src/symbian cmd \\/C makekeys -cert -password asdfgh -len 2048 -dname "CN=UQM OR=Ur-Quan Masters CO=FI" uqm.key uqm.cer - cmd \\/C makesis uqm.pkg + cmd \\/C makesis uqm-armv5.pkg uqm.sis cmd \\/C signsis -v uqm.sis uqm.sisx uqm.cer uqm.key asdfgh mv uqm.sisx ../.. cd ../.. } +uqm_install_gcce() { + uqm_create_symbian_content_package + + cd src/symbian + cmd \\/C makekeys -cert -password asdfgh -len 2048 -dname "CN=UQM OR=Ur-Quan Masters CO=FI" uqm.key uqm.cer + cmd \\/C makesis uqm-gcce.pkg uqm.sis + cmd \\/C signsis -v uqm.sis uqm.sisx uqm.cer uqm.key asdfgh + mv uqm.sisx ../.. + cd ../.. +} + uqm_create_symbian_content_package() { if [ -e "content.uqm" ]; then echo "Content package already exists, skipping" @@ -640,7 +664,7 @@ MINGW32*|CYGWIN*) rm -f "$BUILD_WORK/config_win.h" ;; - ARMV5) + ARMV5|GCCE) local TARGET_FILE eval TARGET_FILE="\$BUILD_WORK/\${${BUILD_PROJECT}_NAME}" @@ -649,7 +673,7 @@ rm -f $TARGET_FILE uqm.sisx content.uqm cd src/symbian - cmd \\/C abld reallyclean armv5 + cmd \\/C abld reallyclean cmd \\/C bldmake clean rm -f uqm.sis uqm.key uqm.cer cd ../.. @@ -663,7 +687,7 @@ rm -f $TARGET_FILE content.uqm cd src/symbian - cmd \\/C abld reallyclean winscw + cmd \\/C abld reallyclean cmd \\/C bldmake clean cd ../.. ;; Modified: trunk/sc2/build/unix/config_functions =================================================================== --- trunk/sc2/build/unix/config_functions 2008-08-31 20:49:52 UTC (rev 3066) +++ trunk/sc2/build/unix/config_functions 2008-08-31 21:27:02 UTC (rev 3067) @@ -1019,6 +1019,8 @@ HOST_SYSTEM="WINSCW" ;; [Aa][Rr][Mm][Vv]5) HOST_SYSTEM="ARMV5" ;; + [Gg][Cc][Cc][Ee]) + HOST_SYSTEM="GCCE" ;; *) build_message "Warning: host type '$BUILD_HOST' unknown. Using defaults." ;; Modified: trunk/sc2/build/unix/config_proginfo_build =================================================================== --- trunk/sc2/build/unix/config_proginfo_build 2008-08-31 20:49:52 UTC (rev 3066) +++ trunk/sc2/build/unix/config_proginfo_build 2008-08-31 21:27:02 UTC (rev 3067) @@ -117,6 +117,31 @@ BUILDTOOL_LINK_COMMAND="\$PROG_armar_FILE $EXTRA_ARMV5_FLAGS_LINK" BUILDTOOL_LINK_DEPEND='armar' ;; + GCCE) + EXTRA_GCCE_FLAGS_COMPILE='-Wno-unknown-pragmas -march=armv5t -mapcs -pipe -nostdinc -msoft-float -D_UNICODE -D__GCCE__ -D__SYMBIAN32__ -D__SERIES60_30__ -D__SERIES60_3X__ -D__GCCE__ -D__EPOC32__ -D__MARM__ -D__EABI__ -D__MARM_ARMV5__ -D __REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__ -D__PRODUCT_INCLUDE__=\"/epoc32/include/variant/Symbian_OS_v9.1.hrh\" -x c -include $BUILD_EPOCROOT/EPOC32/INCLUDE/GCCE/GCCE.h -I$BUILD_EPOCROOT/epoc32/include -I$BUILD_EPOCROOT/epoc32/include/stdapis -I$BUILD_EPOCROOT/epoc32/include/variant' + EXTRA_GCCE_FLAGS_LINK='' + + BUILDTOOL_PREPROC_C_COMMAND="\$PROG_gcce_FILE -E $EXTRA_GCCE_FLAGS_COMPILE" + BUILDTOOL_PREPROC_C_DEPEND='gcce' + + BUILDTOOL_MKDEP_C_COMMAND="\$PROG_gcce_FILE -MM $EXTRA_GCCE_FLAGS_COMPILE" + BUILDTOOL_MKDEP_C_DEPEND='gcce' + + BUILDTOOL_COMPILE_C_COMMAND="\$PROG_gcce_FILE -c $EXTRA_GCCE_FLAGS_COMPILE" + BUILDTOOL_COMPILE_C_DEPEND='gcce' + + BUILDTOOL_PREPROC_OBJC_COMMAND="\$PROG_gcce_FILE -E" + BUILDTOOL_PREPROC_OBJC_DEPEND='gcce' + + BUILDTOOL_MKDEP_OBJC_COMMAND="\$PROG_gcce_FILE -MM" + BUILDTOOL_MKDEP_OBJC_DEPEND='gcce' + + BUILDTOOL_COMPILE_OBJC_COMMAND="\$PROG_gcce_FILE -c" + BUILDTOOL_COMPILE_OBJC_DEPEND='gcce' + + BUILDTOOL_LINK_COMMAND="\$PROG_gcce_FILE $EXTRA_GCCE_FLAGS_LINK" + BUILDTOOL_LINK_DEPEND='gcce' + ;; *) useGccBuildTools ;; @@ -271,6 +296,14 @@ PROG_armar_VERSION='$(armar --vsn)' +### gcce ### +PROG_gcce_NAME="GNU C Compiler (CodeSourcery ARM)" +PROG_gcce_FILE="arm-none-symbianelf-gcc" +PROG_gcce_ACTION="" +PROG_gcce_VERSION='$(arm-none-symbianelf-gcc --version)' + + + ############################################################################## # Describe the libaries (possibly) used: # ############################################################################## Modified: trunk/sc2/build/unix/config_proginfo_host =================================================================== --- trunk/sc2/build/unix/config_proginfo_host 2008-08-31 20:49:52 UTC (rev 3066) +++ trunk/sc2/build/unix/config_proginfo_host 2008-08-31 21:27:02 UTC (rev 3067) @@ -67,15 +67,17 @@ gcc -E -include SDL/SDL_version.h $LIB_SDL_CFLAGS - | \ tail -1 | tr -d ' ') ;; - WINSCW) + WINSCW|GCCE) LIB_SDL_CFLAGS='-I$BUILD_EPOCROOT/epoc32/include/SDL' LIB_SDL_LDFLAGS='' LIB_SDL_VERSION='1.2.13' + LIB_SDL_DETECT="true" ;; ARMV5) LIB_SDL_CFLAGS='-J$BUILD_EPOCROOT/epoc32/include/SDL' LIB_SDL_LDFLAGS='' LIB_SDL_VERSION='1.2.13' + LIB_SDL_DETECT="true" ;; *) LIB_SDL_CFLAGS='$(sdl-config --cflags)' @@ -99,9 +101,10 @@ LIB_SDL_image_CFLAGS='' LIB_SDL_image_LDFLAGS="-framework SDL_image" ;; - ARMV5|WINSCW) + ARMV5|WINSCW|GCCE) LIB_SDL_image_CFLAGS="$LIB_SDL_CFLAGS" LIB_SDL_image_LDFLAGS="$LIB_SDL_LDFLAGS" + LIB_SDL_image_DETECT="true" ;; *) LIB_SDL_image_CFLAGS="$LIB_SDL_CFLAGS" @@ -149,7 +152,7 @@ LIB_opengl_CFLAGS="" LIB_opengl_LDFLAGS="-framework OpenGL" ;; - ARMV5|WINSCW) + ARMV5|WINSCW|GCCE) LIB_opengl_DETECT="false" ;; *) @@ -166,7 +169,7 @@ LIB_vorbis_LDFLAGS="-lvorbis" LIB_vorbis_VERSION="" case "$HOST_SYSTEM" in - ARMV5|WINSCW) + ARMV5|WINSCW|GCCE) LIB_vorbis_DETECT="false" ;; esac @@ -198,7 +201,7 @@ esac LIB_vorbisfile_VERSION="" case "$HOST_SYSTEM" in - ARMV5|WINSCW) + ARMV5|WINSCW|GCCE) LIB_vorbisfile_DETECT="false" ;; *) @@ -220,7 +223,7 @@ LIB_tremor_CFLAGS="" LIB_tremor_LDFLAGS="-framework Tremor" ;; - ARMV5|WINSCW) + ARMV5|WINSCW|GCCE) LIB_tremor_DETECT="false" ;; *) @@ -237,7 +240,7 @@ LIB_libmikmod_LDFLAGS="$(libmikmod-config --libs)" LIB_libmikmod_VERSION="$(libmikmod-config --version)" case "$HOST_SYSTEM" in - ARMV5|WINSCW) + ARMV5|WINSCW|GCCE) LIB_libmikmod_DETECT="false" ;; esac @@ -250,7 +253,7 @@ MINGW32*|CYGWIN*|cegcc) LIB_zlib_LDFLAGS="-lzdll" ;; - ARMV5|WINSCW) + ARMV5|WINSCW|GCCE) LIB_zlib_LDFLAGS="" ;; *) @@ -259,7 +262,7 @@ esac LIB_zlib_VERSION="" case "$HOST_SYSTEM" in - ARMV5|WINSCW) + ARMV5|WINSCW|GCCE) LIB_zlib_DETECT="true" ;; *) @@ -283,7 +286,7 @@ LIB_pthread_LDFLAGS="$(pthread-config --ldflags)" LIB_pthread_VERSION="$(pthread-config --version)" ;; - WINSCW|ARMV5) + WINSCW|ARMV5|GCCE) LIB_pthread_CFLAGS="" LIB_pthread_LDFLAGS="" LIB_pthread_VERSION="" @@ -304,7 +307,7 @@ LIB_netlibs_LDFLAGS="-lsocket" LIB_netlibs_VERSION="" ;; - ARMV5|WINSCW) + ARMV5|WINSCW|GCCE) LIB_netlibs_DETECT="false" ;; esac Added: trunk/sc2/build/unix/make/buildtools-gcce =================================================================== --- trunk/sc2/build/unix/make/buildtools-gcce (rev 0) +++ trunk/sc2/build/unix/make/buildtools-gcce 2008-08-31 21:27:02 UTC (rev 3067) @@ -0,0 +1,8 @@ +# Definitions for build tools for the makefile used by the UQM build system. +# This file defines the build commands for GCCE tools. + +include build/unix/make/buildtools-generic + +define act_link + arm-none-symbianelf-ar cr "$@" $^ $(LDFLAGS) +endef Added: trunk/sc2/src/symbian/uqm-armv5.pkg =================================================================== --- trunk/sc2/src/symbian/uqm-armv5.pkg (rev 0) +++ trunk/sc2/src/symbian/uqm-armv5.pkg 2008-08-31 21:27:02 UTC (rev 3067) @@ -0,0 +1,26 @@ +;Language - standard language definitions +&EN + +; standard SIS file header +#{"Ur-Quan Masters"},(0xA000A0C3),1,0,0 + +;Localised Vendor name +%{"Interstellar Frungy League"} + +;Unique Vendor name +:"Interstellar Frungy League" + +;Supports Series 60 v 3.0 +[0x101F7961], 0, 0, 0, {"Series60ProductID"} + +*"uqm.key", "uqm.cer" + +;Files to install +;<source> <destination> +"\Epoc32\release\Armv5\urel\uqm.exe" - "!:\sys\bin\uqm.exe" +"\Epoc32\data\z\resource\apps\uqm.rsc" - "!:\resource\apps\uqm.rsc" +"\Epoc32\data\z\resource\apps\uqm_icon.mif" - "!:\resource\apps\uqm_icon.mif" +"\Epoc32\data\z\private\10003a3f\import\apps\uqm_reg.rsc" - "!:\private\10003a3f\import\apps\uqm_reg.rsc" +"uqm.cfg" - "c:\private\A000A0C3\userdata\uqm.cfg" +"..\..\content\version" - "c:\private\A000A0C3\content\version" +"..\..\content.uqm" - "c:\private\A000A0C3\content\packages\content.uqm" Added: trunk/sc2/src/symbian/uqm-gcce.pkg =================================================================== --- trunk/sc2/src/symbian/uqm-gcce.pkg (rev 0) +++ trunk/sc2/src/symbian/uqm-gcce.pkg 2008-08-31 21:27:02 UTC (rev 3067) @@ -0,0 +1,26 @@ +;Language - standard language definitions +&EN + +; standard SIS file header +#{"Ur-Quan Masters"},(0xA000A0C3),1,0,0 + +;Localised Vendor name +%{"Interstellar Frungy League"} + +;Unique Vendor name +:"Interstellar Frungy League" + +;Supports Series 60 v 3.0 +[0x101F7961], 0, 0, 0, {"Series60ProductID"} + +*"uqm.key", "uqm.cer" + +;Files to install +;<source> <destination> +"\Epoc32\release\gcce\urel\uqm.exe" - "!:\sys\bin\uqm.exe" +"\Epoc32\data\z\resource\apps\uqm.rsc" - "!:\resource\apps\uqm.rsc" +"\Epoc32\data\z\resource\apps\uqm_icon.mif" - "!:\resource\apps\uqm_icon.mif" +"\Epoc32\data\z\private\10003a3f\import\apps\uqm_reg.rsc" - "!:\private\10003a3f\import\apps\uqm_reg.rsc" +"uqm.cfg" - "c:\private\A000A0C3\userdata\uqm.cfg" +"..\..\content\version" - "c:\private\A000A0C3\content\version" +"..\..\content.uqm" - "c:\private\A000A0C3\content\packages\content.uqm" Modified: trunk/sc2/src/symbian/uqm.mmp =================================================================== --- trunk/sc2/src/symbian/uqm.mmp 2008-08-31 20:49:52 UTC (rev 3066) +++ trunk/sc2/src/symbian/uqm.mmp 2008-08-31 21:27:02 UTC (rev 3067) @@ -39,5 +39,5 @@ LIBRARY libz.lib LIBRARY libpthread.lib +STATICLIBRARY uqm.lib STATICLIBRARY SDL_image.lib -STATICLIBRARY uqm.lib Deleted: trunk/sc2/src/symbian/uqm.pkg =================================================================== --- trunk/sc2/src/symbian/uqm.pkg 2008-08-31 20:49:52 UTC (rev 3066) +++ trunk/sc2/src/symbian/uqm.pkg 2008-08-31 21:27:02 UTC (rev 3067) @@ -1,26 +0,0 @@ -;Language - standard language definitions -&EN - -; standard SIS file header -#{"Ur-Quan Masters"},(0xA000A0C3),1,0,0 - -;Localised Vendor name -%{"Interstellar Frungy League"} - -;Unique Vendor name -:"Interstellar Frungy League" - -;Supports Series 60 v 3.0 -[0x101F7961], 0, 0, 0, {"Series60ProductID"} - -*"uqm.key", "uqm.cer" - -;Files to install -;<source> <destination> -"\Epoc32\release\Armv5\urel\uqm.exe" - "!:\sys\bin\uqm.exe" -"\Epoc32\data\z\resource\apps\uqm.rsc" - "!:\resource\apps\uqm.rsc" -"\Epoc32\data\z\resource\apps\uqm_icon.mif" - "!:\resource\apps\uqm_icon.mif" -"\Epoc32\data\z\private\10003a3f\import\apps\uqm_reg.rsc" - "!:\private\10003a3f\import\apps\uqm_reg.rsc" -"uqm.cfg" - "c:\private\A000A0C3\userdata\uqm.cfg" -"..\..\content\version" - "c:\private\A000A0C3\content\version" -"..\..\content.uqm" - "c:\private\A000A0C3\content\packages\content.uqm" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gew...@us...> - 2008-09-01 18:22:14
|
Revision: 3068 http://sc2.svn.sourceforge.net/sc2/?rev=3068&view=rev Author: gewlitys Date: 2008-09-01 18:22:12 +0000 (Mon, 01 Sep 2008) Log Message: ----------- Updated email address. Modified Paths: -------------- trunk/sc2/AUTHORS trunk/sc2/Contributing Modified: trunk/sc2/AUTHORS =================================================================== --- trunk/sc2/AUTHORS 2008-08-31 21:27:02 UTC (rev 3067) +++ trunk/sc2/AUTHORS 2008-09-01 18:22:12 UTC (rev 3068) @@ -8,7 +8,7 @@ Core team (in alphabetical order): Serge van den Boom <sv...@st...> - Mika Kolehmainen <mim...@cc...> + Mika Kolehmainen <mk...@ka...> Michael Chapman Martin <mcm...@gm...> Chris Nelson <ch...@to...> Alex Volkov <co...@us...> Modified: trunk/sc2/Contributing =================================================================== --- trunk/sc2/Contributing 2008-08-31 21:27:02 UTC (rev 3067) +++ trunk/sc2/Contributing 2008-09-01 18:22:12 UTC (rev 3068) @@ -109,7 +109,7 @@ - *nix build system - Netplay - General issues (particularly on *nix) - Mika Kolehmainen (mimakole at cc.jyu.fi), Gwl at #sc2 + Mika Kolehmainen (mk at kapsi.fi), Gwl at #sc2 - Graphics - Sound - General issues This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2008-10-05 20:07:39
|
Revision: 3081 http://sc2.svn.sourceforge.net/sc2/?rev=3081&view=rev Author: avolkov Date: 2008-10-05 20:07:37 +0000 (Sun, 05 Oct 2008) Log Message: ----------- DrawTracedText abstraction; bug #1029; from Nic, modified Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/src/sc2code/comm.c trunk/sc2/src/sc2code/intro.c trunk/sc2/src/sc2code/libs/gfxlib.h trunk/sc2/src/sc2code/libs/graphics/font.c Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2008-10-05 19:27:26 UTC (rev 3080) +++ trunk/sc2/ChangeLog 2008-10-05 20:07:37 UTC (rev 3081) @@ -1,4 +1,5 @@ Changes towards version 0.7: +- DrawTracedText abstraction (bug #1029), from Nic - Experimental support for Symbian S60 3rd edition - Mika & SvdB - Pthread support - Mika - Content Dirs completely reorganized; 3DO and PC segregation - Coredev Modified: trunk/sc2/src/sc2code/comm.c =================================================================== --- trunk/sc2/src/sc2code/comm.c 2008-10-05 19:27:26 UTC (rev 3080) +++ trunk/sc2/src/sc2code/comm.c 2008-10-05 20:07:37 UTC (rev 3081) @@ -250,30 +250,8 @@ else { // Alien speech - - // Draw the background by drawing the same text in the - // background color one pixel shifted to all 4 directions. - SetContextForeGroundColor (CommData.AlienTextBColor); - - --pText->baseline.x; - font_DrawText (pText); - - ++pText->baseline.x; - --pText->baseline.y; - font_DrawText (pText); - - ++pText->baseline.x; - ++pText->baseline.y; - font_DrawText (pText); - - --pText->baseline.x; - ++pText->baseline.y; - font_DrawText (pText); - - SetContextForeGroundColor (CommData.AlienTextFColor); - - --pText->baseline.y; - font_DrawText (pText); + font_DrawTracedText (pText, + CommData.AlienTextFColor, CommData.AlienTextBColor); } } while (!eol && maxchars); pText->pStr = pStr; Modified: trunk/sc2/src/sc2code/intro.c =================================================================== --- trunk/sc2/src/sc2code/intro.c 2008-10-05 19:27:26 UTC (rev 3080) +++ trunk/sc2/src/sc2code/intro.c 2008-10-05 20:07:37 UTC (rev 3081) @@ -149,29 +149,11 @@ } static void -DrawTracedText (TEXT *pText, COLOR Fore, COLOR Back) -{ - SetContextForeGroundColor (Back); - pText->baseline.x--; - font_DrawText (pText); - pText->baseline.x += 2; - font_DrawText (pText); - pText->baseline.x--; - pText->baseline.y--; - font_DrawText (pText); - pText->baseline.y += 2; - font_DrawText (pText); - pText->baseline.y--; - SetContextForeGroundColor (Fore); - font_DrawText (pText); -} - -static void DrawTextEffect (TEXT *pText, COLOR Fore, COLOR Back, int Effect) { if (Effect == 'T') { - DrawTracedText (pText, Fore, Back); + font_DrawTracedText (pText, Fore, Back); } else { Modified: trunk/sc2/src/sc2code/libs/gfxlib.h =================================================================== --- trunk/sc2/src/sc2code/libs/gfxlib.h 2008-10-05 19:27:26 UTC (rev 3080) +++ trunk/sc2/src/sc2code/libs/gfxlib.h 2008-10-05 20:07:37 UTC (rev 3081) @@ -183,6 +183,7 @@ extern void DrawFilledRectangle (RECT *pRect); extern void DrawLine (LINE *pLine); extern void font_DrawText (TEXT *pText); +extern void font_DrawTracedText (TEXT *pText, COLOR text, COLOR trace); extern void DrawBatch (PRIMITIVE *pBasePrim, PRIM_LINKS PrimLinks, BATCH_FLAGS BatchFlags); extern void BatchGraphics (void); Modified: trunk/sc2/src/sc2code/libs/graphics/font.c =================================================================== --- trunk/sc2/src/sc2code/libs/graphics/font.c 2008-10-05 19:27:26 UTC (rev 3080) +++ trunk/sc2/src/sc2code/libs/graphics/font.c 2008-10-05 20:07:37 UTC (rev 3081) @@ -62,6 +62,30 @@ DrawBatch (&_locPrim, 0, BATCH_SINGLE); } + +/* Draw the stroke by drawing the same text in the + * background color one pixel shifted to all 4 directions. + */ +void +font_DrawTracedText (TEXT *pText, COLOR text, COLOR trace) +{ + // Preserve current foreground color for full correctness + COLOR oldfg = SetContextForeGroundColor (trace); + pText->baseline.x--; + font_DrawText (pText); + pText->baseline.x += 2; + font_DrawText (pText); + pText->baseline.x--; + pText->baseline.y--; + font_DrawText (pText); + pText->baseline.y += 2; + font_DrawText (pText); + pText->baseline.y--; + SetContextForeGroundColor (text); + font_DrawText (pText); + SetContextForeGroundColor (oldfg); +} + BOOLEAN GetContextFontLeading (SIZE *pheight) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gew...@us...> - 2008-10-12 00:37:16
|
Revision: 3084 http://sc2.svn.sourceforge.net/sc2/?rev=3084&view=rev Author: gewlitys Date: 2008-10-12 00:37:05 +0000 (Sun, 12 Oct 2008) Log Message: ----------- Added support for packed ani and font files Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/src/options.c trunk/sc2/src/options.h trunk/sc2/src/sc2code/libs/graphics/filegfx.c trunk/sc2/src/sc2code/libs/graphics/font.c trunk/sc2/src/sc2code/libs/graphics/sdl/3do_getbody.c Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2008-10-11 19:49:46 UTC (rev 3083) +++ trunk/sc2/ChangeLog 2008-10-12 00:37:05 UTC (rev 3084) @@ -1,4 +1,5 @@ Changes towards version 0.7: +- Added support for packed ani and font files - Mika - DrawTracedText abstraction (bug #1029), from Nic - Experimental support for Symbian S60 3rd edition - Mika & SvdB - Pthread support - Mika Modified: trunk/sc2/src/options.c =================================================================== --- trunk/sc2/src/options.c 2008-10-11 19:49:46 UTC (rev 3083) +++ trunk/sc2/src/options.c 2008-10-12 00:37:05 UTC (rev 3084) @@ -60,6 +60,7 @@ uio_DirHandle *configDir; uio_DirHandle *saveDir; uio_DirHandle *meleeDir; +uio_MountHandle *contentMountHandle; char baseContentPath[PATH_MAX]; @@ -312,15 +313,14 @@ static void mountContentDir (uio_Repository *repository, const char *contentPath) { - uio_MountHandle *contentHandle; uio_DirHandle *packagesDir, *addonsDir; static uio_AutoMount *autoMount[] = { NULL }; availableAddons = NULL; - contentHandle = uio_mountDir (repository, "/", + contentMountHandle = uio_mountDir (repository, "/", uio_FSTYPE_STDIO, NULL, NULL, contentPath, autoMount, uio_MOUNT_TOP | uio_MOUNT_RDONLY, NULL); - if (contentHandle == NULL) + if (contentMountHandle == NULL) { log_add (log_Fatal, "Fatal error: Could not mount content dir: %s", strerror (errno)); @@ -338,7 +338,7 @@ packagesDir = uio_openDir (repository, "/packages", 0); if (packagesDir != NULL) { - mountDirZips (contentHandle, packagesDir, "/"); + mountDirZips (contentMountHandle, packagesDir, "/"); uio_closeDir (packagesDir); } @@ -354,7 +354,7 @@ return; } - mountDirZips (contentHandle, addonsDir, "addons"); + mountDirZips (contentMountHandle, addonsDir, "addons"); availableAddons = uio_getDirList (addonsDir, "", "", match_MATCH_PREFIX); if (availableAddons != NULL) @@ -387,7 +387,7 @@ "not found; addon skipped.", addon); continue; } - mountDirZips (contentHandle, addonDir, mountname); + mountDirZips (contentMountHandle, addonDir, mountname); uio_closeDir (addonDir); } } Modified: trunk/sc2/src/options.h =================================================================== --- trunk/sc2/src/options.h 2008-10-11 19:49:46 UTC (rev 3083) +++ trunk/sc2/src/options.h 2008-10-12 00:37:05 UTC (rev 3084) @@ -50,6 +50,8 @@ extern uio_DirHandle *meleeDir; extern char baseContentPath[PATH_MAX]; +extern uio_MountHandle *contentMountHandle; + extern uio_DirList *availableAddons; extern const char **optAddons; Modified: trunk/sc2/src/sc2code/libs/graphics/filegfx.c =================================================================== --- trunk/sc2/src/sc2code/libs/graphics/filegfx.c 2008-10-11 19:49:46 UTC (rev 3083) +++ trunk/sc2/src/sc2code/libs/graphics/filegfx.c 2008-10-12 00:37:05 UTC (rev 3084) @@ -57,7 +57,7 @@ return 0; fp = res_OpenResFile (contentDir, pStr, "rb"); - if (fp == (uio_Stream *) ~0) + if (fp != NULL) { FONT hData; Modified: trunk/sc2/src/sc2code/libs/graphics/font.c =================================================================== --- trunk/sc2/src/sc2code/libs/graphics/font.c 2008-10-11 19:49:46 UTC (rev 3083) +++ trunk/sc2/src/sc2code/libs/graphics/font.c 2008-10-12 00:37:05 UTC (rev 3084) @@ -326,7 +326,7 @@ } else { - log_add (log_Debug, "Character %u not present", (unsigned int) ch); + //log_add (log_Debug, "Character %u not present", (unsigned int) ch); return NULL; } } Modified: trunk/sc2/src/sc2code/libs/graphics/sdl/3do_getbody.c =================================================================== --- trunk/sc2/src/sc2code/libs/graphics/sdl/3do_getbody.c 2008-10-11 19:49:46 UTC (rev 3083) +++ trunk/sc2/src/sc2code/libs/graphics/sdl/3do_getbody.c 2008-10-12 00:37:05 UTC (rev 3084) @@ -42,6 +42,8 @@ int hotspot_y; } AniData; +extern uio_Repository *repository; +static uio_AutoMount *autoMount[] = { NULL }; static void process_image (FRAME FramePtr, SDL_Surface *img[], AniData *ani, int cel_ct) @@ -375,61 +377,100 @@ { int cel_total, cel_index, n; DWORD opos; - char CurrentLine[1024], filename[1024]; + char CurrentLine[1024], filename[PATH_MAX]; SDL_Surface **img; AniData *ani; DRAWABLE Drawable; + uio_MountHandle *aniMount = 0; + uio_DirHandle *aniDir = 0; + uio_Stream *aniFile = 0; opos = uio_ftell (fp); { char *s1, *s2; + char aniDirName[PATH_MAX]; + const char *aniFileName; + uint32 header = 0; if (_cur_resfile_name == 0 || (((s2 = 0), (s1 = strrchr (_cur_resfile_name, '/')) == 0) && (s2 = strrchr (_cur_resfile_name, '\\')) == 0)) + { n = 0; + } else { if (s2 > s1) s1 = s2; n = s1 - _cur_resfile_name + 1; + } + + uio_fread(&header, 4, 1, fp); + if (_cur_resfile_name && header == 0x04034b50) + { + // zipped ani file + if (n) + { + strncpy (aniDirName, _cur_resfile_name, n - 1); + aniDirName[n - 1] = 0; + aniFileName = _cur_resfile_name + n; + } + else + { + strcpy(aniDirName, "."); + aniFileName = _cur_resfile_name; + } + aniDir = uio_openDir (repository, aniDirName, 0); + aniMount = uio_mountDir (repository, aniDirName, uio_FSTYPE_ZIP, + aniDir, aniFileName, "/", autoMount, + uio_MOUNT_RDONLY | uio_MOUNT_ABOVE, + contentMountHandle); + aniFile = uio_fopen (aniDir, aniFileName, "r"); + opos = 0; + n = 0; + } + else + { + // unpacked ani file strncpy (filename, _cur_resfile_name, n); + aniFile = fp; + aniDir = contentDir; } } cel_total = 0; - while (uio_fgets (CurrentLine, sizeof (CurrentLine), fp)) + uio_fseek (aniFile, opos, SEEK_SET); + while (uio_fgets (CurrentLine, sizeof (CurrentLine), aniFile)) { ++cel_total; } - img = HMalloc(sizeof (SDL_Surface *) * cel_total); - if (!img) - { - log_add (log_Warning, "Couldn't allocate space for '%s' images", _cur_resfile_name); - - return NULL; - } - + img = HMalloc (sizeof (SDL_Surface *) * cel_total); ani = HMalloc (sizeof (AniData) * cel_total); - if (!ani) + if (!img || !ani) { + log_add (log_Warning, "Couldn't allocate space for '%s'", _cur_resfile_name); + if (aniMount) + { + uio_fclose(aniFile); + uio_closeDir(aniDir); + uio_unmountDir(aniMount); + } HFree (img); - log_add (log_Warning, "Couldn't allocate space for '%s' anidata", _cur_resfile_name); - + HFree (ani); return NULL; } cel_index = 0; - uio_fseek (fp, opos, SEEK_SET); - while (uio_fgets (CurrentLine, sizeof (CurrentLine), fp) && cel_index < cel_total) + uio_fseek (aniFile, opos, SEEK_SET); + while (uio_fgets (CurrentLine, sizeof (CurrentLine), aniFile) && cel_index < cel_total) { sscanf (CurrentLine, "%s %d %d %d %d", &filename[n], &ani[cel_index].transparent_color, &ani[cel_index].colormap_index, &ani[cel_index].hotspot_x, &ani[cel_index].hotspot_y); - img[cel_index] = sdluio_loadImage (contentDir, filename); + img[cel_index] = sdluio_loadImage (aniDir, filename); if (img[cel_index] == NULL) { const char *err; @@ -451,7 +492,7 @@ ++cel_index; } - if ((int)uio_ftell (fp) - (int)opos >= (int)length) + if ((int)uio_ftell (aniFile) - (int)opos >= (int)length) break; } @@ -483,6 +524,13 @@ log_add (log_Warning, "Couldn't get cel data for '%s'", _cur_resfile_name); + if (aniMount) + { + uio_fclose(aniFile); + uio_closeDir(aniDir); + uio_unmountDir(aniMount); + } + HFree (img); HFree (ani); return Drawable; @@ -547,11 +595,45 @@ size_t numBCDs = 0; int dirEntryI; uio_DirHandle *fontDirHandle = NULL; + uio_MountHandle *fontMount = NULL; FONT fontPtr = NULL; if (_cur_resfile_name == 0) goto err; + if (fp != (uio_Stream*)~0) + { + // font is zipped instead of being in a directory + + char *s1, *s2; + int n; + const char *fontZipName; + char fontDirName[PATH_MAX]; + + if ((((s2 = 0), (s1 = strrchr (_cur_resfile_name, '/')) == 0) + && (s2 = strrchr (_cur_resfile_name, '\\')) == 0)) + { + strcpy(fontDirName, "."); + fontZipName = _cur_resfile_name; + } + else + { + if (s2 > s1) + s1 = s2; + n = s1 - _cur_resfile_name + 1; + strncpy (fontDirName, _cur_resfile_name, n - 1); + fontDirName[n - 1] = 0; + fontZipName = _cur_resfile_name + n; + } + + fontDirHandle = uio_openDir (repository, fontDirName, 0); + fontMount = uio_mountDir (repository, _cur_resfile_name, uio_FSTYPE_ZIP, + fontDirHandle, fontZipName, "/", autoMount, + uio_MOUNT_RDONLY | uio_MOUNT_ABOVE, + contentMountHandle); + uio_closeDir (fontDirHandle); + } + fontDir = CaptureDirEntryTable (LoadDirEntryTable (contentDir, _cur_resfile_name, ".", match_MATCH_SUBSTRING)); if (fontDir == 0) @@ -597,6 +679,8 @@ } uio_closeDir (fontDirHandle); DestroyDirEntryTable (ReleaseDirEntryTable (fontDir)); + if (fontMount != 0) + uio_unmountDir(fontMount); #if 0 if (numBCDs == 0) @@ -697,6 +781,10 @@ if (fontDir != 0) DestroyDirEntryTable (ReleaseDirEntryTable (fontDir)); + + if (fontMount != 0) + uio_unmountDir(fontMount); + return 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Mee...@us...> - 2008-10-12 21:47:06
|
Revision: 3086 http://sc2.svn.sourceforge.net/sc2/?rev=3086&view=rev Author: Meep-Eep Date: 2008-10-12 21:46:57 +0000 (Sun, 12 Oct 2008) Log Message: ----------- Added read-ahead buffering when reading zip index files. Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/src/sc2code/libs/uio/fileblock.c trunk/sc2/src/sc2code/libs/uio/fileblock.h trunk/sc2/src/sc2code/libs/uio/zip/zip.c Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2008-10-12 01:34:39 UTC (rev 3085) +++ trunk/sc2/ChangeLog 2008-10-12 21:46:57 UTC (rev 3086) @@ -1,4 +1,5 @@ Changes towards version 0.7: +- Added read-ahead buffering when reading zip index files. - SvdB - Added support for packed ani and font files - Mika - DrawTracedText abstraction (bug #1029), from Nic - Experimental support for Symbian S60 3rd edition - Mika & SvdB Modified: trunk/sc2/src/sc2code/libs/uio/fileblock.c =================================================================== --- trunk/sc2/src/sc2code/libs/uio/fileblock.c 2008-10-12 01:34:39 UTC (rev 3085) +++ trunk/sc2/src/sc2code/libs/uio/fileblock.c 2008-10-12 21:46:57 UTC (rev 3086) @@ -18,6 +18,8 @@ * */ +#define uio_INTERNAL_FILEBLOCK + #include "iointrn.h" #include "fileblock.h" #include "uioport.h" @@ -25,11 +27,42 @@ #include <errno.h> static uio_FileBlock *uio_FileBlock_new(uio_Handle *handle, int flags, - off_t offset, size_t blockSize, char *buffer, size_t bufSize); + off_t offset, size_t blockSize, char *buffer, size_t bufSize, + off_t bufOffset, size_t bufFill, size_t readAheadBufSize); static inline uio_FileBlock *uio_FileBlock_alloc(void); static void uio_FileBlock_free(uio_FileBlock *block); +// caller should uio_Handle_ref(handle) (unless it doesn't need it's own +// reference anymore). +static uio_FileBlock * +uio_FileBlock_new(uio_Handle *handle, int flags, off_t offset, + size_t blockSize, char *buffer, size_t bufSize, off_t bufOffset, + size_t bufFill, size_t readAheadBufSize) { + uio_FileBlock *result; + + result = uio_FileBlock_alloc(); + result->handle = handle; + result->flags = flags; + result->offset = offset; + result->blockSize = blockSize; + result->buffer = buffer; + result->bufSize = bufSize; + result->bufOffset = bufOffset; + result->bufFill = bufFill; + result->readAheadBufSize = readAheadBufSize; + return result; +} +static inline uio_FileBlock * +uio_FileBlock_alloc(void) { + return uio_malloc(sizeof (uio_FileBlock)); +} + +static inline void +uio_FileBlock_free(uio_FileBlock *block) { + uio_free(block); +} + uio_FileBlock * uio_openFileBlock(uio_Handle *handle) { // TODO: if mmap support is available, and it is available natively @@ -44,7 +77,7 @@ return NULL; } uio_Handle_ref(handle); - return uio_FileBlock_new(handle, 0, 0, statBuf.st_size, NULL, 0); + return uio_FileBlock_new(handle, 0, 0, statBuf.st_size, NULL, 0, 0, 0, 0); } uio_FileBlock * @@ -58,52 +91,153 @@ // errno is set return NULL; } - if (statBuf.st_size > + if (statBuf.st_size > offset || (statBuf.st_size - offset > size)) { + // NOT: 'if (statBuf.st_size > offset + size)', to protect + // against overflow. + + } #endif uio_Handle_ref(handle); - return uio_FileBlock_new(handle, 0, offset, size, NULL, 0); + return uio_FileBlock_new(handle, 0, offset, size, NULL, 0, 0, 0, 0); } +static inline ssize_t +uio_accessFileBlockMmap(uio_FileBlock *block, off_t offset, size_t length, + char **buffer) { + // TODO + errno = ENOSYS; + (void) block; + (void) offset; + (void) length; + (void) buffer; + return -1; +} + +static inline ssize_t +uio_accessFileBlockNoMmap(uio_FileBlock *block, off_t offset, size_t length, + char **buffer) { + + // TODO: add read-ahead buffering + ssize_t numRead; + off_t start; + off_t end; + size_t bufSize; + char *oldBuffer; + //size_t oldBufSize; + + // Don't go beyond the end of the block. + if (offset > (off_t) block->blockSize) { + *buffer = block->buffer; + return 0; + } + if (length > block->blockSize - offset) + length = block->blockSize - offset; + + if (block->buffer != NULL) { + // Check whether the requested data is already in the buffer. + if (offset >= block->bufOffset && + (offset - block->bufOffset) + length < block->bufFill) { + *buffer = block->buffer + (offset - block->bufOffset); + return length; + } + } + + if (length < block->readAheadBufSize && + (block->flags & uio_FB_USAGE_MASK) != 0) { + // We can buffer more data. + switch (block->flags & uio_FB_USAGE_MASK) { + case uio_FB_USAGE_FORWARD: + // Read extra data after the requested data. + start = offset; + end = (block->readAheadBufSize > block->blockSize - offset) ? + block->blockSize : offset + block->readAheadBufSize; + break; + case uio_FB_USAGE_BACKWARD: + // Read extra data before the requested data. + end = offset + length; + start = (end <= (off_t) block->blockSize) ? + 0 : end - block->bufSize; + break; + case uio_FB_USAGE_FORWARD | uio_FB_USAGE_BACKWARD: { + // Read extra data both before and after the requested data. + off_t extraBefore = (block->readAheadBufSize - length) / 2; + start = (offset < extraBefore) ? 0 : offset - extraBefore; + + end = (block->readAheadBufSize > block->blockSize - start) ? + block->blockSize : start + block->readAheadBufSize; + break; + } + } + } else { + start = offset; + end = offset + length; + } + bufSize = (length > block->readAheadBufSize) ? + length : block->readAheadBufSize; + + // Start contains the start index in the block of the data we're going + // to read. + // End contains the end index. + // bufSize contains the size of the buffer. bufSize >= end - start. + + oldBuffer = block->buffer; + //oldBufSize = block->bufSize; + if (block->buffer != NULL || block->bufSize != bufSize) { + // We don't have a buffer, or we have one, but of the wrong size. + block->buffer = uio_malloc(bufSize); + block->bufSize = bufSize; + } + + if (oldBuffer != NULL) { + // TODO: If we have part of the data still in the old buffer, we + // can keep that. + // memmove(...) + + if (oldBuffer != block->buffer) + uio_free(oldBuffer); + } + block->bufFill = 0; + block->bufOffset = start; + + // TODO: lock handle + if (uio_lseek(block->handle, block->offset + start, SEEK_SET) == + (off_t) -1) { + // errno is set + return -1; + } + + numRead = uio_read(block->handle, block->buffer, end - start); + if (numRead == -1) { + // errno is set + // TODO: unlock handle + return -1; + } + // TODO: unlock handle + + block->bufFill = numRead; + *buffer = block->buffer + (offset - block->bufOffset); + if (numRead <= (offset - block->bufOffset)) + return 0; + if ((size_t) numRead >= length) + return length; + return numRead - offset; +} + // block remains usable until the next call to uio_accessFileBlock // with the same block as argument, or until uio_closeFileBlock with // that block as argument. +// The 'offset' parameter is wrt. the start of the block. +// Requesting access to data beyond the file block is not an error. The +// FileBlock is meant to be used as a replacement of seek() and read(), and +// as with those functions, trying to go beyond the end of a file just +// goes to the end. The return value is the number of bytes in the buffer. ssize_t uio_accessFileBlock(uio_FileBlock *block, off_t offset, size_t length, char **buffer) { if (block->flags & uio_FB_USE_MMAP) { - // TODO - errno = ENOSYS; - return -1; + return uio_accessFileBlockMmap(block, offset, length, buffer); } else { - // TODO: add read-ahead buffering - ssize_t numRead; - - if (length > block->blockSize - offset) - length = block->blockSize - offset; - - if (block->buffer != NULL && length != block->bufSize) { - uio_free(block->buffer); - block->buffer = NULL; - } - if (block->buffer == NULL) - block->buffer = uio_malloc(length); - - // TODO: lock handle - if (uio_lseek(block->handle, block->offset + offset, SEEK_SET) == - (off_t) -1) { - // errno is set - return -1; - } - - numRead = uio_read(block->handle, block->buffer, length); - if (numRead == -1) { - // errno is set - // TODO: unlock handle - return -1; - } - // TODO: unlock handle - *buffer = block->buffer; - return numRead; + return uio_accessFileBlockNoMmap(block, offset, length, buffer); } } @@ -115,10 +249,31 @@ errno = ENOSYS; return -1; } else { - ssize_t numRead; + ssize_t numCopied = 0; + ssize_t readResult; + // Don't go beyond the end of the block. + if (offset > (off_t) block->blockSize) + return 0; if (length > block->blockSize - offset) length = block->blockSize - offset; + + // Check whether (part of) the requested data is already in our + // own buffer. + if (block->buffer != NULL && offset >= block->bufOffset + && offset < block->bufOffset + (off_t) block->bufFill) { + size_t toCopy = block->bufFill - offset; + if (toCopy > length) + toCopy = length; + memcpy(buffer, block->buffer + (offset - block->bufOffset), + toCopy); + numCopied += toCopy; + length -= toCopy; + if (length == 0) + return numCopied; + buffer += toCopy; + offset += toCopy; + } // TODO: lock handle if (uio_lseek(block->handle, block->offset + offset, SEEK_SET) == @@ -127,14 +282,15 @@ return -1; } - numRead = uio_read(block->handle, buffer, length); - if (numRead == -1) { + readResult = uio_read(block->handle, buffer, length); + // TODO: unlock handle + if (readResult == -1) { // errno is set - // TODO: unlock handle return -1; } - // TODO: unlock handle - return numRead; + numCopied += readResult; + + return numCopied; } } @@ -154,31 +310,25 @@ return 0; } -// caller should uio_Handle_ref(handle) (unless it doesn't need it's own -// reference anymore). -static uio_FileBlock * -uio_FileBlock_new(uio_Handle *handle, int flags, off_t offset, - size_t blockSize, char *buffer, size_t bufSize) { - uio_FileBlock *result; - - result = uio_FileBlock_alloc(); - result->handle = handle; - result->flags = flags; - result->offset = offset; - result->blockSize = blockSize; - result->buffer = buffer; - result->bufSize = bufSize; - return result; +// Usage is the or'ed value of zero or more of uio_FB_USAGE_FORWARD, +// and uio_FB_USAGE_BACKWARD. +void +uio_setFileBlockUsageHint(uio_FileBlock *block, int usage, + size_t readAheadBufSize) { + block->flags = (block->flags & ~uio_FB_USAGE_MASK) | + (usage & uio_FB_USAGE_MASK); + block->readAheadBufSize = readAheadBufSize; } -static inline uio_FileBlock * -uio_FileBlock_alloc(void) { - return uio_malloc(sizeof (uio_FileBlock)); +// Call if you want the memory used by the fileblock to be released, but +// still want to use the fileblock later. If you don't need the fileblock, +// call uio_closeFileBlock() instead. +void +uio_clearFileBlockBuffers(uio_FileBlock *block) { + if (block->buffer != NULL) { + uio_free(block->buffer); + block->buffer = NULL; + } } -static void -uio_FileBlock_free(uio_FileBlock *block) { - uio_free(block); -} - Modified: trunk/sc2/src/sc2code/libs/uio/fileblock.h =================================================================== --- trunk/sc2/src/sc2code/libs/uio/fileblock.h 2008-10-12 01:34:39 UTC (rev 3085) +++ trunk/sc2/src/sc2code/libs/uio/fileblock.h 2008-10-12 21:46:57 UTC (rev 3086) @@ -21,23 +21,55 @@ #ifndef _FILEBLOCK_H #define _FILEBLOCK_H +typedef struct uio_FileBlock uio_FileBlock; + #include "io.h" #include "uioport.h" #include <sys/types.h> -typedef struct uio_FileBlock { +#define uio_FB_USAGE_FORWARD 1 +#define uio_FB_USAGE_BACKWARD 2 +#define uio_FB_USAGE_MASK (uio_FB_USAGE_FORWARD | uio_FB_USAGE_BACKWARD) + +#ifdef uio_INTERNAL_FILEBLOCK + +// A fileblock represents a contiguous block of data from a file. +// It's purpose is to avoid needless copying of data, while enabling +// buffering. + +struct uio_FileBlock { uio_Handle *handle; int flags; -#define uio_FB_USE_MMAP 1 + // See above for uio_FB_USAGE_FORWARD, uio_FB_USAGE_BACKWARD. +#define uio_FB_USE_MMAP 4 off_t offset; // Offset to the start of the block in the file. size_t blockSize; + // Size of the block of data represented by this FileBlock. char *buffer; // either allocated buffer, or buffer to mmap'ed area. size_t bufSize; -} uio_FileBlock; + // Size of the buffer. + off_t bufOffset; + // Offset of the start of the buffer into the block. + size_t bufFill; + // Part of 'buffer' which is in use. + size_t readAheadBufSize; + // Try to read up to this many bytes at a time, even when less + // is immediately needed. +}; +// INV: The FileBlock represents 'fileData[offset..(offset + blockSize - 1)]' +// where 'fileData' is the contents of the file. +// INV: If buf != NULL then: +// bufFill <= bufSize +// bufFill <= blockSize +// buffer[0..bufFill - 1] == fileData[ +// (offset + bufOffset)..(offset + bufOffset + bufFill - 1)] + +#endif /* uio_INTERNAL_FILEBLOCK */ + uio_FileBlock *uio_openFileBlock(uio_Handle *handle); uio_FileBlock *uio_openFileBlock2(uio_Handle *handle, off_t offset, size_t size); @@ -46,6 +78,10 @@ int uio_copyFileBlock(uio_FileBlock *block, off_t offset, char *buffer, size_t length); int uio_closeFileBlock(uio_FileBlock *block); +#define uio_FB_READAHEAD_BUFSIZE_MAX ((size_t) -1) +void uio_setFileBlockUsageHint(uio_FileBlock *block, int usage, + size_t readAheadBufSize); +void uio_clearFileBlockBuffers(uio_FileBlock *block); #endif /* _FILEBLOCK_H */ Modified: trunk/sc2/src/sc2code/libs/uio/zip/zip.c =================================================================== --- trunk/sc2/src/sc2code/libs/uio/zip/zip.c 2008-10-12 01:34:39 UTC (rev 3085) +++ trunk/sc2/src/sc2code/libs/uio/zip/zip.c 2008-10-12 21:46:57 UTC (rev 3086) @@ -43,6 +43,8 @@ #endif +#define DIR_STRUCTURE_READ_BUFSIZE 0x10000 + static int zip_badFile(zip_GPFileData *gPFileData, char *fileName); static int zip_fillDirStructure(uio_GPDir *top, uio_Handle *handle); #if zip_USE_HEADERS == zip_USE_LOCAL_HEADERS @@ -583,7 +585,7 @@ int savedErrno = errno; #ifdef DEBUG fprintf(stderr, "Error: failed to read the zip directory " - "structure - %d.\n", errno); + "structure - %s.\n", strerror(errno)); #endif uio_GPRoot_umount(result); errno = savedErrno; @@ -647,7 +649,11 @@ } startCentralDir = makeUInt32(buf[16], buf[17], buf[18], buf[19]); - + + // Enable read-ahead buffering, for speed. + uio_setFileBlockUsageHint(fileBlock, uio_FB_USAGE_FORWARD, + DIR_STRUCTURE_READ_BUFSIZE); + pos = startCentralDir; while (numEntries--) { if (zip_fillDirStructureCentralProcessEntry(top, fileBlock, &pos) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Mee...@us...> - 2008-10-15 17:46:30
|
Revision: 3090 http://sc2.svn.sourceforge.net/sc2/?rev=3090&view=rev Author: Meep-Eep Date: 2008-10-15 17:45:17 +0000 (Wed, 15 Oct 2008) Log Message: ----------- Case insensitive matching for .uqm/.zip/.rmp. Also fixes an error in the regexp used before. Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/src/options.c Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2008-10-13 20:42:22 UTC (rev 3089) +++ trunk/sc2/ChangeLog 2008-10-15 17:45:17 UTC (rev 3090) @@ -1,4 +1,5 @@ Changes towards version 0.7: +- Case insensitive matching when looking for .zip/.uqm/.rmp files - SvdB - Added read-ahead buffering when reading zip index files. - SvdB - Added support for packed ani and font files - Mika - DrawTracedText abstraction (bug #1029), from Nic Modified: trunk/sc2/src/options.c =================================================================== --- trunk/sc2/src/options.c 2008-10-13 20:42:22 UTC (rev 3089) +++ trunk/sc2/src/options.c 2008-10-15 17:45:17 UTC (rev 3090) @@ -408,7 +408,7 @@ static uio_AutoMount *autoMount[] = { NULL }; uio_DirList *dirList; - dirList = uio_getDirList (dirHandle, "", ".(zip|uqm)$", + dirList = uio_getDirList (dirHandle, "", "\\.([zZ][iI][pP]|[uU][qQ][mM])$", match_MATCH_REGEX); if (dirList != NULL) { @@ -435,7 +435,7 @@ uio_DirList *indices; int numLoaded = 0; - indices = uio_getDirList (dir, "", ".rmp$", + indices = uio_getDirList (dir, "", "\\.[rR][mM][pP]$", match_MATCH_REGEX); if (indices != NULL) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gew...@us...> - 2008-10-17 21:48:18
|
Revision: 3092 http://sc2.svn.sourceforge.net/sc2/?rev=3092&view=rev Author: gewlitys Date: 2008-10-17 21:48:14 +0000 (Fri, 17 Oct 2008) Log Message: ----------- Added --addondir commandline option. Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/src/options.c trunk/sc2/src/options.h trunk/sc2/src/starcon2.c Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2008-10-17 20:49:24 UTC (rev 3091) +++ trunk/sc2/ChangeLog 2008-10-17 21:48:14 UTC (rev 3092) @@ -1,4 +1,5 @@ Changes towards version 0.7: +- Added --addondir commandline option - Mika - Case insensitive matching when looking for .zip/.uqm/.rmp files - SvdB - Added read-ahead buffering when reading zip index files. - SvdB - Added support for packed ani and font files - Mika Modified: trunk/sc2/src/options.c =================================================================== --- trunk/sc2/src/options.c 2008-10-17 20:49:24 UTC (rev 3091) +++ trunk/sc2/src/options.c 2008-10-17 21:48:14 UTC (rev 3092) @@ -72,8 +72,11 @@ static const char *findFileInDirs (const char *locs[], int numLocs, const char *file); -static void mountContentDir (uio_Repository *repository, +static uio_MountHandle *mountContentDir (uio_Repository *repository, const char *contentPath); +static void mountAddonDir (uio_Repository *repository, + uio_MountHandle *contentMountHandle, const char *addonDirName); + static void mountDirZips (uio_MountHandle *contentHandle, uio_DirHandle *dirHandle, const char *mountPoint); @@ -126,10 +129,11 @@ // execFile is the path to the uqm executable, as acquired through // main()'s argv[0]. void -prepareContentDir (const char *contentDirName, const char *execFile) +prepareContentDir (const char *contentDirName, const char* addonDirName, const char *execFile) { const char *testFile = "version"; const char *loc; + uio_MountHandle* contentMountHandle; if (contentDirName == NULL) { @@ -176,8 +180,11 @@ } log_add (log_Debug, "Using '%s' as base content dir.", baseContentPath); + contentMountHandle = mountContentDir (repository, baseContentPath); - mountContentDir (repository, baseContentPath); + if (addonDirName) + log_add (log_Debug, "Using '%s' as addon dir.", addonDirName); + mountAddonDir (repository, contentMountHandle, addonDirName); #ifndef __APPLE__ (void) execFile; @@ -309,15 +316,13 @@ } } -static void +static uio_MountHandle * mountContentDir (uio_Repository *repository, const char *contentPath) { - uio_DirHandle *packagesDir, *addonsDir; + uio_DirHandle *packagesDir; static uio_AutoMount *autoMount[] = { NULL }; uio_MountHandle *contentMountHandle; - availableAddons = NULL; - contentMountHandle = uio_mountDir (repository, "/", uio_FSTYPE_STDIO, NULL, NULL, contentPath, autoMount, uio_MOUNT_TOP | uio_MOUNT_RDONLY, NULL); @@ -343,6 +348,44 @@ uio_closeDir (packagesDir); } + return contentMountHandle; +} + +static void +mountAddonDir (uio_Repository *repository, uio_MountHandle *contentMountHandle, + const char *addonDirName) +{ + uio_DirHandle *addonsDir; + static uio_AutoMount *autoMount[] = { NULL }; + uio_MountHandle *mountHandle; + + availableAddons = NULL; + + if (addonDirName != NULL) + { + mountHandle = uio_mountDir (repository, "addons", + uio_FSTYPE_STDIO, NULL, NULL, addonDirName, autoMount, + uio_MOUNT_TOP | uio_MOUNT_RDONLY, NULL); + if (mountHandle == NULL) + { + log_add (log_Warning, "Warning: Could not mount addon directory: %s" + ";\n\t'--addon' options are ignored.", strerror (errno)); + return; + } + } + else + { + mountHandle = contentMountHandle; + } + + contentDir = uio_openDir (repository, "/", 0); + if (contentDir == NULL) + { + log_add (log_Fatal, "Fatal error: Could not open content dir: %s", + strerror (errno)); + exit (EXIT_FAILURE); + } + // NB: note the difference between addonsDir and addonDir. // the former is the dir 'addons', the latter a directory // in that dir. @@ -355,7 +398,7 @@ return; } - mountDirZips (contentMountHandle, addonsDir, "addons"); + mountDirZips (mountHandle, addonsDir, "addons"); availableAddons = uio_getDirList (addonsDir, "", "", match_MATCH_PREFIX); if (availableAddons != NULL) @@ -388,7 +431,7 @@ "not found; addon skipped.", addon); continue; } - mountDirZips (contentMountHandle, addonDir, mountname); + mountDirZips (mountHandle, addonDir, mountname); uio_closeDir (addonDir); } } Modified: trunk/sc2/src/options.h =================================================================== --- trunk/sc2/src/options.h 2008-10-17 20:49:24 UTC (rev 3091) +++ trunk/sc2/src/options.h 2008-10-17 21:48:14 UTC (rev 3092) @@ -66,7 +66,7 @@ extern INPUT_TEMPLATE input_templates[6]; -void prepareContentDir (const char *contentDirName, const char *execFile); +void prepareContentDir (const char *contentDirName, const char *addonDirName, const char *execFile); void prepareConfigDir (const char *configDirName); void prepareMeleeDir (void); void prepareSaveDir (void); Modified: trunk/sc2/src/starcon2.c =================================================================== --- trunk/sc2/src/starcon2.c 2008-10-17 20:49:24 UTC (rev 3091) +++ trunk/sc2/src/starcon2.c 2008-10-17 21:48:14 UTC (rev 3092) @@ -74,6 +74,7 @@ const char *configDir; const char *contentDir; const char **addons; + const char *addonDir; int numAddons; int gammaSet; float gamma; @@ -124,6 +125,7 @@ /* .configDir = */ NULL, /* .contentDir = */ NULL, /* .addons = */ NULL, + /* .addonDir = */ NULL, /* .numAddons = */ 0, /* .gammaSet = */ 0, /* .gamma = */ 0.0f, @@ -437,7 +439,7 @@ speechVolumeScale = options.speechVolumeScale; optAddons = options.addons; - prepareContentDir (options.contentDir, argv[0]); + prepareContentDir (options.contentDir, options.addonDir, argv[0]); prepareMeleeDir (); prepareSaveDir (); #if 0 @@ -500,6 +502,7 @@ SOUND_OPT, STEREOSFX_OPT, ADDON_OPT, + ADDONDIR_OPT, ACCEL_OPT, #ifdef NETPLAY NETHOST1_OPT, @@ -545,6 +548,7 @@ {"sound", 1, NULL, SOUND_OPT}, {"stereosfx", 0, NULL, STEREOSFX_OPT}, {"addon", 1, NULL, ADDON_OPT}, + {"addondir", 1, NULL, ADDONDIR_OPT}, {"accel", 1, NULL, ACCEL_OPT}, #ifdef NETPLAY {"nethost1", 1, NULL, NETHOST1_OPT}, @@ -822,6 +826,9 @@ options->addons[options->numAddons - 1] = optarg; options->addons[options->numAddons] = NULL; break; + case ADDONDIR_OPT: + options->addonDir = optarg; + break; case ACCEL_OPT: force_platform = PLATFORM_NULL; if (!strcmp (optarg, "mmx")) @@ -1012,6 +1019,7 @@ "FILE)"); log_add (log_User, " --addon ADDON (using a specific addon; " "may be specified multiple times)"); + log_add (log_User, " --addondir=ADDONDIR (directory where addons reside)"); log_add (log_User, " --sound=DRIVER (openal, mixsdl, none; default " "mixsdl)"); log_add (log_User, " --stereosfx (enables positional sound effects, " This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gew...@us...> - 2008-10-18 17:35:15
|
Revision: 3096 http://sc2.svn.sourceforge.net/sc2/?rev=3096&view=rev Author: gewlitys Date: 2008-10-18 17:35:09 +0000 (Sat, 18 Oct 2008) Log Message: ----------- Added ogg and addon support for Symbian. Modified Paths: -------------- trunk/sc2/INSTALL.symbian trunk/sc2/build/unix/config_proginfo_host trunk/sc2/src/symbian/uqm.cfg trunk/sc2/src/symbian/uqm.mmp trunk/sc2/src/symbian/uqmapp.cpp Modified: trunk/sc2/INSTALL.symbian =================================================================== --- trunk/sc2/INSTALL.symbian 2008-10-18 17:28:22 UTC (rev 3095) +++ trunk/sc2/INSTALL.symbian 2008-10-18 17:35:09 UTC (rev 3096) @@ -6,12 +6,11 @@ document, please report them to our Bugzilla at http://bugs.uqm.stack.nl/ -UQM's Symbian support is currently at experimental stage and is tested only on -Nokia N73, which has too little memory to run it reliably for long time. -Reports of successes and failures on other devices are very welcome. +UQM's Symbian support is currently at experimental stage. Development is +being done on Nokia N73, which has too little memory for longer playing +sessions. Reports of successes and failures on other devices are very welcome. Known problems: -- No OGG support so voices and 3DO music are not available. - No netmelee. @@ -40,6 +39,9 @@ - SDL for S60 3rd ed. * Download from http://koti.mbnet.fi/mertama/sdl.html * You also need the sources from http://www.libsdl.org/ + +- Tremor + * Check out from SVN repository at http://svn.xiph.org/trunk/Tremor/ Building: --------- @@ -51,7 +53,7 @@ 2) Subst your Symbian SDK to a new drive along the following example: subst z: C:\Symbian\9.1\S60_3rd_MR_2 -3) Put UQM sources inside the substed drive, if not already there. +3) Put UQM sources and Tremor inside the substed drive, if not already there. 4) Install and build SDL, instructions are inside the package. @@ -60,10 +62,17 @@ cd png\group bldmake bldfiles abld build + +6) Build Tremor. First apply a patch found from UQM SVN repository + at trunk/symbian/tremor: + cd Tremor + patch -p0 </path/to/tremor_symbian.patch + bldmake bldfiles + abld build -6) Open MSYS terminal. All following steps are done inside it. +7) Open MSYS terminal. All following steps are done inside it. -7) Two environment variables control the building, BUILD_EPOCROOT and BUILD_HOST. +8) Two environment variables control the building, BUILD_EPOCROOT and BUILD_HOST. Set BUILD_EPOCROOT to point to the substed drive: export BUILD_EPOCROOT=/z @@ -72,14 +81,14 @@ for which target you want to build: export BUILD_HOST=GCCE -8) Compile (you don't need to change any options from the interactive menu): +9) Compile (you don't need to change any options from the interactive menu): ./build.sh uqm -9) Install. It builds the content zip and puts everything to proper - place (WINSCW) or creates a self-signed SIS package (GCCE / ARMV5): - ./build.sh uqm install +10) Install. It builds the content zip and puts everything to proper + place (WINSCW) or creates a self-signed SIS package (GCCE / ARMV5): + ./build.sh uqm install -10) If you built for GCCE or ARMV5, you should now have uqm.sisx in the same +11) If you built for GCCE or ARMV5, you should now have uqm.sisx in the same directory from where you did the build. Remember to also install SDL SIS package and if device does not support FP2, Open C plugins before attempting to run UQM on actual device. Modified: trunk/sc2/build/unix/config_proginfo_host =================================================================== --- trunk/sc2/build/unix/config_proginfo_host 2008-10-18 17:28:22 UTC (rev 3095) +++ trunk/sc2/build/unix/config_proginfo_host 2008-10-18 17:35:09 UTC (rev 3096) @@ -219,7 +219,7 @@ LIB_tremor_LDFLAGS="-framework Tremor" ;; ARMV5|WINSCW|GCCE) - LIB_tremor_DETECT="false" + LIB_tremor_DETECT="true" ;; *) LIB_tremor_CFLAGS="" Modified: trunk/sc2/src/symbian/uqm.cfg =================================================================== --- trunk/sc2/src/symbian/uqm.cfg 2008-10-18 17:28:22 UTC (rev 3095) +++ trunk/sc2/src/symbian/uqm.cfg 2008-10-18 17:35:09 UTC (rev 3096) @@ -3,7 +3,7 @@ config.sfxvol = 20 config.iconicscan = no config.pulseshield = no -config.3domusic = no +config.3domusic = yes config.smoothmelee = no config.positionalsfx = no config.resheight = 240 @@ -20,7 +20,7 @@ config.3domovies = yes config.scanlines = no config.showfps = no -config.speechvol = 0 +config.speechvol = 20 config.remixmusic = no config.smoothscroll = no config.audioquality = low Modified: trunk/sc2/src/symbian/uqm.mmp =================================================================== --- trunk/sc2/src/symbian/uqm.mmp 2008-10-18 17:28:22 UTC (rev 3095) +++ trunk/sc2/src/symbian/uqm.mmp 2008-10-18 17:35:09 UTC (rev 3096) @@ -33,11 +33,13 @@ LIBRARY ws32.lib LIBRARY bafl.lib LIBRARY euser.lib +LIBRARY efsrv.lib LIBRARY sdl.lib LIBRARY libc.lib LIBRARY libm.lib LIBRARY libz.lib -LIBRARY libpthread.lib +LIBRARY libpthread.lib STATICLIBRARY uqm.lib STATICLIBRARY SDL_image.lib +STATICLIBRARY tremor.lib Modified: trunk/sc2/src/symbian/uqmapp.cpp =================================================================== --- trunk/sc2/src/symbian/uqmapp.cpp 2008-10-18 17:28:22 UTC (rev 3095) +++ trunk/sc2/src/symbian/uqmapp.cpp 2008-10-18 17:35:09 UTC (rev 3096) @@ -6,6 +6,7 @@ #include <aknnotewrappers.h> #include <eikstart.h> #include <badesca.h> +#include <bautils.h> #include <stdio.h> #include <stdlib.h> #include <SDL/SDL_keysym.h> @@ -84,6 +85,7 @@ void DoExit(TInt aErr); void HandleWsEventL(const TWsEvent& aEvent, CCoeControl* aDestination); void HandleResourceChangeL(TInt aType); + void AddCmdLineParamsL(CDesC8Array& aArgs); private: CExitWait* iWait; CSDLWin* iSDLWin; @@ -163,8 +165,10 @@ iSdl->DisableKeyBlocking(*this); iWait = new (ELeave) CExitWait(*this); - CDesC8ArrayFlat* args = new (ELeave)CDesC8ArrayFlat(10); - iSdl->CallMainL(iWait->iStatus, *args, CSDL::ENoParamFlags, 81920); + CDesC8ArrayFlat* args = new (ELeave)CDesC8ArrayFlat(10); + AddCmdLineParamsL(*args); + + iSdl->CallMainL(iWait->iStatus, *args, CSDL::ENoFlags, 81920); delete args; iWait->Start(); @@ -217,7 +221,29 @@ } } } - + +void CSdlAppUi::AddCmdLineParamsL(CDesC8Array& aArgs) + { + _LIT8(KAddonParam, "--addondir=?:\\uqm-addons"); + _LIT16(KTestFolder, "?:\\uqm-addons"); + RFs fs; + + fs.Connect(); + for (TInt8 c = 'e'; c < 'z'; ++c) + { + TBuf16<32> buf(KTestFolder); + buf[0] = c; + if (BaflUtils::FolderExists(fs, buf)) + { + TBuf8<32> arg(KAddonParam); + arg[11] = c; + aArgs.AppendL(arg); + break; + } + } + fs.Close(); + } + CSdlAppUi::~CSdlAppUi() { if(iWait != NULL) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Mee...@us...> - 2008-10-18 18:57:28
|
Revision: 3097 http://sc2.svn.sourceforge.net/sc2/?rev=3097&view=rev Author: Meep-Eep Date: 2008-10-18 18:57:19 +0000 (Sat, 18 Oct 2008) Log Message: ----------- Use system getopt_long() when available. Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/build/unix/build.config trunk/sc2/build.vars.in trunk/sc2/src/Makeinfo Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2008-10-18 17:35:09 UTC (rev 3096) +++ trunk/sc2/ChangeLog 2008-10-18 18:57:19 UTC (rev 3097) @@ -1,4 +1,5 @@ Changes towards version 0.7: +- Use system getopt_long() when available - SvdB - Added --addondir commandline option - Mika - Case insensitive matching when looking for .zip/.uqm/.rmp files - SvdB - Added read-ahead buffering when reading zip index files. - SvdB Modified: trunk/sc2/build/unix/build.config =================================================================== --- trunk/sc2/build/unix/build.config 2008-10-18 17:35:09 UTC (rev 3096) +++ trunk/sc2/build/unix/build.config 2008-10-18 18:57:19 UTC (rev 3097) @@ -432,8 +432,8 @@ PREPROC_OBJC MKDEP_OBJC COMPILE_OBJC \ MAKE ECHON SED DEBUG JOYSTICK NETPLAY \ OGGVORBIS SOUNDMODULE USE_INTERNAL_MIKMOD \ - HAVE_OPENGL HAVE_REGEX_H_FLAG USE_ZIP_IO \ - USE_PLATFORM_ACCEL THREADLIB USE_WINSOCK \ + HAVE_OPENGL HAVE_GETOPT_LONG HAVE_REGEX_H_FLAG \ + USE_ZIP_IO USE_PLATFORM_ACCEL THREADLIB USE_WINSOCK \ INSTALL_LIBDIR INSTALL_BINDIR INSTALL_SHAREDIR \ REZ WINDRES $HAVE_SYMBOLS" SUBSTITUTE_FILES="build.vars" Modified: trunk/sc2/build.vars.in =================================================================== --- trunk/sc2/build.vars.in 2008-10-18 17:35:09 UTC (rev 3096) +++ trunk/sc2/build.vars.in 2008-10-18 18:57:19 UTC (rev 3097) @@ -40,6 +40,7 @@ uqm_SOUNDMODULE='@SOUNDMODULE@' uqm_OGGVORBIS='@OGGVORBIS@' uqm_USE_INTERNAL_MIKMOD='@USE_INTERNAL_MIKMOD@' +uqm_HAVE_GETOPT_LONG='@HAVE_GETOPT_LONG@' uqm_HAVE_REGEX='@HAVE_REGEX_H_FLAG@' uqm_HAVE_OPENGL='@HAVE_OPENGL@' uqm_USE_ZIP_IO='@USE_ZIP_IO@' @@ -52,7 +53,7 @@ MACRO___MINGW32__='@MACRO___MINGW32__@' export BUILD_SYSTEM HOST_SYSTEM DEBUG export MACRO_WIN32 MACRO___MINGW32__ -export uqm_SOUNDMODULE uqm_USE_INTERNAL_MIKMOD uqm_HAVE_REGEX uqm_USE_WINSOCK -export uqm_HAVE_OPENGL uqm_USE_ZIP_IO uqm_USE_PLATFORM_ACCEL uqm_THREADLIB -export uqm_NETPLAY +export uqm_SOUNDMODULE uqm_USE_INTERNAL_MIKMOD uqm_HAVE_GETOPT_LONG +export uqm_HAVE_REGEX uqm_USE_WINSOCK uqm_HAVE_OPENGL uqm_USE_ZIP_IO +export uqm_USE_PLATFORM_ACCEL uqm_THREADLIB uqm_NETPLAY Modified: trunk/sc2/src/Makeinfo =================================================================== --- trunk/sc2/src/Makeinfo 2008-10-18 17:35:09 UTC (rev 3096) +++ trunk/sc2/src/Makeinfo 2008-10-18 18:57:19 UTC (rev 3097) @@ -1,12 +1,8 @@ uqm_SUBDIRS="sc2code res" -case "$HOST_SYSTEM" in - ARMV5|GCCE|WINSCW) - ;; - *) - uqm_SUBDIRS="$uqm_SUBDIRS getopt" - ;; -esac +if [ "$uqm_HAVE_GETOPT_LONG" = 0 ]; then + uqm_SUBDIRS="$uqm_SUBDIRS getopt" +fi case "$HOST_SYSTEM" in Darwin) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2008-11-10 06:03:26
|
Revision: 3098 http://sc2.svn.sourceforge.net/sc2/?rev=3098&view=rev Author: avolkov Date: 2008-11-10 06:03:16 +0000 (Mon, 10 Nov 2008) Log Message: ----------- Allow reaching 999.9 over X in HSpace; Y fixed symmetrically and would be relevant if weren't inverted; bug #628 Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/src/sc2code/units.h Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2008-10-18 18:57:19 UTC (rev 3097) +++ trunk/sc2/ChangeLog 2008-11-10 06:03:16 UTC (rev 3098) @@ -1,4 +1,5 @@ Changes towards version 0.7: +- Allow reaching 999.9:999.9 in HyperSpace (bug #628), from Nic - Use system getopt_long() when available - SvdB - Added --addondir commandline option - Mika - Case insensitive matching when looking for .zip/.uqm/.rmp files - SvdB Modified: trunk/sc2/src/sc2code/units.h =================================================================== --- trunk/sc2/src/sc2code/units.h 2008-10-18 18:57:19 UTC (rev 3097) +++ trunk/sc2/src/sc2code/units.h 2008-11-10 06:03:16 UTC (rev 3098) @@ -76,11 +76,11 @@ #define MAX_Y_UNIVERSE 9999 #define MAX_X_LOGICAL \ ((UNIVERSE_TO_LOGX (MAX_X_UNIVERSE + 1) > UNIVERSE_TO_LOGX (-1) ? \ - UNIVERSE_TO_LOGX (MAX_X_UNIVERSE) : UNIVERSE_TO_LOGX (-1)) \ + UNIVERSE_TO_LOGX (MAX_X_UNIVERSE + 1) : UNIVERSE_TO_LOGX (-1)) \ - 1L) #define MAX_Y_LOGICAL \ ((UNIVERSE_TO_LOGY (MAX_Y_UNIVERSE + 1) > UNIVERSE_TO_LOGY (-1) ? \ - UNIVERSE_TO_LOGY (MAX_Y_UNIVERSE) : UNIVERSE_TO_LOGY (-1)) \ + UNIVERSE_TO_LOGY (MAX_Y_UNIVERSE + 1) : UNIVERSE_TO_LOGY (-1)) \ - 1L) #define SECTOR_WIDTH 195 #define SECTOR_HEIGHT 25 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcm...@us...> - 2008-11-29 06:31:54
|
Revision: 3104 http://sc2.svn.sourceforge.net/sc2/?rev=3104&view=rev Author: mcmartin Date: 2008-11-29 06:31:46 +0000 (Sat, 29 Nov 2008) Log Message: ----------- 3do videos now controlled as an addon pack. Modified Paths: -------------- trunk/sc2/src/sc2code/setup.c trunk/sc2/src/starcon2.c Added Paths: ----------- trunk/sc2/content/addons/3dovideo/ trunk/sc2/content/addons/3dovideo/3dovideo.rmp Added: trunk/sc2/content/addons/3dovideo/3dovideo.rmp =================================================================== --- trunk/sc2/content/addons/3dovideo/3dovideo.rmp (rev 0) +++ trunk/sc2/content/addons/3dovideo/3dovideo.rmp 2008-11-29 06:31:46 UTC (rev 3104) @@ -0,0 +1,27 @@ +slides.ending = 3DOVID:addons/3dovideo/ending/victory.duk +slides.intro = 3DOVID:addons/3dovideo/intro/intro.duk +slides.spins.00 = 3DOVID:addons/3dovideo/spins/ship00.duk:addons/3dovideo/spins/spin.aif:addons/3dovideo/spins/ship00.aif:89 +slides.spins.01 = 3DOVID:addons/3dovideo/spins/ship01.duk:addons/3dovideo/spins/spin.aif:addons/3dovideo/spins/ship01.aif:89 +slides.spins.02 = 3DOVID:addons/3dovideo/spins/ship02.duk:addons/3dovideo/spins/spin.aif:addons/3dovideo/spins/ship02.aif:89 +slides.spins.03 = 3DOVID:addons/3dovideo/spins/ship03.duk:addons/3dovideo/spins/spin.aif:addons/3dovideo/spins/ship03.aif:89 +slides.spins.04 = 3DOVID:addons/3dovideo/spins/ship04.duk:addons/3dovideo/spins/spin.aif:addons/3dovideo/spins/ship04.aif:89 +slides.spins.05 = 3DOVID:addons/3dovideo/spins/ship05.duk:addons/3dovideo/spins/spin.aif:addons/3dovideo/spins/ship05.aif:89 +slides.spins.06 = 3DOVID:addons/3dovideo/spins/ship06.duk:addons/3dovideo/spins/spin.aif:addons/3dovideo/spins/ship06.aif:89 +slides.spins.07 = 3DOVID:addons/3dovideo/spins/ship07.duk:addons/3dovideo/spins/spin.aif:addons/3dovideo/spins/ship07.aif:89 +slides.spins.08 = 3DOVID:addons/3dovideo/spins/ship08.duk:addons/3dovideo/spins/spin.aif:addons/3dovideo/spins/ship08.aif:89 +slides.spins.09 = 3DOVID:addons/3dovideo/spins/ship09.duk:addons/3dovideo/spins/spin.aif:addons/3dovideo/spins/ship09.aif:89 +slides.spins.10 = 3DOVID:addons/3dovideo/spins/ship10.duk:addons/3dovideo/spins/spin.aif:addons/3dovideo/spins/ship10.aif:89 +slides.spins.11 = 3DOVID:addons/3dovideo/spins/ship11.duk:addons/3dovideo/spins/spin.aif:addons/3dovideo/spins/ship11.aif:89 +slides.spins.12 = 3DOVID:addons/3dovideo/spins/ship12.duk:addons/3dovideo/spins/spin.aif:addons/3dovideo/spins/ship12.aif:89 +slides.spins.13 = 3DOVID:addons/3dovideo/spins/ship13.duk:addons/3dovideo/spins/spin.aif:addons/3dovideo/spins/ship13.aif:89 +slides.spins.14 = 3DOVID:addons/3dovideo/spins/ship14.duk:addons/3dovideo/spins/spin.aif:addons/3dovideo/spins/ship14.aif:89 +slides.spins.15 = 3DOVID:addons/3dovideo/spins/ship15.duk:addons/3dovideo/spins/spin.aif:addons/3dovideo/spins/ship15.aif:89 +slides.spins.16 = 3DOVID:addons/3dovideo/spins/ship16.duk:addons/3dovideo/spins/spin.aif:addons/3dovideo/spins/ship16.aif:89 +slides.spins.17 = 3DOVID:addons/3dovideo/spins/ship17.duk:addons/3dovideo/spins/spin.aif:addons/3dovideo/spins/ship17.aif:89 +slides.spins.18 = 3DOVID:addons/3dovideo/spins/ship18.duk:addons/3dovideo/spins/spin.aif:addons/3dovideo/spins/ship18.aif:89 +slides.spins.19 = 3DOVID:addons/3dovideo/spins/ship19.duk:addons/3dovideo/spins/spin.aif:addons/3dovideo/spins/ship19.aif:89 +slides.spins.20 = 3DOVID:addons/3dovideo/spins/ship20.duk:addons/3dovideo/spins/spin.aif:addons/3dovideo/spins/ship20.aif:89 +slides.spins.21 = 3DOVID:addons/3dovideo/spins/ship21.duk:addons/3dovideo/spins/spin.aif:addons/3dovideo/spins/ship21.aif:89 +slides.spins.22 = 3DOVID:addons/3dovideo/spins/ship22.duk:addons/3dovideo/spins/spin.aif:addons/3dovideo/spins/ship22.aif:89 +slides.spins.23 = 3DOVID:addons/3dovideo/spins/ship23.duk:addons/3dovideo/spins/spin.aif:addons/3dovideo/spins/ship23.aif:89 +slides.spins.24 = 3DOVID:addons/3dovideo/spins/ship24.duk:addons/3dovideo/spins/spin.aif:addons/3dovideo/spins/ship24.aif:89 Modified: trunk/sc2/src/sc2code/setup.c =================================================================== --- trunk/sc2/src/sc2code/setup.c 2008-11-29 06:19:11 UTC (rev 3103) +++ trunk/sc2/src/sc2code/setup.c 2008-11-29 06:31:46 UTC (rev 3104) @@ -125,6 +125,11 @@ loadAddon ("remix"); } + if (optWhichIntro == OPT_3DO) + { + loadAddon ("3dovideo"); + } + /* Now load the rest of the addons, in order. */ prepareAddons (optAddons); Modified: trunk/sc2/src/starcon2.c =================================================================== --- trunk/sc2/src/starcon2.c 2008-11-29 06:19:11 UTC (rev 3103) +++ trunk/sc2/src/starcon2.c 2008-11-29 06:31:46 UTC (rev 3104) @@ -134,7 +134,7 @@ /* .whichCoarseScan = */ OPT_PC, /* .whichMenu = */ OPT_PC, /* .whichFont = */ OPT_PC, - /* .whichIntro = */ OPT_3DO, + /* .whichIntro = */ OPT_PC, /* .whichShield = */ OPT_PC, /* .smoothScroll = */ OPT_PC, /* .meleeScale = */ TFB_SCALE_TRILINEAR, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcm...@us...> - 2009-02-16 00:40:53
|
Revision: 3108 http://sc2.svn.sourceforge.net/sc2/?rev=3108&view=rev Author: mcmartin Date: 2009-02-16 00:40:42 +0000 (Mon, 16 Feb 2009) Log Message: ----------- Move the configure and keyconfig data into subtrees of the resource map. As a side effect, default key configurations are read directly from the content directory. THIS IS AN INCOMPATIBLE CHANGE TO THE CONFIG FILES. Update content as well as src when upgrading here. Old configurations will be lost but the upgrade should otherwise be automatic. Bumped version to 0.6.5 to commemorate the incompatible change. Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/content/menu.key trunk/sc2/content/uqm.key trunk/sc2/src/sc2code/libs/input/sdl/input.c trunk/sc2/src/sc2code/libs/reslib.h trunk/sc2/src/sc2code/libs/resource/Makeinfo trunk/sc2/src/sc2code/libs/resource/resinit.c trunk/sc2/src/sc2code/setupmenu.c trunk/sc2/src/starcon2.c trunk/sc2/src/uqmversion.h Removed Paths: ------------- trunk/sc2/src/sc2code/libs/resource/mapres.c trunk/sc2/src/sc2code/libs/resource/resdata.c Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2009-02-08 09:27:07 UTC (rev 3107) +++ trunk/sc2/ChangeLog 2009-02-16 00:40:42 UTC (rev 3108) @@ -1,4 +1,6 @@ Changes towards version 0.7: +- .cfg files are now kept as subtrees of the resource map - Michael +- Flight control data no longer unnecessarily copied to config directory - Michael - Index loading/saving now can operate on subtrees - Michael - Videos vs. slide now controlled by a '3dovideo' addon - Michael - New video resource type for 3DO videos - Michael Modified: trunk/sc2/content/menu.key =================================================================== --- trunk/sc2/content/menu.key 2009-02-08 09:27:07 UTC (rev 3107) +++ trunk/sc2/content/menu.key 2009-02-16 00:40:42 UTC (rev 3108) @@ -6,79 +6,79 @@ # Menu controls. Both sets of arrow keys, basically. Paging controls # moving quickly through the file lists in Super Melee. Zooming # controls zoom controls in the starmap. "Cancel" is also used to get -# you into menu mode to begin with. There is a "menu.Special" command +# you into menu mode to begin with. There is a "Special" command # currently unused by the game. It seems to have been originally used # to call up details on starships in the Super Melee selection screen. # Arrow key controls... -menu.up.1 = key Up -menu.down.1 = key Down -menu.right.1 = key Right -menu.left.1 = key Left -menu.pageup.1 = key PageUp -menu.pagedown.1 = key PageDown -menu.home.1 = key Home -menu.end.1 = key End -menu.zoomin.1 = key PageUp -menu.zoomout.1 = key PageDown -menu.select.1 = key Return -menu.select.2 = key RightControl -menu.cancel.1 = key Space -menu.cancel.2 = key RightShift +up.1 = STRING:key Up +down.1 = STRING:key Down +right.1 = STRING:key Right +left.1 = STRING:key Left +pageup.1 = STRING:key PageUp +pagedown.1 = STRING:key PageDown +home.1 = STRING:key Home +end.1 = STRING:key End +zoomin.1 = STRING:key PageUp +zoomout.1 = STRING:key PageDown +select.1 = STRING:key Return +select.2 = STRING:key RightControl +cancel.1 = STRING:key Space +cancel.2 = STRING:key RightShift # ... and the number pad. Note that zoom controls on the starmap are # different from the paging controls in Super Melee. -menu.up.2 = key Keypad-8 -menu.down.2 = key Keypad-2 -menu.left.2 = key Keypad-4 -menu.right.2 = key Keypad-6 -menu.pageup.2 = key Keypad-9 -menu.pagedown.2 = key Keypad-3 -menu.home.2 = key Keypad-7 -menu.end.2 = key Keypad-1 -menu.zoomin.2 = key Keypad-+ -menu.zoomout.2 = key Keypad-- -menu.select.3 = key Keypad-Enter -menu.cancel.3 = key Keypad-0 +up.2 = STRING:key Keypad-8 +down.2 = STRING:key Keypad-2 +left.2 = STRING:key Keypad-4 +right.2 = STRING:key Keypad-6 +pageup.2 = STRING:key Keypad-9 +pagedown.2 = STRING:key Keypad-3 +home.2 = STRING:key Keypad-7 +end.2 = STRING:key Keypad-1 +zoomin.2 = STRING:key Keypad-+ +zoomout.2 = STRING:key Keypad-- +select.3 = STRING:key Keypad-Enter +cancel.3 = STRING:key Keypad-0 # System utility keys. -menu.delete.1 = key Delete -menu.delete.2 = key Keypad-. -menu.backspace.1 = key Backspace -menu.editcancel.1 = key Escape -menu.search.1 = key / -menu.next.1 = key Tab -menu.pause.1 = key Pause -menu.pause.2 = key F1 -menu.exit.1 = key F10 -menu.fullscreen.1 = key F11 -menu.special.1 = key LeftAlt -menu.special.2 = key RightAlt +delete.1 = STRING:key Delete +delete.2 = STRING:key Keypad-. +backspace.1 = STRING:key Backspace +editcancel.1 = STRING:key Escape +search.1 = STRING:key / +next.1 = STRING:key Tab +pause.1 = STRING:key Pause +pause.2 = STRING:key F1 +exit.1 = STRING:key F10 +fullscreen.1 = STRING:key F11 +special.1 = STRING:key LeftAlt +special.2 = STRING:key RightAlt # Joystick controls, for both port 1 and 2. -menu.up.3 = joystick 0 axis 1 negative -menu.down.3 = joystick 0 axis 1 positive -menu.left.3 = joystick 0 axis 0 negative -menu.right.3 = joystick 0 axis 0 positive +up.3 = STRING:joystick 0 axis 1 negative +down.3 = STRING:joystick 0 axis 1 positive +left.3 = STRING:joystick 0 axis 0 negative +right.3 = STRING:joystick 0 axis 0 positive -menu.up.4 = joystick 0 hat 0 up -menu.down.4 = joystick 0 hat 0 down -menu.left.4 = joystick 0 hat 0 left -menu.right.4 = joystick 0 hat 0 right +up.4 = STRING:joystick 0 hat 0 up +down.4 = STRING:joystick 0 hat 0 down +left.4 = STRING:joystick 0 hat 0 left +right.4 = STRING:joystick 0 hat 0 right -menu.cancel.4 = joystick 0 button 1 -menu.select.4 = joystick 0 button 0 +cancel.4 = STRING:joystick 0 button 1 +select.4 = STRING:joystick 0 button 0 -menu.up.5 = joystick 1 axis 1 negative -menu.down.5 = joystick 1 axis 1 positive -menu.left.5 = joystick 1 axis 0 negative -menu.right.5 = joystick 1 axis 0 positive +up.5 = STRING:joystick 1 axis 1 negative +down.5 = STRING:joystick 1 axis 1 positive +left.5 = STRING:joystick 1 axis 0 negative +right.5 = STRING:joystick 1 axis 0 positive -menu.up.6 = joystick 1 hat 0 up -menu.down.6 = joystick 1 hat 0 down -menu.left.6 = joystick 1 hat 0 left -menu.right.6 = joystick 1 hat 0 right +up.6 = STRING:joystick 1 hat 0 up +down.6 = STRING:joystick 1 hat 0 down +left.6 = STRING:joystick 1 hat 0 left +right.6 = STRING:joystick 1 hat 0 right -menu.cancel.5 = joystick 1 button 1 -menu.select.5 = joystick 1 button 0 +cancel.5 = STRING:joystick 1 button 1 +select.5 = STRING:joystick 1 button 0 Modified: trunk/sc2/content/uqm.key =================================================================== --- trunk/sc2/content/uqm.key 2009-02-08 09:27:07 UTC (rev 3107) +++ trunk/sc2/content/uqm.key 2009-02-16 00:40:42 UTC (rev 3108) @@ -1,71 +1,71 @@ -keys.1.name = Arrows -keys.1.up.1 = key Up -keys.1.down.1 = key Down -keys.1.left.1 = key Left -keys.1.right.1 = key Right -keys.1.weapon.1 = key RightControl -keys.1.special.1 = key RightShift -keys.1.up.2 = key Keypad-8 -keys.1.down.2 = key Keypad-2 -keys.1.left.2 = key Keypad-4 -keys.1.right.2 = key Keypad-6 -keys.1.weapon.2 = key Return -keys.1.special.2 = key Keypad-0 -keys.1.escape.1 = key Escape +1.name = STRING:Arrows +1.up.1 = STRING:key Up +1.down.1 = STRING:key Down +1.left.1 = STRING:key Left +1.right.1 = STRING:key Right +1.weapon.1 = STRING:key RightControl +1.special.1 = STRING:key RightShift +1.up.2 = STRING:key Keypad-8 +1.down.2 = STRING:key Keypad-2 +1.left.2 = STRING:key Keypad-4 +1.right.2 = STRING:key Keypad-6 +1.weapon.2 = STRING:key Return +1.special.2 = STRING:key Keypad-0 +1.escape.1 = STRING:key Escape -keys.2.name = WASD -keys.2.up.1 = key w -keys.2.down.1 = key s -keys.2.left.1 = key a -keys.2.right.1 = key d -keys.2.weapon.1 = key v -keys.2.special.1 = key b -keys.2.escape.1 = key Escape +2.name = STRING:WASD +2.up.1 = STRING:key w +2.down.1 = STRING:key s +2.left.1 = STRING:key a +2.right.1 = STRING:key d +2.weapon.1 = STRING:key v +2.special.1 = STRING:key b +2.escape.1 = STRING:key Escape -keys.3.name = Arrows (2) -keys.3.up.1 = key Up -keys.3.down.1 = key Down -keys.3.left.1 = key Left -keys.3.right.1 = key Right -keys.3.up.2 = key Keypad-8 -keys.3.down.2 = key Keypad-2 -keys.3.left.2 = key Keypad-4 -keys.3.right.2 = key Keypad-6 -keys.3.weapon.1 = key ] -keys.3.special.1 = key [ -keys.3.escape.1 = key Escape +3.name = STRING:Arrows (2) +3.up.1 = STRING:key Up +3.down.1 = STRING:key Down +3.left.1 = STRING:key Left +3.right.1 = STRING:key Right +3.up.2 = STRING:key Keypad-8 +3.down.2 = STRING:key Keypad-2 +3.left.2 = STRING:key Keypad-4 +3.right.2 = STRING:key Keypad-6 +3.weapon.1 = STRING:key ] +3.special.1 = STRING:key [ +3.escape.1 = STRING:key Escape -keys.4.name = ESDF -keys.4.up.1 = key e -keys.4.down.1 = key d -keys.4.left.1 = key s -keys.4.right.1 = key f -keys.4.weapon.1 = key q -keys.4.special.1 = key a -keys.4.escape.1 = key Escape +4.name = STRING:ESDF +4.up.1 = STRING:key e +4.down.1 = STRING:key d +4.left.1 = STRING:key s +4.right.1 = STRING:key f +4.weapon.1 = STRING:key q +4.special.1 = STRING:key a +4.escape.1 = STRING:key Escape -keys.5.name = Joystick 1 -keys.5.up.1 = joystick 0 axis 1 negative -keys.5.down.1 = joystick 0 axis 1 positive -keys.5.left.1 = joystick 0 axis 0 negative -keys.5.right.1 = joystick 0 axis 0 positive -keys.5.up.2 = joystick 0 hat 0 up -keys.5.down.2 = joystick 0 hat 0 down -keys.5.left.2 = joystick 0 hat 0 left -keys.5.right.2 = joystick 0 hat 0 right -keys.5.weapon.1 = joystick 0 button 0 -keys.5.special.1 = joystick 0 button 1 -keys.5.escape.1 = key Escape +5.name = STRING:Joystick 1 +5.up.1 = STRING:joystick 0 axis 1 negative +5.down.1 = STRING:joystick 0 axis 1 positive +5.left.1 = STRING:joystick 0 axis 0 negative +5.right.1 = STRING:joystick 0 axis 0 positive +5.up.2 = STRING:joystick 0 hat 0 up +5.down.2 = STRING:joystick 0 hat 0 down +5.left.2 = STRING:joystick 0 hat 0 left +5.right.2 = STRING:joystick 0 hat 0 right +5.weapon.1 = STRING:joystick 0 button 0 +5.special.1 = STRING:joystick 0 button 1 +5.escape.1 = STRING:key Escape -keys.6.name = Joystick 2 -keys.6.up.1 = joystick 1 axis 1 negative -keys.6.down.1 = joystick 1 axis 1 positive -keys.6.left.1 = joystick 1 axis 0 negative -keys.6.right.1 = joystick 1 axis 0 positive -keys.6.up.2 = joystick 1 hat 0 up -keys.6.down.2 = joystick 1 hat 0 down -keys.6.left.2 = joystick 1 hat 0 left -keys.6.right.2 = joystick 1 hat 0 right -keys.6.weapon.1 = joystick 1 button 0 -keys.6.special.1 = joystick 1 button 1 -keys.6.escape.1 = key Escape +6.name = STRING:Joystick 2 +6.up.1 = STRING:joystick 1 axis 1 negative +6.down.1 = STRING:joystick 1 axis 1 positive +6.left.1 = STRING:joystick 1 axis 0 negative +6.right.1 = STRING:joystick 1 axis 0 positive +6.up.2 = STRING:joystick 1 hat 0 up +6.down.2 = STRING:joystick 1 hat 0 down +6.left.2 = STRING:joystick 1 hat 0 left +6.right.2 = STRING:joystick 1 hat 0 right +6.weapon.1 = STRING:joystick 1 button 0 +6.special.1 = STRING:joystick 1 button 1 +6.escape.1 = STRING:key Escape Modified: trunk/sc2/src/sc2code/libs/input/sdl/input.c =================================================================== --- trunk/sc2/src/sc2code/libs/input/sdl/input.c 2009-02-08 09:27:07 UTC (rev 3107) +++ trunk/sc2/src/sc2code/libs/input/sdl/input.c 2009-02-16 00:40:42 UTC (rev 3108) @@ -146,11 +146,10 @@ static void initKeyConfig (void) { - uio_Stream *fp; int i; /* First, load in the menu keys */ - res_LoadFilename (contentDir, "menu.key", NULL); + LoadResourceIndex (contentDir, "menu.key", "menu."); for (i = 0; i < NUM_MENU_KEYS; i++) { if (!menu_res_names[i]) @@ -158,30 +157,15 @@ register_menu_controls (i); } - fp = res_OpenResFile (configDir, "flight.cfg", "rt"); - if (!fp) + LoadResourceIndex (configDir, "flight.cfg", "keys."); + if (!res_HasKey ("keys.1.name")) { - if (copyFile (contentDir, "uqm.key", - configDir, "flight.cfg") == -1) - { - log_add (log_Fatal, "Error: Could not copy default key config " - "to user config dir: %s.", strerror (errno)); - exit (EXIT_FAILURE); - } - log_add (log_Info, "Copying default key config file to user " - "config dir."); - - if ((fp = res_OpenResFile (configDir, "flight.cfg", "rt")) == NULL) - { - log_add (log_Fatal, "Error: Could not open flight.cfg"); - exit (EXIT_FAILURE); - } + /* Either flight.cfg doesn't exist, or we're using an old version + of flight.cfg, and thus we wound up loading untyped values into + 'keys.keys.1.name' and such. Load the defaults from the content + directory. */ + LoadResourceIndex (contentDir, "uqm.key", "keys."); } - - res_LoadFile (fp, NULL); - // TODO RES070 - // res_LoadFile (fp, "keys."); - res_CloseResFile (fp); register_flight_controls (); @@ -454,16 +438,7 @@ void SaveKeyConfiguration (uio_DirHandle *path, const char *fname) { - uio_Stream *f; - - f = res_OpenResFile (path, fname, "wb"); - if (f) - { - res_SaveFile (f, "keys.", FALSE); - // TODO RES070 - // res_SaveFile (f, "keys.", TRUE); - res_CloseResFile (f); - } + SaveResourceIndex (path, fname, "keys.", TRUE); } void Modified: trunk/sc2/src/sc2code/libs/reslib.h =================================================================== --- trunk/sc2/src/sc2code/libs/reslib.h 2009-02-08 09:27:07 UTC (rev 3107) +++ trunk/sc2/src/sc2code/libs/reslib.h 2009-02-16 00:40:42 UTC (rev 3108) @@ -59,7 +59,6 @@ BOOLEAN res_CloseResFile (uio_Stream *fp); BOOLEAN DeleteResFile (uio_DirHandle *dir, const char *filename); -RESOURCE_INDEX InitResourceSystem (); void UninitResourceSystem (void); BOOLEAN InstallResTypeVectors (const char *res_type, ResourceLoadFun *loadFun, ResourceFreeFun *freeFun, ResourceStringFun *stringFun); void *res_GetResource (RESOURCE res); @@ -99,14 +98,7 @@ #define GetDirEntryContents GetStringContents /* Key-Value resources */ -void res_ClearTables (void); -void res_LoadFilename (uio_DirHandle *path, const char *fname, const char *prefix); -void res_SaveFilename (uio_DirHandle *path, const char *fname, const char *root, BOOLEAN strip_root); - -void res_LoadFile (uio_Stream *fname, const char *prefix); -void res_SaveFile (uio_Stream *fname, const char *root, BOOLEAN strip_root); - BOOLEAN res_HasKey (const char *key); const char *res_GetString (const char *key); Modified: trunk/sc2/src/sc2code/libs/resource/Makeinfo =================================================================== --- trunk/sc2/src/sc2code/libs/resource/Makeinfo 2009-02-08 09:27:07 UTC (rev 3107) +++ trunk/sc2/src/sc2code/libs/resource/Makeinfo 2009-02-16 00:40:42 UTC (rev 3108) @@ -1,2 +1,2 @@ -uqm_CFILES="direct.c filecntl.c getres.c loadres.c mapres.c - propfile.c resdata.c resinit.c stringbank.c" +uqm_CFILES="direct.c filecntl.c getres.c loadres.c stringbank.c + propfile.c resinit.c" Deleted: trunk/sc2/src/sc2code/libs/resource/mapres.c =================================================================== --- trunk/sc2/src/sc2code/libs/resource/mapres.c 2009-02-08 09:27:07 UTC (rev 3107) +++ trunk/sc2/src/sc2code/libs/resource/mapres.c 2009-02-16 00:40:42 UTC (rev 3108) @@ -1,250 +0,0 @@ -/* mapres.c, Copyright (c) 2005 Michael C. Martin */ - -/* - * 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 thta it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Se 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 <stdlib.h> -#include <string.h> -#include <ctype.h> -#include "libs/reslib.h" -#include "libs/log.h" -#include "libs/uio/charhashtable.h" -#include "propfile.h" -#include "stringbank.h" - -/* The CharHashTable owns its keys, but not its values. We will keep the - values in a StringBank. */ - -static CharHashTable_HashTable *map = NULL; -static stringbank *bank = NULL; - -static void -check_map_init (void) -{ - if (map == NULL) { - map = CharHashTable_newHashTable (NULL, NULL, NULL, NULL, 0, 0.85, 0.9); - } - if (bank == NULL) { - bank = StringBank_Create (); - } -} - -void -res_ClearTables (void) -{ - if (map != NULL) { - CharHashTable_deleteHashTable (map); - map = NULL; - } - if (bank != NULL) { - StringBank_Free (bank); - bank = NULL; - } -} - -BOOLEAN -res_Remove (const char *key) -{ - return CharHashTable_remove (map, key); -} - -/* Type conversion routines. */ -static const char * -bool2str (BOOLEAN b) -{ - return b ? "yes" : "no"; -} - -static const char * -int2str (int i) { - char buf[20]; - sprintf (buf, "%d", i); - return StringBank_AddOrFindString (bank, buf); -} - -static int -str2int (const char *s) { - return atoi(s); -} - -static BOOLEAN -str2bool (const char *s) { - if (!strcasecmp (s, "yes") || - !strcasecmp (s, "true") || - !strcasecmp (s, "1") ) - return TRUE; - return FALSE; -} - -BOOLEAN -res_IsBoolean (const char *key) -{ - const char *d; - check_map_init (); - - d = res_GetString (key); - if (!d) return 0; - - return !strcasecmp (d, "yes") || - !strcasecmp (d, "no") || - !strcasecmp (d, "true") || - !strcasecmp (d, "false") || - !strcasecmp (d, "0") || - !strcasecmp (d, "1") || - !strcasecmp (d, ""); -} - -BOOLEAN -res_IsInteger (const char *key) -{ - const char *d; - check_map_init (); - - d = res_GetString (key); - while (*d) { - if (!isdigit (*d)) - return 0; - d++; - } - return 1; -} - -const char * -res_GetString (const char *key) -{ - check_map_init (); - return CharHashTable_find (map, key); -} - -void -res_PutString (const char *key, const char *value) -{ - check_map_init (); - - value = StringBank_AddOrFindString (bank, value); - if (!CharHashTable_add (map, key, (void *)value)) - { - CharHashTable_remove (map, key); - CharHashTable_add (map, key, (void *)value); - } -} - -int -res_GetInteger (const char *key) -{ - check_map_init (); - return str2int (res_GetString (key)); -} - -void -res_PutInteger (const char *key, int value) -{ - check_map_init (); - res_PutString (key, int2str(value)); -} - -BOOLEAN -res_GetBoolean (const char *key) -{ - check_map_init (); - return str2bool (res_GetString (key)); -} - -void -res_PutBoolean (const char *key, BOOLEAN value) -{ - check_map_init (); - res_PutString (key, bool2str(value)); -} - -BOOLEAN -res_HasKey (const char *key) -{ - check_map_init (); - return (res_GetString (key) != NULL); -} - -void -res_LoadFile (uio_Stream *s, const char *prefix) -{ - check_map_init (); - - if (!map) - { - return; - } - - PropFile_from_file (s, res_PutString, prefix); -} - -void -res_LoadFilename (uio_DirHandle *path, const char *fname, const char *prefix) -{ - check_map_init (); - - if (!map) - { - return; - } - - PropFile_from_filename (path, fname, res_PutString, prefix); -} - -void -res_SaveFile (uio_Stream *f, const char *prefix, BOOLEAN strip_root) -{ - CharHashTable_Iterator *i; - int prefix_len = 0; - - if (prefix) - prefix_len = strlen (prefix); - - check_map_init (); - - i = CharHashTable_getIterator (map); - while (!CharHashTable_iteratorDone (i)) - { - const char *key = CharHashTable_iteratorKey (i); - const char *value = (const char *)CharHashTable_iteratorValue (i); - if (!prefix || !strncmp (prefix, key, prefix_len)) { - if (prefix && strip_root) { - WriteResFile (key+prefix_len, 1, strlen (key) - prefix_len, f); - } else { - WriteResFile (key, 1, strlen (key), f); - } - PutResFileChar(' ', f); - PutResFileChar('=', f); - PutResFileChar(' ', f); - WriteResFile (value, 1, strlen (value), f); - PutResFileNewline(f); - } - i = CharHashTable_iteratorNext (i); - } - CharHashTable_freeIterator (i); -} - -void -res_SaveFilename (uio_DirHandle *path, const char *fname, const char *prefix, BOOLEAN strip_root) -{ - uio_Stream *f; - - check_map_init (); - f = res_OpenResFile (path, fname, "wb"); - if (f) { - res_SaveFile (f, prefix, strip_root); - res_CloseResFile (f); - } -} Deleted: trunk/sc2/src/sc2code/libs/resource/resdata.c =================================================================== --- trunk/sc2/src/sc2code/libs/resource/resdata.c 2009-02-08 09:27:07 UTC (rev 3107) +++ trunk/sc2/src/sc2code/libs/resource/resdata.c 2009-02-16 00:40:42 UTC (rev 3108) @@ -1,34 +0,0 @@ -//Copyright Paul Reiche, Fred Ford. 1992-2002 - -/* - * 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 "resintrn.h" - -static RESOURCE_INDEX curResourceIndex; - -void -_set_current_index_header (RESOURCE_INDEX newResourceIndex) -{ - curResourceIndex = newResourceIndex; -} - -RESOURCE_INDEX -_get_current_index_header (void) -{ - return curResourceIndex; -} - Modified: trunk/sc2/src/sc2code/libs/resource/resinit.c =================================================================== --- trunk/sc2/src/sc2code/libs/resource/resinit.c 2009-02-08 09:27:07 UTC (rev 3107) +++ trunk/sc2/src/sc2code/libs/resource/resinit.c 2009-02-16 00:40:42 UTC (rev 3108) @@ -23,6 +23,7 @@ #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" @@ -127,18 +128,7 @@ { if (!CharHashTable_add (map, key, newDesc)) { - ResourceDesc *oldDesc = (ResourceDesc *)CharHashTable_find (map, key); - if (oldDesc != NULL) - { - if (newDesc->resdata.ptr != NULL) - { - /* XXX: It might be nice to actually clean it up properly */ - log_add (log_Warning, "LEAK WARNING: Replaced '%s' while it was live", key); - } - HFree (oldDesc->fname); - HFree (oldDesc); - } - CharHashTable_remove (map, key); + res_Remove (key); CharHashTable_add (map, key, newDesc); } } @@ -188,9 +178,20 @@ snprintf (buf, size, "%s", resdata->num ? "true" : "false"); } +static RESOURCE_INDEX curResourceIndex; + +void +_set_current_index_header (RESOURCE_INDEX newResourceIndex) +{ + curResourceIndex = newResourceIndex; +} + RESOURCE_INDEX InitResourceSystem (void) { + if (curResourceIndex) { + return curResourceIndex; + } RESOURCE_INDEX ndx = allocResourceIndex (); _set_current_index_header (ndx); @@ -208,6 +209,15 @@ return ndx; } +RESOURCE_INDEX +_get_current_index_header (void) +{ + if (!curResourceIndex) { + InitResourceSystem (); + } + return curResourceIndex; +} + void LoadResourceIndex (uio_DirHandle *dir, const char *rmpfile, const char *prefix) { @@ -304,3 +314,123 @@ map = _get_current_index_header ()->map; return CharHashTable_add (map, key, result) != 0; } + +/* These replace the mapres.c calls and probably should be split out at some point. */ +const char * +res_GetString (const char *key) +{ + RESOURCE_INDEX idx = _get_current_index_header (); + ResourceDesc *desc = lookupResourceDesc (idx, key); + if (!desc || !desc->resdata.ptr || strcmp(desc->vtable->resType, "STRING")) + return NULL; + return (const char *)desc->resdata.ptr; +} + +void +res_PutString (const char *key, const char *value) +{ + RESOURCE_INDEX idx = _get_current_index_header (); + ResourceDesc *desc = lookupResourceDesc (idx, key); + int srclen, dstlen; + if (!desc || !desc->resdata.ptr || strcmp(desc->vtable->resType, "STRING")) + { + /* TODO: This is kind of roundabout. We can do better by refactoring newResourceDesc */ + process_resource_desc(key, "STRING:undefined"); + desc = lookupResourceDesc (idx, key); + } + srclen = strlen (value); + dstlen = strlen (desc->resdata.ptr); + if (srclen > dstlen) { + char *newValue = HMalloc(srclen + 1); + char *oldValue = desc->fname; + log_add(log_Warning, "Reallocating string space for '%s'", key); + strncpy (newValue, value, srclen + 1); + desc->resdata.ptr = newValue; + desc->fname = newValue; + HFree (oldValue); + } else { + strncpy (desc->resdata.ptr, value, srclen + 1); + } +} + +int +res_GetInteger (const char *key) +{ + RESOURCE_INDEX idx = _get_current_index_header (); + ResourceDesc *desc = lookupResourceDesc (idx, key); + if (!desc || strcmp(desc->vtable->resType, "INT32")) + { + // TODO: Better error handling + return 0; + } + return desc->resdata.num; +} + +void +res_PutInteger (const char *key, int value) +{ + RESOURCE_INDEX idx = _get_current_index_header (); + ResourceDesc *desc = lookupResourceDesc (idx, key); + if (!desc || strcmp(desc->vtable->resType, "INT32")) + { + /* TODO: This is kind of roundabout. We can do better by refactoring newResourceDesc */ + process_resource_desc(key, "INT32:0"); + desc = lookupResourceDesc (idx, key); + } + desc->resdata.num = value; +} + +BOOLEAN +res_GetBoolean (const char *key) +{ + RESOURCE_INDEX idx = _get_current_index_header (); + ResourceDesc *desc = lookupResourceDesc (idx, key); + if (!desc || strcmp(desc->vtable->resType, "BOOLEAN")) + { + // TODO: Better error handling + return FALSE; + } + return desc->resdata.num ? TRUE : FALSE; +} + +void +res_PutBoolean (const char *key, BOOLEAN value) +{ + RESOURCE_INDEX idx = _get_current_index_header (); + ResourceDesc *desc = lookupResourceDesc (idx, key); + if (!desc || strcmp(desc->vtable->resType, "BOOLEAN")) + { + /* TODO: This is kind of roundabout. We can do better by refactoring newResourceDesc */ + process_resource_desc(key, "BOOLEAN:false"); + desc = lookupResourceDesc (idx, key); + } + desc->resdata.num = value; +} + +BOOLEAN +res_HasKey (const char *key) +{ + RESOURCE_INDEX idx = _get_current_index_header (); + return (lookupResourceDesc(idx, key) != NULL); +} + +BOOLEAN +res_Remove (const char *key) +{ + CharHashTable_HashTable *map = _get_current_index_header ()->map; + ResourceDesc *oldDesc = (ResourceDesc *)CharHashTable_find (map, key); + if (oldDesc != NULL) + { + if (oldDesc->resdata.ptr != NULL) + { + log_add (log_Warning, "WARNING: Replacing '%s' while it is live", key); + if (oldDesc->vtable && oldDesc->vtable->freeFun) + { + oldDesc->vtable->freeFun(oldDesc->resdata.ptr); + } + } + HFree (oldDesc->fname); + HFree (oldDesc); + } + return CharHashTable_remove (map, key); +} Modified: trunk/sc2/src/sc2code/setupmenu.c =================================================================== --- trunk/sc2/src/sc2code/setupmenu.c 2009-02-08 09:27:07 UTC (rev 3107) +++ trunk/sc2/src/sc2code/setupmenu.c 2009-02-16 00:40:42 UTC (rev 3108) @@ -328,6 +328,7 @@ static void change_template (WIDGET_CHOICE *self, int oldval) { + (void) oldval; populate_editkeys (self->selected); } @@ -517,8 +518,6 @@ static BOOLEAN OnTextEntryFrame (TEXTENTRY_STATE *pTES) { - WIDGET_TEXTENTRY *widget = (WIDGET_TEXTENTRY *) pTES->CbParam; - redraw_menu (); SleepThreadUntil (pTES->NextTime); @@ -1371,8 +1370,6 @@ res_PutString ("keys.5.name", input_templates[4].name); res_PutString ("keys.6.name", input_templates[5].name); - res_SaveFilename (configDir, "uqm.cfg", "config.", FALSE); - // TODO RES070 - // res_SaveFilename (configDir, "uqm.cfg", "config.", TRUE); + SaveResourceIndex (configDir, "uqm.cfg", "config.", TRUE); SaveKeyConfiguration (configDir, "flight.cfg"); } Modified: trunk/sc2/src/starcon2.c =================================================================== --- trunk/sc2/src/starcon2.c 2009-02-08 09:27:07 UTC (rev 3107) +++ trunk/sc2/src/starcon2.c 2009-02-16 00:40:42 UTC (rev 3108) @@ -103,6 +103,7 @@ const char *optName); static int parseFloatOption (const char *str, float *f, const char *optName); +static void parseIntVolume (int intVol, float *vol); static int parseVolume (const char *str, float *vol, const char *optName); static int InvalidArgument (const char *supplied, const char *opt_name); static int Check_PC_3DO_opt (const char *value, DWORD mask, const char *opt, @@ -210,9 +211,7 @@ PlayerControls[1] = CONTROL_TEMPLATE_JOY_1; // Fill in the options struct based on uqm.cfg - res_LoadFilename (configDir, "uqm.cfg", NULL); - // TODO RES070 - // res_LoadFilename (configDir, "uqm.cfg", "config."); + LoadResourceIndex (configDir, "uqm.cfg", "config."); if (res_HasKey ("config.reswidth")) { @@ -381,18 +380,18 @@ } if (res_HasKey ("config.musicvol")) { - parseVolume (res_GetString ("config.musicvol"), - &options.musicVolumeScale, "music volume"); + parseIntVolume (res_GetInteger ("config.musicvol"), + &options.musicVolumeScale); } if (res_HasKey ("config.sfxvol")) { - parseVolume (res_GetString ("config.sfxvol"), - &options.sfxVolumeScale, "SFX volume"); + parseIntVolume (res_GetInteger ("config.sfxvol"), + &options.sfxVolumeScale); } if (res_HasKey ("config.speechvol")) { - parseVolume (res_GetString ("config.speechvol"), - &options.speechVolumeScale, "speech volume"); + parseIntVolume (res_GetInteger ("config.speechvol"), + &options.speechVolumeScale); } { /* remove old control template names */ @@ -907,6 +906,25 @@ return EXIT_SUCCESS; } +static void +parseIntVolume (int intVol, float *vol) +{ + if (intVol < 0) + { + *vol = 0.0f; + return; + } + + if (intVol > 100) + { + *vol = 1.0f; + return; + } + + *vol = intVol / 100.0f; + return; +} + static int parseVolume (const char *str, float *vol, const char *optName) { @@ -925,20 +943,7 @@ "for '%s'.", optName); return -1; } - - if (intVol < 0) - { - *vol = 0.0f; - return 0; - } - - if (intVol > 100) - { - *vol = 1.0f; - return 0; - } - - *vol = intVol / 100.0f; + parseIntVolume (intVol, vol); return 0; } Modified: trunk/sc2/src/uqmversion.h =================================================================== --- trunk/sc2/src/uqmversion.h 2009-02-08 09:27:07 UTC (rev 3107) +++ trunk/sc2/src/uqmversion.h 2009-02-16 00:40:42 UTC (rev 3108) @@ -21,8 +21,8 @@ #define UQM_MAJOR_VERSION_S "0" #define UQM_MINOR_VERSION 6 #define UQM_MINOR_VERSION_S "6" -#define UQM_PATCH_VERSION 4 -#define UQM_PATCH_VERSION_S "4" +#define UQM_PATCH_VERSION 5 +#define UQM_PATCH_VERSION_S "5" #define UQM_EXTRA_VERSION "" /* The final version is interpreted as: * printf ("%d.%d.%d%s", UQM_MAJOR_VERSION, UQM_MINOR_VERSION, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcm...@us...> - 2009-02-16 02:22:21
|
Revision: 3110 http://sc2.svn.sourceforge.net/sc2/?rev=3110&view=rev Author: mcmartin Date: 2009-02-16 01:57:52 +0000 (Mon, 16 Feb 2009) Log Message: ----------- Fixes for building on MSVS 2005 - these should also suffice for MSVC6. Modified Paths: -------------- trunk/sc2/doc/devel/versions trunk/sc2/src/sc2code/libs/resource/resinit.c Modified: trunk/sc2/doc/devel/versions =================================================================== --- trunk/sc2/doc/devel/versions 2009-02-16 01:23:20 UTC (rev 3109) +++ trunk/sc2/doc/devel/versions 2009-02-16 01:57:52 UTC (rev 3110) @@ -34,3 +34,4 @@ Version 0.6.2: Revision 2669 Version 0.6.3: Revision 2828 Version 0.6.4: Revision 2869 +Version 0.6.5: Revision 3110 Modified: trunk/sc2/src/sc2code/libs/resource/resinit.c =================================================================== --- trunk/sc2/src/sc2code/libs/resource/resinit.c 2009-02-16 01:23:20 UTC (rev 3109) +++ trunk/sc2/src/sc2code/libs/resource/resinit.c 2009-02-16 01:57:52 UTC (rev 3110) @@ -189,10 +189,11 @@ RESOURCE_INDEX InitResourceSystem (void) { + RESOURCE_INDEX ndx; if (curResourceIndex) { return curResourceIndex; } - RESOURCE_INDEX ndx = allocResourceIndex (); + ndx = allocResourceIndex (); _set_current_index_header (ndx); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2009-06-26 20:38:07
|
Revision: 3152 http://sc2.svn.sourceforge.net/sc2/?rev=3152&view=rev Author: avolkov Date: 2009-06-26 20:38:05 +0000 (Fri, 26 Jun 2009) Log Message: ----------- Micro font: moved BULLET char to rightful Unicode spot; restored ASTERISK Modified Paths: -------------- trunk/sc2/src/sc2code/comm.c trunk/sc2/src/sc2code/libs/strlib.h Added Paths: ----------- trunk/sc2/content/base/fonts/player.fon/42.png trunk/sc2/content/base/fonts/player.fon/8226.png Removed Paths: ------------- trunk/sc2/content/base/fonts/player.fon/42.png Deleted: trunk/sc2/content/base/fonts/player.fon/42.png =================================================================== (Binary files differ) Copied: trunk/sc2/content/base/fonts/player.fon/42.png (from rev 2984, trunk/sc2/content/comm/comandr/comandr.fon/42.png) =================================================================== (Binary files differ) Copied: trunk/sc2/content/base/fonts/player.fon/8226.png (from rev 3151, trunk/sc2/content/base/fonts/player.fon/42.png) =================================================================== (Binary files differ) Modified: trunk/sc2/src/sc2code/comm.c =================================================================== --- trunk/sc2/src/sc2code/comm.c 2009-06-26 20:01:56 UTC (rev 3151) +++ trunk/sc2/src/sc2code/comm.c 2009-06-26 20:38:05 UTC (rev 3152) @@ -198,7 +198,7 @@ locText = *pTextIn; locText.baseline.x -= 8; locText.CharCount = (COUNT)~0; - locText.pStr = "*"; + locText.pStr = STR_BULLET; font_DrawText (&locText); locText = *pTextIn; Modified: trunk/sc2/src/sc2code/libs/strlib.h =================================================================== --- trunk/sc2/src/sc2code/libs/strlib.h 2009-06-26 20:01:56 UTC (rev 3151) +++ trunk/sc2/src/sc2code/libs/strlib.h 2009-06-26 20:38:05 UTC (rev 3152) @@ -92,6 +92,8 @@ #define STR_EARTH_SIGN "\xE2\x99\x81" #define WCHAR_MIDDLE_DOT 0x00b7 #define STR_MIDDLE_DOT "\xC2\xB7" +#define WCHAR_BULLET 0x2022 +#define STR_BULLET "\xE2\x80\xA2" #endif /* _STRLIB_H */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2009-06-28 23:43:55
|
Revision: 3157 http://sc2.svn.sourceforge.net/sc2/?rev=3157&view=rev Author: avolkov Date: 2009-06-28 23:43:08 +0000 (Sun, 28 Jun 2009) Log Message: ----------- Content reorg: font chars now use hexadecimal numbering to match the Unicode standard Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/src/sc2code/libs/graphics/sdl/3do_getbody.c Added Paths: ----------- trunk/sc2/content/base/fonts/arilou.fon/00020.png trunk/sc2/content/base/fonts/arilou.fon/00021.png trunk/sc2/content/base/fonts/arilou.fon/00022.png trunk/sc2/content/base/fonts/arilou.fon/00023.png trunk/sc2/content/base/fonts/arilou.fon/00024.png trunk/sc2/content/base/fonts/arilou.fon/00025.png trunk/sc2/content/base/fonts/arilou.fon/00026.png trunk/sc2/content/base/fonts/arilou.fon/00027.png trunk/sc2/content/base/fonts/arilou.fon/00028.png trunk/sc2/content/base/fonts/arilou.fon/00029.png trunk/sc2/content/base/fonts/arilou.fon/0002a.png trunk/sc2/content/base/fonts/arilou.fon/0002b.png trunk/sc2/content/base/fonts/arilou.fon/0002c.png trunk/sc2/content/base/fonts/arilou.fon/0002d.png trunk/sc2/content/base/fonts/arilou.fon/0002e.png trunk/sc2/content/base/fonts/arilou.fon/0002f.png trunk/sc2/content/base/fonts/arilou.fon/00030.png trunk/sc2/content/base/fonts/arilou.fon/00031.png trunk/sc2/content/base/fonts/arilou.fon/00032.png trunk/sc2/content/base/fonts/arilou.fon/00033.png trunk/sc2/content/base/fonts/arilou.fon/00034.png trunk/sc2/content/base/fonts/arilou.fon/00035.png trunk/sc2/content/base/fonts/arilou.fon/00036.png trunk/sc2/content/base/fonts/arilou.fon/00037.png trunk/sc2/content/base/fonts/arilou.fon/00038.png trunk/sc2/content/base/fonts/arilou.fon/00039.png trunk/sc2/content/base/fonts/arilou.fon/0003a.png trunk/sc2/content/base/fonts/arilou.fon/0003b.png trunk/sc2/content/base/fonts/arilou.fon/0003c.png trunk/sc2/content/base/fonts/arilou.fon/0003d.png trunk/sc2/content/base/fonts/arilou.fon/0003e.png trunk/sc2/content/base/fonts/arilou.fon/0003f.png trunk/sc2/content/base/fonts/arilou.fon/00040.png trunk/sc2/content/base/fonts/arilou.fon/00041.png trunk/sc2/content/base/fonts/arilou.fon/00042.png trunk/sc2/content/base/fonts/arilou.fon/00043.png trunk/sc2/content/base/fonts/arilou.fon/00044.png trunk/sc2/content/base/fonts/arilou.fon/00045.png trunk/sc2/content/base/fonts/arilou.fon/00046.png trunk/sc2/content/base/fonts/arilou.fon/00047.png trunk/sc2/content/base/fonts/arilou.fon/00048.png trunk/sc2/content/base/fonts/arilou.fon/00049.png trunk/sc2/content/base/fonts/arilou.fon/0004a.png trunk/sc2/content/base/fonts/arilou.fon/0004b.png trunk/sc2/content/base/fonts/arilou.fon/0004c.png trunk/sc2/content/base/fonts/arilou.fon/0004d.png trunk/sc2/content/base/fonts/arilou.fon/0004e.png trunk/sc2/content/base/fonts/arilou.fon/0004f.png trunk/sc2/content/base/fonts/arilou.fon/00050.png trunk/sc2/content/base/fonts/arilou.fon/00051.png trunk/sc2/content/base/fonts/arilou.fon/00052.png trunk/sc2/content/base/fonts/arilou.fon/00053.png trunk/sc2/content/base/fonts/arilou.fon/00054.png trunk/sc2/content/base/fonts/arilou.fon/00055.png trunk/sc2/content/base/fonts/arilou.fon/00056.png trunk/sc2/content/base/fonts/arilou.fon/00057.png trunk/sc2/content/base/fonts/arilou.fon/00058.png trunk/sc2/content/base/fonts/arilou.fon/00059.png trunk/sc2/content/base/fonts/arilou.fon/0005a.png trunk/sc2/content/base/fonts/arilou.fon/0005b.png trunk/sc2/content/base/fonts/arilou.fon/0005c.png trunk/sc2/content/base/fonts/arilou.fon/0005d.png trunk/sc2/content/base/fonts/arilou.fon/0005e.png trunk/sc2/content/base/fonts/arilou.fon/0005f.png trunk/sc2/content/base/fonts/arilou.fon/00060.png trunk/sc2/content/base/fonts/arilou.fon/00061.png trunk/sc2/content/base/fonts/arilou.fon/00062.png trunk/sc2/content/base/fonts/arilou.fon/00063.png trunk/sc2/content/base/fonts/arilou.fon/00064.png trunk/sc2/content/base/fonts/arilou.fon/00065.png trunk/sc2/content/base/fonts/arilou.fon/00066.png trunk/sc2/content/base/fonts/arilou.fon/00067.png trunk/sc2/content/base/fonts/arilou.fon/00068.png trunk/sc2/content/base/fonts/arilou.fon/00069.png trunk/sc2/content/base/fonts/arilou.fon/0006a.png trunk/sc2/content/base/fonts/arilou.fon/0006b.png trunk/sc2/content/base/fonts/arilou.fon/0006c.png trunk/sc2/content/base/fonts/arilou.fon/0006d.png trunk/sc2/content/base/fonts/arilou.fon/0006e.png trunk/sc2/content/base/fonts/arilou.fon/0006f.png trunk/sc2/content/base/fonts/arilou.fon/00070.png trunk/sc2/content/base/fonts/arilou.fon/00071.png trunk/sc2/content/base/fonts/arilou.fon/00072.png trunk/sc2/content/base/fonts/arilou.fon/00073.png trunk/sc2/content/base/fonts/arilou.fon/00074.png trunk/sc2/content/base/fonts/arilou.fon/00075.png trunk/sc2/content/base/fonts/arilou.fon/00076.png trunk/sc2/content/base/fonts/arilou.fon/00077.png trunk/sc2/content/base/fonts/arilou.fon/00078.png trunk/sc2/content/base/fonts/arilou.fon/00079.png trunk/sc2/content/base/fonts/arilou.fon/0007a.png trunk/sc2/content/base/fonts/arilou.fon/0007b.png trunk/sc2/content/base/fonts/arilou.fon/0007c.png trunk/sc2/content/base/fonts/arilou.fon/0007d.png trunk/sc2/content/base/fonts/chmmr.fon/00020.png trunk/sc2/content/base/fonts/chmmr.fon/00021.png trunk/sc2/content/base/fonts/chmmr.fon/00022.png trunk/sc2/content/base/fonts/chmmr.fon/00023.png trunk/sc2/content/base/fonts/chmmr.fon/00024.png trunk/sc2/content/base/fonts/chmmr.fon/00025.png trunk/sc2/content/base/fonts/chmmr.fon/00026.png trunk/sc2/content/base/fonts/chmmr.fon/00027.png trunk/sc2/content/base/fonts/chmmr.fon/00028.png trunk/sc2/content/base/fonts/chmmr.fon/00029.png trunk/sc2/content/base/fonts/chmmr.fon/0002a.png trunk/sc2/content/base/fonts/chmmr.fon/0002b.png trunk/sc2/content/base/fonts/chmmr.fon/0002c.png trunk/sc2/content/base/fonts/chmmr.fon/0002d.png trunk/sc2/content/base/fonts/chmmr.fon/0002e.png trunk/sc2/content/base/fonts/chmmr.fon/0002f.png trunk/sc2/content/base/fonts/chmmr.fon/00030.png trunk/sc2/content/base/fonts/chmmr.fon/00031.png trunk/sc2/content/base/fonts/chmmr.fon/00032.png trunk/sc2/content/base/fonts/chmmr.fon/00033.png trunk/sc2/content/base/fonts/chmmr.fon/00034.png trunk/sc2/content/base/fonts/chmmr.fon/00035.png trunk/sc2/content/base/fonts/chmmr.fon/00036.png trunk/sc2/content/base/fonts/chmmr.fon/00037.png trunk/sc2/content/base/fonts/chmmr.fon/00038.png trunk/sc2/content/base/fonts/chmmr.fon/00039.png trunk/sc2/content/base/fonts/chmmr.fon/0003a.png trunk/sc2/content/base/fonts/chmmr.fon/0003b.png trunk/sc2/content/base/fonts/chmmr.fon/0003c.png trunk/sc2/content/base/fonts/chmmr.fon/0003d.png trunk/sc2/content/base/fonts/chmmr.fon/0003e.png trunk/sc2/content/base/fonts/chmmr.fon/0003f.png trunk/sc2/content/base/fonts/chmmr.fon/00041.png trunk/sc2/content/base/fonts/chmmr.fon/00042.png trunk/sc2/content/base/fonts/chmmr.fon/00043.png trunk/sc2/content/base/fonts/chmmr.fon/00044.png trunk/sc2/content/base/fonts/chmmr.fon/00045.png trunk/sc2/content/base/fonts/chmmr.fon/00046.png trunk/sc2/content/base/fonts/chmmr.fon/00047.png trunk/sc2/content/base/fonts/chmmr.fon/00048.png trunk/sc2/content/base/fonts/chmmr.fon/00049.png trunk/sc2/content/base/fonts/chmmr.fon/0004a.png trunk/sc2/content/base/fonts/chmmr.fon/0004b.png trunk/sc2/content/base/fonts/chmmr.fon/0004c.png trunk/sc2/content/base/fonts/chmmr.fon/0004d.png trunk/sc2/content/base/fonts/chmmr.fon/0004e.png trunk/sc2/content/base/fonts/chmmr.fon/0004f.png trunk/sc2/content/base/fonts/chmmr.fon/00050.png trunk/sc2/content/base/fonts/chmmr.fon/00051.png trunk/sc2/content/base/fonts/chmmr.fon/00052.png trunk/sc2/content/base/fonts/chmmr.fon/00053.png trunk/sc2/content/base/fonts/chmmr.fon/00054.png trunk/sc2/content/base/fonts/chmmr.fon/00055.png trunk/sc2/content/base/fonts/chmmr.fon/00056.png trunk/sc2/content/base/fonts/chmmr.fon/00057.png trunk/sc2/content/base/fonts/chmmr.fon/00058.png trunk/sc2/content/base/fonts/chmmr.fon/00059.png trunk/sc2/content/base/fonts/chmmr.fon/0005a.png trunk/sc2/content/base/fonts/chmmr.fon/0005b.png trunk/sc2/content/base/fonts/chmmr.fon/0005c.png trunk/sc2/content/base/fonts/chmmr.fon/0005d.png trunk/sc2/content/base/fonts/chmmr.fon/0005e.png trunk/sc2/content/base/fonts/chmmr.fon/0005f.png trunk/sc2/content/base/fonts/chmmr.fon/00060.png trunk/sc2/content/base/fonts/chmmr.fon/00061.png trunk/sc2/content/base/fonts/chmmr.fon/00062.png trunk/sc2/content/base/fonts/chmmr.fon/00063.png trunk/sc2/content/base/fonts/chmmr.fon/00064.png trunk/sc2/content/base/fonts/chmmr.fon/00065.png trunk/sc2/content/base/fonts/chmmr.fon/00066.png trunk/sc2/content/base/fonts/chmmr.fon/00067.png trunk/sc2/content/base/fonts/chmmr.fon/00068.png trunk/sc2/content/base/fonts/chmmr.fon/00069.png trunk/sc2/content/base/fonts/chmmr.fon/0006a.png trunk/sc2/content/base/fonts/chmmr.fon/0006b.png trunk/sc2/content/base/fonts/chmmr.fon/0006c.png trunk/sc2/content/base/fonts/chmmr.fon/0006d.png trunk/sc2/content/base/fonts/chmmr.fon/0006e.png trunk/sc2/content/base/fonts/chmmr.fon/0006f.png trunk/sc2/content/base/fonts/chmmr.fon/00070.png trunk/sc2/content/base/fonts/chmmr.fon/00071.png trunk/sc2/content/base/fonts/chmmr.fon/00072.png trunk/sc2/content/base/fonts/chmmr.fon/00073.png trunk/sc2/content/base/fonts/chmmr.fon/00074.png trunk/sc2/content/base/fonts/chmmr.fon/00075.png trunk/sc2/content/base/fonts/chmmr.fon/00076.png trunk/sc2/content/base/fonts/chmmr.fon/00077.png trunk/sc2/content/base/fonts/chmmr.fon/00078.png trunk/sc2/content/base/fonts/chmmr.fon/00079.png trunk/sc2/content/base/fonts/chmmr.fon/0007a.png trunk/sc2/content/base/fonts/chmmr.fon/0007b.png trunk/sc2/content/base/fonts/chmmr.fon/0007c.png trunk/sc2/content/base/fonts/chmmr.fon/0007d.png trunk/sc2/content/base/fonts/ilwrath.fon/00020.png trunk/sc2/content/base/fonts/ilwrath.fon/00021.png trunk/sc2/content/base/fonts/ilwrath.fon/00022.png trunk/sc2/content/base/fonts/ilwrath.fon/00023.png trunk/sc2/content/base/fonts/ilwrath.fon/00024.png trunk/sc2/content/base/fonts/ilwrath.fon/00025.png trunk/sc2/content/base/fonts/ilwrath.fon/00026.png trunk/sc2/content/base/fonts/ilwrath.fon/00027.png trunk/sc2/content/base/fonts/ilwrath.fon/00028.png trunk/sc2/content/base/fonts/ilwrath.fon/00029.png trunk/sc2/content/base/fonts/ilwrath.fon/0002a.png trunk/sc2/content/base/fonts/ilwrath.fon/0002b.png trunk/sc2/content/base/fonts/ilwrath.fon/0002c.png trunk/sc2/content/base/fonts/ilwrath.fon/0002d.png trunk/sc2/content/base/fonts/ilwrath.fon/0002e.png trunk/sc2/content/base/fonts/ilwrath.fon/0002f.png trunk/sc2/content/base/fonts/ilwrath.fon/00030.png trunk/sc2/content/base/fonts/ilwrath.fon/00031.png trunk/sc2/content/base/fonts/ilwrath.fon/00032.png trunk/sc2/content/base/fonts/ilwrath.fon/00033.png trunk/sc2/content/base/fonts/ilwrath.fon/00034.png trunk/sc2/content/base/fonts/ilwrath.fon/00035.png trunk/sc2/content/base/fonts/ilwrath.fon/00036.png trunk/sc2/content/base/fonts/ilwrath.fon/00037.png trunk/sc2/content/base/fonts/ilwrath.fon/00038.png trunk/sc2/content/base/fonts/ilwrath.fon/00039.png trunk/sc2/content/base/fonts/ilwrath.fon/0003a.png trunk/sc2/content/base/fonts/ilwrath.fon/0003b.png trunk/sc2/content/base/fonts/ilwrath.fon/0003c.png trunk/sc2/content/base/fonts/ilwrath.fon/0003d.png trunk/sc2/content/base/fonts/ilwrath.fon/0003e.png trunk/sc2/content/base/fonts/ilwrath.fon/0003f.png trunk/sc2/content/base/fonts/ilwrath.fon/00041.png trunk/sc2/content/base/fonts/ilwrath.fon/00042.png trunk/sc2/content/base/fonts/ilwrath.fon/00043.png trunk/sc2/content/base/fonts/ilwrath.fon/00044.png trunk/sc2/content/base/fonts/ilwrath.fon/00045.png trunk/sc2/content/base/fonts/ilwrath.fon/00046.png trunk/sc2/content/base/fonts/ilwrath.fon/00047.png trunk/sc2/content/base/fonts/ilwrath.fon/00048.png trunk/sc2/content/base/fonts/ilwrath.fon/00049.png trunk/sc2/content/base/fonts/ilwrath.fon/0004a.png trunk/sc2/content/base/fonts/ilwrath.fon/0004b.png trunk/sc2/content/base/fonts/ilwrath.fon/0004c.png trunk/sc2/content/base/fonts/ilwrath.fon/0004d.png trunk/sc2/content/base/fonts/ilwrath.fon/0004e.png trunk/sc2/content/base/fonts/ilwrath.fon/0004f.png trunk/sc2/content/base/fonts/ilwrath.fon/00050.png trunk/sc2/content/base/fonts/ilwrath.fon/00051.png trunk/sc2/content/base/fonts/ilwrath.fon/00052.png trunk/sc2/content/base/fonts/ilwrath.fon/00053.png trunk/sc2/content/base/fonts/ilwrath.fon/00054.png trunk/sc2/content/base/fonts/ilwrath.fon/00055.png trunk/sc2/content/base/fonts/ilwrath.fon/00056.png trunk/sc2/content/base/fonts/ilwrath.fon/00057.png trunk/sc2/content/base/fonts/ilwrath.fon/00058.png trunk/sc2/content/base/fonts/ilwrath.fon/00059.png trunk/sc2/content/base/fonts/ilwrath.fon/0005a.png trunk/sc2/content/base/fonts/ilwrath.fon/0005b.png trunk/sc2/content/base/fonts/ilwrath.fon/0005c.png trunk/sc2/content/base/fonts/ilwrath.fon/0005d.png trunk/sc2/content/base/fonts/ilwrath.fon/0005e.png trunk/sc2/content/base/fonts/ilwrath.fon/00060.png trunk/sc2/content/base/fonts/ilwrath.fon/00061.png trunk/sc2/content/base/fonts/ilwrath.fon/00062.png trunk/sc2/content/base/fonts/ilwrath.fon/00063.png trunk/sc2/content/base/fonts/ilwrath.fon/00064.png trunk/sc2/content/base/fonts/ilwrath.fon/00065.png trunk/sc2/content/base/fonts/ilwrath.fon/00066.png trunk/sc2/content/base/fonts/ilwrath.fon/00067.png trunk/sc2/content/base/fonts/ilwrath.fon/00068.png trunk/sc2/content/base/fonts/ilwrath.fon/00069.png trunk/sc2/content/base/fonts/ilwrath.fon/0006a.png trunk/sc2/content/base/fonts/ilwrath.fon/0006b.png trunk/sc2/content/base/fonts/ilwrath.fon/0006c.png trunk/sc2/content/base/fonts/ilwrath.fon/0006d.png trunk/sc2/content/base/fonts/ilwrath.fon/0006e.png trunk/sc2/content/base/fonts/ilwrath.fon/0006f.png trunk/sc2/content/base/fonts/ilwrath.fon/00070.png trunk/sc2/content/base/fonts/ilwrath.fon/00071.png trunk/sc2/content/base/fonts/ilwrath.fon/00072.png trunk/sc2/content/base/fonts/ilwrath.fon/00073.png trunk/sc2/content/base/fonts/ilwrath.fon/00074.png trunk/sc2/content/base/fonts/ilwrath.fon/00075.png trunk/sc2/content/base/fonts/ilwrath.fon/00076.png trunk/sc2/content/base/fonts/ilwrath.fon/00077.png trunk/sc2/content/base/fonts/ilwrath.fon/00078.png trunk/sc2/content/base/fonts/ilwrath.fon/00079.png trunk/sc2/content/base/fonts/ilwrath.fon/0007a.png trunk/sc2/content/base/fonts/kohrah.fon/00020.png trunk/sc2/content/base/fonts/kohrah.fon/00021.png trunk/sc2/content/base/fonts/kohrah.fon/00022.png trunk/sc2/content/base/fonts/kohrah.fon/00027.png trunk/sc2/content/base/fonts/kohrah.fon/00028.png trunk/sc2/content/base/fonts/kohrah.fon/00029.png trunk/sc2/content/base/fonts/kohrah.fon/0002a.png trunk/sc2/content/base/fonts/kohrah.fon/0002c.png trunk/sc2/content/base/fonts/kohrah.fon/0002d.png trunk/sc2/content/base/fonts/kohrah.fon/0002e.png trunk/sc2/content/base/fonts/kohrah.fon/0002f.png trunk/sc2/content/base/fonts/kohrah.fon/00030.png trunk/sc2/content/base/fonts/kohrah.fon/00031.png trunk/sc2/content/base/fonts/kohrah.fon/00032.png trunk/sc2/content/base/fonts/kohrah.fon/00033.png trunk/sc2/content/base/fonts/kohrah.fon/00034.png trunk/sc2/content/base/fonts/kohrah.fon/00035.png trunk/sc2/content/base/fonts/kohrah.fon/00036.png trunk/sc2/content/base/fonts/kohrah.fon/00037.png trunk/sc2/content/base/fonts/kohrah.fon/00038.png trunk/sc2/content/base/fonts/kohrah.fon/00039.png trunk/sc2/content/base/fonts/kohrah.fon/0003a.png trunk/sc2/content/base/fonts/kohrah.fon/0003b.png trunk/sc2/content/base/fonts/kohrah.fon/0003c.png trunk/sc2/content/base/fonts/kohrah.fon/0003d.png trunk/sc2/content/base/fonts/kohrah.fon/0003e.png trunk/sc2/content/base/fonts/kohrah.fon/0003f.png trunk/sc2/content/base/fonts/kohrah.fon/00041.png trunk/sc2/content/base/fonts/kohrah.fon/00042.png trunk/sc2/content/base/fonts/kohrah.fon/00043.png trunk/sc2/content/base/fonts/kohrah.fon/00044.png trunk/sc2/content/base/fonts/kohrah.fon/00045.png trunk/sc2/content/base/fonts/kohrah.fon/00046.png trunk/sc2/content/base/fonts/kohrah.fon/00047.png trunk/sc2/content/base/fonts/kohrah.fon/00048.png trunk/sc2/content/base/fonts/kohrah.fon/00049.png trunk/sc2/content/base/fonts/kohrah.fon/0004a.png trunk/sc2/content/base/fonts/kohrah.fon/0004b.png trunk/sc2/content/base/fonts/kohrah.fon/0004c.png trunk/sc2/content/base/fonts/kohrah.fon/0004d.png trunk/sc2/content/base/fonts/kohrah.fon/0004e.png trunk/sc2/content/base/fonts/kohrah.fon/0004f.png trunk/sc2/content/base/fonts/kohrah.fon/00050.png trunk/sc2/content/base/fonts/kohrah.fon/00051.png trunk/sc2/content/base/fonts/kohrah.fon/00052.png trunk/sc2/content/base/fonts/kohrah.fon/00053.png trunk/sc2/content/base/fonts/kohrah.fon/00054.png trunk/sc2/content/base/fonts/kohrah.fon/00055.png trunk/sc2/content/base/fonts/kohrah.fon/00056.png trunk/sc2/content/base/fonts/kohrah.fon/00057.png trunk/sc2/content/base/fonts/kohrah.fon/00058.png trunk/sc2/content/base/fonts/kohrah.fon/00059.png trunk/sc2/content/base/fonts/kohrah.fon/0005a.png trunk/sc2/content/base/fonts/kohrah.fon/0005b.png trunk/sc2/content/base/fonts/kohrah.fon/0005c.png trunk/sc2/content/base/fonts/kohrah.fon/0005d.png trunk/sc2/content/base/fonts/kohrah.fon/0005e.png trunk/sc2/content/base/fonts/kohrah.fon/00060.png trunk/sc2/content/base/fonts/kohrah.fon/00061.png trunk/sc2/content/base/fonts/kohrah.fon/00062.png trunk/sc2/content/base/fonts/kohrah.fon/00063.png trunk/sc2/content/base/fonts/kohrah.fon/00064.png trunk/sc2/content/base/fonts/kohrah.fon/00065.png trunk/sc2/content/base/fonts/kohrah.fon/00066.png trunk/sc2/content/base/fonts/kohrah.fon/00067.png trunk/sc2/content/base/fonts/kohrah.fon/00068.png trunk/sc2/content/base/fonts/kohrah.fon/00069.png trunk/sc2/content/base/fonts/kohrah.fon/0006a.png trunk/sc2/content/base/fonts/kohrah.fon/0006b.png trunk/sc2/content/base/fonts/kohrah.fon/0006c.png trunk/sc2/content/base/fonts/kohrah.fon/0006d.png trunk/sc2/content/base/fonts/kohrah.fon/0006e.png trunk/sc2/content/base/fonts/kohrah.fon/0006f.png trunk/sc2/content/base/fonts/kohrah.fon/00070.png trunk/sc2/content/base/fonts/kohrah.fon/00071.png trunk/sc2/content/base/fonts/kohrah.fon/00072.png trunk/sc2/content/base/fonts/kohrah.fon/00073.png trunk/sc2/content/base/fonts/kohrah.fon/00074.png trunk/sc2/content/base/fonts/kohrah.fon/00075.png trunk/sc2/content/base/fonts/kohrah.fon/00076.png trunk/sc2/content/base/fonts/kohrah.fon/00077.png trunk/sc2/content/base/fonts/kohrah.fon/00078.png trunk/sc2/content/base/fonts/kohrah.fon/00079.png trunk/sc2/content/base/fonts/kohrah.fon/0007a.png trunk/sc2/content/base/fonts/kohrah.fon/0007b.png trunk/sc2/content/base/fonts/kohrah.fon/0007c.png trunk/sc2/content/base/fonts/kohrah.fon/0007d.png trunk/sc2/content/base/fonts/lander.fon/00020.png trunk/sc2/content/base/fonts/lander.fon/00021.png trunk/sc2/content/base/fonts/lander.fon/00022.png trunk/sc2/content/base/fonts/lander.fon/00023.png trunk/sc2/content/base/fonts/lander.fon/00024.png trunk/sc2/content/base/fonts/lander.fon/00025.png trunk/sc2/content/base/fonts/lander.fon/00026.png trunk/sc2/content/base/fonts/lander.fon/00027.png trunk/sc2/content/base/fonts/lander.fon/00028.png trunk/sc2/content/base/fonts/lander.fon/00029.png trunk/sc2/content/base/fonts/lander.fon/0002a.png trunk/sc2/content/base/fonts/lander.fon/0002b.png trunk/sc2/content/base/fonts/lander.fon/0002c.png trunk/sc2/content/base/fonts/lander.fon/0002d.png trunk/sc2/content/base/fonts/lander.fon/0002e.png trunk/sc2/content/base/fonts/lander.fon/0002f.png trunk/sc2/content/base/fonts/lander.fon/00030.png trunk/sc2/content/base/fonts/lander.fon/00031.png trunk/sc2/content/base/fonts/lander.fon/00032.png trunk/sc2/content/base/fonts/lander.fon/00033.png trunk/sc2/content/base/fonts/lander.fon/00034.png trunk/sc2/content/base/fonts/lander.fon/00035.png trunk/sc2/content/base/fonts/lander.fon/00036.png trunk/sc2/content/base/fonts/lander.fon/00037.png trunk/sc2/content/base/fonts/lander.fon/00038.png trunk/sc2/content/base/fonts/lander.fon/00039.png trunk/sc2/content/base/fonts/lander.fon/0003a.png trunk/sc2/content/base/fonts/lander.fon/0003b.png trunk/sc2/content/base/fonts/lander.fon/0003c.png trunk/sc2/content/base/fonts/lander.fon/0003d.png trunk/sc2/content/base/fonts/lander.fon/0003e.png trunk/sc2/content/base/fonts/lander.fon/0003f.png trunk/sc2/content/base/fonts/lander.fon/00040.png trunk/sc2/content/base/fonts/lander.fon/00041.png trunk/sc2/content/base/fonts/lander.fon/00042.png trunk/sc2/content/base/fonts/lander.fon/00043.png trunk/sc2/content/base/fonts/lander.fon/00044.png trunk/sc2/content/base/fonts/lander.fon/00045.png trunk/sc2/content/base/fonts/lander.fon/00046.png trunk/sc2/content/base/fonts/lander.fon/00047.png trunk/sc2/content/base/fonts/lander.fon/00048.png trunk/sc2/content/base/fonts/lander.fon/00049.png trunk/sc2/content/base/fonts/lander.fon/0004a.png trunk/sc2/content/base/fonts/lander.fon/0004b.png trunk/sc2/content/base/fonts/lander.fon/0004c.png trunk/sc2/content/base/fonts/lander.fon/0004d.png trunk/sc2/content/base/fonts/lander.fon/0004e.png trunk/sc2/content/base/fonts/lander.fon/0004f.png trunk/sc2/content/base/fonts/lander.fon/00050.png trunk/sc2/content/base/fonts/lander.fon/00051.png trunk/sc2/content/base/fonts/lander.fon/00052.png trunk/sc2/content/base/fonts/lander.fon/00053.png trunk/sc2/content/base/fonts/lander.fon/00054.png trunk/sc2/content/base/fonts/lander.fon/00055.png trunk/sc2/content/base/fonts/lander.fon/00056.png trunk/sc2/content/base/fonts/lander.fon/00057.png trunk/sc2/content/base/fonts/lander.fon/00058.png trunk/sc2/content/base/fonts/lander.fon/00059.png trunk/sc2/content/base/fonts/lander.fon/0005a.png trunk/sc2/content/base/fonts/lander.fon/0005b.png trunk/sc2/content/base/fonts/lander.fon/0005c.png trunk/sc2/content/base/fonts/lander.fon/0005d.png trunk/sc2/content/base/fonts/lander.fon/0005e.png trunk/sc2/content/base/fonts/lander.fon/0005f.png trunk/sc2/content/base/fonts/lander.fon/00060.png trunk/sc2/content/base/fonts/lander.fon/0007b.png trunk/sc2/content/base/fonts/lander.fon/0007c.png trunk/sc2/content/base/fonts/lander.fon/0007d.png trunk/sc2/content/base/fonts/micro.fon/00020.png trunk/sc2/content/base/fonts/micro.fon/00021.png trunk/sc2/content/base/fonts/micro.fon/00022.png trunk/sc2/content/base/fonts/micro.fon/00023.png trunk/sc2/content/base/fonts/micro.fon/00024.png trunk/sc2/content/base/fonts/micro.fon/00025.png trunk/sc2/content/base/fonts/micro.fon/00026.png trunk/sc2/content/base/fonts/micro.fon/00027.png trunk/sc2/content/base/fonts/micro.fon/00028.png trunk/sc2/content/base/fonts/micro.fon/00029.png trunk/sc2/content/base/fonts/micro.fon/0002a.png trunk/sc2/content/base/fonts/micro.fon/0002b.png trunk/sc2/content/base/fonts/micro.fon/0002c.png trunk/sc2/content/base/fonts/micro.fon/0002d.png trunk/sc2/content/base/fonts/micro.fon/0002e.png trunk/sc2/content/base/fonts/micro.fon/0002f.png trunk/sc2/content/base/fonts/micro.fon/00030.png trunk/sc2/content/base/fonts/micro.fon/00031.png trunk/sc2/content/base/fonts/micro.fon/00032.png trunk/sc2/content/base/fonts/micro.fon/00033.png trunk/sc2/content/base/fonts/micro.fon/00034.png trunk/sc2/content/base/fonts/micro.fon/00035.png trunk/sc2/content/base/fonts/micro.fon/00036.png trunk/sc2/content/base/fonts/micro.fon/00037.png trunk/sc2/content/base/fonts/micro.fon/00038.png trunk/sc2/content/base/fonts/micro.fon/00039.png trunk/sc2/content/base/fonts/micro.fon/0003a.png trunk/sc2/content/base/fonts/micro.fon/0003b.png trunk/sc2/content/base/fonts/micro.fon/0003c.png trunk/sc2/content/base/fonts/micro.fon/0003d.png trunk/sc2/content/base/fonts/micro.fon/0003e.png trunk/sc2/content/base/fonts/micro.fon/0003f.png trunk/sc2/content/base/fonts/micro.fon/00040.png trunk/sc2/content/base/fonts/micro.fon/00041.png trunk/sc2/content/base/fonts/micro.fon/00042.png trunk/sc2/content/base/fonts/micro.fon/00043.png trunk/sc2/content/base/fonts/micro.fon/00044.png trunk/sc2/content/base/fonts/micro.fon/00045.png trunk/sc2/content/base/fonts/micro.fon/00046.png trunk/sc2/content/base/fonts/micro.fon/00047.png trunk/sc2/content/base/fonts/micro.fon/00048.png trunk/sc2/content/base/fonts/micro.fon/00049.png trunk/sc2/content/base/fonts/micro.fon/0004a.png trunk/sc2/content/base/fonts/micro.fon/0004b.png trunk/sc2/content/base/fonts/micro.fon/0004c.png trunk/sc2/content/base/fonts/micro.fon/0004d.png trunk/sc2/content/base/fonts/micro.fon/0004e.png trunk/sc2/content/base/fonts/micro.fon/0004f.png trunk/sc2/content/base/fonts/micro.fon/00050.png trunk/sc2/content/base/fonts/micro.fon/00051.png trunk/sc2/content/base/fonts/micro.fon/00052.png trunk/sc2/content/base/fonts/micro.fon/00053.png trunk/sc2/content/base/fonts/micro.fon/00054.png trunk/sc2/content/base/fonts/micro.fon/00055.png trunk/sc2/content/base/fonts/micro.fon/00056.png trunk/sc2/content/base/fonts/micro.fon/00057.png trunk/sc2/content/base/fonts/micro.fon/00058.png trunk/sc2/content/base/fonts/micro.fon/00059.png trunk/sc2/content/base/fonts/micro.fon/0005a.png trunk/sc2/content/base/fonts/micro.fon/0005b.png trunk/sc2/content/base/fonts/micro.fon/0005c.png trunk/sc2/content/base/fonts/micro.fon/0005d.png trunk/sc2/content/base/fonts/micro.fon/0005e.png trunk/sc2/content/base/fonts/micro.fon/0005f.png trunk/sc2/content/base/fonts/micro.fon/00060.png trunk/sc2/content/base/fonts/micro.fon/00061.png trunk/sc2/content/base/fonts/micro.fon/00062.png trunk/sc2/content/base/fonts/micro.fon/00063.png trunk/sc2/content/base/fonts/micro.fon/00064.png trunk/sc2/content/base/fonts/micro.fon/00065.png trunk/sc2/content/base/fonts/micro.fon/00066.png trunk/sc2/content/base/fonts/micro.fon/00067.png trunk/sc2/content/base/fonts/micro.fon/00068.png trunk/sc2/content/base/fonts/micro.fon/00069.png trunk/sc2/content/base/fonts/micro.fon/0006a.png trunk/sc2/content/base/fonts/micro.fon/0006b.png trunk/sc2/content/base/fonts/micro.fon/0006c.png trunk/sc2/content/base/fonts/micro.fon/0006d.png trunk/sc2/content/base/fonts/micro.fon/0006e.png trunk/sc2/content/base/fonts/micro.fon/0006f.png trunk/sc2/content/base/fonts/micro.fon/00070.png trunk/sc2/content/base/fonts/micro.fon/00071.png trunk/sc2/content/base/fonts/micro.fon/00072.png trunk/sc2/content/base/fonts/micro.fon/00073.png trunk/sc2/content/base/fonts/micro.fon/00074.png trunk/sc2/content/base/fonts/micro.fon/00075.png trunk/sc2/content/base/fonts/micro.fon/00076.png trunk/sc2/content/base/fonts/micro.fon/00077.png trunk/sc2/content/base/fonts/micro.fon/00078.png trunk/sc2/content/base/fonts/micro.fon/00079.png trunk/sc2/content/base/fonts/micro.fon/0007a.png trunk/sc2/content/base/fonts/micro.fon/0007b.png trunk/sc2/content/base/fonts/micro.fon/0007c.png trunk/sc2/content/base/fonts/micro.fon/0007d.png trunk/sc2/content/base/fonts/micro.fon/0007e.png trunk/sc2/content/base/fonts/micro.fon/000b0.png trunk/sc2/content/base/fonts/micro.fon/0221e.png trunk/sc2/content/base/fonts/micro.fon/02641.png trunk/sc2/content/base/fonts/mycon.fon/00020.png trunk/sc2/content/base/fonts/mycon.fon/00021.png trunk/sc2/content/base/fonts/mycon.fon/00022.png trunk/sc2/content/base/fonts/mycon.fon/00023.png trunk/sc2/content/base/fonts/mycon.fon/00025.png trunk/sc2/content/base/fonts/mycon.fon/00027.png trunk/sc2/content/base/fonts/mycon.fon/00028.png trunk/sc2/content/base/fonts/mycon.fon/00029.png trunk/sc2/content/base/fonts/mycon.fon/0002a.png trunk/sc2/content/base/fonts/mycon.fon/0002b.png trunk/sc2/content/base/fonts/mycon.fon/0002c.png trunk/sc2/content/base/fonts/mycon.fon/0002d.png trunk/sc2/content/base/fonts/mycon.fon/0002e.png trunk/sc2/content/base/fonts/mycon.fon/0002f.png trunk/sc2/content/base/fonts/mycon.fon/00030.png trunk/sc2/content/base/fonts/mycon.fon/00031.png trunk/sc2/content/base/fonts/mycon.fon/00032.png trunk/sc2/content/base/fonts/mycon.fon/00033.png trunk/sc2/content/base/fonts/mycon.fon/00034.png trunk/sc2/content/base/fonts/mycon.fon/00035.png trunk/sc2/content/base/fonts/mycon.fon/00036.png trunk/sc2/content/base/fonts/mycon.fon/00037.png trunk/sc2/content/base/fonts/mycon.fon/00038.png trunk/sc2/content/base/fonts/mycon.fon/00039.png trunk/sc2/content/base/fonts/mycon.fon/0003a.png trunk/sc2/content/base/fonts/mycon.fon/0003b.png trunk/sc2/content/base/fonts/mycon.fon/0003c.png trunk/sc2/content/base/fonts/mycon.fon/0003d.png trunk/sc2/content/base/fonts/mycon.fon/0003e.png trunk/sc2/content/base/fonts/mycon.fon/0003f.png trunk/sc2/content/base/fonts/mycon.fon/00041.png trunk/sc2/content/base/fonts/mycon.fon/00042.png trunk/sc2/content/base/fonts/mycon.fon/00043.png trunk/sc2/content/base/fonts/mycon.fon/00044.png trunk/sc2/content/base/fonts/mycon.fon/00045.png trunk/sc2/content/base/fonts/mycon.fon/00046.png trunk/sc2/content/base/fonts/mycon.fon/00047.png trunk/sc2/content/base/fonts/mycon.fon/00048.png trunk/sc2/content/base/fonts/mycon.fon/00049.png trunk/sc2/content/base/fonts/mycon.fon/0004a.png trunk/sc2/content/base/fonts/mycon.fon/0004b.png trunk/sc2/content/base/fonts/mycon.fon/0004c.png trunk/sc2/content/base/fonts/mycon.fon/0004d.png trunk/sc2/content/base/fonts/mycon.fon/0004e.png trunk/sc2/content/base/fonts/mycon.fon/0004f.png trunk/sc2/content/base/fonts/mycon.fon/00050.png trunk/sc2/content/base/fonts/mycon.fon/00051.png trunk/sc2/content/base/fonts/mycon.fon/00052.png trunk/sc2/content/base/fonts/mycon.fon/00053.png trunk/sc2/content/base/fonts/mycon.fon/00054.png trunk/sc2/content/base/fonts/mycon.fon/00055.png trunk/sc2/content/base/fonts/mycon.fon/00056.png trunk/sc2/content/base/fonts/mycon.fon/00057.png trunk/sc2/content/base/fonts/mycon.fon/00058.png trunk/sc2/content/base/fonts/mycon.fon/00059.png trunk/sc2/content/base/fonts/mycon.fon/0005a.png trunk/sc2/content/base/fonts/mycon.fon/0005b.png trunk/sc2/content/base/fonts/mycon.fon/0005c.png trunk/sc2/content/base/fonts/mycon.fon/0005d.png trunk/sc2/content/base/fonts/mycon.fon/0005f.png trunk/sc2/content/base/fonts/mycon.fon/00060.png trunk/sc2/content/base/fonts/mycon.fon/00061.png trunk/sc2/content/base/fonts/mycon.fon/00062.png trunk/sc2/content/base/fonts/mycon.fon/00063.png trunk/sc2/content/base/fonts/mycon.fon/00064.png trunk/sc2/content/base/fonts/mycon.fon/00065.png trunk/sc2/content/base/fonts/mycon.fon/00066.png trunk/sc2/content/base/fonts/mycon.fon/00067.png trunk/sc2/content/base/fonts/mycon.fon/00068.png trunk/sc2/content/base/fonts/mycon.fon/00069.png trunk/sc2/content/base/fonts/mycon.fon/0006a.png trunk/sc2/content/base/fonts/mycon.fon/0006b.png trunk/sc2/content/base/fonts/mycon.fon/0006c.png trunk/sc2/content/base/fonts/mycon.fon/0006d.png trunk/sc2/content/base/fonts/mycon.fon/0006e.png trunk/sc2/content/base/fonts/mycon.fon/0006f.png trunk/sc2/content/base/fonts/mycon.fon/00070.png trunk/sc2/content/base/fonts/mycon.fon/00071.png trunk/sc2/content/base/fonts/mycon.fon/00072.png trunk/sc2/content/base/fonts/mycon.fon/00073.png trunk/sc2/content/base/fonts/mycon.fon/00074.png trunk/sc2/content/base/fonts/mycon.fon/00075.png trunk/sc2/content/base/fonts/mycon.fon/00076.png trunk/sc2/content/base/fonts/mycon.fon/00077.png trunk/sc2/content/base/fonts/mycon.fon/00078.png trunk/sc2/content/base/fonts/mycon.fon/00079.png trunk/sc2/content/base/fonts/mycon.fon/0007a.png trunk/sc2/content/base/fonts/orz.fon/00020.png trunk/sc2/content/base/fonts/orz.fon/00021.png trunk/sc2/content/base/fonts/orz.fon/00022.png trunk/sc2/content/base/fonts/orz.fon/00023.png trunk/sc2/content/base/fonts/orz.fon/00025.png trunk/sc2/content/base/fonts/orz.fon/00027.png trunk/sc2/content/base/fonts/orz.fon/00028.png trunk/sc2/content/base/fonts/orz.fon/00029.png trunk/sc2/content/base/fonts/orz.fon/0002a.png trunk/sc2/content/base/fonts/orz.fon/0002b.png trunk/sc2/content/base/fonts/orz.fon/0002c.png trunk/sc2/content/base/fonts/orz.fon/0002d.png trunk/sc2/content/base/fonts/orz.fon/0002e.png trunk/sc2/content/base/fonts/orz.fon/0002f.png trunk/sc2/content/base/fonts/orz.fon/00030.png trunk/sc2/content/base/fonts/orz.fon/00031.png trunk/sc2/content/base/fonts/orz.fon/00032.png trunk/sc2/content/base/fonts/orz.fon/00033.png trunk/sc2/content/base/fonts/orz.fon/00034.png trunk/sc2/content/base/fonts/orz.fon/00035.png trunk/sc2/content/base/fonts/orz.fon/00036.png trunk/sc2/content/base/fonts/orz.fon/00037.png trunk/sc2/content/base/fonts/orz.fon/00038.png trunk/sc2/content/base/fonts/orz.fon/00039.png trunk/sc2/content/base/fonts/orz.fon/0003a.png trunk/sc2/content/base/fonts/orz.fon/0003b.png trunk/sc2/content/base/fonts/orz.fon/0003c.png trunk/sc2/content/base/fonts/orz.fon/0003d.png trunk/sc2/content/base/fonts/orz.fon/0003e.png trunk/sc2/content/base/fonts/orz.fon/0003f.png trunk/sc2/content/base/fonts/orz.fon/00041.png trunk/sc2/content/base/fonts/orz.fon/00042.png trunk/sc2/content/base/fonts/orz.fon/00043.png trunk/sc2/content/base/fonts/orz.fon/00044.png trunk/sc2/content/base/fonts/orz.fon/00045.png trunk/sc2/content/base/fonts/orz.fon/00046.png trunk/sc2/content/base/fonts/orz.fon/00047.png trunk/sc2/content/base/fonts/orz.fon/00048.png trunk/sc2/content/base/fonts/orz.fon/00049.png trunk/sc2/content/base/fonts/orz.fon/0004a.png trunk/sc2/content/base/fonts/orz.fon/0004b.png trunk/sc2/content/base/fonts/orz.fon/0004c.png trunk/sc2/content/base/fonts/orz.fon/0004d.png trunk/sc2/content/base/fonts/orz.fon/0004e.png trunk/sc2/content/base/fonts/orz.fon/0004f.png trunk/sc2/content/base/fonts/orz.fon/00050.png trunk/sc2/content/base/fonts/orz.fon/00051.png trunk/sc2/content/base/fonts/orz.fon/00052.png trunk/sc2/content/base/fonts/orz.fon/00053.png trunk/sc2/content/base/fonts/orz.fon/00054.png trunk/sc2/content/base/fonts/orz.fon/00055.png trunk/sc2/content/base/fonts/orz.fon/00056.png trunk/sc2/content/base/fonts/orz.fon/00057.png trunk/sc2/content/base/fonts/orz.fon/00058.png trunk/sc2/content/base/fonts/orz.fon/00059.png trunk/sc2/content/base/fonts/orz.fon/0005a.png trunk/sc2/content/base/fonts/orz.fon/0005b.png trunk/sc2/content/base/fonts/orz.fon/0005c.png trunk/sc2/content/base/fonts/orz.fon/0005d.png trunk/sc2/content/base/fonts/orz.fon/0005f.png trunk/sc2/content/base/fonts/orz.fon/00060.png trunk/sc2/content/base/fonts/orz.fon/00061.png trunk/sc2/content/base/fonts/orz.fon/00062.png trunk/sc2/content/base/fonts/orz.fon/00063.png trunk/sc2/content/base/fonts/orz.fon/00064.png trunk/sc2/content/base/fonts/orz.fon/00065.png trunk/sc2/content/base/fonts/orz.fon/00066.png trunk/sc2/content/base/fonts/orz.fon/00067.png trunk/sc2/content/base/fonts/orz.fon/00068.png trunk/sc2/content/base/fonts/orz.fon/00069.png trunk/sc2/content/base/fonts/orz.fon/0006a.png trunk/sc2/content/base/fonts/orz.fon/0006b.png trunk/sc2/content/base/fonts/orz.fon/0006c.png trunk/sc2/content/base/fonts/orz.fon/0006d.png trunk/sc2/content/base/fonts/orz.fon/0006e.png trunk/sc2/content/base/fonts/orz.fon/0006f.png trunk/sc2/content/base/fonts/orz.fon/00070.png trunk/sc2/content/base/fonts/orz.fon/00071.png trunk/sc2/content/base/fonts/orz.fon/00072.png trunk/sc2/content/base/fonts/orz.fon/00073.png trunk/sc2/content/base/fonts/orz.fon/00074.png trunk/sc2/content/base/fonts/orz.fon/00075.png trunk/sc2/content/base/fonts/orz.fon/00076.png trunk/sc2/content/base/fonts/orz.fon/00077.png trunk/sc2/content/base/fonts/orz.fon/00078.png trunk/sc2/content/base/fonts/orz.fon/00079.png trunk/sc2/content/base/fonts/orz.fon/0007a.png trunk/sc2/content/base/fonts/pkunk.fon/00020.png trunk/sc2/content/base/fonts/pkunk.fon/00021.png trunk/sc2/content/base/fonts/pkunk.fon/00022.png trunk/sc2/content/base/fonts/pkunk.fon/00023.png trunk/sc2/content/base/fonts/pkunk.fon/00024.png trunk/sc2/content/base/fonts/pkunk.fon/00025.png trunk/sc2/content/base/fonts/pkunk.fon/00026.png trunk/sc2/content/base/fonts/pkunk.fon/00027.png trunk/sc2/content/base/fonts/pkunk.fon/00028.png trunk/sc2/content/base/fonts/pkunk.fon/00029.png trunk/sc2/content/base/fonts/pkunk.fon/0002a.png trunk/sc2/content/base/fonts/pkunk.fon/0002b.png trunk/sc2/content/base/fonts/pkunk.fon/0002c.png trunk/sc2/content/base/fonts/pkunk.fon/0002d.png trunk/sc2/content/base/fonts/pkunk.fon/0002e.png trunk/sc2/content/base/fonts/pkunk.fon/0002f.png trunk/sc2/content/base/fonts/pkunk.fon/00030.png trunk/sc2/content/base/fonts/pkunk.fon/00031.png trunk/sc2/content/base/fonts/pkunk.fon/00032.png trunk/sc2/content/base/fonts/pkunk.fon/00033.png trunk/sc2/content/base/fonts/pkunk.fon/00034.png trunk/sc2/content/base/fonts/pkunk.fon/00035.png trunk/sc2/content/base/fonts/pkunk.fon/00036.png trunk/sc2/content/base/fonts/pkunk.fon/00037.png trunk/sc2/content/base/fonts/pkunk.fon/00038.png trunk/sc2/content/base/fonts/pkunk.fon/00039.png trunk/sc2/content/base/fonts/pkunk.fon/0003a.png trunk/sc2/content/base/fonts/pkunk.fon/0003b.png trunk/sc2/content/base/fonts/pkunk.fon/0003c.png trunk/sc2/content/base/fonts/pkunk.fon/0003d.png trunk/sc2/content/base/fonts/pkunk.fon/0003e.png trunk/sc2/content/base/fonts/pkunk.fon/0003f.png trunk/sc2/content/base/fonts/pkunk.fon/00041.png trunk/sc2/content/base/fonts/pkunk.fon/00042.png trunk/sc2/content/base/fonts/pkunk.fon/00043.png trunk/sc2/content/base/fonts/pkunk.fon/00044.png trunk/sc2/content/base/fonts/pkunk.fon/00045.png trunk/sc2/content/base/fonts/pkunk.fon/00046.png trunk/sc2/content/base/fonts/pkunk.fon/00047.png trunk/sc2/content/base/fonts/pkunk.fon/00048.png trunk/sc2/content/base/fonts/pkunk.fon/00049.png trunk/sc2/content/base/fonts/pkunk.fon/0004a.png trunk/sc2/content/base/fonts/pkunk.fon/0004b.png trunk/sc2/content/base/fonts/pkunk.fon/0004c.png trunk/sc2/content/base/fonts/pkunk.fon/0004d.png trunk/sc2/content/base/fonts/pkunk.fon/0004e.png trunk/sc2/content/base/fonts/pkunk.fon/0004f.png trunk/sc2/content/base/fonts/pkunk.fon/00050.png trunk/sc2/content/base/fonts/pkunk.fon/00051.png trunk/sc2/content/base/fonts/pkunk.fon/00052.png trunk/sc2/content/base/fonts/pkunk.fon/00053.png trunk/sc2/content/base/fonts/pkunk.fon/00054.png trunk/sc2/content/base/fonts/pkunk.fon/00055.png trunk/sc2/content/base/fonts/pkunk.fon/00056.png trunk/sc2/content/base/fonts/pkunk.fon/00057.png trunk/sc2/content/base/fonts/pkunk.fon/00058.png trunk/sc2/content/base/fonts/pkunk.fon/00059.png trunk/sc2/content/base/fonts/pkunk.fon/0005a.png trunk/sc2/content/base/fonts/pkunk.fon/0005b.png trunk/sc2/content/base/fonts/pkunk.fon/0005c.png trunk/sc2/content/base/fonts/pkunk.fon/0005d.png trunk/sc2/content/base/fonts/pkunk.fon/0005e.png trunk/sc2/content/base/fonts/pkunk.fon/0005f.png trunk/sc2/content/base/fonts/pkunk.fon/00060.png trunk/sc2/content/base/fonts/pkunk.fon/00061.png trunk/sc2/content/base/fonts/pkunk.fon/00062.png trunk/sc2/content/base/fonts/pkunk.fon/00063.png trunk/sc2/content/base/fonts/pkunk.fon/00064.png trunk/sc2/content/base/fonts/pkunk.fon/00065.png trunk/sc2/content/base/fonts/pkunk.fon/00066.png trunk/sc2/content/base/fonts/pkunk.fon/00067.png trunk/sc2/content/base/fonts/pkunk.fon/00068.png trunk/sc2/content/base/fonts/pkunk.fon/00069.png trunk/sc2/content/base/fonts/pkunk.fon/0006a.png trunk/sc2/content/base/fonts/pkunk.fon/0006b.png trunk/sc2/content/base/fonts/pkunk.fon/0006c.png trunk/sc2/content/base/fonts/pkunk.fon/0006d.png trunk/sc2/content/base/fonts/pkunk.fon/0006e.png trunk/sc2/content/base/fonts/pkunk.fon/0006f.png trunk/sc2/content/base/fonts/pkunk.fon/00070.png trunk/sc2/content/base/fonts/pkunk.fon/00071.png trunk/sc2/content/base/fonts/pkunk.fon/00072.png trunk/sc2/content/base/fonts/pkunk.fon/00073.png trunk/sc2/content/base/fonts/pkunk.fon/00074.png trunk/sc2/content/base/fonts/pkunk.fon/00075.png trunk/sc2/content/base/fonts/pkunk.fon/00076.png trunk/sc2/content/base/fonts/pkunk.fon/00077.png trunk/sc2/content/base/fonts/pkunk.fon/00078.png trunk/sc2/content/base/fonts/pkunk.fon/00079.png trunk/sc2/content/base/fonts/pkunk.fon/0007a.png trunk/sc2/content/base/fonts/pkunk.fon/0007b.png trunk/sc2/content/base/fonts/pkunk.fon/0007c.png trunk/sc2/content/base/fonts/pkunk.fon/0007d.png trunk/sc2/content/base/fonts/player.fon/00020.png trunk/sc2/content/base/fonts/player.fon/00021.png trunk/sc2/content/base/fonts/player.fon/00022.png trunk/sc2/content/base/fonts/player.fon/00023.png trunk/sc2/content/base/fonts/player.fon/00024.png trunk/sc2/content/base/fonts/player.fon/00025.png trunk/sc2/content/base/fonts/player.fon/00026.png trunk/sc2/content/base/fonts/player.fon/00027.png trunk/sc2/content/base/fonts/player.fon/00028.png trunk/sc2/content/base/fonts/player.fon/00029.png trunk/sc2/content/base/fonts/player.fon/0002a.png trunk/sc2/content/base/fonts/player.fon/0002b.png trunk/sc2/content/base/fonts/player.fon/0002c.png trunk/sc2/content/base/fonts/player.fon/0002d.png trunk/sc2/content/base/fonts/player.fon/0002e.png trunk/sc2/content/base/fonts/player.fon/0002f.png trunk/sc2/content/base/fonts/player.fon/00030.png trunk/sc2/content/base/fonts/player.fon/00031.png trunk/sc2/content/base/fonts/player.fon/00032.png trunk/sc2/content/base/fonts/player.fon/00033.png trunk/sc2/content/base/fonts/player.fon/00034.png trunk/sc2/content/base/fonts/player.fon/00035.png trunk/sc2/content/base/fonts/player.fon/00036.png trunk/sc2/content/base/fonts/player.fon/00037.png trunk/sc2/content/base/fonts/player.fon/00038.png trunk/sc2/content/base/fonts/player.fon/00039.png trunk/sc2/content/base/fonts/player.fon/0003a.png trunk/sc2/content/base/fonts/player.fon/0003b.png trunk/sc2/content/base/fonts/player.fon/0003c.png trunk/sc2/content/base/fonts/player.fon/0003d.png trunk/sc2/content/base/fonts/player.fon/0003e.png trunk/sc2/content/base/fonts/player.fon/0003f.png trunk/sc2/content/base/fonts/player.fon/00040.png trunk/sc2/content/base/fonts/player.fon/00041.png trunk/sc2/content/base/fonts/player.fon/00042.png trunk/sc2/content/base/fonts/player.fon/00043.png trunk/sc2/content/base/fonts/player.fon/00044.png trunk/sc2/content/base/fonts/player.fon/00045.png trunk/sc2/content/base/fonts/player.fon/00046.png trunk/sc2/content/base/fonts/player.fon/00047.png trunk/sc2/content/base/fonts/player.fon/00048.png trunk/sc2/content/base/fonts/player.fon/00049.png trunk/sc2/content/base/fonts/player.fon/0004a.png trunk/sc2/content/base/fonts/player.fon/0004b.png trunk/sc2/content/base/fonts/player.fon/0004c.png trunk/sc2/content/base/fonts/player.fon/0004d.png trunk/sc2/content/base/fonts/player.fon/0004e.png trunk/sc2/content/base/fonts/player.fon/0004f.png trunk/sc2/content/base/fonts/player.fon/00050.png trunk/sc2/content/base/fonts/player.fon/00051.png trunk/sc2/content/base/fonts/player.fon/00052.png trunk/sc2/content/base/fonts/player.fon/00053.png trunk/sc2/content/base/fonts/player.fon/00054.png trunk/sc2/content/base/fonts/player.fon/00055.png trunk/sc2/content/base/fonts/player.fon/00056.png trunk/sc2/content/base/fonts/player.fon/00057.png trunk/sc2/content/base/fonts/player.fon/00058.png trunk/sc2/content/base/fonts/player.fon/00059.png trunk/sc2/content/base/fonts/player.fon/0005a.png trunk/sc2/content/base/fonts/player.fon/0005b.png trunk/sc2/content/base/fonts/player.fon/0005c.png trunk/sc2/content/base/fonts/player.fon/0005d.png trunk/sc2/content/base/fonts/player.fon/0005e.png trunk/sc2/content/base/fonts/player.fon/0005f.png trunk/sc2/content/base/fonts/player.fon/00060.png trunk/sc2/content/base/fonts/player.fon/00061.png trunk/sc2/content/base/fonts/player.fon/00062.png trunk/sc2/content/base/fonts/player.fon/00063.png trunk/sc2/content/base/fonts/player.fon/00064.png trunk/sc2/content/base/fonts/player.fon/00065.png trunk/sc2/content/base/fonts/player.fon/00066.png trunk/sc2/content/base/fonts/player.fon/00067.png trunk/sc2/content/base/fonts/player.fon/00068.png trunk/sc2/content/base/fonts/player.fon/00069.png trunk/sc2/content/base/fonts/player.fon/0006a.png trunk/sc2/content/base/fonts/player.fon/0006b.png trunk/sc2/content/base/fonts/player.fon/0006c.png trunk/sc2/content/base/fonts/player.fon/0006d.png trunk/sc2/content/base/fonts/player.fon/0006e.png trunk/sc2/content/base/fonts/player.fon/0006f.png trunk/sc2/content/base/fonts/player.fon/00070.png trunk/sc2/content/base/fonts/player.fon/00071.png trunk/sc2/content/base/fonts/player.fon/00072.png trunk/sc2/content/base/fonts/player.fon/00073.png trunk/sc2/content/base/fonts/player.fon/00074.png trunk/sc2/content/base/fonts/player.fon/00075.png trunk/sc2/content/base/fonts/player.fon/00076.png trunk/sc2/content/base/fonts/player.fon/00077.png trunk/sc2/content/base/fonts/player.fon/00078.png trunk/sc2/content/base/fonts/player.fon/00079.png trunk/sc2/content/base/fonts/player.fon/0007a.png trunk/sc2/content/base/fonts/player.fon/0007b.png trunk/sc2/content/base/fonts/player.fon/0007d.png trunk/sc2/content/base/fonts/player.fon/0007e.png trunk/sc2/content/base/fonts/player.fon/02022.png trunk/sc2/content/base/fonts/probe.fon/00020.png trunk/sc2/content/base/fonts/probe.fon/00021.png trunk/sc2/content/base/fonts/probe.fon/00022.png trunk/sc2/content/base/fonts/probe.fon/00023.png trunk/sc2/content/base/fonts/probe.fon/00024.png trunk/sc2/content/base/fonts/probe.fon/00025.png trunk/sc2/content/base/fonts/probe.fon/00026.png trunk/sc2/content/base/fonts/probe.fon/00027.png trunk/sc2/content/base/fonts/probe.fon/00028.png trunk/sc2/content/base/fonts/probe.fon/00029.png trunk/sc2/content/base/fonts/probe.fon/0002a.png trunk/sc2/content/base/fonts/probe.fon/0002b.png trunk/sc2/content/base/fonts/probe.fon/0002c.png trunk/sc2/content/base/fonts/probe.fon/0002d.png trunk/sc2/content/base/fonts/probe.fon/0002e.png trunk/sc2/content/base/fonts/probe.fon/0002f.png trunk/sc2/content/base/fonts/probe.fon/00030.png trunk/sc2/content/base/fonts/probe.fon/00031.png trunk/sc2/content/base/fonts/probe.fon/00032.png trunk/sc2/content/base/fonts/probe.fon/00033.png trunk/sc2/content/base/fonts/probe.fon/00034.png trunk/sc2/content/base/fonts/probe.fon/00035.png trunk/sc2/content/base/fonts/probe.fon/00036.png trunk/sc2/content/base/fonts/probe.fon/00037.png trunk/sc2/content/base/fonts/probe.fon/00038.png trunk/sc2/content/base/fonts/probe.fon/00039.png trunk/sc2/content/base/fonts/probe.fon/0003a.png trunk/sc2/content/base/fonts/probe.fon/0003b.png trunk/sc2/content/base/fonts/probe.fon/0003c.png trunk/sc2/content/base/fonts/probe.fon/0003d.png trunk/sc2/content/base/fonts/probe.fon/0003e.png trunk/sc2/content/base/fonts/probe.fon/0003f.png trunk/sc2/content/base/fonts/probe.fon/00041.png trunk/sc2/content/base/fonts/probe.fon/00042.png trunk/sc2/content/base/fonts/probe.fon/00043.png trunk/sc2/content/base/fonts/probe.fon/00044.png trunk/sc2/content/base/fonts/probe.fon/00045.png trunk/sc2/content/base/fonts/probe.fon/00046.png trunk/sc2/content/base/fonts/probe.fon/00047.png trunk/sc2/content/base/fonts/probe.fon/00048.png trunk/sc2/content/base/fonts/probe.fon/00049.png trunk/sc2/content/base/fonts/probe.fon/0004a.png trunk/sc2/content/base/fonts/probe.fon/0004b.png trunk/sc2/content/base/fonts/probe.fon/0004c.png trunk/sc2/content/base/fonts/probe.fon/0004d.png trunk/sc2/content/base/fonts/probe.fon/0004e.png trunk/sc2/content/base/fonts/probe.fon/0004f.png trunk/sc2/content/base/fonts/probe.fon/00050.png trunk/sc2/content/base/fonts/probe.fon/00051.png trunk/sc2/content/base/fonts/probe.fon/00052.png trunk/sc2/content/base/fonts/probe.fon/00053.png trunk/sc2/content/base/fonts/probe.fon/00054.png trunk/sc2/content/base/fonts/probe.fon/00055.png trunk/sc2/content/base/fonts/probe.fon/00056.png trunk/sc2/content/base/fonts/probe.fon/00057.png trunk/sc2/content/base/fonts/probe.fon/00058.png trunk/sc2/content/base/fonts/probe.fon/00059.png trunk/sc2/content/base/fonts/probe.fon/0005a.png trunk/sc2/content/base/fonts/probe.fon/0005b.png trunk/sc2/content/base/fonts/probe.fon/0005c.png trunk/sc2/content/base/fonts/probe.fon/0005d.png trunk/sc2/content/base/fonts/probe.fon/0005e.png trunk/sc2/content/base/fonts/probe.fon/0005f.png trunk/sc2/content/base/fonts/probe.fon/00060.png trunk/sc2/content/base/fonts/probe.fon/00061.png trunk/sc2/content/base/fonts/probe.fon/00062.png trunk/sc2/content/base/fonts/probe.fon/00063.png trunk/sc2/content/base/fonts/probe.fon/00064.png trunk/sc2/content/base/fonts/probe.fon/00065.png trunk/sc2/content/base/fonts/probe.fon/00066.png trunk/sc2/content/base/fonts/probe.fon/00067.png trunk/sc2/content/base/fonts/probe.fon/00068.png trunk/sc2/content/base/fonts/probe.fon/00069.png trunk/sc2/content/base/fonts/probe.fon/0006a.png trunk/sc2/content/base/fonts/probe.fon/0006b.png trunk/sc2/content/base/fonts/probe.fon/0006c.png trunk/sc2/content/base/fonts/probe.fon/0006d.png trunk/sc2/content/base/fonts/probe.fon/0006e.png trunk/sc2/content/base/fonts/probe.fon/0006f.png trunk/sc2/content/base/fonts/probe.fon/00070.png trunk/sc2/content/base/fonts/probe.fon/00071.png trunk/sc2/content/base/fonts/probe.fon/00072.png trunk/sc2/content/base/fonts/probe.fon/00073.png trunk/sc2/content/base/fonts/probe.fon/00074.png trunk/sc2/content/base/fonts/probe.fon/00075.png trunk/sc2/content/base/fonts/probe.fon/00076.png trunk/sc2/content/base/fonts/probe.fon/00077.png trunk/sc2/content/base/fonts/probe.fon/00078.png trunk/sc2/content/base/fonts/probe.fon/00079.png trunk/sc2/content/base/fonts/probe.fon/0007a.png trunk/sc2/content/base/fonts/probe.fon/0007b.png trunk/sc2/content/base/fonts/probe.fon/0007c.png trunk/sc2/content/base/fonts/probe.fon/0007d.png trunk/sc2/content/base/fonts/pt13.fon/00020.png trunk/sc2/content/base/fonts/pt13.fon/00021.png trunk/sc2/content/base/fonts/pt13.fon/00022.png trunk/sc2/content/base/fonts/pt13.fon/00023.png trunk/sc2/content/base/fonts/pt13.fon/00026.png trunk/sc2/content/base/fonts/pt13.fon/00027.png trunk/sc2/content/base/fonts/pt13.fon/00028.png trunk/sc2/content/base/fonts/pt13.fon/00029.png trunk/sc2/content/base/fonts/pt13.fon/0002a.png trunk/sc2/content/base/fonts/pt13.fon/0002b.png trunk/sc2/content/base/fonts/pt13.fon/0002c.png trunk/sc2/content/base/fonts/pt13.fon/0002d.png trunk/sc2/content/base/fonts/pt13.fon/0002e.png trunk/sc2/content/base/fonts/pt13.fon/0002f.png trunk/sc2/content/base/fonts/pt13.fon/00030.png trunk/sc2/content/base/fonts/pt13.fon/00031.png trunk/sc2/content/base/fonts/pt13.fon/00032.png trunk/sc2/content/base/fonts/pt13.fon/00033.png trunk/sc2/content/base/fonts/pt13.fon/00034.png trunk/sc2/content/base/fonts/pt13.fon/00035.png trunk/sc2/content/base/fonts/pt13.fon/00036.png trunk/sc2/content/base/fonts/pt13.fon/00037.png trunk/sc2/content/base/fonts/pt13.fon/00038.png trunk/sc2/content/base/fonts/pt13.fon/00039.png trunk/sc2/content/base/fonts/pt13.fon/0003a.png trunk/sc2/content/base/fonts/pt13.fon/0003b.png trunk/sc2/content/base/fonts/pt13.fon/0003c.png trunk/sc2/content/base/fonts/pt13.fon/0003d.png trunk/sc2/content/base/fonts/pt13.fon/0003e.png trunk/sc2/content/base/fonts/pt13.fon/0003f.png trunk/sc2/content/base/fonts/pt13.fon/00041.png trunk/sc2/content/base/fonts/pt13.fon/00042.png trunk/sc2/content/base/fonts/pt13.fon/00043.png trunk/sc2/content/base/fonts/pt13.fon/00044.png trunk/sc2/content/base/fonts/pt13.fon/00045.png trunk/sc2/content/base/fonts/pt13.fon/00046.png trunk/sc2/content/base/fonts/pt13.fon/00047.png trunk/sc2/content/base/fonts/pt13.fon/00048.png trunk/sc2/content/base/fonts/pt13.fon/00049.png trunk/sc2/content/base/fonts/pt13.fon/0004a.png trunk/sc2/content/base/fonts/pt13.fon/0004b.png trunk/sc2/content/base/fonts/pt13.fon/0004c.png trunk/sc2/content/base/fonts/pt13.fon/0004d.png trunk/sc2/content/base/fonts/pt13.fon/0004e.png trunk/sc2/content/base/fonts/pt13.fon/0004f.png trunk/sc2/content/base/fonts/pt13.fon/00050.png trunk/sc2/content/base/fonts/pt13.fon/00051.png trunk/sc2/content/base/fonts/pt13.fon/00052.png trunk/sc2/content/base/fonts/pt13.fon/00053.png trunk/sc2/content/base/fonts/pt13.fon/00054.png trunk/sc2/content/base/fonts/pt13.fon/00055.png trunk/sc2/content/base/fonts/pt13.fon/00056.png trunk/sc2/content/base/fonts/pt13.fon/00057.png trunk/sc2/content/base/fonts/pt13.fon/00058.png trunk/sc2/content/base/fonts/pt13.fon/00059.png trunk/sc2/content/base/fonts/pt13.fon/0005a.png trunk/sc2/content/base/fonts/pt13.fon/0005b.png trunk/sc2/content/base/fonts/pt13.fon/0005c.png trunk/sc2/content/base/fonts/pt13.fon/0005d.png trunk/sc2/content/base/fonts/pt13.fon/0005e.png trunk/sc2/content/base/fonts/pt13.fon/0005f.png trunk/sc2/content/base/fonts/pt13.fon/00060.png trunk/sc2/content/base/fonts/pt13.fon/00061.png trunk/sc2/content/base/fonts/pt13.fon/00062.png trunk/sc2/content/base/fonts/pt13.fon/00063.png trunk/sc2/content/base/fonts/pt13.fon/00064.png trunk/sc2/content/base/fonts/pt13.fon/00065.png trunk/sc2/content/base/fonts/pt13.fon/00066.png trunk/sc2/content/base/fonts/pt13.fon/00067.png trunk/sc2/content/base/fonts/pt13.fon/00068.png trunk/sc2/content/base/fonts/pt13.fon/00069.png trunk/sc2/content/base/fonts/pt13.fon/0006a.png trunk/sc2/content/base/fonts/pt13.fon/0006b.png trunk/sc2/content/base/fonts/pt13.fon/0006c.png trunk/sc2/content/base/fonts/pt13.fon/0006d.png trunk/sc2/content/base/fonts/pt13.fon/0006e.png trunk/sc2/content/base/fonts/pt13.fon/0006f.png trunk/sc2/content/base/fonts/pt13.fon/00070.png trunk/sc2/content/base/fonts/pt13.fon/00071.png trunk/sc2/content/base/fonts/pt13.fon/00072.png trunk/sc2/content/base/fonts/pt13.fon/00073.png trunk/sc2/content/base/fonts/pt13.fon/00074.png trunk/sc2/content/base/fonts/pt13.fon/00075.png trunk/sc2/content/base/fonts/pt13.fon/00076.png trunk/sc2/content/base/fonts/pt13.fon/00077.png trunk/sc2/content/base/fonts/pt13.fon/00078.png trunk/sc2/content/base/fonts/pt13.fon/00079.png trunk/sc2/content/base/fonts/pt13.fon/0007a.png trunk/sc2/content/base/fonts/pt13.fon/0007b.png trunk/sc2/content/base/fonts/pt13.fon/0007c.png trunk/sc2/content/base/fonts/pt13.fon/0007d.png trunk/sc2/content/base/fonts/pt13.fon/0007e.png trunk/sc2/content/base/fonts/pt13.fon/000e4.png trunk/sc2/content/base/fonts/pt17.fon/00020.png trunk/sc2/content/base/fonts/pt17.fon/0002d.png trunk/sc2/content/base/fonts/pt17.fon/0002e.png trunk/sc2/content/base/fonts/pt17.fon/00041.png trunk/sc2/content/base/fonts/pt17.fon/00042.png trunk/sc2/content/base/fonts/pt17.fon/00043.png trunk/sc2/content/base/fonts/pt17.fon/00044.png trunk/sc2/content/base/fonts/pt17.fon/00045.png trunk/sc2/content/base/fonts/pt17.fon/00046.png trunk/sc2/content/base/fonts/pt17.fon/00047.png trunk/sc2/content/base/fonts/pt17.fon/00048.png trunk/sc2/content/base/fonts/pt17.fon/00049.png trunk/sc2/content/base/fonts/pt17.fon/0004a.png trunk/sc2/content/base/fonts/pt17.fon/0004b.png trunk/sc2/content/base/fonts/pt17.fon/0004c.png trunk/sc2/content/base/fonts/pt17.fon/0004d.png trunk/sc2/content/base/fonts/pt17.fon/0004e.png trunk/sc2/content/base/fonts/pt17.fon/0004f.png trunk/sc2/content/base/fonts/pt17.fon/00050.png trunk/sc2/content/base/fonts/pt17.fon/00051.png trunk/sc2/content/base/fonts/pt17.fon/00052.png trunk/sc2/content/base/fonts/pt17.fon/00053.png trunk/sc2/content/base/fonts/pt17.fon/00054.png trunk/sc2/content/base/fonts/pt17.fon/00055.png trunk/sc2/content/base/fonts/pt17.fon/00056.png trunk/sc2/content/base/fonts/pt17.fon/00057.png trunk/sc2/content/base/fonts/pt17.fon/00058.png trunk/sc2/content/base/fonts/pt17.fon/00059.png trunk/sc2/content/base/fonts/pt17.fon/0005a.png trunk/sc2/content/base/fonts/pt17.fon/0005f.png trunk/sc2/content/base/fonts/pt45.fon/00020.png trunk/sc2/content/base/fonts/pt45.fon/00044.png trunk/sc2/content/base/fonts/pt45.fon/00045.png trunk/sc2/content/base/fonts/pt45.fon/00048.png trunk/sc2/content/base/fonts/pt45.fon/0004e.png trunk/sc2/content/base/fonts/pt45.fon/00054.png trunk/sc2/content/base/fonts/shofixti.fon/00020.png trunk/sc2/content/base/fonts/shofixti.fon/00021.png trunk/sc2/content/base/fonts/shofixti.fon/00022.png trunk/sc2/content/base/fonts/shofixti.fon/00023.png trunk/sc2/content/base/fonts/shofixti.fon/00024.png trunk/sc2/content/base/fonts/shofixti.fon/00025.png trunk/sc2/content/base/fonts/shofixti.fon/00026.png trunk/sc2/content/base/fonts/shofixti.fon/00027.png trunk/sc2/content/base/fonts/shofixti.fon/00028.png trunk/sc2/content/base/fonts/shofixti.fon/00029.png trunk/sc2/content/base/fonts/shofixti.fon/0002a.png trunk/sc2/content/base/fonts/shofixti.fon/0002b.png trunk/sc2/content/base/fonts/shofixti.fon/0002c.png trunk/sc2/content/base/fonts/shofixti.fon/0002d.png trunk/sc2/content/base/fonts/shofixti.fon/0002e.png trunk/sc2/content/base/fonts/shofixti.fon/0002f.png trunk/sc2/content/base/fonts/shofixti.fon/00030.png trunk/sc2/content/base/fonts/shofixti.fon/00031.png trunk/sc2/content/base/fonts/shofixti.fon/00032.png trunk/sc2/content/base/fonts/shofixti.fo... [truncated message content] |
From: <av...@us...> - 2009-06-29 05:05:49
|
Revision: 3158 http://sc2.svn.sourceforge.net/sc2/?rev=3158&view=rev Author: avolkov Date: 2009-06-29 05:05:48 +0000 (Mon, 29 Jun 2009) Log Message: ----------- Allow addons to override any content by placing zips into their 'shadow-content' dir. Unzipped files in 'shadow-content' are not currently supported. Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/src/options.c trunk/sc2/src/options.h trunk/sc2/src/starcon2.c Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2009-06-28 23:43:08 UTC (rev 3157) +++ trunk/sc2/ChangeLog 2009-06-29 05:05:48 UTC (rev 3158) @@ -1,4 +1,6 @@ Changes towards version 0.7: +- Allow addons to override any content by placing zips into their + 'shadow-content' dir - Alex - Content reorg: font chars now use hexadecimal numbering - Alex - Content reorg: some race comm and ships renamed, ship files renamed, many ani files renamed, new naming scheme for ani frames and voice - Alex Modified: trunk/sc2/src/options.c =================================================================== --- trunk/sc2/src/options.c 2009-06-28 23:43:08 UTC (rev 3157) +++ trunk/sc2/src/options.c 2009-06-29 05:05:48 UTC (rev 3158) @@ -77,8 +77,8 @@ static void mountAddonDir (uio_Repository *repository, uio_MountHandle *contentMountHandle, const char *addonDirName); -static void mountDirZips (uio_MountHandle *contentHandle, - uio_DirHandle *dirHandle, const char *mountPoint); +static void mountDirZips (uio_DirHandle *dirHandle, const char *mountPoint, + int relativeFlags, uio_MountHandle *relativeHandle); // Looks for a file 'file' in all 'numLocs' locations from 'locs'. @@ -344,7 +344,7 @@ packagesDir = uio_openDir (repository, "/packages", 0); if (packagesDir != NULL) { - mountDirZips (contentMountHandle, packagesDir, "/"); + mountDirZips (packagesDir, "/", uio_MOUNT_BELOW, contentMountHandle); uio_closeDir (packagesDir); } @@ -390,7 +390,7 @@ return; } - mountDirZips (mountHandle, addonsDir, "addons"); + mountDirZips (addonsDir, "addons", uio_MOUNT_BELOW, mountHandle); availableAddons = uio_getDirList (addonsDir, "", "", match_MATCH_PREFIX); if (availableAddons != NULL) @@ -423,7 +423,7 @@ "not found; addon skipped.", addon); continue; } - mountDirZips (mountHandle, addonDir, mountname); + mountDirZips (addonDir, mountname, uio_MOUNT_BELOW, mountHandle); uio_closeDir (addonDir); } } @@ -439,7 +439,8 @@ } static void -mountDirZips (uio_MountHandle *contentHandle, uio_DirHandle *dirHandle, const char *mountPoint) +mountDirZips (uio_DirHandle *dirHandle, const char *mountPoint, + int relativeFlags, uio_MountHandle *relativeHandle) { static uio_AutoMount *autoMount[] = { NULL }; uio_DirList *dirList; @@ -454,8 +455,8 @@ { if (uio_mountDir (repository, mountPoint, uio_FSTYPE_ZIP, dirHandle, dirList->names[i], "/", autoMount, - uio_MOUNT_BELOW | uio_MOUNT_RDONLY, - contentHandle) == NULL) + relativeFlags | uio_MOUNT_RDONLY, + relativeHandle) == NULL) { log_add (log_Warning, "Warning: Could not mount '%s': %s.", dirList->names[i], strerror (errno)); @@ -513,7 +514,7 @@ return FALSE; } - loadIndices (addonDir); + loadIndices (addonDir); uio_closeDir (addonDir); uio_closeDir (addonsDir); @@ -521,10 +522,47 @@ } void +prepareShadowAddons (const char **addons) +{ + uio_DirHandle *addonsDir; + const char *shadowDirName = "shadow-content"; + + addonsDir = uio_openDirRelative (contentDir, "addons", 0); + // If anything fails here, it will fail again later, so + // we'll just keep quiet about it for now + if (addonsDir == NULL) + return; + + for (; *addons != NULL; addons++) + { + const char *addon = *addons; + uio_DirHandle *addonDir; + uio_DirHandle *shadowDir; + + addonDir = uio_openDirRelative (addonsDir, addon, 0); + if (addonDir == NULL) + continue; + + // Mount addon's "shadow-content" on top of "/" + shadowDir = uio_openDirRelative (addonDir, shadowDirName, 0); + if (shadowDir) + { + log_add (log_Debug, "Mounting shadow content of '%s' addon", addon); + mountDirZips (shadowDir, "/", uio_MOUNT_TOP, NULL); + uio_closeDir (shadowDir); + } + uio_closeDir (addonDir); + } + + uio_closeDir (addonsDir); +} + +void prepareAddons (const char **addons) { for (; *addons != NULL; addons++) { + log_add (log_Info, "Loading addon '%s'", *addons); if (!loadAddon (*addons)) { break; Modified: trunk/sc2/src/options.h =================================================================== --- trunk/sc2/src/options.h 2009-06-28 23:43:08 UTC (rev 3157) +++ trunk/sc2/src/options.h 2009-06-29 05:05:48 UTC (rev 3158) @@ -71,6 +71,7 @@ void prepareMeleeDir (void); void prepareSaveDir (void); void prepareAddons (const char **addons); +void prepareShadowAddons (const char **addons); BOOLEAN loadAddon (const char *addon); int loadIndices (uio_DirHandle *baseDir); Modified: trunk/sc2/src/starcon2.c =================================================================== --- trunk/sc2/src/starcon2.c 2009-06-28 23:43:08 UTC (rev 3157) +++ trunk/sc2/src/starcon2.c 2009-06-29 05:05:48 UTC (rev 3158) @@ -444,6 +444,7 @@ prepareContentDir (options.contentDir, options.addonDir, argv[0]); prepareMeleeDir (); prepareSaveDir (); + prepareShadowAddons (options.addons); #if 0 initTempDir (); #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2009-06-30 00:08:35
|
Revision: 3159 http://sc2.svn.sourceforge.net/sc2/?rev=3159&view=rev Author: avolkov Date: 2009-06-30 00:07:20 +0000 (Tue, 30 Jun 2009) Log Message: ----------- Load override.cfg from config dir to add or override menu controls Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/doc/devel/debug trunk/sc2/src/sc2code/libs/input/sdl/input.c trunk/sc2/src/sc2code/libs/resource/getres.c trunk/sc2/src/sc2code/libs/resource/index.h trunk/sc2/src/sc2code/libs/resource/resinit.c Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2009-06-29 05:05:48 UTC (rev 3158) +++ trunk/sc2/ChangeLog 2009-06-30 00:07:20 UTC (rev 3159) @@ -1,4 +1,5 @@ Changes towards version 0.7: +- Load override.cfg from user's dir to add or override menu controls - Alex - Allow addons to override any content by placing zips into their 'shadow-content' dir - Alex - Content reorg: font chars now use hexadecimal numbering - Alex Modified: trunk/sc2/doc/devel/debug =================================================================== --- trunk/sc2/doc/devel/debug 2009-06-29 05:05:48 UTC (rev 3158) +++ trunk/sc2/doc/devel/debug 2009-06-30 00:07:20 UTC (rev 3159) @@ -11,8 +11,8 @@ when the current activity (IP, HyperSpace, Communication, Battle) changes. By setting this, a function can be called from the main loop, thereby eliminating threading issues that may otherwise arrise. -The debug key can be specified in keys.cfg by adding a line with a text -similar to "Debug: key F11". +The debug key can be specified in user's override.cfg by adding a line +with a text similar to "debug.1 = STRING:key F12". An interactive way to access various debugging code, similar to the uio debug mode (see below) is in the works. Modified: trunk/sc2/src/sc2code/libs/input/sdl/input.c =================================================================== --- trunk/sc2/src/sc2code/libs/input/sdl/input.c 2009-06-29 05:05:48 UTC (rev 3158) +++ trunk/sc2/src/sc2code/libs/input/sdl/input.c 2009-06-30 00:07:20 UTC (rev 3159) @@ -150,6 +150,7 @@ /* First, load in the menu keys */ LoadResourceIndex (contentDir, "menu.key", "menu."); + LoadResourceIndex (configDir, "override.cfg", "menu."); for (i = 0; i < NUM_MENU_KEYS; i++) { if (!menu_res_names[i]) Modified: trunk/sc2/src/sc2code/libs/resource/getres.c =================================================================== --- trunk/sc2/src/sc2code/libs/resource/getres.c 2009-06-29 05:05:48 UTC (rev 3158) +++ trunk/sc2/src/sc2code/libs/resource/getres.c 2009-06-30 00:07:20 UTC (rev 3159) @@ -121,11 +121,11 @@ return NULL; } + if (desc->resdata.ptr == NULL) + loadResourceDesc (desc); if (desc->resdata.ptr != NULL) - return desc->resdata.ptr; + ++desc->refcount; - loadResourceDesc (desc); - return desc->resdata.ptr; // May still be NULL, if the load failed. } @@ -176,6 +176,13 @@ return; } + if (desc->refcount > 0) + --desc->refcount; + else + log_add (log_Debug, "Warning: freeing an unreferenced resource."); + if (desc->refcount > 0) + return; // Still references left + freeFun = desc->vtable->freeFun; if (freeFun == NULL) { @@ -216,7 +223,7 @@ freeFun = desc->vtable->freeFun; if (freeFun == NULL) { - log_add (log_Debug, "Warning: trying to detatch from a non-heap resource."); + log_add (log_Debug, "Warning: trying to detach from a non-heap resource."); return NULL; } @@ -227,8 +234,16 @@ return NULL; } + if (desc->refcount > 1) + { + log_add (log_Debug, "Warning: trying to detach a resource referenced " + "%u times", desc->refcount); + return NULL; + } + result = desc->resdata.ptr; desc->resdata.ptr = NULL; + desc->refcount = 0; return result; } Modified: trunk/sc2/src/sc2code/libs/resource/index.h =================================================================== --- trunk/sc2/src/sc2code/libs/resource/index.h 2009-06-29 05:05:48 UTC (rev 3158) +++ trunk/sc2/src/sc2code/libs/resource/index.h 2009-06-30 00:07:20 UTC (rev 3159) @@ -37,6 +37,8 @@ char *fname; ResourceHandlers *vtable; RESOURCE_DATA resdata; + // refcount is rudimentary as nothing really frees the descriptors + unsigned refcount; } ResourceDesc; struct resource_index_desc Modified: trunk/sc2/src/sc2code/libs/resource/resinit.c =================================================================== --- trunk/sc2/src/sc2code/libs/resource/resinit.c 2009-06-29 05:05:48 UTC (rev 3158) +++ trunk/sc2/src/sc2code/libs/resource/resinit.c 2009-06-30 00:07:20 UTC (rev 3159) @@ -106,6 +106,7 @@ strncpy (result->fname, path, pathlen); result->fname[pathlen] = '\0'; result->vtable = vtable; + result->refcount = 0; if (vtable->freeFun == NULL) { @@ -324,6 +325,9 @@ ResourceDesc *desc = lookupResourceDesc (idx, key); if (!desc || !desc->resdata.ptr || strcmp(desc->vtable->resType, "STRING")) return NULL; + /* TODO: Work out exact STRING semantics, specifically, the lifetime of + * the returned value. If caller is allowed to reference the returned + * value forever, STRING has to be ref-counted. */ return (const char *)desc->resdata.ptr; } @@ -424,7 +428,8 @@ { if (oldDesc->resdata.ptr != NULL) { - log_add (log_Warning, "WARNING: Replacing '%s' while it is live", key); + if (oldDesc->refcount > 0) + log_add (log_Warning, "WARNING: Replacing '%s' while it is live", key); if (oldDesc->vtable && oldDesc->vtable->freeFun) { oldDesc->vtable->freeFun(oldDesc->resdata.ptr); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2009-06-30 01:11:34
|
Revision: 3160 http://sc2.svn.sourceforge.net/sc2/?rev=3160&view=rev Author: avolkov Date: 2009-06-30 01:11:27 +0000 (Tue, 30 Jun 2009) Log Message: ----------- Change hardcoded Starbase and Sa-Matra values to pretty enum values; bug #1047; from Nic Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/src/sc2code/planets/calc.c trunk/sc2/src/sc2code/planets/genchmmr.c trunk/sc2/src/sc2code/planets/gensam.c trunk/sc2/src/sc2code/planets/gensol.c trunk/sc2/src/sc2code/planets/gensyr.c trunk/sc2/src/sc2code/planets/plandata.h trunk/sc2/src/sc2code/planets/planets.h trunk/sc2/src/sc2code/planets/solarsys.c trunk/sc2/src/sc2code/uqmdebug.c Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2009-06-30 00:07:20 UTC (rev 3159) +++ trunk/sc2/ChangeLog 2009-06-30 01:11:27 UTC (rev 3160) @@ -1,4 +1,6 @@ Changes towards version 0.7: +- Change hardcoded Starbase and Sa-Matra values to pretty enum values + (bug #1047), from Nic - Load override.cfg from user's dir to add or override menu controls - Alex - Allow addons to override any content by placing zips into their 'shadow-content' dir - Alex Modified: trunk/sc2/src/sc2code/planets/calc.c =================================================================== --- trunk/sc2/src/sc2code/planets/calc.c 2009-06-30 00:07:20 UTC (rev 3159) +++ trunk/sc2/src/sc2code/planets/calc.c 2009-06-30 01:11:27 UTC (rev 3160) @@ -235,8 +235,7 @@ { DWORD old_seed; - /* Earth Starbase */ - if (pPlanetDesc->data_index == (BYTE)~0) + if (pPlanetDesc->data_index == HIERARCHY_STARBASE) return (0); old_seed = TFB_SeedRandom (pPlanetDesc->rand_seed); Modified: trunk/sc2/src/sc2code/planets/genchmmr.c =================================================================== --- trunk/sc2/src/sc2code/planets/genchmmr.c 2009-06-30 00:07:20 UTC (rev 3159) +++ trunk/sc2/src/sc2code/planets/genchmmr.c 2009-06-30 01:11:27 UTC (rev 3160) @@ -41,7 +41,7 @@ COUNT angle; DWORD rand_val; - pSolarSysState->MoonDesc[0].data_index = (BYTE)~0; + pSolarSysState->MoonDesc[0].data_index = HIERARCHY_STARBASE; pSolarSysState->MoonDesc[0].radius = MIN_MOON_RADIUS; rand_val = TFB_Random (); angle = NORMALIZE_ANGLE (LOWORD (rand_val)); Modified: trunk/sc2/src/sc2code/planets/gensam.c =================================================================== --- trunk/sc2/src/sc2code/planets/gensam.c 2009-06-30 00:07:20 UTC (rev 3159) +++ trunk/sc2/src/sc2code/planets/gensam.c 2009-06-30 01:11:27 UTC (rev 3160) @@ -186,7 +186,7 @@ COUNT angle; DWORD rand_val; - pSolarSysState->MoonDesc[0].data_index = (BYTE)(~0 - 1); + pSolarSysState->MoonDesc[0].data_index = SA_MATRA; pSolarSysState->MoonDesc[0].radius = MIN_MOON_RADIUS + (2 * MOON_DELTA); rand_val = TFB_Random (); Modified: trunk/sc2/src/sc2code/planets/gensol.c =================================================================== --- trunk/sc2/src/sc2code/planets/gensol.c 2009-06-30 00:07:20 UTC (rev 3159) +++ trunk/sc2/src/sc2code/planets/gensol.c 2009-06-30 01:11:27 UTC (rev 3160) @@ -462,7 +462,7 @@ COUNT angle; /* Starbase: */ - pSolarSysState->MoonDesc[0].data_index = (BYTE)~0; + pSolarSysState->MoonDesc[0].data_index = HIERARCHY_STARBASE; pSolarSysState->MoonDesc[0].radius = MIN_MOON_RADIUS; angle = HALF_CIRCLE + QUADRANT; pSolarSysState->MoonDesc[0].location.x = Modified: trunk/sc2/src/sc2code/planets/gensyr.c =================================================================== --- trunk/sc2/src/sc2code/planets/gensyr.c 2009-06-30 00:07:20 UTC (rev 3159) +++ trunk/sc2/src/sc2code/planets/gensyr.c 2009-06-30 01:11:27 UTC (rev 3160) @@ -75,7 +75,7 @@ GenerateRandomIP (GENERATE_MOONS); if (pSolarSysState->pBaseDesc == &pSolarSysState->PlanetDesc[0]) { - pSolarSysState->MoonDesc[0].data_index = (BYTE)~0; + pSolarSysState->MoonDesc[0].data_index = HIERARCHY_STARBASE; pSolarSysState->MoonDesc[0].radius = MIN_MOON_RADIUS; pSolarSysState->MoonDesc[0].location.x = COSINE (QUADRANT, pSolarSysState->MoonDesc[0].radius); Modified: trunk/sc2/src/sc2code/planets/plandata.h =================================================================== --- trunk/sc2/src/sc2code/planets/plandata.h 2009-06-30 00:07:20 UTC (rev 3159) +++ trunk/sc2/src/sc2code/planets/plandata.h 2009-06-30 01:11:27 UTC (rev 3160) @@ -180,7 +180,13 @@ YEL_GAS_GIANT, LAST_GAS_GIANT = YEL_GAS_GIANT, - NUMBER_OF_PLANET_TYPES + NUMBER_OF_PLANET_TYPES, + + WORLD_TYPE_SPECIAL = 0x80, + PLANET_SHIELDED = WORLD_TYPE_SPECIAL, + + HIERARCHY_STARBASE = 127 | WORLD_TYPE_SPECIAL, + SA_MATRA = 126 | WORLD_TYPE_SPECIAL, }; #define NUMBER_OF_SMALL_ROCKY_WORLDS (LAST_SMALL_ROCKY_WORLD - FIRST_SMALL_ROCKY_WORLD + 1) Modified: trunk/sc2/src/sc2code/planets/planets.h =================================================================== --- trunk/sc2/src/sc2code/planets/planets.h 2009-06-30 00:07:20 UTC (rev 3159) +++ trunk/sc2/src/sc2code/planets/planets.h 2009-06-30 01:11:27 UTC (rev 3160) @@ -113,8 +113,6 @@ #define MIN_MOON_RADIUS 35 #define MOON_DELTA 20 -#define PLANET_SHIELDED (1 << 7) - typedef struct planet_desc { DWORD rand_seed; Modified: trunk/sc2/src/sc2code/planets/solarsys.c =================================================================== --- trunk/sc2/src/sc2code/planets/solarsys.c 2009-06-30 00:07:20 UTC (rev 3159) +++ trunk/sc2/src/sc2code/planets/solarsys.c 2009-06-30 01:11:27 UTC (rev 3160) @@ -152,15 +152,13 @@ pMoonDesc->temp_color = pCurDesc->temp_color; data_index = pMoonDesc->data_index; - if (data_index == (BYTE)~0) + if (data_index == HIERARCHY_STARBASE) { - /* Starbase */ pMoonDesc->image.frame = SetAbsFrameIndex (SpaceJunkFrame, 16); } - else if (data_index == (BYTE)(~0 - 1)) + else if (data_index == SA_MATRA) { - /* Sa-Matra */ pMoonDesc->image.frame = SetAbsFrameIndex (SpaceJunkFrame, 19); } Modified: trunk/sc2/src/sc2code/uqmdebug.c =================================================================== --- trunk/sc2/src/sc2code/uqmdebug.c 2009-06-30 00:07:20 UTC (rev 3159) +++ trunk/sc2/src/sc2code/uqmdebug.c 2009-06-30 01:11:27 UTC (rev 3160) @@ -991,11 +991,11 @@ { const char *typeStr; - if (moon->data_index == (BYTE) ~0) + if (moon->data_index == HIERARCHY_STARBASE) { typeStr = "StarBase"; } - else if (moon->data_index == (BYTE) (~0 - 1)) + else if (moon->data_index == SA_MATRA) { typeStr = "Sa-Matra"; } @@ -1014,13 +1014,11 @@ { PLANET_INFO *info; - if (world->data_index == (BYTE) ~0) { - // StarBase + if (world->data_index == HIERARCHY_STARBASE) { return; } - if (world->data_index == (BYTE)(~0 - 1)) { - // Sa-Matra + if (world->data_index == SA_MATRA) { return; } @@ -1240,13 +1238,11 @@ static void tallyResourcesWorld (TallyResourcesArg *arg, const PLANET_DESC *world) { - if (world->data_index == (BYTE) ~0) { - // StarBase + if (world->data_index == HIERARCHY_STARBASE) { return; } - if (world->data_index == (BYTE)(~0 - 1)) { - // Sa-Matra + if (world->data_index == SA_MATRA) { return; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2009-06-30 05:32:38
|
Revision: 3162 http://sc2.svn.sourceforge.net/sc2/?rev=3162&view=rev Author: avolkov Date: 2009-06-30 05:32:24 +0000 (Tue, 30 Jun 2009) Log Message: ----------- Rounding-error correction in log(x|y)ToUniverse; bug #1046; from Nic Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/src/sc2code/units.h Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2009-06-30 01:37:53 UTC (rev 3161) +++ trunk/sc2/ChangeLog 2009-06-30 05:32:24 UTC (rev 3162) @@ -1,4 +1,5 @@ Changes towards version 0.7: +- Rounding-error correction in log(x|y)ToUniverse (bug #1046), from Nic - Change hardcoded Starbase and Sa-Matra values to pretty enum values (bug #1047), from Nic - Load override.cfg from user's dir to add or override menu controls - Alex Modified: trunk/sc2/src/sc2code/units.h =================================================================== --- trunk/sc2/src/sc2code/units.h 2009-06-30 01:37:53 UTC (rev 3161) +++ trunk/sc2/src/sc2code/units.h 2009-06-30 05:32:24 UTC (rev 3162) @@ -92,11 +92,18 @@ #define UNIT_SCREEN_WIDTH 63 #define UNIT_SCREEN_HEIGHT 50 +#define LOG_UNITS_X ((SDWORD)(LOG_SPACE_WIDTH >> 4) * SECTOR_WIDTH) +#define LOG_UNITS_Y ((SDWORD)(LOG_SPACE_HEIGHT >> 4) * SECTOR_HEIGHT) +#define UNIVERSE_UNITS_X (((MAX_X_UNIVERSE + 1) >> 4) * 10) +#define UNIVERSE_UNITS_Y (((MAX_Y_UNIVERSE + 1) >> 4)) + +#define ROUNDING_ERROR(div) ((div) >> 1) + static inline COORD logxToUniverse (SDWORD lx) { - return (COORD) ((lx * ((MAX_X_UNIVERSE + 1) >> 4)) * 10 - / ((SDWORD) ((LOG_SPACE_WIDTH) >> 4) * SECTOR_WIDTH)); + return (COORD) ((lx * UNIVERSE_UNITS_X + ROUNDING_ERROR(LOG_UNITS_X)) + / LOG_UNITS_X); } #define LOGX_TO_UNIVERSE(lx) \ logxToUniverse (lx) @@ -104,27 +111,25 @@ logyToUniverse (SDWORD ly) { return (COORD) (MAX_Y_UNIVERSE - - (COORD)(((SDWORD) (ly) * ((MAX_Y_UNIVERSE + 1) >> 4)) - / ((SDWORD) ((LOG_SPACE_HEIGHT) >> 4) * SECTOR_HEIGHT))); + ((ly * UNIVERSE_UNITS_Y + ROUNDING_ERROR(LOG_UNITS_Y)) + / LOG_UNITS_Y)); } #define LOGY_TO_UNIVERSE(ly) \ logyToUniverse (ly) static inline SDWORD universeToLogx (COORD ux) { - return ((SDWORD) ux * ((SDWORD) ((LOG_SPACE_WIDTH) >> 4) * SECTOR_WIDTH) - + ((((MAX_X_UNIVERSE + 1) >> 4) * 10) >> 1)) - / (((MAX_X_UNIVERSE + 1) >> 4) * 10); + return (ux * LOG_UNITS_X + ROUNDING_ERROR(UNIVERSE_UNITS_X)) + / UNIVERSE_UNITS_X; } #define UNIVERSE_TO_LOGX(ux) \ universeToLogx (ux) static inline SDWORD universeToLogy (COORD uy) { - return ((SDWORD) (MAX_Y_UNIVERSE - uy) - * ((SDWORD) ((LOG_SPACE_HEIGHT) >> 4) * SECTOR_HEIGHT) - + (((MAX_Y_UNIVERSE + 1) >> 4) >> 1)) - / ((MAX_Y_UNIVERSE + 1) >> 4); + return ((MAX_Y_UNIVERSE - uy) * LOG_UNITS_Y + + ROUNDING_ERROR(UNIVERSE_UNITS_Y)) + / UNIVERSE_UNITS_Y; } #define UNIVERSE_TO_LOGY(uy) \ universeToLogy (uy) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2009-06-30 10:06:56
|
Revision: 3163 http://sc2.svn.sourceforge.net/sc2/?rev=3163&view=rev Author: avolkov Date: 2009-06-30 10:06:23 +0000 (Tue, 30 Jun 2009) Log Message: ----------- Starmap unit conversion corrections and lazy-cursor fix; fixes bug #970 Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/src/sc2code/planets/pstarmap.c Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2009-06-30 05:32:24 UTC (rev 3162) +++ trunk/sc2/ChangeLog 2009-06-30 10:06:23 UTC (rev 3163) @@ -1,4 +1,5 @@ Changes towards version 0.7: +- Starmap unit conversion corrections; fixes bug #970 - Alex - Rounding-error correction in log(x|y)ToUniverse (bug #1046), from Nic - Change hardcoded Starbase and Sa-Matra values to pretty enum values (bug #1047), from Nic Modified: trunk/sc2/src/sc2code/planets/pstarmap.c =================================================================== --- trunk/sc2/src/sc2code/planets/pstarmap.c 2009-06-30 05:32:24 UTC (rev 3162) +++ trunk/sc2/src/sc2code/planets/pstarmap.c 2009-06-30 10:06:23 UTC (rev 3163) @@ -36,24 +36,59 @@ #include "libs/mathlib.h" +static inline long +signedDivWithError (long val, long divisor) +{ + int invert = 0; + if (val < 0) + { + invert = 1; + val = -val; + } + val = (val + ROUNDING_ERROR (divisor)) / divisor; + return invert ? -val : val; +} -#define UNIVERSE_TO_DISPX(ux) \ - (COORD)(((((long)(ux) - pMenuState->flash_rect1.corner.x) \ - << LOBYTE (pMenuState->delta_item)) \ - * SIS_SCREEN_WIDTH / (MAX_X_UNIVERSE + 1)) + ((SIS_SCREEN_WIDTH - 1) >> 1)) -#define UNIVERSE_TO_DISPY(uy) \ - (COORD)(((((long)pMenuState->flash_rect1.corner.y - (uy)) \ - << LOBYTE (pMenuState->delta_item)) \ - * SIS_SCREEN_HEIGHT / (MAX_Y_UNIVERSE + 1)) + ((SIS_SCREEN_HEIGHT - 1) >> 1)) -#define DISP_TO_UNIVERSEX(dx) \ - ((COORD)((((long)((dx) - ((SIS_SCREEN_WIDTH - 1) >> 1)) \ - * (MAX_X_UNIVERSE + 1)) >> LOBYTE (pMenuState->delta_item)) \ - / SIS_SCREEN_WIDTH) + pMenuState->flash_rect1.corner.x) -#define DISP_TO_UNIVERSEY(dy) \ - ((COORD)((((long)(((SIS_SCREEN_HEIGHT - 1) >> 1) - (dy)) \ - * (MAX_Y_UNIVERSE + 1)) >> LOBYTE (pMenuState->delta_item)) \ - / SIS_SCREEN_HEIGHT) + pMenuState->flash_rect1.corner.y) +#define MAP_FIT_X ((MAX_X_UNIVERSE + 1) / SIS_SCREEN_WIDTH + 1) +static inline COORD +universeToDispx (COORD ux) +{ + return signedDivWithError ((((long)ux - pMenuState->flash_rect1.corner.x) + << LOBYTE (pMenuState->delta_item)) + * SIS_SCREEN_WIDTH, MAX_X_UNIVERSE + MAP_FIT_X) + + ((SIS_SCREEN_WIDTH - 1) >> 1); +} +#define UNIVERSE_TO_DISPX(ux) universeToDispx(ux) + +static inline COORD +universeToDispy (COORD uy) +{ + return signedDivWithError ((((long)pMenuState->flash_rect1.corner.y - uy) + << LOBYTE (pMenuState->delta_item)) + * SIS_SCREEN_HEIGHT, MAX_Y_UNIVERSE + 2) + + ((SIS_SCREEN_HEIGHT - 1) >> 1); +} +#define UNIVERSE_TO_DISPY(uy) universeToDispy(uy) + +static inline COORD +dispxToUniverse (COORD dx) +{ + return (((long)(dx - ((SIS_SCREEN_WIDTH - 1) >> 1)) + * (MAX_X_UNIVERSE + MAP_FIT_X)) >> LOBYTE (pMenuState->delta_item)) + / SIS_SCREEN_WIDTH + pMenuState->flash_rect1.corner.x; +} +#define DISP_TO_UNIVERSEX(dx) dispxToUniverse(dx) + +static inline COORD +dispyToUniverse (COORD dy) +{ + return (((long)(((SIS_SCREEN_HEIGHT - 1) >> 1) - dy) + * (MAX_Y_UNIVERSE + 2)) >> LOBYTE (pMenuState->delta_item)) + / SIS_SCREEN_HEIGHT + pMenuState->flash_rect1.corner.y; +} +#define DISP_TO_UNIVERSEY(dy) dispyToUniverse(dy) + static BOOLEAN transition_pending; static int @@ -619,43 +654,29 @@ if (sx) { - pMS->first_item.x = - DISP_TO_UNIVERSEX (s.origin.x) - sx; + pMS->first_item.x = DISP_TO_UNIVERSEX (s.origin.x) - sx; while (UNIVERSE_TO_DISPX (pMS->first_item.x) == pt.x) - { pMS->first_item.x += sx; - if (pMS->first_item.x < 0) - { - pMS->first_item.x = 0; - break; - } - else if (pMS->first_item.x > MAX_X_UNIVERSE) - { - pMS->first_item.x = MAX_X_UNIVERSE; - break; - } - } + + if (pMS->first_item.x < 0) + pMS->first_item.x = 0; + else if (pMS->first_item.x > MAX_X_UNIVERSE) + pMS->first_item.x = MAX_X_UNIVERSE; + s.origin.x = UNIVERSE_TO_DISPX (pMS->first_item.x); } if (sy) { - pMS->first_item.y = - DISP_TO_UNIVERSEY (s.origin.y) + sy; + pMS->first_item.y = DISP_TO_UNIVERSEY (s.origin.y) + sy; while (UNIVERSE_TO_DISPY (pMS->first_item.y) == pt.y) - { pMS->first_item.y -= sy; - if (pMS->first_item.y < 0) - { - pMS->first_item.y = 0; - break; - } - else if (pMS->first_item.y > MAX_Y_UNIVERSE) - { - pMS->first_item.y = MAX_Y_UNIVERSE; - break; - } - } + + if (pMS->first_item.y < 0) + pMS->first_item.y = 0; + else if (pMS->first_item.y > MAX_Y_UNIVERSE) + pMS->first_item.y = MAX_Y_UNIVERSE; + s.origin.y = UNIVERSE_TO_DISPY (pMS->first_item.y); } @@ -707,6 +728,19 @@ pMS->first_item = BestSDPtr->star_pt; GetClusterName (BestSDPtr, buf); } + else + { // No star found. Reset the coordinates to the cursor's location + pMS->first_item.x = DISP_TO_UNIVERSEX (pt.x); + if (pMS->first_item.x < 0) + pMS->first_item.x = 0; + else if (pMS->first_item.x > MAX_X_UNIVERSE) + pMS->first_item.x = MAX_X_UNIVERSE; + pMS->first_item.y = DISP_TO_UNIVERSEY (pt.y); + if (pMS->first_item.y < 0) + pMS->first_item.y = 0; + else if (pMS->first_item.y > MAX_Y_UNIVERSE) + pMS->first_item.y = MAX_Y_UNIVERSE; + } if (GET_GAME_STATE (ARILOU_SPACE)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2009-07-01 01:22:54
|
Revision: 3164 http://sc2.svn.sourceforge.net/sc2/?rev=3164&view=rev Author: avolkov Date: 2009-07-01 00:25:39 +0000 (Wed, 01 Jul 2009) Log Message: ----------- Added missing sleeps in DoInput() functions; bug #893. Random minor cleanups Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/src/sc2code/comm.c trunk/sc2/src/sc2code/gameopt.c trunk/sc2/src/sc2code/getchar.c trunk/sc2/src/sc2code/libs/video/vidplayer.c trunk/sc2/src/sc2code/loadmele.c trunk/sc2/src/sc2code/melee.c trunk/sc2/src/sc2code/menu.c trunk/sc2/src/sc2code/outfit.c trunk/sc2/src/sc2code/pickship.c trunk/sc2/src/sc2code/planets/cargo.c trunk/sc2/src/sc2code/planets/devices.c trunk/sc2/src/sc2code/planets/pstarmap.c trunk/sc2/src/sc2code/planets/roster.c trunk/sc2/src/sc2code/planets/scan.c trunk/sc2/src/sc2code/restart.c trunk/sc2/src/sc2code/shipyard.c trunk/sc2/src/sc2code/starbase.c Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2009-06-30 10:06:23 UTC (rev 3163) +++ trunk/sc2/ChangeLog 2009-07-01 00:25:39 UTC (rev 3164) @@ -1,4 +1,5 @@ Changes towards version 0.7: +- 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 - Change hardcoded Starbase and Sa-Matra values to pretty enum values Modified: trunk/sc2/src/sc2code/comm.c =================================================================== --- trunk/sc2/src/sc2code/comm.c 2009-06-30 10:06:23 UTC (rev 3163) +++ trunk/sc2/src/sc2code/comm.c 2009-07-01 00:25:39 UTC (rev 3164) @@ -1077,6 +1077,7 @@ PlayerResponseInput (ENCOUNTER_STATE *pES) { BYTE response; + DWORD TimeIn = GetTimeCounter (); if (pES->top_response == (BYTE)~0) { @@ -1152,6 +1153,8 @@ UnbatchGraphics (); UnlockMutex (GraphicsLock); } + + SleepThreadUntil (TimeIn + ONE_SECOND / 20); } } Modified: trunk/sc2/src/sc2code/gameopt.c =================================================================== --- trunk/sc2/src/sc2code/gameopt.c 2009-06-30 10:06:23 UTC (rev 3163) +++ trunk/sc2/src/sc2code/gameopt.c 2009-07-01 00:25:39 UTC (rev 3164) @@ -915,6 +915,7 @@ BYTE NewState; SUMMARY_DESC *pSD; BOOLEAN first_time; + DWORD TimeIn = GetTimeCounter (); if (GLOBAL (CurrentActivity) & CHECK_ABORT) { @@ -1185,6 +1186,8 @@ SetFlashRect (NULL, (FRAME)0); UnlockMutex (GraphicsLock); } + + SleepThreadUntil (TimeIn + ONE_SECOND / 30); } return (TRUE); Modified: trunk/sc2/src/sc2code/getchar.c =================================================================== --- trunk/sc2/src/sc2code/getchar.c 2009-06-30 10:06:23 UTC (rev 3163) +++ trunk/sc2/src/sc2code/getchar.c 2009-07-01 00:25:39 UTC (rev 3164) @@ -419,6 +419,8 @@ if (pTES->FrameCallback) return pTES->FrameCallback (pTES); + else + SleepThread (ONE_SECOND / 30); return TRUE; } Modified: trunk/sc2/src/sc2code/libs/video/vidplayer.c =================================================================== --- trunk/sc2/src/sc2code/libs/video/vidplayer.c 2009-06-30 10:06:23 UTC (rev 3163) +++ trunk/sc2/src/sc2code/libs/video/vidplayer.c 2009-07-01 00:25:39 UTC (rev 3164) @@ -453,6 +453,10 @@ } // non a/s decoder seeking is not supported yet } + else + { + SleepThread (ONE_SECOND / 30); + } return TRUE; } Modified: trunk/sc2/src/sc2code/loadmele.c =================================================================== --- trunk/sc2/src/sc2code/loadmele.c 2009-06-30 10:06:23 UTC (rev 3163) +++ trunk/sc2/src/sc2code/loadmele.c 2009-07-01 00:25:39 UTC (rev 3164) @@ -328,6 +328,8 @@ BOOLEAN DoLoadTeam (MELEE_STATE *pMS) { + DWORD TimeIn = GetTimeCounter (); + if (GLOBAL (CurrentActivity) & CHECK_ABORT) return FALSE; @@ -434,6 +436,8 @@ } } + SleepThreadUntil (TimeIn + ONE_SECOND / 30); + return TRUE; } Modified: trunk/sc2/src/sc2code/melee.c =================================================================== --- trunk/sc2/src/sc2code/melee.c 2009-06-30 10:06:23 UTC (rev 3163) +++ trunk/sc2/src/sc2code/melee.c 2009-07-01 00:25:39 UTC (rev 3164) @@ -188,7 +188,7 @@ // Loaded from melee/melebkgd.ani static FRAME BuildPickFrame; // Constructed. -DWORD InTime; +DWORD LastInputTime; MELEE_STATE *pMeleeState; BOOLEAN DoMelee (MELEE_STATE *pMS); @@ -1014,9 +1014,11 @@ static void AdvanceCursor (MELEE_STATE *pMS) { - if (++pMS->col == NUM_MELEE_COLUMNS) + ++pMS->col; + if (pMS->col == NUM_MELEE_COLUMNS) { - if (++pMS->row < NUM_MELEE_ROWS) + ++pMS->row; + if (pMS->row < NUM_MELEE_ROWS) pMS->col = 0; else { @@ -1047,8 +1049,11 @@ static BOOLEAN DoEdit (MELEE_STATE *pMS) { + DWORD TimeIn = GetTimeCounter (); + if (GLOBAL (CurrentActivity) & CHECK_ABORT) return (FALSE); + SetMenuSounds (MENU_SOUND_ARROWS, MENU_SOUND_SELECT | MENU_SOUND_DELETE); if (!pMS->Initialized) { @@ -1078,7 +1083,7 @@ pMS->MeleeOption = START_MELEE; pMS->InputFunc = DoMelee; UnlockMutex (GraphicsLock); - InTime = GetTimeCounter (); + LastInputTime = GetTimeCounter (); } else if (pMS->row < NUM_MELEE_ROWS && (PulsedInputState.menu[KEY_MENU_SELECT] || @@ -1151,13 +1156,13 @@ { if (PulsedInputState.menu[KEY_MENU_LEFT]) { - if (col-- == 0) - col = 0; + if (col > 0) + --col; } else if (PulsedInputState.menu[KEY_MENU_RIGHT]) { - if (++col == NUM_MELEE_COLUMNS) - col = NUM_MELEE_COLUMNS - 1; + if (col < NUM_MELEE_COLUMNS - 1) + ++col; } if (PulsedInputState.menu[KEY_MENU_UP]) @@ -1205,6 +1210,8 @@ flushPacketQueues (); #endif + SleepThreadUntil (TimeIn + ONE_SECOND / 30); + return (TRUE); } @@ -1212,6 +1219,8 @@ static BOOLEAN DoPickShip (MELEE_STATE *pMS) { + DWORD TimeIn = GetTimeCounter (); + if (GLOBAL (CurrentActivity) & CHECK_ABORT) return (FALSE); @@ -1302,12 +1311,14 @@ if (PulsedInputState.menu[KEY_MENU_LEFT]) { - if (NewStarShip-- % NUM_PICK_COLS == 0) + if (NewStarShip % NUM_PICK_COLS == 0) NewStarShip += NUM_PICK_COLS; + --NewStarShip; } else if (PulsedInputState.menu[KEY_MENU_RIGHT]) { - if (++NewStarShip % NUM_PICK_COLS == 0) + ++NewStarShip; + if (NewStarShip % NUM_PICK_COLS == 0) NewStarShip -= NUM_PICK_COLS; } @@ -1336,6 +1347,8 @@ } } + SleepThreadUntil (TimeIn + ONE_SECOND / 30); + return (TRUE); } @@ -1836,6 +1849,7 @@ static BOOLEAN DoConnectingDialog (MELEE_STATE *pMS) { + DWORD TimeIn = GetTimeCounter (); COUNT which_side = (pMS->MeleeOption == NET_TOP) ? 1 : 0; NetConnection *conn; @@ -1947,7 +1961,7 @@ flushPacketQueues (); - SleepThread (30); + SleepThreadUntil (TimeIn + ONE_SECOND / 30); return TRUE; } @@ -2021,6 +2035,8 @@ BOOLEAN DoMelee (MELEE_STATE *pMS) { + DWORD TimeIn = GetTimeCounter (); + BOOLEAN force_select = FALSE; if (GLOBAL (CurrentActivity) & CHECK_ABORT) return (FALSE); @@ -2047,7 +2063,7 @@ XFormColorMap ((COLORMAPPTR)clut_buf, ONE_SECOND / 2); } - InTime = GetTimeCounter (); + LastInputTime = GetTimeCounter (); return TRUE; } @@ -2060,7 +2076,7 @@ { // Start editing the teams. LockMutex (GraphicsLock); - InTime = GetTimeCounter (); + LastInputTime = GetTimeCounter (); Deselect (pMS->MeleeOption); UnlockMutex (GraphicsLock); pMS->MeleeOption = EDIT_MELEE; @@ -2086,19 +2102,19 @@ NewMeleeOption = pMS->MeleeOption; if (PulsedInputState.menu[KEY_MENU_UP]) { - InTime = GetTimeCounter (); - if (NewMeleeOption-- == TOP_ENTRY) - NewMeleeOption = TOP_ENTRY; + LastInputTime = GetTimeCounter (); + if (NewMeleeOption != TOP_ENTRY) + --NewMeleeOption; } else if (PulsedInputState.menu[KEY_MENU_DOWN]) { - InTime = GetTimeCounter (); - if (NewMeleeOption++ == QUIT_BOT) - NewMeleeOption = QUIT_BOT; + LastInputTime = GetTimeCounter (); + if (NewMeleeOption != QUIT_BOT) + ++NewMeleeOption; } if ((PlayerControl[0] & PlayerControl[1] & PSYTRON_CONTROL) - && GetTimeCounter () - InTime > ONE_SECOND * 10) + && GetTimeCounter () - LastInputTime > ONE_SECOND * 10) { force_select = TRUE; NewMeleeOption = START_MELEE; @@ -2143,7 +2159,7 @@ pMS->Initialized = FALSE; pMS->side = pMS->MeleeOption == LOAD_TOP ? 0 : 1; DoLoadTeam (pMS); - InTime = GetTimeCounter (); + LastInputTime = GetTimeCounter (); break; case SAVE_TOP: case SAVE_BOT: @@ -2208,6 +2224,8 @@ check_for_disconnections (pMS); #endif + SleepThreadUntil (TimeIn + ONE_SECOND / 30); + return (TRUE); } @@ -2695,5 +2713,3 @@ #endif /* NETPLAY */ - - Modified: trunk/sc2/src/sc2code/menu.c =================================================================== --- trunk/sc2/src/sc2code/menu.c 2009-06-30 10:06:23 UTC (rev 3163) +++ trunk/sc2/src/sc2code/menu.c 2009-07-01 00:25:39 UTC (rev 3164) @@ -446,6 +446,7 @@ if (useAltMenu) NewState = ConvertAlternateMenu (BaseState, NewState); pMS->CurState = NewState; + SleepThread (ONE_SECOND / 20); return (TRUE); } } Modified: trunk/sc2/src/sc2code/outfit.c =================================================================== --- trunk/sc2/src/sc2code/outfit.c 2009-06-30 10:06:23 UTC (rev 3163) +++ trunk/sc2/src/sc2code/outfit.c 2009-07-01 00:25:39 UTC (rev 3164) @@ -801,7 +801,10 @@ } if (pMS->CurState == OUTFIT_DOFUEL) + { ChangeFuelQuantity (); + SleepThread (ONE_SECOND / 30); + } else DoMenuChooser (pMS, PM_FUEL); } Modified: trunk/sc2/src/sc2code/pickship.c =================================================================== --- trunk/sc2/src/sc2code/pickship.c 2009-06-30 10:06:23 UTC (rev 3163) +++ trunk/sc2/src/sc2code/pickship.c 2009-07-01 00:25:39 UTC (rev 3164) @@ -239,6 +239,8 @@ } } + SleepThread (ONE_SECOND / 30); + return (TRUE); } Modified: trunk/sc2/src/sc2code/planets/cargo.c =================================================================== --- trunk/sc2/src/sc2code/planets/cargo.c 2009-06-30 10:06:23 UTC (rev 3163) +++ trunk/sc2/src/sc2code/planets/cargo.c 2009-07-01 00:25:39 UTC (rev 3164) @@ -340,16 +340,19 @@ NewState = pMS->CurState - 1; if (back) { - if (NewState-- == 0) - NewState = NUM_ELEMENT_CATEGORIES - 1; + if (NewState == 0) + NewState += NUM_ELEMENT_CATEGORIES; + --NewState; } else if (forward) { - if (++NewState == NUM_ELEMENT_CATEGORIES) + ++NewState; + if (NewState == NUM_ELEMENT_CATEGORIES) NewState = 0; } - if (++NewState != pMS->CurState) + ++NewState; + if (NewState != pMS->CurState) { SelectCargo: DrawCargoStrings ((BYTE)(pMS->CurState - 1), (BYTE)(NewState - 1)); @@ -361,6 +364,8 @@ } } + SleepThread (ONE_SECOND / 30); + return (TRUE); } Modified: trunk/sc2/src/sc2code/planets/devices.c =================================================================== --- trunk/sc2/src/sc2code/planets/devices.c 2009-06-30 10:06:23 UTC (rev 3163) +++ trunk/sc2/src/sc2code/planets/devices.c 2009-07-01 00:25:39 UTC (rev 3164) @@ -496,22 +496,24 @@ NewState = pMS->CurState - 1; if (back) { - if (NewState-- == 0) - NewState = 0; + if (NewState > 0) + --NewState; if ((SIZE)NewState < NewTop && (NewTop -= MAX_VIS_DEVICES) < 0) NewTop = 0; } else if (forward) { - if (++NewState == (BYTE)pMS->first_item.x) + ++NewState; + if (NewState == (BYTE)pMS->first_item.x) NewState = (BYTE)(pMS->first_item.x - 1); if (NewState >= NewTop + MAX_VIS_DEVICES) NewTop = NewState; } - if (++NewState != pMS->CurState) + ++NewState; + if (NewState != pMS->CurState) { if (NewTop != pMS->first_item.y) { @@ -522,6 +524,8 @@ DrawDevices (pMS, (BYTE)(pMS->CurState - 1), (BYTE)(NewState - 1)); pMS->CurState = NewState; } + + SleepThread (ONE_SECOND / 30); } return (TRUE); Modified: trunk/sc2/src/sc2code/planets/pstarmap.c =================================================================== --- trunk/sc2/src/sc2code/planets/pstarmap.c 2009-06-30 10:06:23 UTC (rev 3163) +++ trunk/sc2/src/sc2code/planets/pstarmap.c 2009-07-01 00:25:39 UTC (rev 3164) @@ -1174,6 +1174,8 @@ DrawMatchedStarName (pTES); UpdateFuelRequirement (pMS); } + + SleepThread (ONE_SECOND / 30); return TRUE; } @@ -1229,6 +1231,7 @@ #define MAX_ACCEL_DELAY (ONE_SECOND / 8) #define STEP_ACCEL_DELAY (ONE_SECOND / 120) static UNICODE last_buf[CURSOR_INFO_BUFSIZE]; + DWORD TimeIn = GetTimeCounter (); pMS->MenuRepeatDelay = (COUNT)pMS->CurState; if (!pMS->Initialized) @@ -1339,6 +1342,8 @@ UpdateCursorInfo (pMS, last_buf); UpdateFuelRequirement (pMS); } + + SleepThreadUntil (TimeIn + MIN_ACCEL_DELAY); } { Modified: trunk/sc2/src/sc2code/planets/roster.c =================================================================== --- trunk/sc2/src/sc2code/planets/roster.c 2009-06-30 10:06:23 UTC (rev 3163) +++ trunk/sc2/src/sc2code/planets/roster.c 2009-07-01 00:25:39 UTC (rev 3164) @@ -362,6 +362,8 @@ "flash roster menu"); } + SleepThread (ONE_SECOND / 30); + return TRUE; } Modified: trunk/sc2/src/sc2code/planets/scan.c =================================================================== --- trunk/sc2/src/sc2code/planets/scan.c 2009-06-30 10:06:23 UTC (rev 3163) +++ trunk/sc2/src/sc2code/planets/scan.c 2009-07-01 00:25:39 UTC (rev 3164) @@ -668,6 +668,7 @@ static BOOLEAN PickPlanetSide (MENU_STATE *pMS) { + DWORD TimeIn = GetTimeCounter (); BOOLEAN select, cancel; select = PulsedInputState.menu[KEY_MENU_SELECT]; cancel = PulsedInputState.menu[KEY_MENU_CANCEL]; @@ -844,12 +845,10 @@ if (new_pt.x != pSolarSysState->MenuState.first_item.x || new_pt.y != pSolarSysState->MenuState.first_item.y) { - DWORD TimeIn; - - TimeIn = GetTimeCounter (); SetPlanetLoc (new_pt); - SleepThreadUntil (TimeIn + ONE_SECOND / 40); } + + SleepThreadUntil (TimeIn + ONE_SECOND / 40); } return (TRUE); Modified: trunk/sc2/src/sc2code/restart.c =================================================================== --- trunk/sc2/src/sc2code/restart.c 2009-06-30 10:06:23 UTC (rev 3163) +++ trunk/sc2/src/sc2code/restart.c 2009-07-01 00:25:39 UTC (rev 3164) @@ -114,8 +114,9 @@ static BOOLEAN DoRestart (MENU_STATE *pMS) { - static DWORD InTime; + static DWORD LastInputTime; static DWORD InactTimeOut; + DWORD TimeIn = GetTimeCounter (); /* Cancel any presses of the Pause key. */ GamePaused = FALSE; @@ -158,15 +159,15 @@ PulsedInputState.menu[KEY_MENU_SELECT] || MouseButtonDown)) { - if (GetTimeCounter () - InTime < InactTimeOut) - return (TRUE); + if (GetTimeCounter () - LastInputTime > InactTimeOut) + { + SleepThreadUntil (FadeMusic (0, ONE_SECOND)); + StopMusic (); + FadeMusic (NORMAL_VOLUME, 0); - SleepThreadUntil (FadeMusic (0, ONE_SECOND)); - StopMusic (); - FadeMusic (NORMAL_VOLUME, 0); - - GLOBAL (CurrentActivity) = (ACTIVITY)~0; - return (FALSE); + GLOBAL (CurrentActivity) = (ACTIVITY)~0; + return (FALSE); + } } else if (PulsedInputState.menu[KEY_MENU_SELECT]) { @@ -192,7 +193,7 @@ SetupMenu (); SetMenuSounds (MENU_SOUND_UP | MENU_SOUND_DOWN, MENU_SOUND_SELECT); - InTime = GetTimeCounter (); + LastInputTime = GetTimeCounter (); SetTransitionSource (NULL); BatchGraphics (); DrawRestartMenuGraphic (pMS); @@ -255,7 +256,9 @@ UnbatchGraphics (); } - InTime = GetTimeCounter (); + LastInputTime = GetTimeCounter (); + SleepThreadUntil (TimeIn + ONE_SECOND / 30); + return (TRUE); } Modified: trunk/sc2/src/sc2code/shipyard.c =================================================================== --- trunk/sc2/src/sc2code/shipyard.c 2009-06-30 10:06:23 UTC (rev 3163) +++ trunk/sc2/src/sc2code/shipyard.c 2009-07-01 00:25:39 UTC (rev 3164) @@ -1064,6 +1064,8 @@ } } + SleepThread (ONE_SECOND / 30); + return TRUE; } Modified: trunk/sc2/src/sc2code/starbase.c =================================================================== --- trunk/sc2/src/sc2code/starbase.c 2009-06-30 10:06:23 UTC (rev 3163) +++ trunk/sc2/src/sc2code/starbase.c 2009-07-01 00:25:39 UTC (rev 3164) @@ -433,6 +433,8 @@ UnlockMutex (GraphicsLock); pMS->CurState = NewState; } + + SleepThread (ONE_SECOND / 30); } return (TRUE); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |