Clownacy
eaf2de05b6
Add glyph-batching to the SDLTexture backend
...
Hope it will be this easy for the OpenGL backend
2020-02-01 17:49:26 +00:00
Clownacy
639039ce3a
Added Backend_PrepareToDrawGlyphs
...
This is to reduce OpenGL context changes, and help pave the way for
glyph-batching
2020-02-01 16:40:23 +00:00
Clownacy
debaeaad17
Merge pull request #99 from GabrielRavier/fixPortableBugs
...
Fix some UB
2020-02-01 12:46:33 +00:00
Clownacy
a762f28837
Note some out-of-bounds array accesses
...
Thanks, Gabe
2020-02-01 12:45:32 +00:00
Clownacy
e3db7749ba
Add verbose error-reporting to backends
...
Should fix #98
2020-02-01 12:22:44 +00:00
Gabriel Ravier
8042ab2c9b
Fixed more crashes in Caret
...
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-02-01 07:52:31 +01:00
Gabriel Ravier
aad200801c
Removed UB in PutArmsEnergy
...
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-01-31 23:55:59 +01:00
Clownacy
ed1ff2f275
Tweak MIN/MAX macros in software renderer
2020-01-29 23:45:22 +00:00
Clownacy
788697dc5d
Fix a possible hang in the audio mixer
...
It was likely a race condition between the game thread writing to
'organya_timer', and the audio thread reading it.
...I really need to rethink the API for this Organya-synchronisation
thing.
2020-01-29 23:21:27 +00:00
Clownacy
e4394aea1f
Whoops, forgot to remove this #include
2020-01-29 22:16:21 +00:00
Clownacy
d0defa4a7b
This cast shouldn't be necessary
2020-01-29 22:15:53 +00:00
Clownacy
638e96be11
Move and rename attrHot
...
Like the MIN and MAX macros, I'd rather keep this in the source file
than a common header.
2020-01-29 22:14:35 +00:00
Gabriel Ravier
5e6658847c
Re-add missing "(double)"
...
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-01-29 23:04:17 +01:00
Gabriel Ravier
88a8362f23
Reverted fmodf stuff and tried to make it so C++ compilers would go for the float version in appropriate circumstances (fmodf directly is unavailable due to not being in C89)
...
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-01-29 23:01:31 +01:00
Gabriel Ravier
1442299924
Made MixSounds be marked as hot
...
Signed-off-by: Gabriel Ravier <gabrielravier@gabrielAncientIBMv2>
2020-01-29 23:01:31 +01:00
Gabriel Ravier
c15ecbf728
Used fmodf instead of fmod for a 0.5% performance increase in MixSounds
...
Signed-off-by: Gabriel Ravier <gabrielravier@gabrielAncientIBMv2>
2020-01-29 23:01:31 +01:00
Clownacy
bd876e9309
Change icon resource IDs
...
Visual Studio 2017 doesn't like them being 0 and 1: the compiled EXE
uses the small icon as the taskbar icon. Changing them to 101 and
102, like CSE2 did before the accurate-portable-split, fixes this.
2020-01-28 21:26:28 +00:00
Clownacy
f127010848
Use stb_image's file API
...
Streams data, instead of reading the whole file into memory.
2020-01-27 15:07:08 +00:00
Clownacy
1cffacb72e
Added DecodeBitmapFromFile
2020-01-27 00:30:54 +00:00
Clownacy
2ef48bea8a
Change DecodeBitmap to use unsigned ints
...
Why would an image decoder ever return a _negative_ image
width/height?
2020-01-26 23:59:04 +00:00
Clownacy
4f7bd116f6
Add missing SDL.h #includes
2020-01-26 23:57:09 +00:00
Clownacy
cccef2b089
Fix memory leaks
2020-01-26 23:54:20 +00:00
Clownacy
5e60c15b1d
Add missing sanity check
2020-01-26 23:53:40 +00:00
Clownacy
1e21b32dec
Remove SDL.h #include from Draw.h
2020-01-26 20:17:40 +00:00
Clownacy
b650294b8b
Change LoadFileToMemory's function signature
2020-01-26 20:06:31 +00:00
Clownacy
cf8977207e
Stop using SDL for .bmp decoding
...
Now it uses stb_image instead
2020-01-26 19:47:50 +00:00
Clownacy
dfd50ecf8d
Remove MycParam.cpp's dependency on SDL
...
Instead we just encrypt/decrypt the 290.rec data in an
endian-neutral way.
2020-01-26 14:45:36 +00:00
Clownacy
331d5a2d95
Merge branch 'accurate' into portable
2020-01-26 13:52:47 +00:00
Clownacy
30dced2587
Correct the style of some pointer checks
2020-01-26 13:52:24 +00:00
Clownacy
8d6c449482
Catch an entry parameter list I missed
2020-01-26 13:35:47 +00:00
Clownacy
e33bd9c8f9
Fix visual artefacting on the Pi
...
I'm not sure why there was linear filtering when I was rendering at
1:1 pixel ratio, but it did happen. This fixes it by forcing
nearest-neighbour. The artefacting was caused by the linear filtering
blending with pixels outside the specified texture coordinates,
creating lines around everything.
Fun fact: the framebuffer technique CSE2 uses is demanding on the Pi
(1278x720 runs at 60 FPS when the framebuffer is forced to 852x480,
even though all the internal rendering is still 1278x720). I guess
rendering those extra 920160 pixels really takes its toll.
2020-01-25 14:26:15 +00:00
Clownacy
99a8b2bd18
Improve OpenGL performance on the Raspberry Pi
...
Apparently 2 VBOs wasn't enough. This bumped the framerate from 13FPS
to 20FPS in a stress-test (CSE2E at 1704x960 on a Raspberry Pi 3B
in X11 with the KMS OpenGL driver).
2020-01-25 14:22:50 +00:00
Clownacy
517824216e
Merge branch 'accurate' into portable
2020-01-24 21:01:33 +00:00
Clownacy
0bcf978424
Rename HookDirectInputDevice
2020-01-24 21:00:34 +00:00
Clownacy
78b41a5ced
Merge branch 'accurate' into portable
2020-01-23 01:50:42 +00:00
Clownacy
0237844e14
Actually, this fix doesn't seem right
2020-01-23 01:50:03 +00:00
Clownacy
e8edc42d07
Merge branch 'accurate' into portable
2020-01-23 01:37: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
1fe73f9aab
Explicitly compare pointers in Font.cpp to NULL
2020-01-23 01:05:29 +00:00
Clownacy
ede9fa213d
Fix compilation with FIX_BUGS enabled
2020-01-23 00:03:54 +00:00
Clownacy
8798a7cc19
Add the RGB macro to the windows.h wrapper
2020-01-22 23:53:14 +00:00
Clownacy
2f4eb464a5
Merge branch 'accurate' into portable
2020-01-22 23:51:42 +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
87b296c513
Converted SDLSurface renderer
2020-01-22 22:33:34 +00:00
Clownacy
f6f3c26a3b
Converted SDLTexture renderer
2020-01-22 22:31:19 +00:00
Clownacy
48b7a878ba
Convert software renderer
2020-01-22 22:24:23 +00:00
Clownacy
6dac8254e2
Begin merge of Backend_Init/Backend_CreateWindow
...
OpenGL3+OpenGLES2 backend done so far
2020-01-22 22:19:55 +00:00
Clownacy
3baba6a727
Make FlushVertexBuffer bail when buffer is empty
2020-01-22 21:56:11 +00:00