Commit graph

96 commits

Author SHA1 Message Date
Clownacy
71199c7693 Merge branch 'accurate' into portable 2020-09-03 21:58:40 +01:00
Clownacy
aa396092b5 Translate error messages with FIX_BUGS 2020-09-03 21:39:36 +01:00
Clownacy
a05b802904 Merge branch 'accurate' into portable 2020-09-03 21:11:16 +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
adb09e19b7 Merge branch 'accurate' into portable 2020-07-08 19:42:28 +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
143f3b9646 Backport header improvements from #133
Thanks to GabrielRavier for these
2020-07-02 14:42:53 +01:00
Gabriel Ravier
32c8795ead src: Cleaned up includes to only (and always) include what we use
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-07-01 18:26:22 +02:00
Clownacy
27a1fd900f Revert more unnecessary edits 2020-06-30 13:48:46 +01:00
Gabriel Ravier
771b944d17 src: Some cleanup for the MAX_PATH std::string PR
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-06-29 19:02:25 +02:00
Gabriel Ravier
564d42dbd2 src: Change from using asprintf-based code to using std::string-based code
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-06-29 18:33:22 +02:00
Gabriel Ravier
32a879ca58 src: Removed MAX_PATH and made the path/string handling better in general (ported over from supportPathsAboveFilenameMax)
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-06-29 00:14:30 +02:00
Clownacy
cc8e875cb1 Merge branch 'accurate' into portable 2020-06-27 19:28:09 +01:00
Clownacy
a5bf854408 Document gMC.equip
All raw values have been replaced with enums
2020-06-27 19:27:57 +01:00
Clownacy
2f682a102f Merge branch 'accurate' into portable 2020-05-04 18:17:39 +01:00
Clownacy
95b29bb516 Mark some functions as static
Mac debug data confirms these
2020-05-03 21:52:36 +01:00
Clownacy
03250d62a0 Make variables more accurate
This commit changes which variables are static: the Mac (and
presumably the Linux) debug data tells you what variables are static,
by prefixing their names with double_underscores.

The variable names themselves also hint at this: global variables are
prefixed with 'g', and use upper-camelcase, while static variables
use whatever_you_call_this.
2020-05-03 20:28:56 +01:00
Clownacy
135035bb1a Change 'PlatformBackend' namespace to 'Backend' 2020-04-04 20:31:27 +01:00
Clownacy
63e75089d6 Split SDL2 code from Game.cpp 2020-03-31 16:32:50 +01: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
8d6c449482 Catch an entry parameter list I missed 2020-01-26 13:35:47 +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
df9dc3e22d Merge branch 'accurate' into portable 2020-01-06 19:39:36 +00:00
Clownacy
c838e8ebcb Add and apply the enum_ESCRETURN enum
Restored from the original source code, as it survived in the Linux
port's debug data.
2020-01-06 19:19:17 +00:00
Clownacy
0ec5d85d56 Merge branch 'accurate' into portable 2019-11-17 18:30:44 +00:00
Clownacy
5e49d734c9 Clean-up Game.cpp 2019-11-15 20:00:43 +00:00
Clownacy
531a6a0aeb Merge branch 'accurate' into portable 2019-11-10 12:17:40 +00:00
Gabriel Ravier
a45592302f Documentation : Commented the fact that "swPlay % 2" is always true
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-11-09 23:36:09 +01:00
Clownacy
a8fb0839fa Note Shift-JIS strings 2019-09-28 15:35:41 +00:00
Clownacy
5b5d5ae729 Revert "Restore the Windows-style path separators"
This reverts commit 42e1b36fd8.
2019-09-05 14:19:17 +01:00
Clownacy
84c3cd825e Merge branch 'accurate' into portable 2019-09-05 14:18:42 +01:00
Clownacy
42e1b36fd8 Restore the Windows-style path separators 2019-09-05 14:05:27 +01:00
Clownacy
22c967ca3a Add a replication of MSVC2003's rand() algorithm
This actually affects how the game sounds. Seriously, listen to the
dialogue boxes. Now it matches the original.
2019-09-04 19:23:35 +00:00
Clownacy
4e50046d4b Remove WINDOWS and NONPORTABLE
Now that the portable stuff gets its own branch, these are unneeded
2019-09-04 02:14:15 +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
fd855ee732 Restore the new renderers 2019-09-02 22:46:36 +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
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
34986ff049 Restore some commented-out code 2019-08-28 23:40:07 +01:00
Clownacy
3ab2b11204 Convert Game.cpp to UTF-8 2019-08-25 21:07:03 +01:00
Clownacy
b7d01aae3f Overhauled the Music ID enum
This should be ASM-accurate, since SurfaceID was
2019-08-21 18:26:20 +00:00
Clownacy
64598dc2a5 Rename Surface_Ids to SurfaceID
For code style consistency (this isn't a vanilla enum name - I don't
think there even was an enum for this in the original source code)
2019-08-21 16:18:55 +00:00
Clownacy
f9de3f8216 Added another bugfix
This was causing MSVC debug builds to raise a warning whenever a save
was loaded.
2019-07-12 13:09:08 +01:00
Clownacy
97acb292bb Made Game.cpp ASM-accurate
Working towards #74.
2019-06-30 03:03:25 +01:00
Clownacy
19166f80d0 Correct some misdecompiled switchcases 2019-06-21 11:02:20 +00:00
Clownacy
078dc440c7 Made TextScr.cpp ASM-accurate
Yes! Finally!

Working towards #74
2019-06-20 20:33:47 +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
00ca00f5dd Weed out some usage of C++ bools
Pixel used BOOL, the C89-friendly Windows-specific equivalent
2019-05-14 01:35:04 +01:00
Clownacy
c9d5b3d03a Made Ending.cpp ASM-accurate 2019-05-13 20:43:43 +01:00