QWTables.cc 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. GNU General Public License version 3 notice
  3. Copyright (C) 2012 Mihawk <luiz@netdome.biz>. All rights reserved.
  4. This program is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 3 of the License, or
  7. (at your option) any later version.
  8. This program 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 General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see < http://www.gnu.org/licenses/ >.
  14. */
  15. #include "QWTables.h"
  16. #include <QString>
  17. const QWTables::OriginalChecksumTable QWTables::ourOriginalChecksumTable[] = {
  18. { "maps/start.bsp", 493454459 },
  19. { "maps/e1m1.bsp", 2902972546 },
  20. { "maps/e1m2.bsp", 1729102119 },
  21. { "maps/e1m3.bsp", 893792842 },
  22. { "maps/e1m4.bsp", 3990488693 },
  23. { "maps/e1m5.bsp", 2821463178 },
  24. { "maps/e1m6.bsp", 738207971 },
  25. { "maps/e1m7.bsp", 2547448602 },
  26. { "maps/e1m8.bsp", 79095617 },
  27. { "maps/e2m1.bsp", 3707072562 },
  28. { "maps/e2m2.bsp", 2945850701 },
  29. { "maps/e2m3.bsp", 4237894993 },
  30. { "maps/e2m4.bsp", 3273038793 },
  31. { "maps/e2m5.bsp", 3204615999 },
  32. { "maps/e2m6.bsp", 2443393921 },
  33. { "maps/e2m7.bsp", 2051006488 },
  34. { "maps/e3m1.bsp", 2427587873 },
  35. { "maps/e3m2.bsp", 2624353592 },
  36. { "maps/e3m3.bsp", 3285212440 },
  37. { "maps/e3m4.bsp", 2977500344 },
  38. { "maps/e3m5.bsp", 2440693297 },
  39. { "maps/e3m6.bsp", 767655416 },
  40. { "maps/e3m7.bsp", 272220593 },
  41. { "maps/e4m1.bsp", 3153093456 },
  42. { "maps/e4m2.bsp", 4294495000 },
  43. { "maps/e4m3.bsp", 1505685644 },
  44. { "maps/e4m4.bsp", 758847551 },
  45. { "maps/e4m5.bsp", 1771890676 },
  46. { "maps/e4m6.bsp", 102825880 },
  47. { "maps/e4m7.bsp", 2649489836 },
  48. { "maps/e4m8.bsp", 1018457175 },
  49. { "maps/end.bsp", 3151279269 },
  50. { "maps/dm1.bsp", 3318209203 },
  51. { "maps/dm2.bsp", 1710634548 },
  52. { "maps/dm3.bsp", 367136248 },
  53. { "maps/dm4.bsp", 2624578751 },
  54. { "maps/dm5.bsp", 2955757821 },
  55. { "maps/dm6.bsp", 1376311851 },
  56. { NULL, 0 }
  57. };
  58. quint32 QWTables::getOriginalMapChecksum(const QString &mapName)
  59. {
  60. for(int i = 0; ; ++i)
  61. {
  62. if(!ourOriginalChecksumTable[i].mapname)
  63. return 0;
  64. if(mapName == QString(ourOriginalChecksumTable[i].mapname))
  65. return ourOriginalChecksumTable[i].checksum;
  66. }
  67. return 0;
  68. }