Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

* first compile and linking of game.cbp

* started to cleanup starwars.cbp
  • Loading branch information...
commit 6ffb60f1e107f91e65baf886382d59bcf375df01 1 parent 208736b
@xLAva authored
View
6 code/cgame/FxScheduler.cpp
@@ -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
10 code/game/g_local.cpp
@@ -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
7 code/game/g_local.h
@@ -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
7 code/game/game.cbp
@@ -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
13 code/game/game.depend
@@ -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
59 code/game/game.layout
@@ -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
24 code/game/q_shared.cpp
@@ -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
46 code/game/q_shared.h
@@ -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
View
2  code/ghoul2/g2_api.cpp → code/ghoul2/G2_API.cpp
@@ -24,7 +24,7 @@
#endif
#if !defined(MINIHEAP_H_INC)
- #include "..\qcommon\MiniHeap.h"
+ #include "../qcommon/miniheap.h"
#endif
View
0  code/ghoul2/g2_bolts.cpp → code/ghoul2/G2_bolts.cpp
File renamed without changes
View
0  code/ghoul2/g2_bones.cpp → code/ghoul2/G2_bones.cpp
File renamed without changes
View
0  code/ghoul2/g2_misc.cpp → code/ghoul2/G2_misc.cpp
File renamed without changes
View
0  code/ghoul2/g2_surfaces.cpp → code/ghoul2/G2_surfaces.cpp
File renamed without changes
View
0  code/mp3code/l3.h → code/mp3code/L3.h
File renamed without changes
View
0  code/mp3code/csbtl3.c → code/mp3code/csbtL3.c
File renamed without changes
View
0  code/mp3code/cupl1.c → code/mp3code/cupL1.c
File renamed without changes
View
26 code/starwars.cbp
@@ -241,7 +241,7 @@
<Unit filename="game/anims.h" />
<Unit filename="game/b_public.h" />
<Unit filename="game/bg_public.h" />
- <Unit filename="Icarus/BlockStream.h" />
+ <Unit filename="icarus/BlockStream.h" />
<Unit filename="game/bset.h" />
<Unit filename="game/bstate.h" />
<Unit filename="cgame/cg_public.h" />
@@ -263,13 +263,13 @@
<Unit filename="game/g_shared.h" />
<Unit filename="game/genericparser2.h" />
<Unit filename="qcommon/hstring.h" />
- <Unit filename="Icarus/ICARUS.h" />
- <Unit filename="Icarus/Instance.h" />
- <Unit filename="Icarus/interface.h" />
- <Unit filename="Icarus/Interpreter.h" />
+ <Unit filename="icarus/icarus.h" />
+ <Unit filename="icarus/Instance.h" />
+ <Unit filename="icarus/Interface.h" />
+ <Unit filename="icarus/Interpreter.h" />
<Unit filename="client/keys.h" />
- <Unit filename="Icarus/sequence.h" />
- <Unit filename="Icarus/Sequencer.h" />
+ <Unit filename="icarus/Sequence.h" />
+ <Unit filename="icarus/Sequencer.h" />
<Unit filename="server/server.h" />
<Unit filename="client/snd_ambient.h" />
<Unit filename="client/snd_local.h" />
@@ -279,9 +279,9 @@
<Unit filename="game/statindex.h" />
<Unit filename="qcommon/strip.h" />
<Unit filename="qcommon/stripPublic.h" />
- <Unit filename="Icarus/TaskManager.h" />
+ <Unit filename="icarus/TaskManager.h" />
<Unit filename="game/teams.h" />
- <Unit filename="Icarus/Tokenizer.h" />
+ <Unit filename="icarus/Tokenizer.h" />
<Unit filename="qcommon/unzip.h" />
<Unit filename="client/vmachine.h" />
<Unit filename="game/weapons.h" />
@@ -410,7 +410,7 @@
<Unit filename="game/ghoul2_shared.h" />
<Unit filename="renderer/matcomp.h" />
<Unit filename="renderer/mdx_format.h" />
- <Unit filename="qcommon/MiniHeap.h" />
+ <Unit filename="qcommon/miniheap.h" />
<Unit filename="renderer/glext.h" />
<Unit filename="win32/glw_win.h" />
<Unit filename="renderer/qgl.h" />
@@ -421,8 +421,8 @@
<Unit filename="renderer/tr_quicksprite.h" />
<Unit filename="renderer/tr_stl.h" />
<Unit filename="renderer/tr_types.h" />
- <Unit filename="renderer/tr_WorldEffects.h" />
- <Unit filename="renderer/MatComp.c">
+ <Unit filename="renderer/tr_worldeffects.h" />
+ <Unit filename="renderer/matcomp.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="renderer/tr_animation.cpp" />
@@ -453,7 +453,7 @@
<Unit filename="renderer/tr_surface.cpp" />
<Unit filename="renderer/tr_surfacesprites.cpp" />
<Unit filename="renderer/tr_world.cpp" />
- <Unit filename="renderer/tr_WorldEffects.cpp" />
+ <Unit filename="renderer/tr_worldeffects.cpp" />
<Unit filename="win32/win_gamma.cpp" />
<Unit filename="win32/win_glimp.cpp" />
<Unit filename="win32/win_qgl.cpp" />
View
12 code/starwars.layout
@@ -7,12 +7,24 @@
<File name="ghoul2/G2.h" open="0" top="0" tabpos="0">
<Cursor position="11361" topLine="143" />
</File>
+ <File name="ghoul2/G2_API.cpp" open="0" top="0" tabpos="1">
+ <Cursor position="570" topLine="9" />
+ </File>
+ <File name="mp3code/cdct.c" open="0" top="0" tabpos="2">
+ <Cursor position="0" topLine="21" />
+ </File>
+ <File name="mp3code/cupl3.c" open="0" top="0" tabpos="3">
+ <Cursor position="1854" topLine="39" />
+ </File>
<File name="renderer/tr_backend.cpp" open="0" top="0" tabpos="0">
<Cursor position="0" topLine="1232" />
</File>
<File name="renderer/tr_font.cpp" open="0" top="0" tabpos="0">
<Cursor position="0" topLine="54" />
</File>
+ <File name="renderer/tr_surfacesprites.cpp" open="0" top="0" tabpos="4">
+ <Cursor position="1145" topLine="0" />
+ </File>
<File name="server/sv_game.cpp" open="0" top="0" tabpos="0">
<Cursor position="11970" topLine="437" />
</File>
View
2  code/ui/gameinfo.cpp
@@ -12,7 +12,7 @@
#include "../game/weapons.h"
-gameinfo_import_t gi;
+extern gameinfo_import_t gi;
weaponData_t weaponData[WP_NUM_WEAPONS];
ammoData_t ammoData[AMMO_MAX];
View
4 starwars.workspace
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_workspace_file>
<Workspace title="Workspace">
- <Project filename="code/game/game.cbp" active="1" />
- <Project filename="code/starwars.cbp" />
+ <Project filename="code/game/game.cbp" />
+ <Project filename="code/starwars.cbp" active="1" />
</Workspace>
</CodeBlocks_workspace_file>
Please sign in to comment.
Something went wrong with that request. Please try again.