Commit graph

966 commits

Author SHA1 Message Date
Gabriel Ravier
4766172c3b
Replaced tabs before comments with spaces, shortened a few lines and formatted some switches
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-09-17 10:48:05 +02:00
Gabriel Ravier
6ffc8d7429
Shorten long line
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-09-17 10:31:07 +02:00
Gabriel Ravier
f2a2b3fd0c
Commented some func decls in ArmsItem.h and changed a "32" to "0x20" in the cpp
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-09-17 10:25:18 +02:00
Gabriel Ravier
9bb916e99d
Set PutCampObject as static and commented some func decls
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-09-17 09:56:33 +02:00
Gabriel Ravier
358423aa38
Some nice commenting and reordering of stuff and staticing of stuff
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-09-16 15:30:38 +02:00
Clownacy
602315fa39 Deobfuscate a value without affecting ASM
Doing 'fx / 32 / 0x200' produces different assembly.
2019-09-15 18:46:52 +01:00
Clownacy
bc5a9b2d9f These macros produced inaccurate assembly 2019-09-15 18:44:03 +01:00
Gabriel Ravier
cc4de5e44c
Remove NPC utility macros
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-09-15 18:16:46 +02:00
Gabriel Ravier
c68923fdd5
Corrected erroneous "PIXELS_TO_UNITS(24)"s to "PIXELS_TO_UNITS(20)"s
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-09-15 16:13:13 +02:00
Gabriel Ravier
c9517bffc4
Un-abbreviated "SPRITE" from "SPRT" in sprite macro names
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-09-15 16:10:46 +02:00
Gabriel Ravier
0cf2a20a9a
Corrected erroneous PIXELS_TO_UNITS(32) to PIXELS_TO_UNITS(16)
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-09-15 16:07:03 +02:00
Gabriel Ravier
9e5e2a0e26
Indented some comments
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-09-15 16:05:24 +02:00
Gabriel Ravier
002e0f7760
Changed erroneous "=" to "+="
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-09-15 16:00:06 +02:00
Gabriel Ravier
58a02a609c
Defined TILES_TO_UNITS and UNITS_TO_TILES in terms of TILES_TO_PIXELS, PIXELS_TO_TILES, PIXELS_TO_UNITS and UNITS_TO_PIXELS
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-09-15 15:58:04 +02:00
Gabriel Ravier
04113870a5
Removed tiles comments when useless
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-09-15 15:51:32 +02:00
Gabriel Ravier
6eadf6c4a5
Changed view stuff to be measured in pixels, not tiles
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-09-15 14:16:44 +02:00
Gabriel Ravier
08131d527a
Converted hitbox measurements to pixels
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-09-15 14:12:35 +02:00
Gabriel Ravier
4070f1b972
Changed some stuff to conform to Clownacy's PR review
Changed BalfrogAnims to BalfrogSprites
Changed BALFANI_[name] to BALFROG_SPRT_[name]
Changed -[macro](val) to [macro](-val)

Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-09-15 10:58:55 +02:00
Gabriel Ravier
0d833b38a8
Prevent some annoying warnings popping up everywhere
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-09-15 10:50:46 +02:00
Gabriel Ravier
fcc1e3cc23
Added some common macro utilities used by most NPCs
I'm pretty sure Pixel didn't actually use macros for this but I don't think just having this kind of stuff copied around everywhere is really great either

Forgot to commit and push this yesterday

Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-09-15 10:48:18 +02:00
Gabriel Ravier
041bd0e5f9
Used doubles for TILES_TO_UNITS weirdly written stuff
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-09-14 20:47:28 +02:00
Gabriel Ravier
ac498c2be4
After intense debate with Cucky and BLink, ended up changing "PIXELS_TO_UNITS(3) - 1" to "0x5FF"
🙄

Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-09-14 20:07:35 +02:00
Gabriel Ravier
e2c57e6dbc
Alphabetized macros in BossFrog and re-ordered some stuff to go along with Clownacy's coding standards
Also changed NPC_NULL_DELETES_ITSELF to NPC_DAMAGE_TEXT_HOLDER as Fayti pointed out the misnomer

