Commit graph

1726 commits

Author SHA1 Message Date
Clownacy
14735caac3 Mark CMake target thingies as private 2020-02-29 18:19:06 +00:00
Clownacy
8ec8a8d990 Added unfinished miniaudio audio backend
Currently only works with CMake
2020-02-29 18:18:59 +00:00
Clownacy
934054806e Merge branch 'accurate' into portable 2020-02-25 17:56:17 +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
a767c16d83 Un-un-const a few things 2020-02-09 18:55:41 +00:00
Clownacy
f82a53d336 Prevent errors encountered by MSVC 2020-02-09 18:47:50 +00:00
Clownacy
d4004fe99a Store glyph pixels as chars, not floats
Smaller memory footprint, and probably-insignificant performance
impact.
2020-02-09 13:56:45 +00:00
Clownacy
bb11cd567d Software renderer cleanup 2020-02-09 13:44:02 +00:00
Clownacy
60d3cc2ed6 Update cute_spritebatch.h 2020-02-09 12:40:35 +00:00
Clownacy
8edca4fb2e Style tweak 2020-02-09 12:35:38 +00:00
Clownacy
f0206600b1 Travis: Exclude macOS Make OpenGLES2 build too
OpenGLES2 is also apparently in a different location
2020-02-06 09:21:45 +00:00
Clownacy
0902b9e35d Merge branch 'accurate' into portable
I'm not going to add the FIX_BUGS and JAPANESE thing yet because we
have too many Travis jobs as it is.
2020-02-05 21:07:34 +00:00
Clownacy
fd19806eaf Travis: Add FIX_BUGS and JAPANESE to matrix
Also changed it to only produce release builds
2020-02-05 21:05:20 +00:00
Clownacy
2b2965721f Group jobs by build system 2020-02-05 21:01:07 +00:00
Clownacy
4737a7cbca Travis: Only create release builds 2020-02-05 20:59:08 +00:00
Clownacy
6bbe0c977f Explain the macOS OpenGL job exclusion 2020-02-05 20:52:30 +00:00
Clownacy
1478d2510b Shut up a Travis warning 2020-02-05 20:45:44 +00:00
Clownacy
fe5291bce5 Uhh... now? 2020-02-05 20:41:11 +00:00
Clownacy
1575fbf908 Er... does this make it work? 2020-02-05 20:37:18 +00:00
Clownacy
f06b78bd38 Exclude macOS OpenGL3 Make builds from Travis
Apparently Apple handles OpenGL in a completely non-standard way.
2020-02-05 19:06:37 +00:00
Clownacy
425051a3cf Make Travis build every rendering backend
I wonder if GLES2 is available on MacOS...
2020-02-05 16:02:44 +00:00
Clownacy
59a8c2617f Tweak some variable naming
The enhanced branch calls them the 'internal *screen* width/height',
which I think is more appropriate.
2020-02-05 15:52:43 +00:00
Clownacy
d9e7ebac38 Correct a typo 2020-02-05 15:47:26 +00:00
Clownacy
2af6a043ef Clean-up the OpenGL renderers a little 2020-02-04 16:35:42 +00:00
Clownacy
1140ab0916 Clean-up renderer backend initialisation 2020-02-04 15:51:19 +00:00
Clownacy
ba6d711d3a Tick cute_spritebatch once per frame
...As opposed to once per draw call.

This change was made because multiple draw calls can be made per
frame, or a only a handful of draw calls may be made per minute.

Since draw calls are an inconsistent metric, I just switched to
frames instead.
2020-02-04 14:57:06 +00:00
Clownacy
2e5e1994c2 Enable debug console prints in non-debug builds 2020-02-03 16:44:52 +00:00
Clownacy
53c0e8470f Add an optimisation to the OpenGL renderers
Since we track the currently-bound "source texture", we don't need
to poll the OpenGL driver for the same info.
2020-02-03 15:53:59 +00:00
Clownacy
dfacd62662 Fix text-flickering in the OpenGL renderers
This would occur in CSE2E's options menu.

It was caused by cute_spritebatch destroying a texture atlas that
was being used by the current unflushed vertex buffer. To solve
this, we now track what textures are being used by current buffer,
and flush the buffer when the texture are about to be
modified/deleted.

As you can guess, this issue doesn't affect the SDLTexture backend,
since its batching system is half-decent.
2020-02-03 15:44:09 +00:00
Clownacy
b894543f3b Shut up a C++11 error from the enhanced branch
Nice one, C++. Adding yet another C-incompatibility?
2020-02-03 14:43:02 +00:00
Clownacy
4190493fd8 More documentation 2020-02-02 00:34:03 +00:00
Clownacy
514d9f8739 Document the OpenGL renderer a bit more
This makes it easier to find things
2020-02-02 00:21:28 +00:00
Clownacy
d84f64a5a9 Tweak cute_spritebatch settings
1024x1024 seems like overkill
2020-02-02 00:10:01 +00:00
Clownacy
eb6ab89b85 Fixes and improvements
Made texture-atlasing occur immediately, notably.
2020-02-02 00:01:45 +00:00
Clownacy
1b2d4fdb4d Fix the other rendering backends
Also finished ripping-out the sub-pixel support
2020-02-01 22:57:07 +00:00
Clownacy
eeed719c16 Get the SDLTexture renderer working again 2020-02-01 22:47:13 +00:00
Clownacy
15cfad01af Disable sub-pixel rendering in local FreeType 2020-02-01 22:40:21 +00:00
Clownacy
e3cd7ce353 Add glyph-batching to OpenGL renderer
Unfortunately, sub-pixel font rendering had to go. It wasn't portable
anyway (not every display is an LCD with R->G->B ordering).
2020-02-01 22:37:59 +00:00
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
fa8ab56e93 Merge branch 'accurate' into portable 2020-02-01 12:48:14 +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
Clownacy
49d32a98c5 Merge branch 'accurate' into portable 2020-02-01 11:52:59 +00:00
Clownacy
c204ba140e Update PHILOSOPHY.md 2020-02-01 11:49:18 +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