scriplib.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. ===========================================================================
  3. Copyright (C) 1999-2005 Id Software, Inc.
  4. This file is part of Quake III Arena source code.
  5. Quake III Arena source code is free software; you can redistribute it
  6. and/or modify it under the terms of the GNU General Public License as
  7. published by the Free Software Foundation; either version 2 of the License,
  8. or (at your option) any later version.
  9. Quake III Arena source code is distributed in the hope that it will be
  10. useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with Foobar; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  16. ===========================================================================
  17. */
  18. // scriplib.h
  19. #ifndef __CMDLIB__
  20. #include "cmdlib.h"
  21. #endif
  22. #ifndef __MATHLIB__
  23. #include "mathlib.h"
  24. #endif
  25. #define MAXTOKEN 1024
  26. extern char token[MAXTOKEN];
  27. extern char *scriptbuffer,*script_p,*scriptend_p;
  28. extern int grabbed;
  29. extern int scriptline;
  30. extern qboolean endofscript;
  31. void LoadScriptFile( const char *filename );
  32. void ParseFromMemory (char *buffer, int size);
  33. qboolean GetToken (qboolean crossline);
  34. void UnGetToken (void);
  35. qboolean TokenAvailable (void);
  36. void MatchToken( char *match );
  37. void Parse1DMatrix (int x, vec_t *m);
  38. void Parse2DMatrix (int y, int x, vec_t *m);
  39. void Parse3DMatrix (int z, int y, int x, vec_t *m);
  40. void Write1DMatrix (FILE *f, int x, vec_t *m);
  41. void Write2DMatrix (FILE *f, int y, int x, vec_t *m);
  42. void Write3DMatrix (FILE *f, int z, int y, int x, vec_t *m);