Commit graph

2485 commits

Author SHA1 Message Date
Clownacy
1582af91cf Replace more float logic with integer-only
I hate floats >:(
2020-07-09 01:09:19 +01:00
Clownacy
c7a3e9c308 Comment-out unused variable 2020-07-08 20:43:56 +01:00
Clownacy
6e486d9226 Er, actually remove those dead includes 2020-07-08 20:00:49 +01:00
Clownacy
9c056f6882 Add option to make DoConfig clone use OpenGL 2.1
This way, I can use it in my Windows 7 VM, where OpenGL 3.2 isn't
available.
2020-07-08 19:33:58 +01:00
Clownacy
cebd07a939 Update imgui to latest table branch commit 2020-07-08 19:33:55 +01:00
Clownacy
ab82f014ae Avoid some float logic
Also shuts up some VS2019 warnings
2020-07-08 19:33:53 +01:00
Clownacy
8b854a0c95 Don't use Windows.h in WindowsWrapper.h
The need for this was eliminates ages ago, when I remove the
WindowsWrapper.h dependencies from the backends (it should only be
used by core Cave Story code).

This should eliminate any future issues with Windows.h causing
name-collisions.
2020-07-08 19:33:52 +01:00
Clownacy
565c79a4ce Fix GLFW3 software renderer in VS2019
GLFW will include these headers for us properly
2020-07-08 19:33:49 +01:00
Clownacy
adb09e19b7 Merge branch 'accurate' into portable 2020-07-08 19:42:28 +01:00
Clownacy
f7a8a260a4 Added OTHER_RECT struct
Unifies the weird not-RECTs
2020-07-08 19:30:11 +01:00
Clownacy
bfc255478c Remove unit-conversion macros 2020-07-08 19:15:11 +01:00
Clownacy
13985fb349 Added SoundMode enum
Controls whether a PlaySoundObject call start, stops, or loops a
sound
2020-07-08 18:52:32 +01:00
Clownacy
53c8d2e55c Remove invalid comment 2020-07-08 17:01:44 +01:00
Clownacy
ccf79e2559 Code style tweak 2020-07-08 16:54:31 +01:00
Clownacy
5652756129 Deobfuscate some 'tiles-to-units' calculations 2020-07-08 16:46:28 +01:00
Clownacy
b6af751f7b Convert NPC 129's rects to decimal 2020-07-08 16:41:49 +01:00
Clownacy
92ce7aeb5d Use fixed-size types for the WAV header struct
This matches the WAVEFORMATEX struct
2020-07-08 16:35:09 +01:00
Clownacy
1733b58b3a Merge branch 'accurate' into portable 2020-07-08 03:06:28 +01:00
Clownacy
d6bbb013f9 Deobfuscate some BOOLs 2020-07-08 02:57:00 +01:00
Clownacy
81641c82f3 Fix InitSoundObject 2020-07-08 02:37:19 +01:00
Clownacy
04fca693ad Try to avoid more Windows.h name collisions
I was hearing that DrawText would conflict.
2020-07-08 02:27:37 +01:00
Clownacy
72af19d056 Merge branch 'accurate' into portable 2020-07-08 02:12:32 +01:00
Clownacy
788e5ea2d8 Add some sound fixes and documentation 2020-07-08 02:07:22 +01:00
Clownacy
85ccda7829 Add missing functions to header 2020-07-08 01:57:15 +01:00
Clownacy
4afb0f494e Fix .wav file offsets 2020-07-08 01:56:31 +01:00
Clownacy
82a6160a31 Add missing sanity checks 2020-07-08 01:02:56 +01:00
Clownacy
a015d4d02e Restored LoadSoundObject
Can be used to load SFX from .wav files
2020-07-08 00:56:02 +01:00
Clownacy
cc0464e774 Restore InitSoundObject
Can be used to load SFX from .wav resource files (as long as they're
mono unsigned 8-bit samples).
2020-07-08 00:40:49 +01:00
Clownacy
ca1ed4f642 Restore a lost FIX_BUGS 2020-07-08 00:39:01 +01:00
Clownacy
4d3aae328b Merge branch 'accurate' into portable 2020-07-07 23:50:43 +01:00
Clownacy
41f699fcea Restore removed code from accurate branch
It's best to leave things like these around, just commented-out
2020-07-06 15:32:43 +01:00
Clownacy
220f48a98b Backport some undefined-behaviour fixes 2020-07-06 15:11:45 +01:00
Clownacy
1321ba522d Merge branch 'accurate' into portable 2020-07-06 13:46:09 +01:00
Clownacy
ffa4b16376 Deobfustate some NPC_MAX values 2020-07-02 20:20:12 +01:00
Clownacy
f7b428752f
Merge pull request #137 from GabrielRavier/accurateFixBugsTscBufferSizeCrash
accurate:  Do not crash when TSC files are too big with FIX_BUGS
2020-07-02 15:52:53 +01:00
Clownacy
90de32a83d
Fix bugs in bugfix
These checks would leak the FILE*. Also did some pedantic style tweaks.
2020-07-02 15:52:37 +01:00
Clownacy
4a8877713e Merge branch 'accurate' into portable 2020-07-02 15:52:19 +01:00
Gabriel Ravier
ff25ddfef0 src/TextScr.cpp: Do not crash when TSC files are too big with FIX_BUGS
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-07-02 16:43:13 +02:00
Clownacy
99fd64462b
Merge pull request #133 from GabrielRavier/portableMinimizeHeaders
portable: Cleaned up includes to only (and always) include what we use
2020-07-02 14:56:34 +01:00
Clownacy
720b1dfea7
Reword a comment 2020-07-02 14:55:18 +01:00
Clownacy
47ed4d7bfd
Restore stddef.h in Main.cpp
`NULL` is used in this file
2020-07-02 14:54:15 +01:00
Clownacy
9549f68b77
Merge branch 'portable' into portableMinimizeHeaders 2020-07-02 14:50:06 +01:00
Clownacy
8880c599b4 Merge branch 'accurate' into portable 2020-07-02 14:46:06 +01:00
Clownacy
143f3b9646 Backport header improvements from #133
Thanks to GabrielRavier for these
2020-07-02 14:42:53 +01:00
Gabriel Ravier
ca8b5ccaa1 Merge branch 'portable' into portableMinimizeHeaders
# Conflicts:
#	src/BulHit.cpp
2020-07-02 15:26:33 +02:00
Gabriel Ravier
81edd4db52 src: Restored SDL.h includes to conform to project style of including SDL2
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-07-02 14:59:55 +02:00
Gabriel Ravier
41c3afd927 src/Sound.cpp: Re-added Main.h include but commented it out with an explanation as to why
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-07-02 14:54:29 +02:00
Gabriel Ravier
187847fbcc src: Fixed not including headers that are included for detection of conflicting definitions
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-07-02 14:43:47 +02:00
Clownacy
6cc976d4d6 Wii U audio tweaks
Clean-up better, and neaten-up some code
2020-07-02 02:31:55 +01:00
Clownacy
28964f166c Merge branch 'accurate' into portable 2020-07-02 02:24:15 +01:00