locations.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /* Copyright (C) 2005-2010 Valeriy Argunov (nporep AT mail DOT ru) */
  2. /*
  3. * This library is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU Lesser General Public License as published by
  5. * the Free Software Foundation; either version 2.1 of the License, or
  6. * (at your option) any later version.
  7. *
  8. * This library is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU Lesser General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU Lesser General Public License
  14. * along with this library; if not, write to the Free Software
  15. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  16. */
  17. #include "declarations.h"
  18. #include "actions.h"
  19. #include "codetools.h"
  20. #include "variant.h"
  21. #ifndef QSP_LOCSDEFINES
  22. #define QSP_LOCSDEFINES
  23. typedef struct
  24. {
  25. QSP_CHAR *Image;
  26. QSP_CHAR *Desc;
  27. QSPLineOfCode *OnPressLines;
  28. int OnPressLinesCount;
  29. } QSPLocAct;
  30. typedef struct
  31. {
  32. QSP_CHAR *Name;
  33. QSP_CHAR *Desc;
  34. QSPLineOfCode *OnVisitLines;
  35. int OnVisitLinesCount;
  36. QSPLocAct Actions[QSP_MAXACTIONS];
  37. } QSPLocation;
  38. typedef struct
  39. {
  40. int Index;
  41. QSP_CHAR *Name;
  42. } QSPLocName;
  43. extern QSPLocation *qspLocs;
  44. extern QSPLocName *qspLocsNames;
  45. extern int qspLocsCount;
  46. extern int qspCurLoc;
  47. extern int qspRefreshCount;
  48. extern int qspFullRefreshCount;
  49. /* External functions */
  50. void qspCreateWorld(int, int);
  51. void qspPrepareLocs();
  52. int qspLocIndex(QSP_CHAR *);
  53. void qspExecLocByIndex(int, QSP_BOOL, QSP_BOOL);
  54. void qspExecLocByName(QSP_CHAR *, QSP_BOOL);
  55. void qspExecLocByNameWithArgs(QSP_CHAR *, QSPVariant *, int);
  56. void qspExecLocByVarNameWithArgs(QSP_CHAR *, QSPVariant *, int);
  57. void qspRefreshCurLoc(QSP_BOOL, QSPVariant *, int);
  58. #endif