Commit graph

778 commits

Author SHA1 Message Date
Clownacy
15bfd00d25 Added hardware-accelerated rendering backend
Still need to add the code for surviving render target losses
2019-07-15 16:47:10 +01:00
Clownacy
21cf78b86d Split Draw.cpp into common code and backend code
Should be easy to add the new hardware renderer now
2019-07-15 13:42:49 +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
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
5167a341aa Made NpChar.cpp ASM-accurate
SetBulletObject has a commented-out if, it seems, and the leftover
braces affected the ASM.
2019-06-30 00:57:19 +01:00
Clownacy
c162d06f96 BossAlmo1.cpp extra accuracy
I forgot, the Linux debug data tells us the exact line number each
variable is declared on.
2019-06-30 00:30:30 +01:00
Clownacy
deb0538d03 Boss.cpp cleanup 2019-06-30 00:20:32 +01:00
Clownacy
a9940c9ca9 ArmsItem.cpp code cleanup and accuracy improvements 2019-06-29 23:29:44 +01:00
Clownacy
2c23de27d5 Made KeyControl.cpp ASM-accurate
Didn't realise this file was so tiny. Anyway, working towards #74.
2019-06-29 21:16:43 +01:00
Clownacy
729540d2b8 Fixed DoConfig
Turns out I never fixed the button order in the first place.
2019-06-28 18:51:28 +01:00
Clownacy
21d5ba34b0 Shut up some Clang warnings in the Enhanced branch
Once again SDL2 using plain ints everywhere causes issues.
2019-06-27 18:01:55 +00:00
Clownacy
26af89d5bb Merge branch 'master' of https://github.com/cuckydev/Cave-Story-Engine-2 2019-06-27 17:51:05 +00:00
Clownacy
941dec2c7c Add a bugfix for unsafe usage of sprintf
Thanks, Gabe
2019-06-27 17:50:19 +00:00
Clownacy
d1c7cd53df Added a translation for a Japanese variable 2019-06-23 22:55:01 +00:00
Cucky
95cf124ee3
Merge pull request #82 from Clownacy/master
Cleanup, bugfixes, accuracy, build overhaul
2019-06-21 11:59:26 -04:00
Clownacy
19166f80d0 Correct some misdecompiled switchcases 2019-06-21 11:02:20 +00:00
Clownacy
31196e15ec CMake fixes
This fixes Ninja support, fixes Visual Studio debug builds, and
fixes Windows builds.
2019-06-21 02:45:16 +01:00
Clownacy
427fe69374 MessageBoxA usage cleanup 2019-06-20 21:17:32 +01:00
Clownacy
546631fad7 Made Profile.cpp ASM-accurate 2019-06-20 21:10:27 +01:00
Clownacy
323e33ed36 Fixes for non-MSVC2003 builds 2019-06-20 20:46:03 +01:00
Clownacy
078dc440c7 Made TextScr.cpp ASM-accurate
Yes! Finally!

