Commit graph

82 commits

Author SHA1 Message Date
Gabriel Ravier
90476c3a3e CMakeLists: Change minimum CMake version from 3.12 to 3.10.2
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-16 10:25:48 +02:00
Gabriel Ravier
181ecc3ec2 CMakeLists: Reverted random comment change from 593315eb
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-16 00:29:43 +02:00
Gabriel Ravier
593315eb53 CMakeLists: Made build work for cross-compile with mingw
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-16 00:11:03 +02:00
Clownacy
36f961d328 Fix CMake build with Linux MinGW-w64 2020-03-14 23:01:27 +00:00
Clownacy
4ef83526c0 More CMake cleanup 2020-03-14 21:59:42 +00:00
Clownacy
cadfeab385 Neaten-up the CMake file 2020-03-14 20:26:59 +00:00
Clownacy
216aec7caf Clean-up CMake LTO
Honestly, considering the user can enable LTO by setting
CMAKE_INTERPROCEDURAL_OPTIMIZATION, I might remove this option too...
2020-03-14 20:19:48 +00:00
Clownacy
10fbb05670 Remove some Make/CMake options
These options would add compiler flags that the user could just pass
on their own with CXXFLAGS/CMAKE_CXX_FLAGS.
2020-03-14 20:03:42 +00:00
Clownacy
a70b4e444e Add CMake info to the readme 2020-03-14 19:42:58 +00:00
Clownacy
efa987d7ad Make the static MSVC runtime linkage optional
I'd tell people to use CMAKE_MSVC_RUNTIME_LIBRARY instead, but, eh,
it's too recent.
2020-03-14 19:36:47 +00:00
Clownacy
de1740b61c Match the portable branch's CMakeLists.txt 2020-03-14 19:15:41 +00:00
Clownacy
3de557807c This option shouldn't be on by default 2020-03-14 19:10:31 +00:00
Clownacy
140c67a5cb Make CMake file match the portable branch one 2020-03-14 19:09:32 +00:00
Clownacy
406ff18909 Add CMakeLists.txt and Visual Studio 6 support
The CMake file allows you to compile the accurate branch with
whatever version of Visual Studio you have lying around, without
having to clumbsily convert the VS2003 project.

I've tested this with VS2019, VS2003, and VS6. VS6 is goofy - it's
missing a few types and constants, and it's not smart enough to
realise that ints and longs are the same in ILP32 data models. I've
added a few small hacks to address this. Might undo them. Who knows.

For now, I want to support VS6 because Mint compiled CSE2 with it
before, and because VS6 uses `msvcrt.dll` as its C runtime, which
apparently comes pre-installed in Windows, as opposed to all those
other annoying runtime versions that require they be installed
separately (which is why MinGW targets it specifically).

Also, VS6 *should* give us Win95-compatible builds. The internet says
MSVC2003 is Win95-compatible too, but Mint claims the vanilla EXE
doesn't run on there. I imagine it has something to do with its
static runtime library (VS2003 links the static one by default for
some reason).
2020-03-13 21:35:51 +00:00
Clownacy
c7c5077103 Remove the leftover CMakeLists.txt file
I might bring this back at some point. Depends.
2019-09-05 12:46:39 +00:00
Clownacy
ea83d4ba8a Merge branch 'master' into accurate 2019-08-25 20:35:01 +01:00
Clownacy
c4599bc146 Allow third-party in-source files to go in the external folder 2019-08-10 22:47:40 +01:00
Clownacy
cdbcd5f6c3 Added a local copy of GLEW 2019-08-10 21:47:06 +01:00
Clownacy
fc0653e5aa Back to OpenGL 3.2 (I really want the core profile)
In OpenGL 3.1, compatibility mode was an extension, meaning it could
never actually be disabled. 3.2 fixed that with the introduction of
profiles.
2019-08-10 18:05:01 +01:00
Clownacy
7146288e94 Sod it, fall back on compatibility mode if it's available
This way, I can use immediate mode, which is way faster than using
buffers for some reason. Since I'm not using profiles anymore, I
dropped the minimum requirement to OpenGL 3.1. If a driver doesn't
support Legacy GL, then it can use the slow buffer code.

But seriously, I need to figure out why using buffers is so slow.
If this was a common problem, Modern OpenGL wouldn't have made it the
only option.
2019-08-09 19:19:43 +01:00
Clownacy
eb62a80956 Change references to OpenGL 2.1 to 3.2 2019-07-31 22:38:33 +00:00
Clownacy
348a691c6c GLU is unneeded 2019-07-31 02:49:07 +00:00
Clownacy
b998719ff1 Update CMakeLists.txt, the Makefile, and the readme 2019-07-24 20:09:27 +01:00
Clownacy
05f382961d Added OpenGL 2.1 renderer
Yay 100% hardware-acceleration. Yes, I know 2.1 is outdated and
crappy, but it was the easiest one to write. I'll probably make an
OpenGL 3.0 Core renderer at some point.