Note to self : Make a PR with coding standards

Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-09-13 20:35:37 +02:00
Gabriel Ravier
aeb1e292b7
Merge branch 'accurate' into commentBalfrog 2019-09-13 19:01:03 +02:00
Gabriel Ravier
9bef4b1d49
Commented BossFrog entirely
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-09-13 18:49:17 +02:00
Clownacy
69292f99f6 Add a new bugfix 2019-09-12 14:50:06 +00:00
Gabriel Ravier
861064bf12
Started improving on balfrog.cpp
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-09-12 16:47:14 +02:00
Clownacy
3889bd9f1d Add missing #include to Draw.cpp
Thanks to GabrielRavier for noticing.
2019-09-10 12:31:38 +00:00
Clownacy
2cb7bfbd3d Tiny cleanup 2019-09-10 01:59:26 +00:00
Clownacy
385d7e5844 Clean up Back.cpp a little 2019-09-10 01:04:09 +01:00
Clownacy
9ca503a96e Add Visual Studio 2017 project files
This required hacking-in DirectInput8 support since Visual Studio
hasn't supported DirectInput7 and earlier since 2007.
2019-09-10 00:43:23 +01:00
Clownacy
f8c2e17655 Clean up Map.cpp 2019-09-09 23:46:35 +01:00
Clownacy
0532e2afa2 Shut up a warning 2019-09-06 20:08:07 +01: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
d80adf9cc8 Comment on a bug in MakePixToneObject 2019-09-05 21:41:40 +00:00
Clownacy
7f7553bef2 An accuracy improvement in Triangle.cpp
This one's weird: it doesn't affect the actual generation of ASM in
the function, but rather it affects the ASM of sinf and cosf.

You see, sinf and cosf are static - they're built right into the EXE.
Since the previous code used cosf and sinf, they were embedded into
the EXE, and InitTriangleTable would call them directly.

However, this isn't what the original EXE does: instead,
InitTriangleTable calls an intermediary function, that in turn calls
the real cosf and sinf. Turns out this strange code generation is
caused by calling cos and sin instead of cosf and sinf, but still
using float parameters.
2019-09-05 17:04:07 +01:00
Clownacy
3bac7674f4 Correct some WinAPI usage
All the broken stuff just happened to work on 32-bit, but would cause
MinGW-w64 to explode if you tried building as 64-bit.

I guess thanks to Microsoft keeping the basic C int types the same
size in 64-bit as they were in 32-bit, this branch compiles as 64-bit
just fine, despite Cave Story's many int-size dependencies.
2019-09-05 15:03:34 +01:00
Clownacy
5dd3a5dd2d Add the typos back to the stage table
These were corrected in an earlier commit because they affect
portability.
2019-09-05 14:56:03 +01:00
Clownacy
42e1b36fd8 Restore the Windows-style path separators 2019-09-05 14:05:27 +01:00
Clownacy
93029e8e2c Fix incorrectly-ordered #include 2019-09-04 14:13:51 +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
dcf9921481 Move SystemTask from WindowsWrapper.h to Main.h 2019-09-04 02:23:49 +01: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
987ecd5340 Apply a missing constant in Organya 2019-09-04 01:41:15 +01:00
Clownacy
8f1bc269f0 I might have found out why Sound.cpp uses DSBUFFERDESC1 2019-09-03 00:34:47 +01:00
Clownacy
09b188ac29 Add a bugfix for a bizarre function call 2019-09-03 00:17:42 +01:00
Clownacy
bc262bd5e2 Explain some Shift-JIS 2019-09-02 20:28:41 +01:00
Clownacy
4dadefc7d4 Add a missing NULL 2019-09-02 20:02:25 +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