Commit graph

86 commits

Author SHA1 Message Date
Clownacy
afb2b22e58 Merge branch 'accurate' into portable 2020-10-23 19:10:36 +01:00
Clownacy
d81c46a79c Release custom code under the MIT licence
Of course, Pixel's code is still proprietary.
2020-10-23 19:09:55 +01:00
Clownacy
2963977cf9 Merge branch 'accurate' into portable 2020-09-04 02:36:19 +01:00
Clownacy
92d50ae187 Comment on a weird-ass Sleep call 2020-09-04 02:35:31 +01:00
Clownacy
3eced7b3e4 Implement the Sleep(100) call
Okay, seriously, why does the game do this?
2020-09-04 02:29:50 +01:00
Clownacy
bc165d0f0a Remove Organya-sleeping
Turns out that 'Sleep' call is ran on the *main* thread.

I have absolutely no idea why the game does this.
2020-09-04 02:26:31 +01:00
Clownacy
0c367cecf7 Add FIX_MAJOR_BUGS option
This one specifically fixes bugs that either invoke undefined
behaviour or cause memory leaks. Essentially, they affect stability.
Bugs that just affect gameplay will remain covered by FIX_BUGS.
2020-09-03 21:05:14 +01:00
Clownacy
ab09dc67eb Emulate the Organya thread pauses
Now there's a 100ms pause between songs.

Currently only the miniaudio backend supports this.
2020-09-03 18:14:52 +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
99fa3868d3 Merge branch 'accurate' into portable 2020-06-30 21:36:48 +01:00
Clownacy
1bf110269c Correct some constants
Have been incorrect since f43a3c1130
2020-06-30 21:30:56 +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
f78f6b7105 Split Organya callback data
The function pointer only ever needs to be set once, unlike the
timer. This should avoid any scary race-conditions.
2020-04-18 00:54:24 +01:00
Clownacy
1898633602 Found a name for nameless_flag! 2020-04-16 15:28:57 +01:00
Clownacy
c51a074fad Big disgusting backend rework
We need to avoid `WindowsWrapper.h` in the backends whenever we can,
to avoid name collisions (the Wii U homebrew library) defines its own
BOOL/TRUE/FALSE, which really doesn't work with CSE2.
2020-04-13 18:19:39 +01: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
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
788697dc5d Fix a possible hang in the audio mixer
It was likely a race condition between the game thread writing to
'organya_timer', and the audio thread reading it.

...I really need to rethink the API for this Organya-synchronisation
thing.
2020-01-29 23:21:27 +00:00
Clownacy
78b41a5ced Merge branch 'accurate' into portable 2020-01-23 01:50:42 +00:00
Clownacy
0237844e14 Actually, this fix doesn't seem right 2020-01-23 01:50:03 +00:00
Clownacy
e8edc42d07 Merge branch 'accurate' into portable 2020-01-23 01:37:03 +00:00
Clownacy
4091d152ee Minor style tweak 2020-01-23 01:36:19 +00:00
Clownacy
a65c4bc1e3 Added bugfix to Organya 2020-01-23 01:34:55 +00:00
Clownacy
242aa05920 Remove some whitespace 2020-01-09 05:43:05 +00:00
Clownacy
406087bebb Added a missing #include in Organya.cpp 2020-01-08 13:34:54 +00:00
Clownacy
9cbaa0be00 Merge branch 'accurate' into portable 2020-01-08 13:16:21 +00:00
Clownacy
5abf8a8878 More-accurate Organya.cpp variable arrangement
Also found some authentic variable names
2020-01-07 21:38:34 +00:00
Clownacy
0ec5d85d56 Merge branch 'accurate' into portable 2019-11-17 18:30:44 +00:00
Clownacy
5987a5a8d7 Clean-up Organya.cpp 2019-11-14 01:55:28 +00:00
Clownacy
531a6a0aeb Merge branch 'accurate' into portable 2019-11-10 12:17:40 +00:00
Gabriel Ravier
f840be28c7 Added better comment for random self-assign in Fade.cpp
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-11-09 23:37:10 +01:00
Clownacy
63858fc31e Add a TODO 2019-10-10 19:28:05 +00:00
Clownacy
69292f99f6 Add a new bugfix 2019-09-12 14:50:06 +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
0907027a82 Merge branch 'accurate' into portable 2019-09-06 19:30:23 +00:00
Clownacy
d0b17cd406 Fix crash when quitting the game 2019-09-06 19:27:14 +00:00
Clownacy
8114f88dd1 Shut up some build warnings 2019-09-06 15:21:43 +00:00
Clownacy
b6fccd509d Add a missing comment translation 2019-09-06 14:47:13 +00:00
Clownacy
0dc9bb6b1b Change the audio backend API again 2019-09-06 14:46:31 +00:00
Clownacy
2b4b57c6eb Merge branch 'accurate' into portable 2019-09-04 14:11:54 +00:00
Clownacy
7a5eb3993c Remove some FIX_BUGS things that aren't actually bugs
Code cleanup isn't within the scope of the project.
2019-09-04 13:57:22 +00:00
Clownacy
0424c3e275 More portability improvements
Now this actually compile on Linux, but it doesn't run.
2019-09-04 13:51:49 +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
79759145c0 Merge branch 'accurate' into portable 2019-09-04 01:53:58 +01:00
Clownacy
987ecd5340 Apply a missing constant in Organya 2019-09-04 01:41:15 +01:00
Clownacy
6932e01650 Fix some horribly platform-dependant code in Organya 2019-09-04 01:37:15 +01:00