Commit graph

144 commits

Author SHA1 Message Date
Clownacy
78a066ce75 Note some inaccurate stack frames 2020-01-09 06:58:04 +00:00
Clownacy
9cbaa0be00 Merge branch 'accurate' into portable 2020-01-08 13:16:21 +00:00
Clownacy
d83665ff2a More-accurate Main.cpp variable arrangement 2020-01-07 06:29:04 +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
9498fe13be Made TextScr.cpp valid C89
See #41
2020-01-06 21:15:42 +00:00
Clownacy
0ec5d85d56 Merge branch 'accurate' into portable 2019-11-17 18:30:44 +00:00
Clownacy
6c2ca988a8 Clean-up Main.cpp
Found an ASM-inaccuracy. Yay.
2019-11-15 18:31:48 +00:00
Clownacy
6b98bffba1 Remove mutex_name
It's unused outside of the accurate branch. Maybe someday I'll port
the mutex behaviour.
2019-10-29 12:01:49 +00:00
Clownacy
785131a184 Merge branch 'accurate' into portable 2019-10-26 23:47:06 +01:00
Clownacy
9fb01161c3 Swap two function calls around
This matches the original EXE. I didn't catch it while doing the
ASM-accuracy checks because absolute addresses don't match yet.

Thanks to Gabe for noticing this.
2019-10-26 23:40:32 +01:00
Clownacy
591236398f ...And don't break the indentation
Am I rusty, or something? Jeez.
2019-10-02 15:28:21 +00:00
Clownacy
5329a6d1b7 ...goddammit I didn't save 2019-10-02 15:25:43 +00:00
Clownacy
8f6403f233 Catch another instance of Shift-JIS
Also removed the translation because it's ASM-inaccurate
2019-10-02 15:24:36 +00:00
Clownacy
217ce5437b Port the Windows version's mouse-hiding
The original Windows version would hide the mouse cursor in
fullscreen.
2019-09-08 23:59:13 +00:00
Clownacy
e216fa8e18 Remove the old colour-depth code
It's basically unused anyway
2019-09-08 23:58:48 +00:00
Clownacy
4e239c3175 Restore the rendering backend callbacks
Now the SDLSurface backend survives window resizes (also triggered by
alt-tabbing while in fullscreen), and the SDLTexture backend properly
regenerates its textures after a fullscreen alt-tab in DirectX mode.
2019-09-06 19:07:49 +00:00
Clownacy
8114f88dd1 Shut up some build warnings 2019-09-06 15:21:43 +00:00
Clownacy
12f69e3c6c Fix idling hogging 100% of a CPU core
This was me not converting the WinAPI code properly. Stupid me.
2019-09-05 21:07:30 +00:00
Clownacy
0be5e9ead8 Restored the window icon and custom cursor 2019-09-04 14:39:37 +00: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
8dce9c5aff Add some missing code to the main function
This code was previously in WindowProc, which was replaced.
2019-09-03 00:43:05 +01:00
Clownacy
c00262bcd8 Restore the SDL2 joystick code
Modified to fit the original code better
2019-09-02 23:09:26 +01:00
Clownacy
fd855ee732 Restore the new renderers 2019-09-02 22:46:36 +01:00
Clownacy
ce33ada2c8 Fix window focus event handling 2019-09-02 22:28:21 +01:00
Clownacy
86f737802e Merge branch 'accurate' into portable 2019-09-02 20:30:26 +01:00
Clownacy
bc262bd5e2 Explain some Shift-JIS 2019-09-02 20:28:41 +01:00
Clownacy
1301ea8797 Replace WinAPI with SDL2 as the windowing system 2019-09-02 20:17:06 +01:00
Clownacy
35344c5f4f Fixes
What is it with Pixel's official code, and relying on non-standard
stuff? Even his PxTone library had portability issues.
2019-09-02 02:02:25 +01:00
Clownacy
2a70cbe89a Shut up a warning
The ASM is unaffected
2019-09-01 23:42:28 +01:00
Clownacy
d35c9cd09e Deobfuscate WinMain, and make some accuracy improvements 2019-09-01 23:35:41 +01:00
Clownacy
2b78821786 Add an option to re-enable the Debug Save feature
This includes the ability to drag-and-drop save files onto the game
window, which this feature was likely meant to be used with.
2019-09-01 19:55:54 +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
f956eb9264 Mostly ASM-accurate Draw.cpp
See #74
2019-08-31 17:43:45 +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
2f56effc51 Accurate main function variable names 2019-08-29 20:19:31 +01:00
Clownacy
d5ee5f6979 Made Input.cpp ASM-accurate
See #74
2019-08-29 19:27:56 +01:00
Clownacy
17ae81823c Fixes 2019-08-29 00:00:17 +01:00
Clownacy
470c5d86d5 ASM-accurate Sound.cpp and Organya.cpp (except for one function) 2019-08-28 07:55:42 +01:00
Clownacy
e67c1e3640 Migrated to the native Windows resource file system 2019-08-27 23:59:57 +01:00
Clownacy
59735a61e6 Minor style change 2019-08-13 05:03:43 +00:00
Clownacy
0b874153d4 Free the string returned by SDL_GetBasePath
Thanks, Fayti1703.
2019-07-29 14:33:14 +00:00
Clownacy
9948fa8b07 Move the SDL_Window creation to the rendering backends
Whoops, didn't mean to commit the Main.cpp edit way back when I made
the OpenGL 2.1 backend.
2019-07-24 20:20:06 +01:00
Clownacy
05f382961d Added OpenGL 2.1 renderer
Yay 100% hardware-acceleration. Yes, I know 2.1 is outdated and
crappy, but it was the easiest one to write. I'll probably make an
OpenGL 3.0 Core renderer at some point.

Anyway, font rendering isn't here yet, because I plan to overhaul it.
2019-07-23 15:20:14 +01:00
Clownacy
36fdb4596d Cleanup and an accuracy improvement 2019-07-16 13:21:21 +01:00
Clownacy
81eb438482 Fixes and tweaks 2019-07-16 00:15:20 +01:00
Clownacy
6a4f4e0df3 Added handlers for render target loss/window resize
These only really happen when you use exclusive fullscreen and
alt-tab out. Or, at least, it does on Windows with SDL2 in DirectX
mode.
2019-07-15 17:47:22 +01:00
Clownacy
3ef9b67b1d Replaced a lot of Draw.cpp with a software renderer
Also fixed the SDL_Window not being freed. This commit's a bit of a
blob, since I made a bunch of tweaks to Draw.cpp while adding the new
renderer. Don't worry though, I'll add the hardware accelerated code
back again soon. In fact, I've got an idea on how to make it even
faster, while still being able to survive render target losses.

Hopefully this software renderer will come in handy for the Wii U
port: its SDL2 port's hardware acceleration is broken, and the
SDL_Surface API is too slow.
2019-07-15 11:41:40 +01:00
Clownacy
97acb292bb Made Game.cpp ASM-accurate
Working towards #74.
2019-06-30 03:03:25 +01:00