diff options
| author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2015-02-17 13:32:29 -0500 |
|---|---|---|
| committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2015-02-17 13:32:29 -0500 |
| commit | c1b1558256997df22678f6405ea320ae454ad5b4 (patch) | |
| tree | 39a22c795b8eba596ac05bece07f49741ba03072 /src | |
| parent | 6b99c7aee539e35b8e67520f36adeca9007641cb (diff) | |
| download | therapy-c1b1558256997df22678f6405ea320ae454ad5b4.tar.gz therapy-c1b1558256997df22678f6405ea320ae454ad5b4.tar.bz2 therapy-c1b1558256997df22678f6405ea320ae454ad5b4.zip | |
Removed tool used to generate the font, also commited some stuff I forgot in the last commit
Diffstat (limited to 'src')
| -rw-r--r-- | src/translate_font.cpp | 32 |
1 files changed, 0 insertions, 32 deletions
| diff --git a/src/translate_font.cpp b/src/translate_font.cpp deleted file mode 100644 index 7eb4c59..0000000 --- a/src/translate_font.cpp +++ /dev/null | |||
| @@ -1,32 +0,0 @@ | |||
| 1 | #include "renderer.h" | ||
| 2 | #include <cstdio> | ||
| 3 | |||
| 4 | #define min(x,y) ((x) > (y) ? (y) : (x)) | ||
| 5 | |||
| 6 | int main() | ||
| 7 | { | ||
| 8 | initRenderer(); | ||
| 9 | |||
| 10 | Texture* palette = createTexture(128, 128); | ||
| 11 | fillTexture(palette, NULL, 0, 0, 0); | ||
| 12 | |||
| 13 | Texture* wrong = loadTextureFromBMP("../res/arcadepix_regular_8.bmp"); | ||
| 14 | |||
| 15 | FILE* desc = fopen("../res/arcadepix_regular_8.sfl", "r"); | ||
| 16 | while (!feof(desc)) | ||
| 17 | { | ||
| 18 | int ch; | ||
| 19 | Rectangle srcRect; | ||
| 20 | |||
| 21 | fscanf(desc, "%d %d %d %d %d %*d %*d %*d \n", &ch, &(srcRect.x), &(srcRect.y), &(srcRect.w), &(srcRect.h)); | ||
| 22 | |||
| 23 | Rectangle dstRect(ch % 16 * 8, ch / 16 * 8 + (8 - min(srcRect.h,8)), min(srcRect.w, 8), min(srcRect.h, 8)); | ||
| 24 | blitTexture(wrong, palette, &srcRect, &dstRect); | ||
| 25 | } | ||
| 26 | |||
| 27 | fclose(desc); | ||
| 28 | |||
| 29 | saveTextureToBMP(palette, "tex.bmp"); | ||
| 30 | |||
| 31 | destroyRenderer(); | ||
| 32 | } | ||
