Wargus / stargus

Importer and scripts for Starcraft
GNU General Public License v2.0
127 stars 24 forks source link

CMake from Wargus #5

Closed timfel closed 8 years ago

timfel commented 8 years ago

The attached patch duplicates the CMake build system found in Wargus. The patch also removes the duplicate code between stargus.c and stratagus-game-launcher.h I've only tested it on Linux, but everything seems to build correctly. This doesn't outright remove the old Makefile in case there are any bugs.


Imported from Launchpad using lp2gh.

timfel commented 8 years ago

(by losinggeneration)

timfel commented 8 years ago

(by pali) Nice patch. But Stargus extractor (startool) has one problem: It works only on 32bit system. I'm trying to port mpq part for 64bit systems too and after that I will release new version of Stargus too (of cource with CMake build system + using stratagus*.h files in stargus.c) So I will include your patch after adding 64bit support.

timfel commented 8 years ago

(by losinggeneration) Oh yes, I can see the issue with 64bit support just from the following:

define UInt8 unsigned char

define UInt16 unsigned short

define SInt16 short

define UInt32 unsigned long

define SInt32 int

Switching that to use stdint.h and using the int typedefs makes it pretty clear there's lots of unsafe casting going on.

timfel commented 8 years ago

(by pali) Not only this problem. All pointers are defined as UInt32. I have fixed all expect Wave Huffman decoding in mpq.cpp

timfel commented 8 years ago

(by pali) Your attached commit was merged.