CMake from Wargus

Bug #909435 reported by Harley Laue
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Stargus
Fix Released
Undecided
Pali

Bug Description

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.

Tags: cmake patch
Revision history for this message
Harley Laue (losinggeneration) wrote :
Revision history for this message
Pali (pali) wrote :

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.

Changed in stargus:
assignee: nobody → Pali (pali)
status: New → In Progress
Revision history for this message
Harley Laue (losinggeneration) wrote :

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.

Revision history for this message
Pali (pali) wrote :

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

Revision history for this message
Pali (pali) wrote :

Your attached commit was merged.

Changed in stargus:
status: In Progress → Fix Committed
milestone: none → 2.2.6
Pali (pali)
Changed in stargus:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.