summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2015-02-17 13:32:29 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2015-02-17 13:32:29 -0500
commitc1b1558256997df22678f6405ea320ae454ad5b4 (patch)
tree39a22c795b8eba596ac05bece07f49741ba03072
parent6b99c7aee539e35b8e67520f36adeca9007641cb (diff)
downloadtherapy-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
-rw-r--r--CMakeLists.txt4
-rw-r--r--res/arcadepix_regular_8.PNGbin3906 -> 0 bytes
-rw-r--r--res/arcadepix_regular_8.bmpbin24632 -> 0 bytes
-rw-r--r--res/arcadepix_regular_8.sfl94
-rw-r--r--res/font.bmpbin49208 -> 49208 bytes
-rw-r--r--shaders/bloom1.fragment2
-rw-r--r--shaders/bloom2.fragment4
-rw-r--r--src/translate_font.cpp32
8 files changed, 5 insertions, 131 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 54aee1f..2622733 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt
@@ -28,8 +28,6 @@ find_package(GLFW REQUIRED)
28 28
29# include_directories(${SDL2_INCLUDE_DIR}) 29# include_directories(${SDL2_INCLUDE_DIR})
30set(CMAKE_BUILD_TYPE Debug) 30set(CMAKE_BUILD_TYPE Debug)
31add_executable(Aromatherapy src/main.cpp src/map.cpp src/renderer.cpp) 31add_executable(Aromatherapy src/main.cpp src/map.cpp src/mapview.cpp src/renderer.cpp)
32target_link_libraries(Aromatherapy ${OPENGL_LIBRARY} ${GLEW_LIBRARY} ${GLFW_LIBRARY}) 32target_link_libraries(Aromatherapy ${OPENGL_LIBRARY} ${GLEW_LIBRARY} ${GLFW_LIBRARY})
33add_executable(translate_font src/translate_font.cpp src/renderer.cpp)
34target_link_libraries(translate_font ${OPENGL_LIBRARY} ${GLEW_LIBRARY} ${GLFW_LIBRARY})
35install(TARGETS Aromatherapy RUNTIME DESTINATION ${BIN_DIR}) 33install(TARGETS Aromatherapy RUNTIME DESTINATION ${BIN_DIR})
diff --git a/res/arcadepix_regular_8.PNG b/res/arcadepix_regular_8.PNG deleted file mode 100644 index 5b152aa..0000000 --- a/res/arcadepix_regular_8.PNG +++ /dev/null
Binary files differ
diff --git a/res/arcadepix_regular_8.bmp b/res/arcadepix_regular_8.bmp deleted file mode 100644 index fc2fd82..0000000 --- a/res/arcadepix_regular_8.bmp +++ /dev/null
Binary files differ
diff --git a/res/arcadepix_regular_8.sfl b/res/arcadepix_regular_8.sfl deleted file mode 100644 index b906c01..0000000 --- a/res/arcadepix_regular_8.sfl +++ /dev/null
@@ -1,94 +0,0 @@
139 1 3 2 2 0 4 3
296 4 3 4 2 0 4 6
334 9 3 6 2 0 4 8
494 16 3 6 3 0 4 8
545 23 6 5 1 0 7 7
6126 29 5 7 2 1 6 9
760 37 4 4 5 0 5 6
862 42 4 4 5 0 5 6
935 47 4 5 5 0 5 7
1047 53 4 5 5 1 5 8
1161 59 4 5 5 0 5 7
1292 65 4 5 5 1 5 8
1343 71 4 7 5 -1 5 7
1432 79 10 0 0 0 11 8
1591 80 10 0 0 0 11 0
1693 81 10 0 0 0 11 0
17123 82 10 0 0 0 11 0
18124 83 10 0 0 0 11 0
19125 84 10 0 0 0 11 0
2058 85 5 2 5 0 6 3
2146 88 8 2 2 0 9 3
22105 91 1 3 9 0 2 4
2333 95 3 3 7 0 4 4
2440 99 3 3 7 0 4 4
2541 103 3 3 7 0 4 4
26108 107 3 3 7 0 4 4
2736 111 3 5 7 0 4 7
2842 117 3 5 7 0 4 7
29102 1 11 5 7 0 4 7
30116 7 11 5 7 0 4 7
3138 13 11 6 7 0 4 8
3249 20 11 6 7 0 4 8
3373 27 11 6 7 0 4 8
3484 34 11 6 7 0 4 8
3589 41 11 6 7 0 4 8
3698 48 11 6 7 0 4 8
37100 55 11 6 7 0 4 8
38104 62 11 6 7 0 4 8
39107 69 11 6 7 0 4 8
4097 76 12 6 6 0 5 8
4199 83 12 6 6 0 5 8
42101 90 12 6 6 0 5 8
43110 97 12 6 6 0 5 8
44111 104 12 6 6 0 5 8
45114 111 12 6 6 0 5 8
46115 118 12 6 6 0 5 8
47117 1 20 6 6 0 5 8
48118 8 20 6 6 0 5 8
49120 15 20 6 6 0 5 8
50122 22 20 6 6 0 5 8
5137 29 19 7 7 1 4 9
5248 37 19 7 7 1 4 9
5350 45 19 7 7 1 4 9
5451 53 19 7 7 1 4 9
5552 61 19 7 7 1 4 9
5653 69 19 7 7 1 4 9
5754 77 19 7 7 1 4 9
5855 85 19 7 7 1 4 9
5956 93 19 7 7 1 4 9
6057 101 19 7 7 1 4 9
6165 109 19 7 7 1 4 9
6266 117 19 7 7 1 4 9
6367 1 27 7 7 1 4 9
6468 9 27 7 7 1 4 9
6569 17 27 7 7 1 4 9
6670 25 27 7 7 1 4 9
6771 33 27 7 7 1 4 9
6872 41 27 7 7 1 4 9
6974 49 27 7 7 1 4 9
7075 57 27 7 7 1 4 9
7176 65 27 7 7 1 4 9
7277 73 27 7 7 1 4 9
7378 81 27 7 7 1 4 9
7479 89 27 7 7 1 4 9
7580 97 27 7 7 1 4 9
7681 105 27 7 7 1 4 9
7782 113 27 7 7 1 4 9
7883 1 37 7 7 1 4 9
7985 9 37 7 7 1 4 9
8086 17 37 7 7 1 4 9
8187 25 37 7 7 1 4 9
8288 33 37 7 7 1 4 9
8390 41 37 7 7 1 4 9
84109 49 38 7 6 1 5 9
85119 57 38 7 6 1 5 9
8659 65 39 3 6 0 6 4
8744 69 42 3 3 0 9 4
8895 73 44 7 1 0 11 8
8964 81 37 8 8 1 4 10
90106 90 35 4 11 0 2 6
91103 95 38 6 8 0 5 8
92112 102 38 6 8 0 5 8
93113 109 38 6 8 0 5 8
94121 116 38 6 8 0 5 8
diff --git a/res/font.bmp b/res/font.bmp index 498f915..6be5236 100644 --- a/res/font.bmp +++ b/res/font.bmp
Binary files differ
diff --git a/shaders/bloom1.fragment b/shaders/bloom1.fragment index 77031f2..4940933 100644 --- a/shaders/bloom1.fragment +++ b/shaders/bloom1.fragment
@@ -21,7 +21,7 @@ vec2 rot2d(vec2 p, float a)
21void main() 21void main()
22{ 22{
23 const int NUM_TAPS = 12; 23 const int NUM_TAPS = 12;
24 float max_siz = 1.0; 24 float max_siz = 15.0;
25 25
26 vec2 fTaps_Poisson[NUM_TAPS]; 26 vec2 fTaps_Poisson[NUM_TAPS];
27 fTaps_Poisson[0] = vec2(-.326, -.406); 27 fTaps_Poisson[0] = vec2(-.326, -.406);
diff --git a/shaders/bloom2.fragment b/shaders/bloom2.fragment index 323f441..ac18124 100644 --- a/shaders/bloom2.fragment +++ b/shaders/bloom2.fragment
@@ -51,7 +51,9 @@ void main()
51 } 51 }
52 52
53 vec3 bloom_c = (sum / vec4(NUM_TAPS)).rgb; 53 vec3 bloom_c = (sum / vec4(NUM_TAPS)).rgb;
54 bloom_c = vec3(bloom_c.r*bloom_c.r, bloom_c.g*bloom_c.g, bloom_c.b*bloom_c.b); 54 //bloom_c = vec3(bloom_c.r*bloom_c.r, bloom_c.g*bloom_c.g, bloom_c.b*bloom_c.b);
55 //bloom_c = vec3(bloom_c.r*bloom_c.r, bloom_c.g*bloom_c.g, bloom_c.b*bloom_c.b);
56 bloom_c = max(bloom_c - 0.25, vec3(0,0,0));
55 57
56 color = texture(screenTex, UV).rgb + bloom_c; 58 color = texture(screenTex, UV).rgb + bloom_c;
57} 59}
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
6int 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}