Download code/engine/text/text.h from HDTenEightyP/SeafarerEngine: direct link, hf CLI and curl.
- Browser
- Download file 4.37 kB
-
https://huggingface.co/HDTenEightyP/SeafarerEngine/resolve/main/code/engine/text/text.h
- Command line
-
hf download hf://HDTenEightyP/SeafarerEngine/code/engine/text/text.h
-
curl -L -o text.h https://huggingface.co/HDTenEightyP/SeafarerEngine/resolve/main/code/engine/text/text.h
4.37 kB
| /* | |
| Copyright (c) 2026 Ethan Mortonson. | |
| Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
| The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
| */ | |
| struct _Language_Header | |
| { | |
| char Name[256]; | |
| char Encoding_File[256]; | |
| int ID; | |
| int Number_Of_Encodings; | |
| int Number_Of_Codepages_Required; | |
| int Codepage_Width; | |
| int Codepage_Height; | |
| int Character_Width; | |
| int Character_Height; | |
| }; | |
| struct _Language_Encoding | |
| { | |
| int Unicode_Character; | |
| int Codepage; | |
| int x; | |
| int y; | |
| int Width; | |
| int Height; | |
| }; | |
| void Create_Language(unsigned char Name[256], | |
| unsigned int Number_Of_Encodings, | |
| unsigned int Number_Of_Codepages_Required, | |
| unsigned char Encoding_File[256], const char* Filename); | |
| void Add_Encoding(FILE * f, int Unicode_Character, | |
| int Codepage, | |
| int x, | |
| int y, | |
| int Width, | |
| int Height); | |
| //START: ENGLISH-US, | |
| struct _Text_Engine | |
| { | |
| unsigned int Number_Of_Codepages_Loaded; | |
| struct _Image* Default_Codepage; | |
| struct _Image* Codepages; | |
| struct _Language_Header Language; | |
| struct _Language_Encoding* Encodings; | |
| int Number_Of_Text_Images; | |
| struct _Image* Text_Images; | |
| }; | |
| void Load_Language(struct _Text_Engine* Text_Engine, const char* Filename); | |
| void Write_Language(const char* Filename); | |
| void Encode_Text(struct _Text_Engine* Text_Engine, int Text[256], int Text_Length, int Width, int Height, const char* Output); | |
| struct _Text_Engine* Create_Text_Engine(); | |
| void Initialize_Text_Engine(struct _Engine* Engine); //Load Default codepage | |
| struct _Image* Create_Text_Image(struct _Engine* Engine, char Text[256], int Text_Length, int Width, int Height); | |
| void Initialize_Text_Image(struct _Text_Engine* Text_Engine, struct _Image* Image, char Text[256], int Text_Length, int Width, int Height); | |
| void Create_English_Encoding_File(); | |
| void Load_Encoding(struct _Text_Engine* Text_Engine, const char* Filename); | |
| void Create_Encoded_Text(struct _Text_Engine* Text_Engine, const char* Input_Filepath, const char* Filepath); | |
| void Initialize_Text_Image_From_Encoded_Text(struct _Text_Engine* Text_Engine, struct _Image* Image, int Text_Length, int Height, const char* Filename); | |