Commit graph

981 commits

Author SHA1 Message Date
Clownacy
624adbdab8 Remove junk widescreen code
This doesn't belong in here. Also, this code was overhauled in the
enhanced branch, so this version is useless.
2020-04-15 19:59:13 +01:00
Clownacy
2a0570df94 Make bugfix consistent with official code 2020-04-07 18:18:45 +01:00
Clownacy
409453a6a1 Note some null characters 2020-04-07 14:03:15 +01:00
Clownacy
ae66ede214
Merge pull request #105 from GabrielRavier/accuratePortableBugs2SisterPR
Noted a bunch of npc->cond = 0 bugs and gTS.data-related crashes
2020-04-06 13:51:52 +01:00
Clownacy
fbf9332c9a Fix compiler error with DEBUG_SAVE enabled 2020-04-05 18:25:35 +01:00
Clownacy
f75859b759 Change constant ordering
This was bugging the hell out of me
2020-04-05 03:35:43 +01:00
Clownacy
bd280414ea Cleanup 2020-04-04 00:43:06 +01:00
Clownacy
5d37391882 Document bullets a little 2020-04-04 00:13:20 +01:00
Clownacy
90714cb7a4 Apply some missing BOOL constants 2020-04-03 23:16:40 +01:00
Clownacy
ca6538561f Document ActNpc061 (King) 2020-03-27 17:49:58 +00:00
Clownacy
7820926bfd Remove outdated comments 2020-03-22 15:37:00 +00:00
Clownacy
c34a7fc354 Fix build error 2020-03-22 15:35:59 +00:00
Clownacy
b374a8046c Add some missing global/static variable names
Also from the Mac port.
2020-03-22 15:31:28 +00:00
Clownacy
f6606b7748 Add some missing function names
These were retrieved from the Mac port (v0.0.7), which kept these
functions.

Unfortunately, this port is missing local variable names, so we can't
use it to make InitBack accurate.
2020-03-22 15:31:28 +00:00
Gabriel Ravier
6f114d0da5 Bullet, Caret, NpcAct1{2,4,8}0, TextScr: Add a note about some overflow bugs 2020-03-17 15:31:02 +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
76e4fb5e8a Improve MSVC6 hacks 2020-03-14 14:08:25 +00:00
Clownacy
c6b77fb015 Move the windows.h include to the right place 2020-03-14 13:25:25 +00:00
Clownacy
8a3b5c1f7a Use macros instead of __stdcall
Wow Microsoft's documentation sucks: it constantly omits these,
making you think they're just plain `__cdecl`.
2020-03-14 13:22:36 +00: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
e4a20a983e
Similar fixes 2020-02-20 15:59:04 +00:00
Clownacy
ed97e374f8
Fix screen centering in wide/tallscreen
Previously, it would misbehave if the screen is slightly wider than the level
(because it wasn't accounting for the fact that the game hides half of the
border tiles)
2020-02-20 13:11:39 +00:00
Clownacy
a7f1d80a06 Fix compilation with modern Visual Studio 2020-02-13 18:16:01 +00:00
Clownacy
a762f28837 Note some out-of-bounds array accesses
Thanks, Gabe
2020-02-01 12:45:32 +00:00
Clownacy
30dced2587 Correct the style of some pointer checks 2020-01-26 13:52:24 +00:00
Clownacy
0bcf978424 Rename HookDirectInputDevice 2020-01-24 21:00:34 +00:00
Clownacy
0237844e14 Actually, this fix doesn't seem right 2020-01-23 01:50: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
ede9fa213d Fix compilation with FIX_BUGS enabled 2020-01-23 00:03:54 +00:00
Clownacy
f687c5f68b Remove the RGB macro
This is a leftover part of the window.h emulator in that got moved to
the portable branch
2020-01-22 23:50:27 +00:00
Clownacy
4ebfe064ff Fix compilation 2020-01-22 23:33:59 +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
6764f17ab9 Added bugfix for StartDirectDraw failure
The original code didn't account for it failing, which leads to
annoying bugs happening whenever it does fail.

Now, the game just closes, like it does with any other init error.
2020-01-17 10:35:43 +00:00
Clownacy
78a066ce75 Note some inaccurate stack frames 2020-01-09 06:58:04 +00:00
Clownacy
406087bebb Added a missing #include in Organya.cpp 2020-01-08 13:34:54 +00:00
Clownacy
a5df6ebc72 Remove SET_RECT macro
I should probably remove WindowsWrapper.h from this branch now, and
just make files use windows.h directly.
2020-01-07 23:15:33 +00:00
Clownacy
cb4bd02ab5 More-accurate ValueView.cpp variable arrangement
Finally done with this
2020-01-07 22:20:22 +00:00
Clownacy
5adc06536b More-accurate Triangle.cpp variable arrangement 2020-01-07 22:13:37 +00:00
Clownacy
3f2d5c3e25 More-accurate Stage.cpp variable arrangement 2020-01-07 22:08:10 +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
e459364a33 More-accurate Shoot.cpp variable arrangement 2020-01-07 21:58:35 +00:00
Clownacy
cef901792b More-accurate SelStage.cpp variable arrangement 2020-01-07 21:53:21 +00:00
Clownacy
74cd1b0473 More-accurate Profile.cpp variable arrangement 2020-01-07 21:50:36 +00:00
Clownacy
10a014dabd More-accurate PixTone.cpp variable arrangement
Also added the Linux port's optimisation, for anyone that's curious
2020-01-07 21:45:43 +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
718cb714ee More-accurate NpcTbl.cpp variable arrangement
For some reason, the Linux debug data notes a 2000-line gap before
any declarations. Might be the SDL header or something.
2020-01-07 20:58:46 +00:00
Clownacy
ce4373481b More-accurate NpcHit.cpp variable arrangement 2020-01-07 20:52:58 +00:00