Clownacy
61aec1cb15
Use native Windows types/macros when available
...
This prevents conflicts when a translation unit includes
`WindowsWrapper.h`, and middleware that includes `windows.h`.
2020-03-17 13:21:37 +00:00
Clownacy
44762363cf
Bump required C++ standard to C++11
...
cute_spritebatch.h uses C99/C++11 features.
2020-03-15 00:06:30 +00:00
Clownacy
cc4a58fbac
Use CFLAGS and CMAKE_C_FLAGS
2020-03-14 23:18:30 +00:00
Clownacy
4f49fe8706
Merge branch 'accurate' into portable
2020-03-14 23:17:42 +00:00
Clownacy
7fe29e6ac5
List technical options after game-affecting ones
2020-03-14 23:12:27 +00:00
Clownacy
d54bc4c232
Add MSVC_LINK_STATIC_RUNTIME to the readme
2020-03-14 23:09:05 +00:00
Clownacy
066f4988d3
CMake cleanup
2020-03-14 23:03:47 +00:00
Clownacy
720466826b
Merge branch 'accurate' into portable
2020-03-14 23:01:46 +00:00
Clownacy
36f961d328
Fix CMake build with Linux MinGW-w64
2020-03-14 23:01:27 +00:00
Clownacy
3e581b0489
Specify which type of SDL2 is being used
...
It seems that SDL 2.0.12 improved its autotools-generated CMake file,
to the point where our script mistakes it for a CMake-generated one.
2020-03-14 22:55:01 +00:00
Clownacy
7420594241
Make Travis file use CXXFLAGS/CMAKE_CXX_FLAGS
2020-03-14 22:53:08 +00:00
Clownacy
7d4fda54ef
Fix errors
2020-03-14 22:50:04 +00:00
Clownacy
b84601cceb
Update DoConfig and bin2h CMake files
2020-03-14 22:41:14 +00:00
Clownacy
03c460a60b
Merge branch 'accurate' into portable
2020-03-14 22:10:00 +00:00
Clownacy
e96619141b
Update Travis file to use CXXFLAGS
2020-03-14 22:02:06 +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
84cc01b8f0
Remove LTO from the Makefile
...
Can also be done by adding to CXXFLAGS
The CMake one will be kept around because it uses an actual CMake
feature.
2020-03-14 20:12:33 +00:00
Clownacy
a0f7ce8d9f
Merge branch 'accurate' into portable
2020-03-14 20:11:42 +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
bbf65f64f5
Note that users can pass their own compiler flags
2020-03-14 19:59:56 +00:00
Clownacy
2c831a62ad
Add NATIVE_OPTIMIZATIONS to the Makefile
...
Must have forgot to add this option here when adding it to the
portable branch
2020-03-14 19:45:30 +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
505c9cc8f5
Clean-up MSVC tweaks
2020-03-14 19:30:57 +00:00
Clownacy
1dccec0e31
Bump required CMake version to 3.12
...
I was only able to test 3.8 because of my Pi, but since I've updated
Raspbian, it doesn't use that version anymore, so I can't guarantee
it works.
2020-03-14 19:27:32 +00:00
Clownacy
d80d7ed8c8
Merge branch 'accurate' into portable
2020-03-14 19:26:39 +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
169a755ec3
Wrap UTF-8 strings in C89-style comments
...
This should prevent compilation errors when compilers don't read the
source files as UTF-8.
MSVC in certain codepages previously misread some UTF-8 comments as
containing newlines, causing it to try to process the rest of the
comment as code. This was fixed by forcing MSVC to read the files as
UTF-8 using the `/utf-8` flag, but this doesn't seem to be supported
in older versions.
Since the issue was caused by newlines being added where they didn't
belong, using C89-style comments instead should avoid the problem
altogether.
I'll still keep the utf-8 flag around for supported compilers - just
in case.
2020-03-14 14:12:53 +00:00
Clownacy
76e4fb5e8a
Improve MSVC6 hacks
2020-03-14 14:08:25 +00:00
Clownacy
c6b77fb015
Move the windows.h include to the right place
2020-03-14 13:25:25 +00:00
Clownacy
8a3b5c1f7a
Use macros instead of __stdcall
...
Wow Microsoft's documentation sucks: it constantly omits these,
making you think they're just plain `__cdecl`.
2020-03-14 13:22:36 +00:00
Clownacy
4e0a168533
Move the MSVC6 hacks to WindowsWrapper.h
...
Now the wrapper has a purpose again, and it keeps things neat.
2020-03-14 12:55:22 +00:00
Clownacy
05fb5cf106
Fix build error with MinGW
2020-03-13 22:01:02 +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
39c1d92947
CMakeLists.txt - Wrap paths in ""
2020-03-05 15:16:17 +00:00
Clownacy
27d82e9762
Set STB_IMAGE_STATIC
...
Reduce global namespace clutter.
...Man, I wish other single-header-file libs had an option like this
- this is a big part of why the new miniaudio backend's been causing
so many problems lately.
2020-03-05 00:04:47 +00:00
Clownacy
d57850d937
Fix Windows miniaudio build... again
2020-03-04 21:51:22 +00:00
Clownacy
9af25f7c67
Hopefully fixed miniaudio backend on Windows
...
Stupid BOOL type
2020-03-04 21:02:17 +00:00
Clownacy
156c01e672
Rename RENDERER and AUDIO_BACKEND
...
Now they're BACKEND_RENDERER and BACKEND_AUDIO
2020-02-29 18:33:32 +00:00
Clownacy
72672e142d
Makefile/CMakeLists.txt fixes
2020-02-29 18:19:06 +00:00
Clownacy
15bf7e095a
Add AUDIO_BACKEND option to readme
2020-02-29 18:19:06 +00:00
Clownacy
af24d010a5
Clean-up miniaudio backend a little
...
Really need to figure out the best way to abstract-away the software
mixer...
2020-02-29 18:19:06 +00:00
Clownacy
a943e80b1a
Add miniaudio audio backend to Makefile
...
Also made the CMake file link the libs miniaudio needs
2020-02-29 18:19:06 +00:00
Clownacy
14735caac3
Mark CMake target thingies as private
2020-02-29 18:19:06 +00:00
Clownacy
8ec8a8d990
Added unfinished miniaudio audio backend
...
Currently only works with CMake
2020-02-29 18:18:59 +00:00
Clownacy
934054806e
Merge branch 'accurate' into portable
2020-02-25 17:56:17 +00:00