1
0

t2g_locations.c 453 B

12345678910111213141516171819
  1. #include "t2g_locations.h"
  2. t2g_QSPLocation *t2g_qspLocs = 0;
  3. int t2g_qspLocsCount = 0;
  4. void t2g_qspCreateWorld(int t2g_locsCount)
  5. {
  6. int i;
  7. for (i = 0; i < t2g_qspLocsCount; ++i)
  8. {
  9. free(t2g_qspLocs[i].Name);
  10. free(t2g_qspLocs[i].OnVisit);
  11. }
  12. if (t2g_qspLocsCount != t2g_locsCount)
  13. {
  14. t2g_qspLocsCount = t2g_locsCount;
  15. t2g_qspLocs = (t2g_QSPLocation *)realloc(t2g_qspLocs, t2g_qspLocsCount * sizeof(t2g_QSPLocation));
  16. }
  17. }