Commit graph

11 commits

Author SHA1 Message Date
dhewg
471f51ef9b Fix -Wformat and -Wformat-extra-args warnings
Fix format specifiers and use the C99 %zd for types of size_t and
alike.
2018-08-20 01:46:25 +02:00
dhewg
f8efcf5e90 Fix script interpreter stack for x86_64
Alot of stack and event variables are pointers. Align the size of
all script and event variable types to sizeof(intptr_t) so that
the CPU needs only one fetch insn on 64bit archs.

Tested on x86 and x86_64 and found no different script behaviours
compared to the binary from id.
Savegames on x86_64 do work, but are not compatible to x86 and vice
versa (among other issues, the stack is written to file as-is).
x86 builds can still load savegames from the official binary and
vice versa.
2018-08-20 01:46:24 +02:00
dhewg
30dd372efa Fix event callbacks for x86_64
Fix remaining event related code for the new intptr_t value type.
Regenerated game/gamesys/Callbacks.cpp via CREATE_EVENT_CODE.
2018-08-20 01:46:24 +02:00
dhewg
379ab902bb Fix idEventArg for x86_64
Pointers are passed through events; change the event value type to
intptr_t to provide enough bits.
2018-08-20 01:46:24 +02:00
dhewg
7601f12ba4 Fix warning: left shift count >= width of type 2018-08-20 01:46:24 +02:00
dhewg
6f0fc9fcc1 Fix -Wunused-variable warnings
unused variable
2018-08-20 01:46:23 +02:00
dhewg
64df913412 Fix -Wwrite-strings warnings
deprecated conversion from string constant to ‘char*’

Constify lots of "char *".
2018-08-20 01:46:22 +02:00
dhewg
d83cf21bde Fix -Wchar-subscripts warnings
array subscript has type ‘char’
2018-08-20 01:46:22 +02:00
dhewg
c7c187e4dc Fix all whitespace errors
Excluding 3rd party files.
2018-08-20 01:46:22 +02:00
dhewg
eac3112d2d Fix quoting in GPL headers 2018-08-20 01:46:21 +02:00
Timothee 'TTimo' Besset
aa3dbca015 hello world 2011-11-22 15:28:15 -06:00