Commit graph

115 commits

Author SHA1 Message Date
Clownacy
c0a6441bcb Fix another typo 2020-09-17 21:07:48 +01:00
Clownacy
527328c303 Fix a typo 2020-09-17 21:07:48 +01:00
Clownacy
f54dc8ce05 Ramble about the broken font sizes 2020-09-11 23:55:25 +01:00
Clownacy
0324d1532b Apply SurfaceID type 2020-09-10 21:29:25 +01:00
Clownacy
7cff891452 Remove that FRAMERATE thing 2020-09-03 21:31:49 +01:00
Clownacy
0c367cecf7 Add FIX_MAJOR_BUGS option
This one specifically fixes bugs that either invoke undefined
behaviour or cause memory leaks. Essentially, they affect stability.
Bugs that just affect gameplay will remain covered by FIX_BUGS.
2020-09-03 21:05:14 +01:00
Clownacy
5983b8e234 Don't mark out as static
Causes it to be put in the wrong part of the EXE for some reason,
even though we know from the Mac port that it *was* static.
2020-07-01 21:57:57 +01:00
Gabriel Ravier
a62141e185 src: Added back stddef.h where accurate to get NULL/size_t properly (stdio.h provides them, but it's for file I/O, not essential definitions and types)
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-06-30 01:52:38 +02:00
Gabriel Ravier
66e4995135 src: Remove unnecessary includes
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-06-30 00:12:17 +02:00
Clownacy
70a3badc0d Cleanup 2020-05-04 18:21:44 +01:00
Clownacy
03250d62a0 Make variables more accurate
This commit changes which variables are static: the Mac (and
presumably the Linux) debug data tells you what variables are static,
by prefixing their names with double_underscores.

The variable names themselves also hint at this: global variables are
prefixed with 'g', and use upper-camelcase, while static variables
use whatever_you_call_this.
2020-05-03 20:28:56 +01:00
Clownacy
43c0b670ab Figured out the mystery values in RestoreSurfaces
They're ASCII characters.
2020-04-26 00:07:45 +01:00
Clownacy
8f49276d5e Note some not-so-authentic variable names 2020-04-16 14:44:53 +01:00
Clownacy
b83b7f25fc Found the real name for DummiedOutLogFunction..? 2020-04-16 13:47:17 +01:00
Clownacy
7820926bfd Remove outdated comments 2020-03-22 15:37:00 +00:00
Clownacy
c34a7fc354 Fix build error 2020-03-22 15:35:59 +00:00
Clownacy
b374a8046c Add some missing global/static variable names
Also from the Mac port.
2020-03-22 15:31:28 +00:00
Clownacy
f6606b7748 Add some missing function names
These were retrieved from the Mac port (v0.0.7), which kept these
functions.

Unfortunately, this port is missing local variable names, so we can't
use it to make InitBack accurate.
2020-03-22 15:31:28 +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
989013168c Clean-up Draw.cpp 2019-11-15 21:00:29 +00:00
Clownacy
a8cf5e1846 Fix a typo in a comment 2019-10-20 21:08:47 +00:00
Clownacy
3889bd9f1d Add missing #include to Draw.cpp
Thanks to GabrielRavier for noticing.
2019-09-10 12:31:38 +00:00
Clownacy
93029e8e2c Fix incorrectly-ordered #include 2019-09-04 14:13:51 +00:00
Clownacy
dcf9921481 Move SystemTask from WindowsWrapper.h to Main.h 2019-09-04 02:23:49 +01:00
Clownacy
0faf06224f Added a bugfix for font creation
Fixes Japanese builds using the wrong charset on non-Japanese Windows
installations, and fixed the font using antialiasing, causing it to
clash with the game's colour-keying.
2019-09-01 20:30:26 +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
0af39741d4 Merge branch 'master' into accurate 2019-08-29 00:22:18 +01:00
Clownacy
9f81f9e080 Move MakeSurface_Generic to the correct place in Draw.cpp 2019-08-29 00:21:43 +01:00
Clownacy
e67c1e3640 Migrated to the native Windows resource file system 2019-08-27 23:59:57 +01:00
Clownacy
b6322d5e0f Make LoadBitmap take a pixel buffer instead of an SDL_RWops 2019-08-27 16:10:37 +01:00
Clownacy
64598dc2a5 Rename Surface_Ids to SurfaceID
For code style consistency (this isn't a vanilla enum name - I don't
think there even was an enum for this in the original source code)
2019-08-21 16:18:55 +00:00
Clownacy
f354b84f6a Revert "Glyphs now regenerate with the rest of the game's textures"
This reverts commit aa6174b3f2.
2019-08-14 16:26:37 +00:00
Clownacy
e708dc3a7d Make the surface_metadata struct match the original 2019-08-13 19:48:18 +01:00
Clownacy
aa6174b3f2 Glyphs now regenerate with the rest of the game's textures
God-damn this code is ugly
2019-08-13 18:32:44 +01:00
Clownacy
16b2f6a474 Added enums for the surface types 2019-08-13 04:42:29 +00:00
Clownacy
d47f683491 Ported the Windows version's surface regeneration
Has the same imperfections: if you regenerate the surfaces while a
text box is open (and while using Courier New I guess), the text will
regenerate with smaller spaces.
2019-08-13 04:36:05 +00:00
Clownacy
1b6804bbe1 Fix BackupSurface 2019-08-13 02:52:37 +00:00
Clownacy
3f8ead09d6 Renderer backend simplification part 1: Draw.cpp and Software.cpp
By emulating the DirectDraw code more closely, I can simplify the
renderer backend API.
2019-08-13 01:39:08 +00:00
Clownacy
85f58d7d39 Rendering backend API naming improvements 2019-08-10 19:50:10 +01:00
Clownacy
2b86db32a0 Backend_Blit always uses a colour key 2019-08-10 19:31:45 +01:00
Clownacy
607bbfcef8 Remove some debug prints
I prefer to only print on error
2019-07-31 23:12:06 +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
6d385e674f Font refactor part 1: Software
With this, font blitting is handled by the rendering backend, paving
the way for hardware-accelerated font drawing in the accelerated
backends.
2019-07-23 16:38:04 +01:00
Clownacy
a3278a60b5 A fix, some documentation, and cleanup 2019-07-19 19:19:35 +01:00
Clownacy
74c9931ebb Change the renderer backend API for uploading pixels
Also fix some blatant build errors. I must be going mad - I swear
I've fixed that typedef thing like twice already.
2019-07-19 08:45:59 +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
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