Permalink
Browse files

* first compile and linking of game.cbp

* started to cleanup starwars.cbp
  • Loading branch information...
1 parent 208736b commit 6ffb60f1e107f91e65baf886382d59bcf375df01 @xLAva committed Apr 7, 2013
@@ -51,7 +51,7 @@ void SEffectTemplate::operator=(const SEffectTemplate &that)
for( int i = 0; i < mPrimitiveCount; i++ )
{
- mPrimitives[i] = new CPrimitiveTemplate;
+ mPrimitives[i] = new CPrimitiveTemplate();
*(mPrimitives[i]) = *(that.mPrimitives[i]);
// Mark use as a copy so that we know that we should be chucked when used up
mPrimitives[i]->mCopy = true;
@@ -769,7 +769,7 @@ void CFxScheduler::PlayEffect( const char *file, int clientID )
{
// We have to create a new scheduled effect so that we can create it at a later point
// you should avoid this because it's much more expensive
- sfx = new SScheduledEffect;
+ sfx = new SScheduledEffect();
sfx->mStartTime = theFxHelper.mTime + delay;
sfx->mpTemplate = prim;
sfx->mClientID = clientID;
@@ -1077,7 +1077,7 @@ void CFxScheduler::PlayEffect( int id, vec3_t origin, vec3_t axis[3], const int
{
// We have to create a new scheduled effect so that we can create it at a later point
// you should avoid this because it's much more expensive
- sfx = new SScheduledEffect;
+ sfx = new SScheduledEffect();
sfx->mStartTime = theFxHelper.mTime + delay;
sfx->mpTemplate = prim;
sfx->mClientID = -1;
View
@@ -0,0 +1,10 @@
+
+#include "g_local.h"
+#ifdef __linux__
+unsigned int timeGetTime()
+{
+ struct timeval now;
+ gettimeofday(&now, NULL);
+ return now.tv_usec/1000;
+}
+#endif
View
@@ -15,12 +15,7 @@
#ifdef __linux__
#include <sys/time.h>
-unsigned int timeGetTime()
-{
- struct timeval now;
- gettimeofday(&now, NULL);
- return now.tv_usec/1000;
-}
+unsigned int timeGetTime();
#endif
// the "gameversion" client command will print this plus compile date
View
@@ -20,12 +20,16 @@
<Add option="-W" />
<Add option="-fexceptions" />
<Add option="-fpermissive" />
+ <Add option="-m32" />
<Add option="-DLINUX" />
<Add option="-DNDEBUG" />
<Add option="-D_IMMERSION" />
<Add directory="../icarus" />
<Add directory="./game" />
</Compiler>
+ <Linker>
+ <Add option="-m32" />
+ </Linker>
</Target>
<Target title="Win32 Release">
<Option output="../Release/jk2gamex86" prefix_auto="1" extension_auto="1" />
@@ -294,6 +298,9 @@
<Unit filename="g_itemLoad.cpp" />
<Unit filename="g_items.cpp" />
<Unit filename="g_items.h" />
+ <Unit filename="g_local.cpp">
+ <Option target="Linux Release" />
+ </Unit>
<Unit filename="g_local.h" />
<Unit filename="g_main.cpp">
<Option weight="70" />
View
@@ -12,7 +12,7 @@
"../game/g_shared.h"
"cg_camera.h"
-1365329125 /home/jochen/DocumentsSSD/Coding/jedioutcast/jedioutcast-code/code/game/q_shared.h
+1365336699 /home/jochen/DocumentsSSD/Coding/jedioutcast/jedioutcast-code/code/game/q_shared.h
<assert.h>
<math.h>
<stdio.h>
@@ -260,7 +260,7 @@
"cg_media.h"
"FxScheduler.h"
-1365259956 source:/home/jochen/DocumentsSSD/Coding/jedioutcast/jedioutcast-code/code/cgame/FxScheduler.cpp
+1365336935 source:/home/jochen/DocumentsSSD/Coding/jedioutcast/jedioutcast-code/code/cgame/FxScheduler.cpp
"common_headers.h"
"FxScheduler.h"
"..\game\ghoul2_shared.h"
@@ -312,7 +312,7 @@
"../game/objectives.h"
"../game/g_local.h"
-1365331037 /home/jochen/DocumentsSSD/Coding/jedioutcast/jedioutcast-code/code/game/g_local.h
+1365336463 /home/jochen/DocumentsSSD/Coding/jedioutcast/jedioutcast-code/code/game/g_local.h
"../ui/gameinfo.h"
"g_shared.h"
"anims.h"
@@ -1011,7 +1011,7 @@
1365121381 source:/home/jochen/DocumentsSSD/Coding/jedioutcast/jedioutcast-code/code/game/q_math.cpp
"common_headers.h"
-1365121381 source:/home/jochen/DocumentsSSD/Coding/jedioutcast/jedioutcast-code/code/game/q_shared.cpp
+1365336279 source:/home/jochen/DocumentsSSD/Coding/jedioutcast/jedioutcast-code/code/game/q_shared.cpp
"common_headers.h"
1365333263 source:/home/jochen/DocumentsSSD/Coding/jedioutcast/jedioutcast-code/code/game/wp_saber.cpp
@@ -1061,7 +1061,10 @@
"icarus.h"
"assert.h"
-1365335458 source:/home/jochen/DocumentsSSD/Coding/jedioutcast/jedioutcast-code/code/ui/gameinfo.cpp
+1365337423 source:/home/jochen/DocumentsSSD/Coding/jedioutcast/jedioutcast-code/code/ui/gameinfo.cpp
"gameinfo.h"
"../game/weapons.h"
+1365336452 source:/home/jochen/DocumentsSSD/Coding/jedioutcast/jedioutcast-code/code/game/g_local.cpp
+ "g_local.h"
+
View
@@ -10,21 +10,24 @@
<File name="../cgame/FxParsing.h" open="0" top="0" tabpos="0">
<Cursor position="14" topLine="0" />
</File>
- <File name="../cgame/FxPrimitives.cpp" open="1" top="1" tabpos="13">
+ <File name="../cgame/FxPrimitives.cpp" open="0" top="0" tabpos="11">
<Cursor position="3288" topLine="155" />
</File>
<File name="../cgame/FxPrimitives.h" open="0" top="0" tabpos="9">
<Cursor position="14230" topLine="498" />
</File>
- <File name="../cgame/FxScheduler.cpp" open="0" top="0" tabpos="0">
- <Cursor position="354" topLine="0" />
+ <File name="../cgame/FxScheduler.cpp" open="0" top="0" tabpos="16">
+ <Cursor position="19335" topLine="754" />
</File>
- <File name="../cgame/FxScheduler.h" open="0" top="0" tabpos="0">
- <Cursor position="12138" topLine="383" />
+ <File name="../cgame/FxScheduler.h" open="0" top="0" tabpos="17">
+ <Cursor position="10480" topLine="324" />
</File>
<File name="../cgame/FxSystem.cpp" open="0" top="0" tabpos="0">
<Cursor position="197" topLine="0" />
</File>
+ <File name="../cgame/FxTemplate.cpp" open="0" top="0" tabpos="18">
+ <Cursor position="388" topLine="43" />
+ </File>
<File name="../cgame/animtable.h" open="0" top="0" tabpos="15">
<Cursor position="0" topLine="0" />
</File>
@@ -175,7 +178,7 @@
<File name="bg_pangles.cpp" open="0" top="0" tabpos="0">
<Cursor position="711" topLine="4" />
</File>
- <File name="bg_panimate.cpp" open="0" top="0" tabpos="0">
+ <File name="bg_panimate.cpp" open="0" top="0" tabpos="15">
<Cursor position="19813" topLine="269" />
</File>
<File name="bg_pmove.cpp" open="0" top="0" tabpos="0">
@@ -226,11 +229,14 @@
<File name="g_items.cpp" open="0" top="0" tabpos="0">
<Cursor position="664" topLine="3" />
</File>
- <File name="g_local.h" open="1" top="0" tabpos="3">
- <Cursor position="765" topLine="0" />
+ <File name="g_local.cpp" open="0" top="0" tabpos="14">
+ <Cursor position="162" topLine="0" />
+ </File>
+ <File name="g_local.h" open="0" top="0" tabpos="3">
+ <Cursor position="508" topLine="0" />
</File>
- <File name="g_main.cpp" open="0" top="0" tabpos="2">
- <Cursor position="321" topLine="0" />
+ <File name="g_main.cpp" open="0" top="0" tabpos="1">
+ <Cursor position="571" topLine="7" />
</File>
<File name="g_misc.cpp" open="0" top="0" tabpos="0">
<Cursor position="80940" topLine="2697" />
@@ -295,25 +301,31 @@
<File name="g_weapon.cpp" open="0" top="0" tabpos="0">
<Cursor position="74226" topLine="2487" />
</File>
+ <File name="g_weaponLoad.cpp" open="0" top="0" tabpos="4">
+ <Cursor position="32030" topLine="1298" />
+ </File>
<File name="ghoul2_shared.h" open="0" top="0" tabpos="9">
<Cursor position="0" topLine="0" />
</File>
<File name="npc_headers.h" open="0" top="0" tabpos="14">
<Cursor position="126" topLine="0" />
</File>
- <File name="q_shared.h" open="0" top="0" tabpos="24">
- <Cursor position="404" topLine="0" />
+ <File name="q_shared.cpp" open="0" top="0" tabpos="13">
+ <Cursor position="485" topLine="0" />
+ </File>
+ <File name="q_shared.h" open="0" top="0" tabpos="12">
+ <Cursor position="12762" topLine="498" />
</File>
<File name="wp_saber.cpp" open="0" top="0" tabpos="0">
<Cursor position="253611" topLine="7370" />
</File>
- <File name="../icarus/BlockStream.cpp" open="1" top="0" tabpos="4">
+ <File name="../icarus/BlockStream.cpp" open="0" top="0" tabpos="4">
<Cursor position="124" topLine="0" />
</File>
<File name="../icarus/BlockStream.h" open="0" top="0" tabpos="8">
<Cursor position="277" topLine="0" />
</File>
- <File name="../icarus/Instance.cpp" open="1" top="0" tabpos="5">
+ <File name="../icarus/Instance.cpp" open="0" top="0" tabpos="5">
<Cursor position="105" topLine="0" />
</File>
<File name="../icarus/Interface.h" open="0" top="0" tabpos="0">
@@ -322,19 +334,19 @@
<File name="../icarus/Interpreter.h" open="0" top="0" tabpos="9">
<Cursor position="4060" topLine="166" />
</File>
- <File name="../icarus/Sequence.cpp" open="1" top="0" tabpos="6">
+ <File name="../icarus/Sequence.cpp" open="0" top="0" tabpos="6">
<Cursor position="114" topLine="0" />
</File>
- <File name="../icarus/Sequencer.cpp" open="1" top="0" tabpos="7">
+ <File name="../icarus/Sequencer.cpp" open="0" top="0" tabpos="7">
<Cursor position="49648" topLine="2387" />
</File>
- <File name="../icarus/Sequencer.h" open="1" top="0" tabpos="9">
+ <File name="../icarus/Sequencer.h" open="0" top="0" tabpos="8">
<Cursor position="1936" topLine="54" />
</File>
- <File name="../icarus/TaskManager.cpp" open="1" top="0" tabpos="1">
+ <File name="../icarus/TaskManager.cpp" open="0" top="0" tabpos="1">
<Cursor position="105" topLine="0" />
</File>
- <File name="../icarus/TaskManager.h" open="1" top="0" tabpos="2">
+ <File name="../icarus/TaskManager.h" open="0" top="0" tabpos="2">
<Cursor position="2198" topLine="103" />
</File>
<File name="../icarus/Tokenizer.h" open="0" top="0" tabpos="4">
@@ -346,13 +358,16 @@
<File name="../qcommon/sstring.h" open="0" top="0" tabpos="0">
<Cursor position="2193" topLine="81" />
</File>
- <File name="../qcommon/tri_coll_test.cpp" open="1" top="0" tabpos="11">
+ <File name="../qcommon/tri_coll_test.cpp" open="0" top="0" tabpos="9">
<Cursor position="554" topLine="0" />
</File>
<File name="../renderer/tr_types.h" open="0" top="0" tabpos="5">
<Cursor position="64" topLine="0" />
</File>
- <File name="../ui/gameinfo.cpp" open="1" top="0" tabpos="12">
- <Cursor position="220" topLine="0" />
+ <File name="../ui/gameinfo.cpp" open="0" top="0" tabpos="2">
+ <Cursor position="243" topLine="1" />
+ </File>
+ <File name="../ui/gameinfo.h" open="0" top="0" tabpos="3">
+ <Cursor position="0" topLine="0" />
</File>
</CodeBlocks_layout_file>
View
@@ -5,6 +5,30 @@
//#include "q_shared.h"
+#ifdef __linux__
+char* strupr(char* s)
+{
+ assert(s != (void*)0);
+ while(*s)
+ {
+ *s = toupper((unsigned char)*s);
+ s++;
+ }
+ return s;
+}
+
+char* strlwr(char* s)
+{
+ assert(s != (void*)0);
+ while(*s)
+ {
+ *s = tolower((unsigned char)*s);
+ s++;
+ }
+ return s;
+}
+#endif
+
float Com_Clamp( float min, float max, float value ) {
if ( value < min ) {
return min;
View
@@ -144,27 +144,9 @@ void Sys_PumpEvents( void );
#include <assert.h>
#include <ctype.h>
-char* strupr(char* s)
-{
- assert(s != (void*)0);
- while(*s)
- {
- *s = toupper((unsigned char)*s);
- s++;
- }
- return s;
-}
+char* strupr(char* s);
-char* strlwr(char* s)
-{
- assert(s != (void*)0);
- while(*s)
- {
- *s = tolower((unsigned char)*s);
- s++;
- }
- return s;
-}
+char* strlwr(char* s);
#include <math.h>
#define _isnan isnan
@@ -945,20 +927,20 @@ int Q_isupper( int c );
int Q_isalpha( int c );
// portable case insensitive compare
-int Q_strncmp (const char *s1, const char *s2, int n);
-int Q_stricmpn (const char *s1, const char *s2, int n);
-char *Q_strlwr( char *s1 );
-char *Q_strupr( char *s1 );
-char *Q_strrchr( const char* string, int c );
-inline int Q_stricmp (const char *s1, const char *s2) {return Q_stricmpn (s1, s2, 99999);}
+//int Q_strncmp (const char *s1, const char *s2, int n);
+//int Q_stricmpn (const char *s1, const char *s2, int n);
+//char *Q_strlwr( char *s1 );
+//char *Q_strupr( char *s1 );
+//char *Q_strrchr( const char* string, int c );
+//inline int Q_stricmp (const char *s1, const char *s2) {return Q_stricmpn (s1, s2, 99999);}
// NON-portable (but faster) versions
-//inline int Q_stricmp (const char *s1, const char *s2) { return stricmp(s1, s2); }
-//inline int Q_strncmp (const char *s1, const char *s2, int n) { return strncmp(s1, s2, n); }
-//inline int Q_stricmpn (const char *s1, const char *s2, int n) { return strnicmp(s1, s2, n); }
-//inline char *Q_strlwr( char *s1 ) { return strlwr(s1); }
-//inline char *Q_strupr( char *s1 ) { return strupr(s1); }
-//inline char *Q_strrchr( const char* str, int c ) { return strrchr(str, c); }
+inline int Q_stricmp (const char *s1, const char *s2) { return stricmp(s1, s2); }
+inline int Q_strncmp (const char *s1, const char *s2, int n) { return strncmp(s1, s2, n); }
+inline int Q_stricmpn (const char *s1, const char *s2, int n) { return strnicmp(s1, s2, n); }
+inline char *Q_strlwr( char *s1 ) { return strlwr(s1); }
+inline char *Q_strupr( char *s1 ) { return strupr(s1); }
+inline char *Q_strrchr( const char* str, int c ) { return strrchr(str, c); }
// buffer size safe library replacements
@@ -24,7 +24,7 @@
#endif
#if !defined(MINIHEAP_H_INC)
- #include "..\qcommon\MiniHeap.h"
+ #include "../qcommon/miniheap.h"
#endif
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.

0 comments on commit 6ffb60f

Please sign in to comment.