Anyway, font rendering isn't here yet, because I plan to overhaul it.
2019-07-23 15:20:14 +01:00
Clownacy
44456e4a25 Add an SDL_Surface-based renderer
Ha, my custom software renderer is faster!
2019-07-17 16:09:18 +01:00
Clownacy
b84661d88a Move the backend files around a bit 2019-07-15 17:01:42 +01:00
Clownacy
15bfd00d25 Added hardware-accelerated rendering backend
Still need to add the code for surviving render target losses
2019-07-15 16:47:10 +01:00
Clownacy
21cf78b86d Split Draw.cpp into common code and backend code
Should be easy to add the new hardware renderer now
2019-07-15 13:42:49 +01:00
Clownacy
974865e2d2 Add some Windows-only Generic.cpp functions
These things are annoying. I really need to split this repo into
accurate and portable branches soon.
2019-07-03 11:22:40 +01:00
Clownacy
31196e15ec CMake fixes
This fixes Ninja support, fixes Visual Studio debug builds, and
fixes Windows builds.
2019-06-21 02:45:16 +01:00
Clownacy
49defcc3fb Now the build output directory is generated completely
The data folder is now stored in the new assets folder, and copied
across as part of the build process.
2019-06-17 19:13:29 +00:00
Clownacy
e9c42c6c30 Put back those dashes removed in the last commit
Whitespace selection apparently selects more than whitespace.
Thanks, Geany.
2019-06-16 20:29:38 +00:00
Clownacy
3f36bf52de CMake formatting cleanup 2019-06-16 19:36:59 +00:00
Clownacy
75f585a727 Made CMakeLists.txt cross-compile-friendly
bin2h is built natively
2019-06-08 18:27:57 +00:00
Clownacy
50897e8ceb Move DoConfig_debug naming to the root CMakeLists.txt 2019-05-23 21:29:32 +01:00
Clownacy
5b89a31976 Split bin2h to its own CMake file
Also added warnings to its part of the Makefile
2019-05-23 19:42:52 +01:00
Clownacy
7db42b0b72 Set bin2h to C90 in the CMake file
Done to match the Makefile
2019-05-23 11:36:41 +00:00
Clownacy
609d54916b Renamed debug builds to 'CSE2_debug' and 'DoConfig_debug'
Makes a bit more sense than 'CSE2d' and 'DoConfigd'
2019-05-22 00:29:16 +00:00
Clownacy
e925880f5b Fixed VS 2017 WinXP builds when using local libs
Turns out vcpkg enables this for its build too.
2019-05-08 15:06:51 +01:00
Clownacy
6ef6f0f5c0 Tweak how FORCE_LOCAL_LIBS works 2019-05-05 14:19:40 +01:00
Clownacy
a6ac6787d3 Embed the fonts in the EXE
Now CSE2.exe should be drop-in replacement for Doukutsu.exe, with
no extra files needed.
2019-05-05 14:03:16 +01:00
Clownacy
6dc85875ff Changed output executable naming scheme
Now the Makefile and CMake build systems are identical:

Release builds are named CSE2, and debug builds are named CSE2d.

Language no longer has an effect on filename for the Makefile.
2019-05-05 03:14:58 +01:00
Clownacy
36119082d2 Remove CMAKE_BUILD_TYPE defaulting
It's annoying, but vcpkg *really* didn't agree with it (it would just
build Debug anyway). The instructions provided with the repo already
tell you to manually define Release builds anyway.
2019-05-05 02:55:54 +01:00
Clownacy
ddf61dd791 Added Wave.dat's original file extension
beebd77d73/source/Sound.cpp (L477)

Thank goodness for the Org2 source release
2019-05-05 02:20:37 +01:00
Clownacy
d2f1b2c1a9 Renamed some of the resource files
The Linux port's get_resource function seems to be using the original
filenames, rather than the 8.3 filenames used by the Windows EXE's
resource system. Too bad it doesn't tell us the original file extensions.
2019-05-04 18:26:41 +01:00
Clownacy
6288ec0355 Made DoConfig self-contained 2019-05-02 18:20:47 +01:00
Clownacy
5c339ef686 ...Static-link MSVC CRT properly 2019-04-29 23:21:52 +01:00
Clownacy
12b6fad997 Made MSVC static-link the CRT 2019-04-29 22:11:47 +01:00
Clownacy
fdb2177879 Add missing options to the readme 2019-04-29 14:36:18 +01:00
Clownacy
58d7fb2ca7 Some more CMake fixes 2019-04-26 05:13:50 +01:00