Commit graph

44 commits

Author SHA1 Message Date
Clownacy
37c5236b9b Split SDL2 code from Input.cpp
...So, *all* of it.
2020-03-31 16:24:20 +01:00
Clownacy
2e5e1994c2 Enable debug console prints in non-debug builds 2020-02-03 16:44:52 +00:00
Clownacy
517824216e Merge branch 'accurate' into portable 2020-01-24 21:01:33 +00:00
Clownacy
0bcf978424 Rename HookDirectInputDevice 2020-01-24 21:00:34 +00:00
Clownacy
4ebfe064ff Fix compilation 2020-01-22 23:33:59 +00:00
Clownacy
63d5d766b2 Add debug print for enumerating controllers 2020-01-21 12:30:54 +00:00
Clownacy
4c7726221e ...Actually fix controller support 2020-01-21 12:27:50 +00:00
Clownacy
5d2bcb856b Merge branch 'accurate' into portable 2020-01-21 12:20:03 +00:00
Clownacy
fdbaa4e8e9 Fix controller support
WTF is wrong with me why did I do cffc3af45e
2020-01-21 12:17:45 +00:00
Clownacy
d50c012446 Input.cpp corrections
Typical Microsoft: make the return type a BOOL, but the make the
actual values some random enum.
2020-01-21 11:58:29 +00:00
Clownacy
cffc3af45e Fix bad merge 2020-01-06 18:49:15 +00:00
Clownacy
1e902b009f Slight formatting tweak in Input.cpp 2020-01-06 18:38:45 +00:00
Clownacy
c26954a559 Merge branch 'accurate' into portable 2020-01-06 18:38:22 +00:00
Clownacy
f36fc61de3 Made Input.cpp more ASM-accurate
There was one ASM-inaccuracy I missed last time, but now I've also
made the file's memory layout accurate (it appears that global
variable initialisation actually affects the order they reside in
memory).
2020-01-06 16:57:41 +00:00
Clownacy
38484613d5 Better GUID-printing bugfix
%hhx is a C99 thing, apparently.
2020-01-05 04:44:32 +00:00
Clownacy
354f23cf3f Improved accuracy of Input.cpp
Applied some missing constants/macros, and corrected an
ASM-inaccuracy.

I always wondered why the original code only passed the first member
of the GUID struct, but it turned out it didn't: it actually passed
the whole thing.

Also, it's starting to bother me how many ASM-inaccuracies have
sneaked-through. v2.0 was *meant* to have fixed all this already.
2020-01-05 03:48:02 +00:00
Clownacy
5b4d343df4 Apply missing constants
Yay WinAPI
2020-01-04 19:45:39 +00:00
Clownacy
0218402222 Fully-initialise the JOYSTICK_STATUS struct
This matches the vanilla behaviour.
2020-01-04 19:41:04 +00:00
Clownacy
deadc396bc Don't deinit SDL before calling an SDL function
Also, it's possible for SDL to initialise without 'joystick' being
set to a non-NULL value.
2020-01-04 01:09:07 +00:00
Clownacy
0ec5d85d56 Merge branch 'accurate' into portable 2019-11-17 18:30:44 +00:00
Clownacy
c5a8fec289 Clean-up Input.cpp 2019-11-15 18:44:59 +00:00
Clownacy
f6dd58429e Add missing boolean values 2019-10-21 19:25:34 +01:00
Clownacy
182f11f017 Fix controller support
Pressing up or down wouldn't work.
2019-09-11 17:51:20 +00:00
Clownacy
9ca503a96e Add Visual Studio 2017 project files
This required hacking-in DirectInput8 support since Visual Studio
hasn't supported DirectInput7 and earlier since 2007.
2019-09-10 00:43:23 +01:00
Clownacy
8114f88dd1 Shut up some build warnings 2019-09-06 15:21:43 +00:00
Clownacy
c00262bcd8 Restore the SDL2 joystick code
Modified to fit the original code better
2019-09-02 23:09:26 +01:00
Clownacy
8892dc24b5 ASM-accurate Main.cpp and added the various Windows menus 2019-09-01 18:15:12 +01:00
Clownacy
451945e80c Ripped out SDL2, and begun made WinMain ASM-accurate
Almost there... see #74.
2019-09-01 14:39:16 +01:00
Clownacy
36291ebf36 Cleanup
Doesn't affect the generated ASM
2019-08-29 19:36:39 +01:00
Clownacy
d5ee5f6979 Made Input.cpp ASM-accurate
See #74
2019-08-29 19:27:56 +01:00
Clownacy
44094b103e <SDL.h> -> "SDL.h"
The SDL devs recommend this:
https://wiki.libsdl.org/FAQDevelopment#Do_I_.23include_.3CSDL.h.3E_or_.3CSDL.2FSDL.h.3E.3F
2019-06-06 18:51:44 +00:00
Clownacy
c80b593a3f Some #include fixes
Finally figured out how to get include-what-you-use working
2019-06-06 18:44:28 +00:00
Clownacy
d2b5872c95 Weeded out some bool usage
Cave Story was written in C89. No bools. I've left in Sound.cpp's
though, since that's written in C++98 currently.
2019-05-24 10:07:30 +01:00
Clownacy
676ee004fe Removed the dependency on stdint.h
This doesn't exist in MSVC2003, and nothing in the Linux port's debug
symbols indicate Pixel used it.
2019-05-13 15:18:33 +01:00
Gabriel Ravier
37e29f330f Fix comments in Input.cpp
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-05-08 09:03:56 +02:00
Gabriel Ravier
960fa6f456 Removed all trailing spaces and added newline at EOF (when not present)
Also changed a "linux" to "Linux"

Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-05-07 11:55:42 +02:00
Clownacy
55f1d3a9fe Fixed some problems found while compiling most of this with VC++2003
I could compile most of this, but not link it (SDL2's .lib files must
be too new).
2019-02-20 03:55:05 +00:00
Clownacy
4d04590b28 Made the game compile as C++03
Still need to sort out the C++11-only initialiser lists that GCC allows
in C++03 mode with a warning.
2019-02-19 16:05:28 +00:00
Clownacy
0bb9760d87 Rearranged #includes 2019-02-18 21:30:22 +00:00
cuckydev
c7da84bb9f accuracy? 2019-02-12 20:58:42 -05:00
cuckydev
ad64a0440b moved fonts to seperate folder, switched to joysticks for control 2019-02-10 10:39:45 -05:00
cuckydev
c84f49f1dc wip 2019-01-16 22:48:21 -05:00
cuckydev
c6e3fa8685 working on draw stuff (doesn't compile) 2019-01-12 00:37:07 -05:00
GreenDev
0498f7ce25 Working on input... working on the entry point 2019-01-11 22:04:35 -05:00