This establishes (near) parity of source code file lists
between the Makefile and CMakeLists.txt
To make that change I messed around CMakeLists.txt a bit.
It now uses target_sources and target_compile_definitions.
I also removed some MSVC stuff since we don't actually
care about MSVC--it made things easier.
CMake minimum version 3.0 -> 3.13 for target_sources.
Some key points for programmers:
- Source code files are mostly listed in a 'Sourcefile'.
So you no longer directly edit the object list. There
can be multiple Sourcefiles and they can even live in
subdirectories--the directory name will be prepended to
every filename in the list. Of course, the Makefile
still needs to be edited to read from each Sourcefile.
- Different rules are no longer required for source code
files that live in subdirectories (such as sdl/ or
hardware/). Subdirectories Just Work so go ham!
In addition to those points, another important change is
that the bin directory is no longer divided into platform
subdirectories (Linux64, Mingw, etc). Executables now go
directly into bin. If you use DEBUGMODE or target 64-bit,
then subdirectories for 'debug' and '64' will be made
though.
Oh by the way, I don't think make clean actually removed
files before on Windows. It should now. I also fixed as
many little inconsistencies like that as I noticed.
And now just an overview of the technical aspects that
shouldn't affect anyone who doesn't REALLY care about the
Makefile...
objs and dep directories have been moved to a make
directory. Makefile.cfg and its variants have been moved
out of their various subdirectories to src/Makefile.d
make distclean removes the bin and make directories
entirely, but make clean and cleandep still only affect
the current build target.
When I say automation, I mean that a lot of copy pasting
in the Makefile has been reduced.
The global "tags" can be iterated upon for every unique tag which is set in the
level. If a tag is set on a sector/line/thing, it will be included. Taking the
length of "tags" will give you the number of these unique tags. (If a tag is
set on multiple sectors/lines/things, it will only be counted once though.)
For sectors, lines and mapthings, call the field "tagged". This function takes
one argument, which is the tag. The return value can be iterated over for all
the sectors/lines/things with that tag. The length can also be taken for the
number of such objects. If no argument is given, the global tag is default.
* create new file lua_polyobjlib.c
* made a stub LUA_PolyObjLib function
* added META_POLYOBJ to lua_libs.h
* updated makefile, CMake and MSVC project files for lua_polyobjlib.c
Basically any function that calls fopen() is gone,
except the ones created by me.
And no access to stdin/stdout/stderr
through io.read()/io.write().
Not really harmful but why would you want that in SRB2.
my P_SearchBlockmap_* functions are now a single searchBlockmap function, you can choose between "objects" and "lines" with the first arg to decide what to iterate through. I also rearranged the argument order a bit for easy stack cleanup etc
I'll remove the old stuff later, don't worry, it's disabled for now
Angles now go from 0 to 0xFFFF (360 degrees == FRACUNIT) instead
of using a full UINT32. Lua only has one number type, so signedness
gets in the way of using angle_t directly. This handling of angles
matches up with how ZDoom ACS scripting and the like does it.
I also changed all the integer casts and pushes of fixed_t to
their own macro in preperation for possible future seperation.