TEMP.CPP 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. /*
  2. ** Command & Conquer Red Alert(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. THIS IS FROM SCORE.CPP
  19. line 79
  20. #ifdef FIXIT_SCORE_CRASH
  21. void Disable_Uncompressed_Shapes (void);
  22. void Enable_Uncompressed_Shapes (void);
  23. #endif //FIXIT
  24. line 361
  25. #ifdef FIXIT_SCORE_CRASH
  26. /*
  27. ** Fix for the score screen crash due to uncompressed shape buffer overflow.
  28. */
  29. Disable_Uncompressed_Shapes();
  30. #endif //FIXIT
  31. LINE 844
  32. #ifdef FIXIT_SCORE_CRASH
  33. /*
  34. ** Fix for the score screen crash due to uncompressed shape buffer overflow.
  35. */
  36. Enable_Uncompressed_Shapes();
  37. #endif //FIXIT
  38. end of score
  39. **********************
  40. keyframe.cpp
  41. line 116
  42. #ifdef FIXIT_SCORE_CRASH
  43. char * ptr;
  44. unsigned long offcurr, offdiff;
  45. #else
  46. char * ptr, * lockptr;
  47. unsigned long offcurr, off16, offdiff;
  48. #endif
  49. line 184
  50. #ifndef FIXIT_SCORE_CRASH
  51. off16 = (unsigned long)lockptr & 0x00003FFFL;
  52. #endif
  53. line 194
  54. #ifndef FIXIT_SCORE_CRASH
  55. if ( ((offset[2] & 0x00FFFFFFL) - offcurr) >= (0x00010000L - off16) ) {
  56. ptr = (char *)Add_Long_To_Pointer( ptr, offdiff );
  57. off16 = (unsigned long)ptr & 0x00003FFFL;
  58. offcurr += offdiff;
  59. offdiff = 0;
  60. }
  61. #endif
  62. line 228
  63. #ifndef FIXIT_SCORE_CRASH
  64. if ( ((offset[subframe+2] & 0x00FFFFFFL) - offcurr) >= (0x00010000L - off16) ) {
  65. ptr = (char *)Add_Long_To_Pointer( ptr, offdiff );
  66. off16 = (unsigned long)lockptr & 0x00003FFFL;
  67. offcurr += offdiff;
  68. offdiff = 0;
  69. }
  70. #endif
  71. end keyframe
  72. **********************
  73. 2keyframe.cpp
  74. line 53
  75. #ifdef FIXIT_SCORE_CRASH
  76. /*
  77. ** Global required to fix the score screen crash bug by allowing disabling of uncompressed shapes.
  78. */
  79. bool OriginalUseBigShapeBuffer = false;
  80. #endif //FIXIT
  81. end 2keyframe.cpp