Clownacy
a3a8c4df94
Remove an include which isn't needed
2020-06-30 17:33:03 +01:00
Clownacy
e934cae696
Merge branch 'accurate' into portable
2020-06-30 17:32:19 +01:00
Gabriel Ravier
a62141e185
src: Added back stddef.h where accurate to get NULL/size_t properly (stdio.h provides them, but it's for file I/O, not essential definitions and types)
...
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-06-30 01:52:38 +02:00
Gabriel Ravier
66e4995135
src: Remove unnecessary includes
...
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-06-30 00:12:17 +02:00
Clownacy
5daea02ac6
Change the audio backend API
...
Removes locking and unlocking: instead, samples are passed to Create.
2020-04-06 19:44:45 +01:00
Clownacy
9cbaa0be00
Merge branch 'accurate' into portable
2020-01-08 13:16:21 +00:00
Clownacy
32d635581a
Sound.cpp variable arrangement tweaks
...
Not much can be done for this file, considering how heavily it was
modified in the Linux port.
While I was here, I noted the unused .wav loading function.
2020-01-07 22:03:49 +00:00
Clownacy
84626ea710
Merge branch 'accurate' into portable
2020-01-07 04:55:16 +00:00
Clownacy
58d7a45392
Empty Tags.h
...
There's no evidence Tags.h contained these variables (if anything, it
appears that Pixel manually declared them in every file that used
them).
gg Pixel
2020-01-06 21:20:17 +00:00
Clownacy
dabf04f8ab
Remove leftover macro
2019-11-17 17:53:50 +00:00
Clownacy
531a6a0aeb
Merge branch 'accurate' into portable
2019-11-10 12:17:40 +00:00
Gabriel Ravier
5b18283e5f
Documentation : Made some comments clearer
...
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-11-09 23:37:10 +01:00
Gabriel Ravier
17f7f66fc9
Documentation : Comment an always true expression
...
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-11-09 23:37:10 +01:00
Clownacy
266bb13be2
Compare some pointers to NULL
...
Doesn't affect ASM-accuracy - I just think it looks neater.
2019-11-09 14:53:34 +00:00
Clownacy
88f22510ee
Fix crash when AudioBackend_Init fails
...
Similar checks existed in the original code (see the accurate
branch), but they were removed in the Organya source code release, so
I figured they were useless. Turns out they're not.
Fixes #48 .
2019-09-10 17:59:54 +00:00
Clownacy
aede7b6069
Restore the FREQUENCY constant
...
Cave Story at 2000Hz is fun
2019-09-10 14:04:06 +00:00
Clownacy
0dc9bb6b1b
Change the audio backend API again
2019-09-06 14:46:31 +00:00
Clownacy
d80adf9cc8
Comment on a bug in MakePixToneObject
2019-09-05 21:41:40 +00:00
Clownacy
46fdc08ecd
Fix PixTone sounds missing their ends
...
I was accidentally replicating a bug from the original code in the
wrong place. I should probably comment on that bug in the accurate
branch.
2019-09-05 21:39:38 +00:00
Clownacy
0531a2c482
Remove the Windows-style path separators
...
There, *now* the game runs on Linux
2019-09-04 13:54:19 +00:00
Clownacy
a3bb651194
Change the audio backend API a little
...
AudioBackend_SetSoundPosition was very loosely-defined.
2019-09-04 03:16:33 +01:00
Clownacy
b553b0c2e9
Remove DWORD and BYTE
...
They're not as deeprooted as BOOL.
2019-09-04 01:10:54 +01:00
Clownacy
5ea356a3bd
Weed out a lot of the Windows dependency
...
Storytime: Cucky's original SDL2 port work involved using SDL2's
threading API to emulate the original WinAPI threading.
I can't be assed with that stuff, so I used the same trick Cucky did
for the Wii port, and hooked Organya up to the SDL2 audio callback.
This actually opens up the possibility for perfectly-synchronised
Organya playback. By that I mean, instead of needing a super
low-latency audio callback, I can have the callback synchronise its
audio mixing with Organya itself. I haven't done it yet, I plan to
soon.
2019-09-04 00:28:23 +01:00
Clownacy
5a9492166d
Restored the new SDL2 audio system
...
While I was at it, I overhauled the thing and found a bunch of
optimisations,
2019-09-03 22:29:57 +01:00
Clownacy
8f1bc269f0
I might have found out why Sound.cpp uses DSBUFFERDESC1
2019-09-03 00:34:47 +01:00
Clownacy
09b188ac29
Add a bugfix for a bizarre function call
2019-09-03 00:17:42 +01:00
Clownacy
03e513365b
PATH_LENGTH is actually Windows's MAX_PATH
...
When MAX_PATH isn't available, use FILENAME_MAX. This might be a bad
idea.
2019-08-31 01:44:53 +01:00
Clownacy
8bce9ffc7a
Cleanup
2019-08-28 17:40:43 +01:00
Clownacy
e738541afd
Note an inaccuracy
2019-08-28 07:56:51 +01:00
Clownacy
470c5d86d5
ASM-accurate Sound.cpp and Organya.cpp (except for one function)
2019-08-28 07:55:42 +01:00
Clownacy
c27d15dddc
Prevent segfault on shutdown
...
Oddly enough, putting the check in the Release function doesn't fix
it. Makes me wonder how DirectSound did it. I don't know much C++.
2019-08-15 18:46:04 +00:00
Clownacy
add4e69374
Made Sound.cpp more accurate
2019-08-13 20:45:50 +01:00
Clownacy
3039e3b846
Link to the actual source code for Organya.cpp and Sound.cpp
2019-06-17 17:03:54 +00:00
Clownacy
078da6ccf7
Correct fmod usage
2019-06-14 17:06:42 +01: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
0fb147aa0d
Change the sound buffer size to a power of 2
...
Turns out giving SDL2 a non-power-of-2 buffer size crashes it in
Emscripten.
2019-05-29 18:49:09 +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
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
dc0f242f25
Made clamp macro safer
2019-05-04 21:37:06 +00:00
Clownacy
c52004a1b3
Add a missing #include
2019-05-03 01:40:52 +01:00
Clownacy
7d222231ae
Added some missing headers
2019-04-26 01:41:36 +01:00
Clownacy
79bf011e3b
Made GenericLoad.cpp ASM-accurate
2019-04-22 20:12:43 +01:00
Clownacy
295673b813
Sound cleanup and optimisation
...
PlaySoundObject is also more like it was in the original source code
2019-04-19 01:24:08 +01:00
Clownacy
923cd5a6e3
Added some Raspberry Pi hacks
...
Also added a debug print that tells you what backend SDL2 is using
2019-03-18 20:54:03 +00:00
Clownacy
01ddc5e923
Fixed some warning MSVC2003 was giving in /W3 mode
2019-02-23 21:45:57 +00: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