mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-31 04:20:42 +00:00
- moved getatoken to scriptfile.cpp so common.cpp could be removed.
This commit is contained in:
parent
f9c03760a3
commit
2f3d405f8b
3 changed files with 18 additions and 35 deletions
|
@ -771,7 +771,6 @@ set (PCH_SOURCES
|
|||
# Todo: Split out the license-safe code from this.
|
||||
build/src/animvpx.cpp
|
||||
build/src/clip.cpp
|
||||
build/src/common.cpp
|
||||
build/src/defs.cpp
|
||||
build/src/engine.cpp
|
||||
build/src/mdsprite.cpp
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
|
||||
#define LIBDIVIDE_BODY
|
||||
#include "compat.h"
|
||||
#include "build.h"
|
||||
#include "scriptfile.h"
|
||||
|
||||
#include "baselayer.h"
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include "../../glbackend/glbackend.h"
|
||||
|
||||
// def/clipmap handling
|
||||
|
||||
|
||||
//////////
|
||||
|
||||
int32_t getatoken(scriptfile *sf, const tokenlist *tl, int32_t ntokens)
|
||||
{
|
||||
char *tok;
|
||||
int32_t i;
|
||||
|
||||
if (!sf) return T_ERROR;
|
||||
tok = scriptfile_gettoken(sf);
|
||||
if (!tok) return T_EOF;
|
||||
|
||||
for (i=ntokens-1; i>=0; i--)
|
||||
{
|
||||
if (!Bstrcasecmp(tok, tl[i].text))
|
||||
return tl[i].tokenid;
|
||||
}
|
||||
return T_ERROR;
|
||||
}
|
||||
|
|
@ -438,3 +438,21 @@ void scriptfile_clearsymbols(void)
|
|||
symbtablength = 0;
|
||||
symbtaballoclength = 0;
|
||||
}
|
||||
|
||||
int32_t getatoken(scriptfile *sf, const tokenlist *tl, int32_t ntokens)
|
||||
{
|
||||
char *tok;
|
||||
int32_t i;
|
||||
|
||||
if (!sf) return T_ERROR;
|
||||
tok = scriptfile_gettoken(sf);
|
||||
if (!tok) return T_EOF;
|
||||
|
||||
for (i=ntokens-1; i>=0; i--)
|
||||
{
|
||||
if (!Bstrcasecmp(tok, tl[i].text))
|
||||
return tl[i].tokenid;
|
||||
}
|
||||
return T_ERROR;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue