Permalink
Browse files

Removed l_precomp.cpp, l_precomp.h, l_script.cpp and l_script.h from …

…botlibs, linked idLib with botlib
  • Loading branch information...
1 parent b4044e1 commit 52fe1e66d36586724c524ec72a68dcfd558ce05d @TheDushan committed Aug 29, 2012
Showing with 485 additions and 6,529 deletions.
  1. +1 −1 src/engine/OpenWolf.vcxproj
  2. +27 −29 src/engine/botlib/be_aas_bspq3.cpp
  3. +0 −2 src/engine/botlib/be_aas_cluster.cpp
  4. +0 −2 src/engine/botlib/be_aas_debug.cpp
  5. +0 −2 src/engine/botlib/be_aas_entity.cpp
  6. +0 −2 src/engine/botlib/be_aas_file.cpp
  7. +2 −3 src/engine/botlib/be_aas_main.cpp
  8. +0 −2 src/engine/botlib/be_aas_move.cpp
  9. +0 −2 src/engine/botlib/be_aas_optimize.cpp
  10. +0 −2 src/engine/botlib/be_aas_reach.cpp
  11. +0 −2 src/engine/botlib/be_aas_route.cpp
  12. +0 −2 src/engine/botlib/be_aas_routealt.cpp
  13. +0 −2 src/engine/botlib/be_aas_routetable.cpp
  14. +0 −2 src/engine/botlib/be_aas_sample.cpp
  15. +29 −34 src/engine/botlib/be_ai_char.cpp
  16. +155 −152 src/engine/botlib/be_ai_chat.cpp
  17. +0 −2 src/engine/botlib/be_ai_gen.cpp
  18. +22 −21 src/engine/botlib/be_ai_goal.cpp
  19. +0 −2 src/engine/botlib/be_ai_move.cpp
  20. +20 −19 src/engine/botlib/be_ai_weap.cpp
  21. +63 −61 src/engine/botlib/be_ai_weight.cpp
  22. +0 −2 src/engine/botlib/be_ea.cpp
  23. +45 −17 src/engine/botlib/be_interface.cpp
  24. +1 −10 src/engine/botlib/botlib.h
  25. +7 −6 src/engine/botlib/botlib.vcxproj
  26. +0 −12 src/engine/botlib/botlib.vcxproj.filters
  27. +0 −3,877 src/engine/botlib/l_precomp.cpp
  28. +0 −196 src/engine/botlib/l_precomp.h
  29. +0 −1,703 src/engine/botlib/l_script.cpp
  30. +0 −296 src/engine/botlib/l_script.h
  31. +43 −39 src/engine/botlib/l_struct.cpp
  32. +1 −1 src/engine/botlib/l_struct.h
  33. +6 −6 src/engine/client/cl_cgame.cpp
  34. +7 −7 src/engine/client/cl_ui.cpp
  35. +14 −0 src/engine/idLib/Lexer.cpp
  36. +4 −1 src/engine/idLib/Lexer.h
  37. +6 −4 src/engine/idLib/Token.h
  38. +1 −0 src/engine/idLib/idLib.vcxproj
  39. +23 −0 src/engine/qcommon/parse.cpp
  40. +2 −0 src/engine/qcommon/qcommon.h
  41. +6 −6 src/engine/server/sv_game.cpp
