diff --git a/europc_mono.hpp b/europc_mono.hpp deleted file mode 100644 index 5640718..0000000 --- a/europc_mono.hpp +++ /dev/null @@ -1,7 +0,0 @@ -#pragma once - -#include - -extern uint32_t _binary_europc_mono_data_start __asm("_binary_europc_mono_data_start"); -extern uint32_t _binary_europc_mono_data_end __asm("_binary_europc_mono_data_end"); -extern uint32_t _binary_europc_mono_data_size __asm("_binary_europc_mono_data_size"); diff --git a/europc_mono.data b/europc_mono_9x14.data similarity index 100% rename from europc_mono.data rename to europc_mono_9x14.data diff --git a/europc_mono_9x14.hpp b/europc_mono_9x14.hpp new file mode 100644 index 0000000..a2be09f --- /dev/null +++ b/europc_mono_9x14.hpp @@ -0,0 +1,7 @@ +#pragma once + +#include + +extern uint32_t _binary_europc_mono_9x14_data_start __asm("_binary_europc_mono_9x14_data_start"); +extern uint32_t _binary_europc_mono_9x14_data_end __asm("_binary_europc_mono_9x14_data_end"); +extern uint32_t _binary_europc_mono_9x14_data_size __asm("_binary_europc_mono_9x14_data_size"); diff --git a/example/example.mk b/example/example.mk index 19e512b..70e325b 100644 --- a/example/example.mk +++ b/example/example.mk @@ -40,7 +40,7 @@ FONT_BITMAP_OBJ = \ holly/region_array.o \ holly/background.o \ holly/ta_fifo_polygon_converter.o \ - sperrypc.data.o + sperrypc_8x8.data.o example/font_bitmap.elf: LDSCRIPT = $(LIB)/alt.lds example/font_bitmap.elf: $(START_OBJ) $(FONT_BITMAP_OBJ) @@ -124,7 +124,7 @@ SUZANNE_PROFILE_OBJ = \ holly/ta_fifo_polygon_converter.o \ font/font_bitmap.o \ sh7091/serial.o \ - europc_mono.data.o + verite_8x16.data.o example/suzanne_profile.elf: LDSCRIPT = $(LIB)/alt.lds example/suzanne_profile.elf: $(START_OBJ) $(SUZANNE_PROFILE_OBJ) diff --git a/example/font_bitmap.cpp b/example/font_bitmap.cpp index c0822b6..560b885 100644 --- a/example/font_bitmap.cpp +++ b/example/font_bitmap.cpp @@ -18,7 +18,7 @@ #include "holly/region_array.hpp" #include "twiddle.hpp" -#include "sperrypc.hpp" +#include "sperrypc_8x8.hpp" struct vertex { float x; @@ -229,7 +229,7 @@ void main() { vga(); - auto src = reinterpret_cast(&_binary_sperrypc_data_start); + auto src = reinterpret_cast(&_binary_sperrypc_8x8_data_start); inflate_font(src); palette_data(); diff --git a/example/suzanne_profile.cpp b/example/suzanne_profile.cpp index ccd7754..f427313 100644 --- a/example/suzanne_profile.cpp +++ b/example/suzanne_profile.cpp @@ -21,7 +21,7 @@ #include "math/vec4.hpp" #include "font/font_bitmap.hpp" -#include "europc_mono.hpp" +#include "verite_8x16.hpp" constexpr float half_degree = 0.01745329f / 2; @@ -239,11 +239,11 @@ void main() { vga(); - auto src = reinterpret_cast(&_binary_europc_mono_data_start); - font_bitmap::inflate(2, // pitch - 9, // width - 14, // height - 16, // texture_width + auto src = reinterpret_cast(&_binary_verite_8x16_data_start); + font_bitmap::inflate(1, // pitch + 8, // width + 16, // height + 8, // texture_width 16, // texture_height src); font_bitmap::palette_data(); @@ -308,8 +308,8 @@ void main() transform2(parameter, lights[2], {0.f, 0.f, 1.f, 1.f}); font_bitmap::transform_string(parameter, - 16, 16, // texture - 9, 14, // glyph + 8, 16, // texture + 8, 16, // glyph 40, 40, // position "test", 4); diff --git a/font/font_bitmap.cpp b/font/font_bitmap.cpp index 55d38e5..813ceba 100644 --- a/font/font_bitmap.cpp +++ b/font/font_bitmap.cpp @@ -156,8 +156,8 @@ void transform_string(ta_parameter_writer& parameter, y += static_cast(position_y); z = 1.f / (z + 10.f); - u *= static_cast(glyph_width - 1) / static_cast(texture_width); - v *= static_cast(glyph_height - 1) / static_cast(texture_height); + u *= static_cast(glyph_width) / static_cast(texture_width); + v *= static_cast(glyph_height) / static_cast(texture_height); parameter.append() = ta_vertex_parameter::polygon_type_3(polygon_vertex_parameter_control_word(end_of_strip), diff --git a/sperrypc.hpp b/sperrypc.hpp deleted file mode 100644 index 82f31f5..0000000 --- a/sperrypc.hpp +++ /dev/null @@ -1,7 +0,0 @@ -#pragma once - -#include - -extern uint32_t _binary_sperrypc_data_start __asm("_binary_sperrypc_data_start"); -extern uint32_t _binary_sperrypc_data_end __asm("_binary_sperrypc_data_end"); -extern uint32_t _binary_sperrypc_data_size __asm("_binary_sperrypc_data_size"); diff --git a/sperrypc.data b/sperrypc_8x8.data similarity index 100% rename from sperrypc.data rename to sperrypc_8x8.data diff --git a/sperrypc_8x8.hpp b/sperrypc_8x8.hpp new file mode 100644 index 0000000..286ea61 --- /dev/null +++ b/sperrypc_8x8.hpp @@ -0,0 +1,7 @@ +#pragma once + +#include + +extern uint32_t _binary_sperrypc_8x8_data_start __asm("_binary_sperrypc_8x8_data_start"); +extern uint32_t _binary_sperrypc_8x8_data_end __asm("_binary_sperrypc_8x8_data_end"); +extern uint32_t _binary_sperrypc_8x8_data_size __asm("_binary_sperrypc_8x8_data_size"); diff --git a/verite_8x16.data b/verite_8x16.data new file mode 100644 index 0000000..369f0a9 Binary files /dev/null and b/verite_8x16.data differ diff --git a/verite_8x16.hpp b/verite_8x16.hpp new file mode 100644 index 0000000..5e5bc6c --- /dev/null +++ b/verite_8x16.hpp @@ -0,0 +1,7 @@ +#pragma once + +#include + +extern uint32_t _binary_verite_8x16_data_start __asm("_binary_verite_8x16_data_start"); +extern uint32_t _binary_verite_8x16_data_end __asm("_binary_verite_8x16_data_end"); +extern uint32_t _binary_verite_8x16_data_size __asm("_binary_verite_8x16_data_size");