mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 09:28:15 +03:00
Add Textbook
A relevant paragraph copied from the original commit history: The idea is that we store all strings somewhere managed, and then the hashmap only needs pointers to those strings. For storing strings, I created a `Textbook` structure, which consists of one or more 50 KB "pages" (allocated as needed) on which you can simply write strings in both languages back-to-back with `textbook_store(textbook, text)` and get pointers to each of them. (I was originally going to just use one big buffer and realloc to double the size when filled up, but then the hashmap would be full of dangling pointers...) When needed, like when switching to a different language, an entire textbook can be freed at once. This commit is part of rewritten history of the localization branch. The original (unsquashed) commit history can be found here: https://github.com/Dav999-v/VVVVVV/tree/localization-orig
This commit is contained in:
committed by
Misa Elizabeth Kai
parent
b148950367
commit
0ed2cb1bc0
@@ -104,6 +104,7 @@ set(VVV_SRC
|
||||
src/DeferCallbacks.c
|
||||
src/GlitchrunnerMode.c
|
||||
src/Network.c
|
||||
src/Textbook.c
|
||||
src/ThirdPartyDeps.c
|
||||
src/VFormat.c
|
||||
src/Vlogging.c
|
||||
|
||||
Reference in New Issue
Block a user