@@ -629,7 +629,7 @@ hostname &gt; status-info/build-machine</Command>
</Midl>
<ClCompile>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <PreprocessorDefinitions>WIN32;_WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;HAVE_CONFIG_H;USE_VOIP;USE_CIN_THEORA;USE_INCREASED_ENTITIES;ZLIB_WINAPI;USE_CRYPTO;USE_PHP;HAVE_BZIP2;USE_PHYSICS;ET_SQL;USE_MUMBLE;GUIDMASTER_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;HAVE_CONFIG_H;USE_VOIP;USE_CIN_THEORA;USE_INCREASED_ENTITIES;ZLIB_WINAPI;USE_CRYPTO;USE_PHP;HAVE_BZIP2;USE_PHYSICS;ET_SQL;USE_MUMBLE;GUIDMASTER_SUPPORT;BOTLIB_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>
</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -41,10 +41,9 @@ Maryland 20850 USA.
*
*****************************************************************************/
+#include "../idLib/precompiled.h"
#include "../qcommon/q_shared.h"
#include "l_memory.h"
-#include "l_script.h"
-#include "l_precomp.h"
#include "l_struct.h"
#include "aasfile.h"
#include "botlib.h"
@@ -429,8 +428,8 @@ void AAS_FreeBSPEntities(void)
//===========================================================================
void AAS_ParseBSPEntities(void)
{
- script_t *script;
- token_t token;
+ idToken token;
+ idLexer parser;
bsp_entity_t *ent;
bsp_epair_t *epair;
byte *buffer, *buftrav;
@@ -441,26 +440,26 @@ void AAS_ParseBSPEntities(void)
bspworld.ebuffer = NULL;
- script = LoadScriptMemory(bspworld.dentdata, bspworld.entdatasize, "entdata");
- SetScriptFlags(script, SCFL_NOSTRINGWHITESPACES | SCFL_NOSTRINGESCAPECHARS); //SCFL_PRIMITIVE);
+ parser.LoadMemory(bspworld.dentdata, bspworld.entdatasize, "entdata");
+ parser.SetFlags(LEXFL_NOSTRINGWHITESPACES | LEXFL_NOSTRINGESCAPECHARS);
bufsize = 0;
- while(PS_ReadToken(script, &token))
+ while(parser.ReadToken(&token))
{
if(strcmp(token.string, "{"))
{
- ScriptError(script, "invalid %s\n", token.string);
+ parser.Error("invalid %s\n", token.string);
AAS_FreeBSPEntities();
- FreeScript(script);
+ parser.FreeSource();
return;
} //end if
if(bspworld.numentities >= MAX_BSPENTITIES)
{
botimport.Print(PRT_MESSAGE, "too many entities in BSP file\n");
break;
} //end if
- while(PS_ReadToken(script, &token))
+ while(parser.ReadToken(&token))
{
if(!strcmp(token.string, "}"))
{
@@ -469,50 +468,49 @@ void AAS_ParseBSPEntities(void)
bufsize += sizeof(bsp_epair_t);
if(token.type != TT_STRING)
{
- ScriptError(script, "invalid %s\n", token.string);
+ parser.Error("invalid %s\n", token.string);
AAS_FreeBSPEntities();
- FreeScript(script);
+ parser.FreeSource();
return;
} //end if
- StripDoubleQuotes(token.string);
+ parser.StripDoubleQuotes(token.string);
bufsize += strlen(token.string) + 1;
- if(!PS_ExpectTokenType(script, TT_STRING, 0, &token))
+ if(!parser.ExpectTokenType(TT_STRING, 0, &token))
{
AAS_FreeBSPEntities();
- FreeScript(script);
+ parser.FreeSource();
return;
} //end if
- StripDoubleQuotes(token.string);
+ parser.StripDoubleQuotes(token.string);
bufsize += strlen(token.string) + 1;
} //end while
if(strcmp(token.string, "}"))
{
- ScriptError(script, "missing }\n");
+ parser.Error("missing }\n");
AAS_FreeBSPEntities();
- FreeScript(script);
+ parser.FreeSource();
return;
} //end if
} //end while
- FreeScript(script);
+ parser.FreeSource();
buffer = (byte *) GetClearedHunkMemory(bufsize);
buftrav = buffer;
bspworld.ebuffer = buffer;
// RF, now parse the entities into memory
// RF, NOTE: removed error checks for speed, no need to do them twice
-
- script = LoadScriptMemory(bspworld.dentdata, bspworld.entdatasize, "entdata");
- SetScriptFlags(script, SCFL_NOSTRINGWHITESPACES | SCFL_NOSTRINGESCAPECHARS); //SCFL_PRIMITIVE);
+ parser.LoadMemory(bspworld.dentdata, bspworld.entdatasize, "entdata");
+ parser.SetFlags(LEXFL_NOSTRINGWHITESPACES | LEXFL_NOSTRINGESCAPECHARS);
bspworld.numentities = 1;
- while(PS_ReadToken(script, &token))
+ while(parser.ReadToken(&token))
{
ent = &bspworld.entities[bspworld.numentities];
bspworld.numentities++;
ent->epairs = NULL;
- while(PS_ReadToken(script, &token))
+ while(parser.ReadToken(&token))
{
if(!strcmp(token.string, "}"))
{
@@ -522,23 +520,23 @@ void AAS_ParseBSPEntities(void)
buftrav += sizeof(bsp_epair_t);
epair->next = ent->epairs;
ent->epairs = epair;
- StripDoubleQuotes(token.string);
+ parser.StripDoubleQuotes(token.string);
epair->key = (char *)buftrav;
buftrav += (strlen(token.string) + 1);
strcpy(epair->key, token.string);
- if(!PS_ExpectTokenType(script, TT_STRING, 0, &token))
+ if(!parser.ExpectTokenType(TT_STRING, 0, &token))
{
AAS_FreeBSPEntities();
- FreeScript(script);
+ parser.FreeSource();
return;
} //end if
- StripDoubleQuotes(token.string);
+ parser.StripDoubleQuotes(token.string);
epair->value = (char *)buftrav;
buftrav += (strlen(token.string) + 1);
strcpy(epair->value, token.string);
} //end while
} //end while
- FreeScript(script);
+ parser.FreeSource();
} //end of the function AAS_ParseBSPEntities
//===========================================================================
@@ -43,8 +43,6 @@ Maryland 20850 USA.
#include "../qcommon/q_shared.h"
#include "l_memory.h"
-#include "l_script.h"
-#include "l_precomp.h"
#include "l_struct.h"
#include "l_log.h"
#include "l_memory.h"
@@ -43,8 +43,6 @@ Maryland 20850 USA.
#include "../qcommon/q_shared.h"
#include "l_memory.h"
-#include "l_script.h"
-#include "l_precomp.h"
#include "l_struct.h"
#include "l_libvar.h"
#include "aasfile.h"
@@ -42,8 +42,6 @@ Maryland 20850 USA.
#include "../qcommon/q_shared.h"
#include "l_memory.h"
-#include "l_script.h"
-#include "l_precomp.h"
#include "l_struct.h"
#include "l_utils.h"
#include "l_log.h"
@@ -43,8 +43,6 @@ Maryland 20850 USA.
#include "../qcommon/q_shared.h"
#include "l_memory.h"
-#include "l_script.h"
-#include "l_precomp.h"
#include "l_struct.h"
#include "l_libvar.h"
#include "l_utils.h"
@@ -41,12 +41,11 @@ Maryland 20850 USA.
*
*****************************************************************************/
+#include "../idLib/precompiled.h"
#include "../qcommon/q_shared.h"
#include "l_memory.h"
#include "l_libvar.h"
#include "l_utils.h"
-#include "l_script.h"
-#include "l_precomp.h"
#include "l_struct.h"
#include "l_log.h"
#include "aasfile.h"
@@ -72,7 +71,7 @@ void QDECL AAS_Error(char *fmt, ...)
va_list arglist;
va_start(arglist, fmt);
- Q_vsnprintf(str, sizeof(str), fmt, arglist);
+ idStr::vsnPrintf(str, sizeof(str), fmt, arglist);
va_end(arglist);
botimport.Print(PRT_FATAL, "%s", str);
} //end of the function AAS_Error
@@ -43,8 +43,6 @@ Maryland 20850 USA.
#include "../qcommon/q_shared.h"
#include "l_memory.h"
-#include "l_script.h"
-#include "l_precomp.h"
#include "l_struct.h"
#include "aasfile.h"
#include "botlib.h"
@@ -46,8 +46,6 @@ Maryland 20850 USA.
#include "l_libvar.h"
//#include "l_utils.h"
#include "l_memory.h"
-#include "l_script.h"
-#include "l_precomp.h"
#include "l_struct.h"
#include "aasfile.h"
#include "botlib.h"
@@ -45,9 +45,7 @@ Maryland 20850 USA.
#include "../qcommon/q_shared.h"
#include "l_log.h"
#include "l_memory.h"
-#include "l_script.h"
#include "l_libvar.h"
-#include "l_precomp.h"
#include "l_struct.h"
#include "aasfile.h"
#include "botlib.h"
@@ -47,8 +47,6 @@ Maryland 20850 USA.
#include "l_log.h"
#include "l_crc.h"
#include "l_libvar.h"
-#include "l_script.h"
-#include "l_precomp.h"
#include "l_struct.h"
#include "aasfile.h"
#include "botlib.h"
@@ -45,8 +45,6 @@ Maryland 20850 USA.
#include "l_utils.h"
#include "l_memory.h"
#include "l_log.h"
-#include "l_script.h"
-#include "l_precomp.h"
#include "l_struct.h"
#include "aasfile.h"
#include "botlib.h"
@@ -42,8 +42,6 @@ Maryland 20850 USA.
#include "../qcommon/q_shared.h"
#include "l_memory.h"
-#include "l_script.h"
-#include "l_precomp.h"
#include "l_struct.h"
#include "l_libvar.h"
#include "l_utils.h"
@@ -43,8 +43,6 @@ Maryland 20850 USA.
#include "../qcommon/q_shared.h"
#include "l_memory.h"
-#include "l_script.h"
-#include "l_precomp.h"
#include "l_struct.h"
#include "aasfile.h"
#include "botlib.h"
Oops, something went wrong.

0 comments on commit 52fe1e6

Please sign in to comment.