Working towards #74
2019-06-20 20:33:47 +01:00
Clownacy
fc9270ec8c Fix MSVC2003 2019-06-20 20:08:20 +01:00
Clownacy
44f142d8e7 Big ugly rework of WindowsWrapper.h
Okay so WindowsWrapper.h now just includes Windows.h if it wants
non-portability. This meant I had to split the custom RECT struct
back to the original RECT and unknown nameless struct (one uses
left/right, while the other uses front/back).
2019-06-20 20:06:55 +01:00
Clownacy
765beff57a In-progress TextScriptProc fixes and accuracy improvements
Need to rework WindowsWrapper.h before I can progress.
2019-06-20 19:13:59 +01:00
Clownacy
6c96f243d1 README tweaks
Use 'folder' instead of 'directory' as it's more familiar to Windows
users.
2019-06-17 19:19:14 +00:00
Clownacy
79e996d78f Update the README to reflect the last commit 2019-06-17 19:16:51 +00:00
Clownacy
49defcc3fb Now the build output directory is generated completely
The data folder is now stored in the new assets folder, and copied
across as part of the build process.
2019-06-17 19:13:29 +00:00
Clownacy
3039e3b846 Link to the actual source code for Organya.cpp and Sound.cpp 2019-06-17 17:03:54 +00:00
Clownacy
9ed788fbd9 Merge branch 'master' of https://github.com/cuckydev/Cave-Story-Engine-2 2019-06-17 16:50:02 +00:00
Clownacy
f9b498c51c
Merge pull request #37 from GabrielRavier/feature/improveOToR
Improve O to R
2019-06-17 15:48:46 +00:00
Clownacy
a60e9b4ff2
Merge pull request #36 from GabrielRavier/feature/improveNonNpcCharNpcFiles
Improved N files
2019-06-17 15:44:31 +00:00
Clownacy
e9c42c6c30 Put back those dashes removed in the last commit
Whitespace selection apparently selects more than whitespace.
Thanks, Geany.
2019-06-16 20:29:38 +00:00
Clownacy
3f36bf52de CMake formatting cleanup 2019-06-16 19:36:59 +00:00
Clownacy
86c3c3f7db Fix mystery CMake error
It never happened for me, so maybe it's something that only happens
on older CMake versions? I haven't tested on my Raspberry Pi in a
while.
2019-06-16 19:33:30 +00:00
Gabriel Ravier
a89d97846c
Fixed brace initilizers to not have spaces at the start and end
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-06-14 21:22:45 +02:00
Gabriel Ravier
11e25b5aa5
Fixed indentation by using spaces instead of tabs when appropriate
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-06-14 20:56:48 +02:00
Gabriel Ravier
00fdea492f
Merge branch 'master' into feature/improveOToR 2019-06-14 20:33:26 +02:00
Gabriel Ravier
4ab849f4ef
Merge branch 'master' into feature/improveNonNpcCharNpcFiles 2019-06-14 20:33:23 +02:00
Gabriel Ravier
6a9f2cc1ff
Merge branch 'master' of https://github.com/Clownacy/Cave-Story-Engine-2 2019-06-14 18:11:05 +02:00
Clownacy
078da6ccf7 Correct fmod usage 2019-06-14 17:06:42 +01:00
Gabriel Ravier
fd83c08c9c
Added newline at end of NpcHit.cpp
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-06-14 17:50:07 +02:00
Gabriel Ravier
16e66971d5
Reformatted Profile.cpp
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-06-14 16:54:43 +02:00
Gabriel Ravier
5ccb7dfa93
Reformatted Pixtone.cpp
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-06-14 16:52:53 +02:00
Gabriel Ravier
473bd43ca7
Reformatted Organya.cpp
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-06-14 16:51:49 +02:00
Gabriel Ravier
3a80d8f4fb
Did initial sweep with regexes
Changed regex to "((//|\;)[^ \t\n]|(for|while|if|while|do|void|int|bool)\((for|while|if|while|do)\ \(.*\)\;|\(\ |\ \)|//\ [a-z]|\ \ )|break;\n[\t]*[^\n\t\}(\/\/ Fallthrough]|[^\t\n]\{[^\n]|[^\n\t]\}[^\n]|\,[^\ ]"

Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-06-14 16:49:32 +02:00
Gabriel Ravier
620401b671
Merge branch 'master' of https://github.com/GabrielRavier/Cave-Story-Engine-2 2019-06-14 16:22:10 +02:00
Gabriel Ravier
e8c7daca35
Reverted capitalization of struct member names
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-06-14 08:37:49 +02:00
Gabriel Ravier
06e65cad6e
Revamped NpChar, NpcHit and NpcTbl
Also changed regex to "((//|\;)[^
\t\n]|(for|while|if|while|do|void|int|bool)\((for|while|if|while|do)\
\(.*\)\;|\(\ |\ \)|//\ [a-z]|\ \ )|break;\n[\t]*[^\n\t\}(\/\/
Fallthrough]|[^\t\n]\{[^\n]|[^\n\t]\}[^\n]"

Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-06-13 20:39:46 +02:00
Gabriel Ravier
f9d62f38ef
Merge pull request #23 from Clownacy/master
Merge Clownacy/master into master
2019-06-12 19:44:23 +02:00