diff --git a/base.mk b/base.mk index be80c0a..51ac19e 100644 --- a/base.mk +++ b/base.mk @@ -8,6 +8,7 @@ CFLAGS += -Wno-array-bounds #CFLAGS += -Wno-error=narrowing -Wno-error=unused-variable -Wno-error=array-bounds= CFLAGS += -Wno-error=maybe-uninitialized CFLAGS += -Wno-error=unused-but-set-variable +CFLAGS += -Wno-error=unused-variable CXXFLAGS += -fno-exceptions -fno-non-call-exceptions -fno-rtti -fno-threadsafe-statics @@ -52,6 +53,9 @@ endef %.data.o: %.data $(BUILD_BINARY_O) +%.data.pal.o: %.data.pal + $(BUILD_BINARY_O) + %.o: %.s $(AS) $(AARCH) $(AFLAGS) $(DEBUG) $< -o $@ diff --git a/example/example.mk b/example/example.mk index c19eabc..9f4bfe1 100644 --- a/example/example.mk +++ b/example/example.mk @@ -516,3 +516,29 @@ TA_TRANSFER_PROFILE_OBJ = \ example/ta_transfer_profile.elf: LDSCRIPT = $(LIB)/main.lds example/ta_transfer_profile.elf: $(START_OBJ) $(TA_TRANSFER_PROFILE_OBJ) + +VQ_OBJ = \ + example/vq.o \ + holly/core.o \ + holly/region_array.o \ + holly/background.o \ + holly/ta_fifo_polygon_converter.o \ + holly/video_output.o + +example/vq.elf: LDSCRIPT = $(LIB)/main.lds +example/vq.elf: $(START_OBJ) $(VQ_OBJ) + +SIERPINSKI_OBJ = \ + example/sierpinski.o \ + holly/core.o \ + holly/region_array.o \ + holly/background.o \ + holly/ta_fifo_polygon_converter.o \ + holly/video_output.o \ + wolf2.data.o \ + wolf2.data.pal.o \ + strawberry.data.o \ + strawberry.data.pal.o + +example/sierpinski.elf: LDSCRIPT = $(LIB)/main.lds +example/sierpinski.elf: $(START_OBJ) $(SIERPINSKI_OBJ) diff --git a/example/sierpinski.cpp b/example/sierpinski.cpp new file mode 100644 index 0000000..24a6718 --- /dev/null +++ b/example/sierpinski.cpp @@ -0,0 +1,363 @@ +#include "holly/texture_memory_alloc.hpp" +#include "holly/holly.hpp" +#include "holly/core.hpp" +#include "holly/core_bits.hpp" +#include "holly/ta_fifo_polygon_converter.hpp" +#include "holly/ta_parameter.hpp" +#include "holly/ta_global_parameter.hpp" +#include "holly/ta_vertex_parameter.hpp" +#include "holly/ta_bits.hpp" +#include "holly/isp_tsp.hpp" +#include "holly/region_array.hpp" +#include "holly/background.hpp" +#include "holly/video_output.hpp" +#include "memorymap.hpp" +#include "twiddle.hpp" +#include "sh7091/store_queue.hpp" + +#include "math/vec2.hpp" +#include "wolf2.hpp" +#include "strawberry.hpp" + +/* + a + + s q + + c r b + +saq +qbr +rcs +*/ + +using vec2 = vec<2, float>; + +uint32_t tris; +uint32_t max_tris; + +void triangle(vec2 a, vec2 b, vec2 c, const uint32_t base_color) +{ + const uint32_t parameter_control_word = para_control::para_type::polygon_or_modifier_volume + | para_control::list_type::opaque + | obj_control::col_type::packed_color + | obj_control::shadow + | obj_control::volume::polygon::with_two_volumes + | obj_control::texture; + + const uint32_t isp_tsp_instruction_word = isp_tsp_instruction_word::depth_compare_mode::greater + | isp_tsp_instruction_word::culling_mode::no_culling; + + const uint32_t tsp_instruction_word = tsp_instruction_word::src_alpha_instr::one + | tsp_instruction_word::dst_alpha_instr::zero + | tsp_instruction_word::fog_control::no_fog + | tsp_instruction_word::texture_u_size::from_int(1024) + | tsp_instruction_word::texture_v_size::from_int(1024); + + const uint32_t texture_address_0 = texture_memory_alloc::texture.start + 1024 * 1024 * 0; + const uint32_t texture_control_word_0 = texture_control_word::pixel_format::_8bpp_palette + | texture_control_word::scan_order::twiddled + | texture_control_word::texture_address(texture_address_0 / 8) + | texture_control_word::palette_selector8(0); + + const uint32_t texture_address_1 = texture_memory_alloc::texture.start + 1024 * 1024 * 1; + const uint32_t texture_control_word_1 = texture_control_word::pixel_format::_8bpp_palette + | texture_control_word::scan_order::twiddled + | texture_control_word::texture_address(texture_address_1 / 8) + | texture_control_word::palette_selector8(1); + + *reinterpret_cast(store_queue) = + ta_global_parameter::polygon_type_3(parameter_control_word, + isp_tsp_instruction_word, + tsp_instruction_word, // tsp_instruction_word_0 + texture_control_word_0, // texture_control_word_0 + tsp_instruction_word, // tsp_instruction_word_1 + texture_control_word_1, // texture_control_word_1 + 0, // data_size_for_sort_dma + 0 // next_address_for_sort_dma + ); + sq_transfer_32byte(ta_fifo_polygon_converter); + + *reinterpret_cast(store_queue) = + ta_vertex_parameter::polygon_type_11(polygon_vertex_parameter_control_word(false), + a.x, a.y, 2.0f, // x, y, z + 0.5f, 1.0f, // u, v + base_color, 0, + 0.5f, 1.0f, // u, v + base_color, 0); + sq_transfer_64byte(ta_fifo_polygon_converter); + + *reinterpret_cast(store_queue) = + ta_vertex_parameter::polygon_type_11(polygon_vertex_parameter_control_word(false), + b.x, b.y, 2.0f, // x, y, z + 0.0f, 0.11111975f, // u, v + base_color, 0, + 0.0f, 0.11111975f, // u, v + base_color, 0); + sq_transfer_64byte(ta_fifo_polygon_converter); + + *reinterpret_cast(store_queue) = + ta_vertex_parameter::polygon_type_11(polygon_vertex_parameter_control_word(true), // end_of_strip + c.x, c.y, 2.0f, // x, y, z + 1.0f, 0.11111975f, // u, v + base_color, 0, + 1.0f, 0.11111975f, // u, v + base_color, 0); + sq_transfer_64byte(ta_fifo_polygon_converter); +} + +vec2 midpoint(vec2 a, vec2 b) +{ + return {(a.x + b.x) / 2.f, (a.y + b.y) / 2.f}; +} + +constexpr uint32_t yellow = 0xfff0f000; +constexpr uint32_t blue = 0xff0000ff; +constexpr uint32_t green = 0xff00ff00; + +void shadow_volume(vec2 a, vec2 b, vec2 c) +{ + const uint32_t parameter_control_word = para_control::para_type::polygon_or_modifier_volume + | para_control::list_type::opaque_modifier_volume; + + const uint32_t isp_tsp_instruction_word = isp_tsp_instruction_word::volume_instruction::normal_polygon + | isp_tsp_instruction_word::culling_mode::no_culling; + + *reinterpret_cast(store_queue) = + ta_global_parameter::modifier_volume(parameter_control_word, + isp_tsp_instruction_word + ); + sq_transfer_32byte(ta_fifo_polygon_converter); + + // top + *reinterpret_cast(store_queue) = + ta_vertex_parameter::modifier_volume(modifier_volume_vertex_parameter_control_word(), + a.x, a.y, 1.0f, + b.x, b.y, 1.0f, + c.x, c.y, 1.0f); + sq_transfer_64byte(ta_fifo_polygon_converter); + + // at--ab + // \/_\ . + // ct bt bb + *reinterpret_cast(store_queue) = + ta_vertex_parameter::modifier_volume(modifier_volume_vertex_parameter_control_word(), + a.x, a.y, 1.0f, + a.x, a.y, 3.0f, + b.x, b.y, 1.0f); + sq_transfer_64byte(ta_fifo_polygon_converter); + *reinterpret_cast(store_queue) = + ta_vertex_parameter::modifier_volume(modifier_volume_vertex_parameter_control_word(), + a.x, a.y, 3.0f, + b.x, b.y, 3.0f, + b.x, b.y, 1.0f); + sq_transfer_64byte(ta_fifo_polygon_converter); + + // ab--at + // | / | + // cb--ct bt + *reinterpret_cast(store_queue) = + ta_vertex_parameter::modifier_volume(modifier_volume_vertex_parameter_control_word(), + a.x, a.y, 1.0f, + c.x, c.y, 3.0f, + a.x, a.y, 3.0f); + sq_transfer_64byte(ta_fifo_polygon_converter); + + *reinterpret_cast(store_queue) = + ta_vertex_parameter::modifier_volume(modifier_volume_vertex_parameter_control_word(), + a.x, a.y, 1.0f, + c.x, c.y, 1.0f, + c.x, c.y, 3.0f); + sq_transfer_64byte(ta_fifo_polygon_converter); + + // at + // + // ct--bt + // | \ | + // cb--bb + *reinterpret_cast(store_queue) = + ta_vertex_parameter::modifier_volume(modifier_volume_vertex_parameter_control_word(), + c.x, c.y, 1.0f, + b.x, b.y, 1.0f, + b.x, b.y, 3.0f); + sq_transfer_64byte(ta_fifo_polygon_converter); + + *reinterpret_cast(store_queue) = + ta_vertex_parameter::modifier_volume(modifier_volume_vertex_parameter_control_word(), + c.x, c.y, 1.0f, + b.x, b.y, 3.0f, + c.x, c.y, 3.0f); + sq_transfer_64byte(ta_fifo_polygon_converter); + + + const uint32_t last_parameter_control_word = para_control::para_type::polygon_or_modifier_volume + | para_control::list_type::opaque_modifier_volume + | obj_control::volume::modifier_volume::last_in_volume; + + const uint32_t last_isp_tsp_instruction_word = isp_tsp_instruction_word::volume_instruction::inside_last_polygon + | isp_tsp_instruction_word::culling_mode::no_culling; + *reinterpret_cast(store_queue) = + ta_global_parameter::modifier_volume(last_parameter_control_word, + last_isp_tsp_instruction_word + ); + sq_transfer_32byte(ta_fifo_polygon_converter); + + // bottom + *reinterpret_cast(store_queue) = + ta_vertex_parameter::modifier_volume(modifier_volume_vertex_parameter_control_word(), + a.x, a.y, 3.0f, + b.x, b.y, 3.0f, + c.x, c.y, 3.0f); + sq_transfer_64byte(ta_fifo_polygon_converter); +} + +void subdivide(vec2 a, vec2 b, vec2 c, int depth) +{ + vec2 q = midpoint(a, b); + vec2 r = midpoint(b, c); + vec2 s = midpoint(c, a); + //triangle(s, a, q, green); + //triangle(q, b, r, green); + //triangle(r, c, s, green); + + if (depth <= 0) + return; + + subdivide(s, a, q, depth - 1); + subdivide(q, b, r, depth - 1); + subdivide(r, c, s, depth - 1); + + if (tris++ > max_tris) + return; + + shadow_volume(q, r, s); +} + +vec2 transform(vec2 v, float theta) +{ + v.x -= 320.f; + v.y -= 240.f; + float x = v.x * __builtin_cosf(theta) - v.y * __builtin_sinf(theta); + float y = v.x * __builtin_sinf(theta) + v.y * __builtin_cosf(theta); + return {x + 320.f, y + 240.f}; +} + +void copy_texture(const uint8_t * src, volatile uint32_t * texture) +{ + constexpr uint32_t size = 1024 * 1024 / 4; + uint32_t temp[size]; + twiddle::texture(reinterpret_cast(temp), src, 1024, 1024); + for (uint32_t i = 0; i < size; i++) { + texture[i] = temp[i]; + } +} + +void copy_palette(const uint8_t * src, const uint32_t palette) +{ + for (uint32_t i = 0; i < 256; i++) { + uint8_t a = 255; + uint8_t r = src[i * 3 + 0]; + uint8_t g = src[i * 3 + 1]; + uint8_t b = src[i * 3 + 2]; + holly.PALETTE_RAM[palette * 256 + i] = (a << 24) | (r << 16) | (g << 8) | (b << 0); + } +} + +void copy_textures_palettes() +{ + auto texture = reinterpret_cast(&texture_memory64[texture_memory_alloc::texture.start / 4]); + + auto wolf_src = reinterpret_cast(&_binary_wolf2_data_start); + auto wolf_pal_src = reinterpret_cast(&_binary_wolf2_data_pal_start); + auto wolf_texture = &texture[1024 * 1024 / 4 * 1]; + copy_texture(wolf_src, wolf_texture); + copy_palette(wolf_pal_src, 1); + + auto strawberry_src = reinterpret_cast(&_binary_strawberry_data_start); + auto strawberry_pal_src = reinterpret_cast(&_binary_strawberry_data_pal_start); + auto strawberry_texture = &texture[1024 * 1024 / 4 * 0]; + copy_texture(strawberry_src, strawberry_texture); + copy_palette(strawberry_pal_src, 0); +} + +void main() +{ + video_output::set_mode_vga(); + + constexpr uint32_t ta_alloc = ta_alloc_ctrl::pt_opb::no_list + | ta_alloc_ctrl::tm_opb::no_list + | ta_alloc_ctrl::t_opb::no_list + | ta_alloc_ctrl::om_opb::_16x4byte + | ta_alloc_ctrl::o_opb::_16x4byte; + + constexpr struct opb_size opb_size = { .opaque = 16 * 4 + , .opaque_modifier = 16 * 4 + , .translucent = 0 + , .translucent_modifier = 0 + , .punch_through = 0 + }; + + holly.SOFTRESET = softreset::pipeline_soft_reset + | softreset::ta_soft_reset; + holly.SOFTRESET = 0; + + core_init(); + region_array2(640 / 32, 480 / 32, opb_size); + background_parameter(0xff0000ff); + holly.PAL_RAM_CTRL = pal_ram_ctrl::pixel_format::argb8888; + holly.FPU_SHAD_SCALE = fpu_shad_scale::simple_shadow_enable::parameter_selection_volume_mode; + copy_textures_palettes(); + + uint32_t frame_ix = 0; + float theta = 0; + constexpr float half_degree = 0.01745329f / 2.f; + + constexpr uint32_t reset_tris = 364 + 1; + + max_tris = 0; + uint32_t frame = 0; + while (true) { + tris = 0; + + vec2 a = transform({320.000f, 5.f}, theta); + vec2 b = transform({519.186f, 355.f}, theta); + vec2 c = transform({120.814f, 355.f}, theta); + + if ((frame++ % 10) == 0) { + if (max_tris > reset_tris) { + max_tris = 0; + } + max_tris += 1; + } + + theta += half_degree / 4; + + ta_polygon_converter_init(opb_size.total(), + ta_alloc, + 640 / 32, + 480 / 32); + + triangle(a, b, c, yellow); + // end of opaque list + *reinterpret_cast(store_queue) = + ta_global_parameter::end_of_list(para_control::para_type::end_of_list); + sq_transfer_32byte(ta_fifo_polygon_converter); + + subdivide(a, b, c, 6); + // end of opaque modifier list + *reinterpret_cast(store_queue) = + ta_global_parameter::end_of_list(para_control::para_type::end_of_list); + sq_transfer_32byte(ta_fifo_polygon_converter); + + ta_wait_opaque_modifier_volume_list(); + + core_start_render(frame_ix); + core_wait_end_of_render_video(); + + while (!spg_status::vsync(holly.SPG_STATUS)); + core_flip(frame_ix); + while (spg_status::vsync(holly.SPG_STATUS)); + + frame_ix = (frame_ix + 1) & 1; + } +} diff --git a/example/vq.cpp b/example/vq.cpp new file mode 100644 index 0000000..d4a4ab9 --- /dev/null +++ b/example/vq.cpp @@ -0,0 +1,181 @@ +#include + +#include "align.hpp" + +#include "holly/texture_memory_alloc.hpp" +#include "holly/holly.hpp" +#include "holly/core.hpp" +#include "holly/core_bits.hpp" +#include "holly/ta_fifo_polygon_converter.hpp" +#include "holly/ta_parameter.hpp" +#include "holly/ta_global_parameter.hpp" +#include "holly/ta_vertex_parameter.hpp" +#include "holly/ta_bits.hpp" +#include "holly/isp_tsp.hpp" +#include "holly/region_array.hpp" +#include "holly/background.hpp" +#include "holly/video_output.hpp" +#include "memorymap.hpp" +#include "twiddle.hpp" + +#include "vq.hpp" + +struct vertex { + float x; + float y; + float u; + float v; +}; + +const struct vertex strip_vertices[4] = { + // [ position ] [ uv ] + { 0.5f, -0.5f, 0.f, 0.f}, + { 0.5f, 0.5f, 1.f, 0.f}, + { -0.5f, -0.5f, 0.f, 1.f}, + { -0.5f, 0.5f, 1.f, 1.f}, +}; +constexpr uint32_t strip_length = (sizeof (strip_vertices)) / (sizeof (struct vertex)); + +uint32_t transform(uint32_t * ta_parameter_buf, + const vertex * strip_vertices, + const uint32_t strip_length) +{ + auto parameter = ta_parameter_writer(ta_parameter_buf); + const uint32_t parameter_control_word = para_control::para_type::polygon_or_modifier_volume + | para_control::list_type::opaque + | obj_control::col_type::packed_color + | obj_control::texture; + + const uint32_t isp_tsp_instruction_word = isp_tsp_instruction_word::depth_compare_mode::greater + | isp_tsp_instruction_word::culling_mode::no_culling; + + const uint32_t tsp_instruction_word = tsp_instruction_word::src_alpha_instr::one + | tsp_instruction_word::dst_alpha_instr::zero + | tsp_instruction_word::fog_control::no_fog + | tsp_instruction_word::texture_u_size::from_int(128) + | tsp_instruction_word::texture_v_size::from_int(128); + + const uint32_t texture_address = texture_memory_alloc::texture.start; + const uint32_t texture_control_word = texture_control_word::vq_compressed + | texture_control_word::pixel_format::_565 + | texture_control_word::scan_order::twiddled + | texture_control_word::texture_address(texture_address / 8); + + parameter.append() = + ta_global_parameter::polygon_type_0(parameter_control_word, + isp_tsp_instruction_word, + tsp_instruction_word, + texture_control_word, + 0, // data_size_for_sort_dma + 0 // next_address_for_sort_dma + ); + + for (uint32_t i = 0; i < strip_length; i++) { + float x = strip_vertices[i].x; + float y = -strip_vertices[i].y; + float z = 0.1f; + + x *= 256.f; + y *= 256.f; + x += 320.f; + y += 240.f; + + bool end_of_strip = i == strip_length - 1; + parameter.append() = + ta_vertex_parameter::polygon_type_3(polygon_vertex_parameter_control_word(end_of_strip), + x, y, z, + strip_vertices[i].u, + strip_vertices[i].v, + 0, + 0 // offset_color + ); + } + + parameter.append() = ta_global_parameter::end_of_list(para_control::para_type::end_of_list); + + return parameter.offset; +} + +void init_texture_memory(const struct opb_size& opb_size) +{ + region_array2(640 / 32, // width + 480 / 32, // height + opb_size + ); + background_parameter(0xff00ff00); +} + +void copy_vq_texture() +{ + uint32_t buf[(256 * 4 * 2 + (64 * 64)) / 4]; + + //auto texture16 = reinterpret_cast(&texture_memory64[texture_memory_alloc::texture.start / 4]); + auto texture16 = reinterpret_cast(buf); + + uint16_t * _codes = &codes[0][0]; + for (int i = 0; i < 256 * 4; i++) { + texture16[i] = _codes[i]; + } + + //auto texture8 = reinterpret_cast(&texture16[256 * 4]); + auto texture8 = reinterpret_cast(&buf[256 * 4 * 2 / 4]); + twiddle::texture(texture8, indexes, 64, 64); + + volatile uint32_t * tex = &texture_memory64[texture_memory_alloc::texture.start / 4]; + for (uint32_t i = 0; i < (sizeof (buf)) / 4; i++) { + tex[i] = buf[i]; + } +} + +uint32_t _ta_parameter_buf[((32 * (strip_length + 2)) + 32) / 4]; + +void main() +{ + video_output::set_mode_vga(); + copy_vq_texture(); + + // The address of `ta_parameter_buf` must be a multiple of 32 bytes. + // This is mandatory for ch2-dma to the ta fifo polygon converter. + uint32_t * ta_parameter_buf = align_32byte(_ta_parameter_buf); + + constexpr uint32_t ta_alloc = ta_alloc_ctrl::pt_opb::no_list + | ta_alloc_ctrl::tm_opb::no_list + | ta_alloc_ctrl::t_opb::no_list + | ta_alloc_ctrl::om_opb::no_list + | ta_alloc_ctrl::o_opb::_8x4byte; + + constexpr struct opb_size opb_size = { .opaque = 8 * 4 + , .opaque_modifier = 0 + , .translucent = 0 + , .translucent_modifier = 0 + , .punch_through = 0 + }; + + holly.SOFTRESET = softreset::pipeline_soft_reset + | softreset::ta_soft_reset; + holly.SOFTRESET = 0; + + core_init(); + init_texture_memory(opb_size); + + uint32_t frame_ix = 0; + + while (true) { + ta_polygon_converter_init(opb_size.total(), + ta_alloc, + 640 / 32, + 480 / 32); + uint32_t ta_parameter_size = transform(ta_parameter_buf, strip_vertices, strip_length); + ta_polygon_converter_transfer(ta_parameter_buf, ta_parameter_size); + ta_wait_opaque_list(); + + core_start_render(frame_ix); + core_wait_end_of_render_video(); + + while (!spg_status::vsync(holly.SPG_STATUS)); + core_flip(frame_ix); + while (spg_status::vsync(holly.SPG_STATUS)); + + frame_ix = (frame_ix + 1) & 1; + } +} diff --git a/holly/isp_tsp.hpp b/holly/isp_tsp.hpp index 0440ee2..1a5b669 100644 --- a/holly/isp_tsp.hpp +++ b/holly/isp_tsp.hpp @@ -185,10 +185,14 @@ namespace texture_control_word { constexpr uint32_t non_twiddled = 1 << 26; } - constexpr uint32_t palette_selector(uint32_t a) { + constexpr uint32_t palette_selector4(uint32_t a) { return (a & 0x3f) << 21; } + constexpr uint32_t palette_selector8(uint32_t a) { + return (a & 0x3) << 25; + } + constexpr uint32_t stride_select = 1 << 25; // in 8-byte units diff --git a/math/mat2x2.hpp b/math/mat2x2.hpp new file mode 100644 index 0000000..442ed88 --- /dev/null +++ b/math/mat2x2.hpp @@ -0,0 +1,104 @@ +#pragma once + +#include + +template +struct mat; + +// +// mat4x4 +// + +template +struct mat<2, 2, T> +{ + typedef vec<2, T> row_type; + typedef vec<2, T> col_type; + +private: + row_type value[2]; + +public: + inline constexpr mat(); + + inline constexpr mat + ( + T const& a00, T const& a01, + T const& a10, T const& a11 + ); + + inline static constexpr int length() { return 4; } + + inline constexpr typename mat<2, 2, T>::row_type const & + operator[](int i) const; + + void operator=(const mat<2, 2, T>&) = delete; + +}; + + +template +inline constexpr mat<2, 2, T>::mat() + : value{std::move(row_type(1, 0)), + std::move(row_type(0, 1))} +{ } + +template +inline constexpr mat<2, 2, T>::mat +( + T const& a00, T const& a01, + T const& a10, T const& a11 +) + : value{std::move(row_type(a00, a01)), + std::move(row_type(a10, a11))} +{ } + +template +inline constexpr typename mat<2, 2, T>::row_type const & +mat<2, 2, T>::operator[](int i) const +{ + switch (i) + { + default: [[fallthrough]]; + case 0: + return value[0]; + case 1: + return value[1]; + } +} + +template +inline constexpr mat<2, 2, T> operator*(mat<2, 2, T> const& m1, mat<2, 2, T> const& m2) +{ +#define c(i, j) ( \ + m1[i][0] * m2[0][j] \ + + m1[i][1] * m2[1][j]) + + return mat<2, 2, T>(c(0,0), c(0,1), + c(1,0), c(1,1)); +#undef c +} + +template +inline constexpr typename mat<2, 2, T>::row_type operator* +( + mat<2, 2, T> const& m, + typename mat<2, 2, T>::col_type const& v +) +{ +#define c(i) ( \ + m[i][0] * v[0] \ + + m[i][1] * v[1]) + + return typename mat<2, 2, T>::row_type(c(0), c(1)); +#undef c +} + +template +inline constexpr mat<2, 2, T> transpose(mat<2, 2, T> const& m) +{ + return mat<2, 2, T>( + m[0][0], m[1][0], + m[0][1], m[1][1] + ); +} diff --git a/math/vec2.hpp b/math/vec2.hpp index 2366e9b..f89f179 100644 --- a/math/vec2.hpp +++ b/math/vec2.hpp @@ -133,6 +133,12 @@ inline constexpr T dot(vec<2, T> const& v1, vec<2, T> const& v2) return tmp.x + tmp.y; } +template +inline constexpr T cross(vec<2, T> const& v1, vec<2, T> const& v2) +{ + return v1.x * v2.y - v2.x * v1.y; +} + template inline constexpr vec<2, T> functor1(T (&func) (T const& x), vec<2, T> const& v) { @@ -146,7 +152,7 @@ inline constexpr vec<2, U> functor1(U (&func) (T const& x), vec<2, T> const& v) } template -inline constexpr T length(vec<2, T> const& v) +inline constexpr T magnitude(vec<2, T> const& v) { return sqrt(dot(v, v)); } diff --git a/math/vec3.hpp b/math/vec3.hpp index 13d8241..5adae6b 100644 --- a/math/vec3.hpp +++ b/math/vec3.hpp @@ -160,7 +160,7 @@ inline constexpr vec<3, U> functor1(U (&func) (T const& x), vec<3, T> const& v) } template -inline constexpr T length(vec<3, T> const& v) +inline constexpr T magnitude(vec<3, T> const& v) { return sqrt(dot(v, v)); } diff --git a/math/vec4.hpp b/math/vec4.hpp index d2dc586..9f2ec88 100644 --- a/math/vec4.hpp +++ b/math/vec4.hpp @@ -164,7 +164,7 @@ inline constexpr vec<4, U> functor1(U (&func) (T const& x), vec<4, T> const& v) } template -inline constexpr T length(vec<4, T> const& v) +inline constexpr T magnitude(vec<4, T> const& v) { return sqrt(dot(v, v)); } diff --git a/strawberry.data b/strawberry.data new file mode 100644 index 0000000..5283c30 Binary files /dev/null and b/strawberry.data differ diff --git a/strawberry.data.pal b/strawberry.data.pal new file mode 100644 index 0000000..69e056a Binary files /dev/null and b/strawberry.data.pal differ diff --git a/strawberry.hpp b/strawberry.hpp new file mode 100644 index 0000000..efe4a72 --- /dev/null +++ b/strawberry.hpp @@ -0,0 +1,9 @@ +#include + +extern uint32_t _binary_strawberry_data_start __asm("_binary_strawberry_data_start"); +extern uint32_t _binary_strawberry_data_end __asm("_binary_strawberry_data_end"); +extern uint32_t _binary_strawberry_data_size __asm("_binary_strawberry_data_size"); + +extern uint32_t _binary_strawberry_data_pal_start __asm("_binary_strawberry_data_pal_start"); +extern uint32_t _binary_strawberry_data_pal_end __asm("_binary_strawberry_data_pal_end"); +extern uint32_t _binary_strawberry_data_pal_size __asm("_binary_strawberry_data_pal_size"); diff --git a/strawberry.png b/strawberry.png new file mode 100644 index 0000000..8222340 Binary files /dev/null and b/strawberry.png differ diff --git a/vq.hpp b/vq.hpp new file mode 100644 index 0000000..1bcc5d3 --- /dev/null +++ b/vq.hpp @@ -0,0 +1,4357 @@ +#include +uint16_t codes[256][4] = { + { 0x3, 0x828, 0x4c, 0x2150 }, + { 0x703, 0x6e1, 0x1f24, 0x723 }, + { 0x80, 0x8a0, 0x3920, 0x7221 }, + { 0x620, 0x360, 0x460, 0x140 }, + { 0x0, 0x60c1, 0x1000, 0xa1e2 }, + { 0x260, 0x1a40, 0x7381, 0xac42 }, + { 0x808, 0x3845, 0x7, 0x7967 }, + { 0x806, 0x92c7, 0x2882, 0xbc28 }, + { 0xd81, 0x14e2, 0x55ab, 0x548b }, + { 0x846, 0x3, 0x192d, 0x848 }, + { 0xf63, 0x47a8, 0x1763, 0x3fa7 }, + { 0x100b, 0x2805, 0x5a94, 0x62af }, + { 0x11e0, 0x60, 0x29e0, 0x80 }, + { 0x1400, 0x1be0, 0x13a0, 0xb60 }, + { 0x1762, 0x9f90, 0xf63, 0x7f8d }, + { 0x12a0, 0x2e41, 0x12a0, 0x2660 }, + { 0x1005, 0x2869, 0x3990, 0x8c36 }, + { 0x1140, 0x23c1, 0x1140, 0x23c1 }, + { 0x1f00, 0x16a0, 0x2f00, 0x7ec1 }, + { 0x2000, 0x0, 0x98e0, 0x5820 }, + { 0x2280, 0x5e01, 0x71c0, 0xcc61 }, + { 0x2001, 0x2843, 0x3084, 0x3064 }, + { 0x2801, 0x2002, 0x38c9, 0x5a4e }, + { 0x2990, 0x2a0e, 0x5379, 0x5c16 }, + { 0x28cb, 0x31b1, 0x2066, 0x296d }, + { 0x2f86, 0x2787, 0x7eea, 0x3f89 }, + { 0x28cf, 0x4971, 0x4193, 0x72b7 }, + { 0x2842, 0xba02, 0x58a1, 0xdae1 }, + { 0x2986, 0x6d4d, 0x10c2, 0x3c67 }, + { 0x2d60, 0x3560, 0x25e0, 0x25c0 }, + { 0x2dc0, 0x3d60, 0x6e22, 0xae44 }, + { 0x3277, 0x641b, 0x42d2, 0x6c38 }, + { 0x38ea, 0x1847, 0x620f, 0x2847 }, + { 0x38d1, 0x8c19, 0x4132, 0x9cfb }, + { 0x3a08, 0x4208, 0x0, 0x0 }, + { 0x380a, 0x4027, 0x3803, 0xa24e }, + { 0x41a0, 0x51c0, 0x5a00, 0x6200 }, + { 0x4000, 0x7880, 0xa960, 0xd2a0 }, + { 0x40c8, 0x514b, 0x71ce, 0x8293 }, + { 0x41d3, 0xa318, 0x39b4, 0x5173 }, + { 0x4210, 0x10a7, 0x6b55, 0x422f }, + { 0x496f, 0x5a2d, 0xacf7, 0xd65a }, + { 0x4804, 0x89cd, 0x5067, 0xab73 }, + { 0x4905, 0xcbc9, 0x8a28, 0xecc8 }, + { 0x4826, 0x6049, 0x4826, 0x6069 }, + { 0x4fea, 0x87ce, 0x57eb, 0x67eb }, + { 0x4f67, 0xcf33, 0x3f66, 0xb751 }, + { 0x510a, 0x7314, 0x3823, 0x498a }, + { 0x548b, 0x4b0a, 0x2243, 0x881 }, + { 0x5687, 0x1f44, 0x942b, 0x6667 }, + { 0x5800, 0x3822, 0xba46, 0x88c2 }, + { 0x58a0, 0x89c0, 0xcbe2, 0xe503 }, + { 0x5c18, 0x5b50, 0x8d37, 0x8c92 }, + { 0x5dc1, 0xa5c3, 0xd6a5, 0xee46 }, + { 0x6234, 0x3130, 0x5a13, 0x30f0 }, + { 0x67cb, 0x57ea, 0xb628, 0x7747 }, + { 0x604d, 0x4004, 0x680a, 0x8002 }, + { 0x618b, 0xbb52, 0x820d, 0xd3d4 }, + { 0x66a7, 0x5645, 0x6e3, 0x683 }, + { 0x6186, 0x7800, 0x4000, 0x4000 }, + { 0x649a, 0x29aa, 0x5c35, 0x69a9 }, + { 0x69b3, 0xc5bb, 0x7b78, 0xce7d }, + { 0x6b73, 0x5b91, 0x20a3, 0x1062 }, + { 0x6a90, 0x9bb7, 0xac7a, 0xd57e }, + { 0x6926, 0x0, 0x30a7, 0x29 }, + { 0x6941, 0xa223, 0x840, 0x3040 }, + { 0x7043, 0x8885, 0x88c8, 0xa96b }, + { 0x7560, 0x5460, 0x85c0, 0x6cc0 }, + { 0x7020, 0x9a66, 0x7020, 0x89c4 }, + { 0x736e, 0x1004, 0x3947, 0x492b }, + { 0x7f48, 0xcd4c, 0x4f84, 0x9de4 }, + { 0x7805, 0xb022, 0x9845, 0xd822 }, + { 0x7af3, 0x8b74, 0x492d, 0x38eb }, + { 0x7ad1, 0x2042, 0x9454, 0x1042 }, + { 0x7800, 0x9800, 0xb40e, 0xc329 }, + { 0x7b58, 0x941a, 0x41b0, 0x6ad6 }, + { 0x82a2, 0xc0, 0xa346, 0x10e0 }, + { 0x8140, 0xb300, 0xed80, 0xfee0 }, + { 0x81ae, 0x70cb, 0x794d, 0x790e }, + { 0x8085, 0x4044, 0xb3d3, 0x7a8d }, + { 0x8260, 0x79e0, 0x9280, 0x8a00 }, + { 0x81ad, 0x916c, 0xab94, 0x9a4f }, + { 0x8947, 0x803, 0x8968, 0x1024 }, + { 0x8b2e, 0xb4f2, 0xef3c, 0xffbd }, + { 0x8e09, 0x9ee8, 0xc1a1, 0xe323 }, + { 0x8ab8, 0x7a97, 0x8ad9, 0x7256 }, + { 0x88c7, 0x8062, 0xe353, 0xdb70 }, + { 0x8808, 0xb148, 0xa0ea, 0xd40d }, + { 0x8ad5, 0xbcfb, 0x7a70, 0xa437 }, + { 0x8823, 0xb000, 0xb32f, 0xb001 }, + { 0x908d, 0x8a0a, 0x894f, 0xc536 }, + { 0x9100, 0x6040, 0x800, 0x0 }, + { 0x91ef, 0x9ab3, 0x790a, 0x8a31 }, + { 0x9234, 0x284c, 0x38af, 0x82b }, + { 0x93c4, 0xcc68, 0xb00, 0x4301 }, + { 0x9121, 0xe3a3, 0xaa01, 0xf403 }, + { 0x908c, 0x98ac, 0xb08c, 0xb86a }, + { 0x90c6, 0xeb74, 0xd844, 0xf98d }, + { 0x9644, 0x66e3, 0xd385, 0xb565 }, + { 0x9029, 0xcbf5, 0x8048, 0xbc54 }, + { 0x91a4, 0xd46b, 0x7881, 0xaae8 }, + { 0x91ab, 0xa388, 0x70c7, 0x88e7 }, + { 0x9bb5, 0x3084, 0x7a0f, 0x6802 }, + { 0x9bc0, 0x9b80, 0xa400, 0xabc0 }, + { 0x9f6b, 0x8f2a, 0x4703, 0xf43 }, + { 0x99a4, 0xc388, 0xc040, 0xa8a1 }, + { 0x99e9, 0xb1a8, 0xda64, 0xeac6 }, + { 0x99c4, 0xc305, 0x50a1, 0x7101 }, + { 0xa348, 0xf691, 0x8a04, 0xe630 }, + { 0xa06e, 0xa00d, 0x90d5, 0x9a97 }, + { 0xa3b5, 0xccda, 0x590c, 0x71ae }, + { 0xa28a, 0x910d, 0xe56b, 0xcb6d }, + { 0xa6a4, 0xde65, 0xeca3, 0xf3e4 }, + { 0xa7b2, 0xef19, 0x7fad, 0xded7 }, + { 0xa126, 0x5866, 0xc9ca, 0x7064 }, + { 0xa18a, 0xc9e9, 0xf2af, 0xf32f }, + { 0xad19, 0xdefd, 0xd6bd, 0xf7be }, + { 0xac29, 0x1860, 0xc4cb, 0x3120 }, + { 0xa844, 0xa2ae, 0xe352, 0xcc96 }, + { 0xaab7, 0x70cd, 0xa256, 0x70ad }, + { 0xa8f0, 0x9911, 0x7028, 0x704a }, + { 0xab75, 0xbbd8, 0xe53d, 0xd4bc }, + { 0xb415, 0xa351, 0x60aa, 0x78c6 }, + { 0xb082, 0xc8a1, 0xe0e1, 0xe142 }, + { 0xb046, 0xe10c, 0xc84a, 0xe9ad }, + { 0xb0a4, 0x8044, 0x9042, 0x6842 }, + { 0xb26f, 0x8c6c, 0xc314, 0xaa2f }, + { 0xb54c, 0x76e8, 0xe3d3, 0xccae }, + { 0xb5d8, 0x2946, 0xcebb, 0x62cd }, + { 0xb6a1, 0xb621, 0xbe61, 0xb601 }, + { 0xb109, 0xbb4c, 0xed54, 0xff18 }, + { 0xb214, 0xc238, 0x4845, 0x814f }, + { 0xb2b1, 0xe57b, 0xd4f9, 0xf69d }, + { 0xb5b7, 0x39a7, 0x6b0d, 0x49ab }, + { 0xb34a, 0xb000, 0x9a26, 0xb800 }, + { 0xb2a0, 0xdc80, 0xf6a6, 0xff89 }, + { 0xb8c0, 0xc1c0, 0xf587, 0xf64b }, + { 0xb850, 0xa051, 0xd090, 0xd8d5 }, + { 0xbb49, 0x8043, 0xe5ae, 0xba68 }, + { 0xba68, 0x90a2, 0xee17, 0xd513 }, + { 0xc001, 0xd167, 0xabce, 0xb32b }, + { 0xc67b, 0x526d, 0xb5b8, 0x414a }, + { 0xc20e, 0xd96a, 0xa18f, 0xd394 }, + { 0xc468, 0xe68f, 0x30e0, 0x7283 }, + { 0xc30b, 0xd184, 0xee14, 0xdb8c }, + { 0xc083, 0xbbcb, 0xc907, 0xa228 }, + { 0xc402, 0xcc63, 0xec41, 0xec81 }, + { 0xca27, 0xe407, 0xf407, 0xf505 }, + { 0xcbe7, 0x8d08, 0xd000, 0xb860 }, + { 0xcf2e, 0xaf6c, 0xbcad, 0x7e29 }, + { 0xc8e6, 0xbbb1, 0x7801, 0x8062 }, + { 0xcc9a, 0xbbb7, 0xc3f8, 0xa2f5 }, + { 0xc9d4, 0xca16, 0xc9d4, 0xca36 }, + { 0xca42, 0x9a45, 0xbb28, 0xd610 }, + { 0xca60, 0xb1c0, 0x3800, 0x2000 }, + { 0xcd48, 0x970a, 0xd2c5, 0xdca7 }, + { 0xca70, 0xba4e, 0xc9ab, 0xb908 }, + { 0xccf6, 0x8aef, 0x9acf, 0x50ea }, + { 0xd0ad, 0x904e, 0xda35, 0x992d }, + { 0xd165, 0x906d, 0xa089, 0x88d1 }, + { 0xd512, 0xeed7, 0xde31, 0xf795 }, + { 0xd59c, 0xc4fa, 0xe65e, 0xde1d }, + { 0xd36a, 0xeb2a, 0x9ac6, 0xd3c9 }, + { 0xd278, 0xd31a, 0xdafa, 0xe3dc }, + { 0xd3c3, 0x6800, 0xe5a8, 0x8961 }, + { 0xd4ab, 0x49c1, 0xe5b0, 0x7283 }, + { 0xd523, 0xed68, 0xc5e4, 0xeecd }, + { 0xd446, 0x6840, 0xb242, 0x5800 }, + { 0xd174, 0xa0cd, 0xa971, 0x8849 }, + { 0xd67a, 0xbd77, 0x69cf, 0x58ad }, + { 0xd74e, 0xd74e, 0x4de4, 0x4e23 }, + { 0xd963, 0xe4ae, 0xb322, 0xc568 }, + { 0xde1c, 0xe69c, 0x6a8e, 0x7b0f }, + { 0xd86a, 0xa027, 0xb827, 0x8828 }, + { 0xd800, 0xc9cc, 0xc820, 0xa0c7 }, + { 0xde3d, 0xd57b, 0xddbc, 0xac15 }, + { 0xdc2e, 0xd187, 0xb106, 0xa044 }, + { 0xe337, 0xea13, 0xdad6, 0xe94d }, + { 0xe6db, 0xc5b6, 0xb472, 0x79ca }, + { 0xe22c, 0xd085, 0xe3d5, 0xb18b }, + { 0xe417, 0xa1ce, 0xdc35, 0x994b }, + { 0xe518, 0xeddb, 0xc3f4, 0xe539 }, + { 0xe2c4, 0xf466, 0xb1ef, 0xe334 }, + { 0xe009, 0xe2d1, 0xa088, 0xd455 }, + { 0xe6fd, 0xa473, 0xce7a, 0x5aad }, + { 0xe322, 0xf6ab, 0xfb00, 0xfec7 }, + { 0xe4c7, 0xec05, 0xaf0d, 0xaf2c }, + { 0xe2e8, 0xedb1, 0xf674, 0xffb8 }, + { 0xea61, 0xe2c2, 0xd981, 0xda22 }, + { 0xebb1, 0xdaaf, 0xecd5, 0xebd2 }, + { 0xec93, 0xe410, 0xf65a, 0xf679 }, + { 0xe930, 0xe86b, 0xe991, 0xe88c }, + { 0xeb05, 0xd9c5, 0xed47, 0xe3a7 }, + { 0xefb3, 0xf6cf, 0x8ee9, 0xe6ee }, + { 0xedb9, 0xe475, 0xba70, 0xb98f }, + { 0xef99, 0xf6f7, 0xdf33, 0xf6b3 }, + { 0xe8a3, 0xe8a0, 0xf364, 0xf383 }, + { 0xec2a, 0xd860, 0xe2a6, 0xc801 }, + { 0xeca4, 0xd384, 0x80e0, 0x5020 }, + { 0xecf7, 0xe538, 0xc2a7, 0x8906 }, + { 0xe9c5, 0xecf1, 0xe122, 0xeb2a }, + { 0xeb0f, 0xf598, 0xd988, 0xdb8f }, + { 0xeda8, 0xf6f5, 0xf58a, 0xf739 }, + { 0xec09, 0xf511, 0xebea, 0xf636 }, + { 0xedc0, 0x8600, 0xf5e0, 0x9d80 }, + { 0xf411, 0xf491, 0xe889, 0xf0a8 }, + { 0xf501, 0xfe82, 0xfe81, 0xff61 }, + { 0xf674, 0x8285, 0xf695, 0xab27 }, + { 0xf261, 0xd947, 0xd9e3, 0xb12b }, + { 0xf2e0, 0xdac0, 0xc020, 0x7000 }, + { 0xf449, 0xf3c3, 0xf631, 0xfbe1 }, + { 0xf491, 0xf612, 0xf233, 0xf456 }, + { 0xf023, 0xf025, 0xea4c, 0xe865 }, + { 0xf18b, 0xf230, 0xf2cc, 0xf372 }, + { 0xf324, 0xeb05, 0xe60a, 0xee6b }, + { 0xf68e, 0xf770, 0xec4b, 0xf710 }, + { 0xf148, 0xf26a, 0xf0c7, 0xf1a7 }, + { 0xf1c2, 0xf566, 0xe903, 0xf424 }, + { 0xf434, 0xeaaf, 0xeb2c, 0xed50 }, + { 0xf4ea, 0xf2e2, 0xf281, 0xfb00 }, + { 0xf612, 0xebea, 0xf1a3, 0xf0e0 }, + { 0xf62b, 0xb325, 0xe568, 0x8961 }, + { 0xf634, 0xf634, 0xf4ae, 0xecac }, + { 0xf3ce, 0xf167, 0xea8c, 0xe967 }, + { 0xf486, 0xfe08, 0xf122, 0xf2c2 }, + { 0xf4e4, 0xf4a8, 0xf427, 0xf42c }, + { 0xf5b0, 0xf5d0, 0xc2e5, 0xd3a6 }, + { 0xf718, 0xed11, 0xdb6b, 0xe8c2 }, + { 0xf650, 0xe449, 0xf4c9, 0xe3a6 }, + { 0xf6d7, 0xdcf0, 0xf758, 0xedd3 }, + { 0xf5d2, 0xac08, 0xfdb5, 0xd52e }, + { 0xf73c, 0xf6fd, 0xeebc, 0xe5fc }, + { 0xf000, 0xf3a8, 0xf2c4, 0xfdaa }, + { 0xf695, 0xffbd, 0xf592, 0xff9b }, + { 0xf806, 0xf1cc, 0xf251, 0xf518 }, + { 0xfbd2, 0xf319, 0xfad1, 0xe1d5 }, + { 0xfdb7, 0xf167, 0xf4f3, 0xf084 }, + { 0xfef6, 0xeb26, 0xff18, 0xf368 }, + { 0xfeee, 0xecc9, 0xffb3, 0xf66e }, + { 0xfe65, 0xf501, 0xff07, 0xf5a4 }, + { 0xf840, 0xf800, 0xf804, 0xf26c }, + { 0xff0f, 0xffdb, 0xffda, 0xfffd }, + { 0xff5e, 0xd4b5, 0xf6bb, 0xe28c }, + { 0xff62, 0xff83, 0xffcc, 0xffcf }, + { 0xff8f, 0xffae, 0xffd4, 0xffd4 }, + { 0xffbb, 0xf6b9, 0xe595, 0xd2ef }, + { 0xffd4, 0xf7d4, 0xb68d, 0xa62c }, + { 0xfde2, 0xf583, 0xca80, 0xa9e0 }, + { 0xff2d, 0xffae, 0xfc83, 0xfda5 }, + { 0xff78, 0xff15, 0xf427, 0xf2e5 }, + { 0xff8a, 0xffce, 0xfec6, 0xffad }, + { 0xffde, 0xcdf5, 0xffbd, 0xb4d1 }, + { 0xffc3, 0xffa3, 0xffc7, 0xff63 }, + { 0xffd3, 0xffca, 0xffca, 0xffc5 }, + { 0xffef, 0xfffa, 0xffeb, 0xfff0 }, + { 0xff9b, 0xfd2d, 0xfe94, 0xf304 }, +}; +uint8_t indexes[4096] = { + 188, + 123, + 125, + 125, + 123, + 123, + 192, + 166, + 228, + 188, + 188, + 146, + 239, + 192, + 188, + 244, + 195, + 146, + 146, + 146, + 225, + 228, + 228, + 203, + 228, + 216, + 191, + 191, + 125, + 123, + 96, + 212, + 223, + 191, + 191, + 191, + 213, + 213, + 213, + 94, + 13, + 13, + 13, + 67, + 67, + 129, + 129, + 129, + 239, + 239, + 239, + 146, + 103, + 36, + 2, + 2, + 36, + 103, + 146, + 239, + 239, + 239, + 239, + 239, + 123, + 123, + 125, + 125, + 125, + 123, + 196, + 146, + 188, + 188, + 188, + 239, + 146, + 188, + 214, + 231, + 249, + 192, + 146, + 146, + 214, + 195, + 189, + 213, + 213, + 191, + 191, + 191, + 125, + 125, + 125, + 123, + 123, + 123, + 213, + 216, + 213, + 191, + 191, + 162, + 13, + 13, + 13, + 13, + 13, + 67, + 103, + 146, + 146, + 146, + 146, + 146, + 103, + 80, + 36, + 36, + 36, + 103, + 146, + 239, + 239, + 239, + 239, + 239, + 123, + 123, + 125, + 21, + 21, + 123, + 188, + 188, + 188, + 188, + 239, + 146, + 188, + 123, + 187, + 231, + 220, + 123, + 147, + 146, + 166, + 195, + 189, + 213, + 181, + 191, + 191, + 191, + 44, + 123, + 125, + 123, + 123, + 213, + 231, + 205, + 191, + 191, + 191, + 214, + 94, + 13, + 12, + 12, + 12, + 36, + 80, + 103, + 188, + 188, + 188, + 188, + 188, + 103, + 103, + 80, + 80, + 103, + 146, + 239, + 239, + 239, + 239, + 239, + 188, + 123, + 123, + 21, + 21, + 123, + 188, + 188, + 188, + 146, + 239, + 188, + 123, + 196, + 231, + 195, + 216, + 123, + 196, + 146, + 214, + 181, + 189, + 189, + 228, + 191, + 191, + 96, + 96, + 44, + 21, + 123, + 123, + 190, + 242, + 223, + 191, + 191, + 191, + 213, + 162, + 12, + 12, + 12, + 2, + 80, + 103, + 188, + 188, + 188, + 188, + 188, + 188, + 188, + 188, + 103, + 103, + 103, + 146, + 239, + 239, + 239, + 239, + 239, + 188, + 123, + 123, + 21, + 37, + 188, + 196, + 188, + 146, + 146, + 146, + 188, + 123, + 166, + 231, + 195, + 201, + 123, + 123, + 188, + 214, + 195, + 189, + 213, + 189, + 152, + 191, + 96, + 44, + 44, + 44, + 44, + 123, + 125, + 96, + 191, + 191, + 213, + 213, + 191, + 213, + 65, + 12, + 2, + 80, + 103, + 188, + 188, + 188, + 188, + 192, + 192, + 192, + 192, + 188, + 188, + 188, + 188, + 146, + 146, + 239, + 239, + 239, + 239, + 188, + 123, + 123, + 44, + 188, + 188, + 196, + 188, + 146, + 188, + 188, + 123, + 196, + 244, + 231, + 181, + 181, + 213, + 213, + 203, + 214, + 189, + 189, + 213, + 213, + 152, + 152, + 96, + 44, + 44, + 44, + 78, + 137, + 96, + 96, + 191, + 191, + 213, + 163, + 191, + 214, + 143, + 21, + 2, + 80, + 188, + 188, + 188, + 188, + 188, + 192, + 213, + 213, + 213, + 192, + 188, + 188, + 188, + 188, + 146, + 239, + 239, + 239, + 239, + 146, + 123, + 123, + 71, + 123, + 123, + 196, + 188, + 188, + 196, + 123, + 123, + 214, + 231, + 231, + 181, + 231, + 181, + 213, + 189, + 203, + 189, + 189, + 189, + 181, + 152, + 152, + 44, + 44, + 44, + 44, + 78, + 78, + 152, + 78, + 191, + 191, + 152, + 163, + 213, + 189, + 226, + 21, + 2, + 103, + 188, + 188, + 188, + 188, + 188, + 213, + 213, + 213, + 213, + 213, + 213, + 192, + 192, + 146, + 146, + 239, + 239, + 239, + 239, + 146, + 188, + 123, + 123, + 123, + 123, + 123, + 196, + 188, + 188, + 123, + 196, + 244, + 231, + 181, + 181, + 181, + 181, + 189, + 181, + 222, + 213, + 213, + 213, + 163, + 168, + 152, + 92, + 44, + 44, + 44, + 78, + 78, + 152, + 78, + 78, + 78, + 152, + 213, + 213, + 213, + 213, + 65, + 36, + 103, + 188, + 188, + 188, + 188, + 188, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 147, + 147, + 146, + 239, + 239, + 239, + 239, + 146, + 188, + 123, + 188, + 123, + 123, + 123, + 123, + 188, + 123, + 123, + 214, + 231, + 231, + 181, + 181, + 181, + 231, + 181, + 231, + 222, + 211, + 213, + 163, + 152, + 125, + 125, + 109, + 47, + 44, + 44, + 78, + 78, + 152, + 78, + 78, + 78, + 152, + 152, + 152, + 181, + 213, + 107, + 80, + 103, + 188, + 188, + 188, + 188, + 188, + 188, + 213, + 213, + 228, + 228, + 228, + 228, + 228, + 228, + 166, + 166, + 239, + 239, + 239, + 166, + 188, + 123, + 188, + 123, + 123, + 123, + 123, + 123, + 125, + 123, + 244, + 231, + 181, + 181, + 161, + 181, + 161, + 231, + 161, + 199, + 189, + 181, + 163, + 152, + 44, + 66, + 132, + 172, + 44, + 44, + 78, + 78, + 152, + 44, + 44, + 78, + 152, + 152, + 163, + 181, + 213, + 162, + 103, + 103, + 188, + 188, + 188, + 188, + 188, + 188, + 213, + 213, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 146, + 192, + 147, + 166, + 166, + 188, + 123, + 188, + 123, + 123, + 123, + 123, + 123, + 125, + 196, + 231, + 195, + 181, + 181, + 121, + 181, + 181, + 231, + 161, + 172, + 86, + 181, + 163, + 151, + 131, + 21, + 73, + 69, + 24, + 44, + 26, + 85, + 151, + 24, + 78, + 78, + 78, + 152, + 181, + 181, + 213, + 226, + 80, + 188, + 188, + 188, + 188, + 188, + 188, + 188, + 188, + 213, + 213, + 228, + 228, + 228, + 228, + 223, + 191, + 191, + 213, + 228, + 244, + 146, + 224, + 123, + 123, + 123, + 123, + 123, + 123, + 123, + 125, + 136, + 244, + 189, + 181, + 181, + 181, + 161, + 181, + 161, + 231, + 175, + 50, + 190, + 181, + 181, + 151, + 92, + 24, + 21, + 26, + 24, + 26, + 119, + 119, + 26, + 78, + 92, + 78, + 152, + 163, + 231, + 181, + 226, + 95, + 188, + 188, + 188, + 188, + 188, + 188, + 188, + 188, + 188, + 213, + 213, + 223, + 191, + 191, + 191, + 213, + 213, + 189, + 189, + 189, + 146, + 166, + 188, + 188, + 123, + 123, + 123, + 123, + 123, + 125, + 214, + 244, + 189, + 189, + 181, + 181, + 121, + 181, + 161, + 231, + 175, + 44, + 139, + 231, + 231, + 181, + 85, + 92, + 44, + 26, + 72, + 24, + 32, + 78, + 24, + 41, + 172, + 78, + 152, + 163, + 175, + 180, + 228, + 192, + 188, + 188, + 188, + 188, + 188, + 188, + 188, + 188, + 188, + 188, + 191, + 191, + 152, + 191, + 191, + 177, + 213, + 163, + 213, + 163, + 192, + 166, + 188, + 123, + 123, + 123, + 123, + 123, + 125, + 125, + 166, + 195, + 189, + 189, + 181, + 181, + 181, + 181, + 181, + 231, + 175, + 44, + 50, + 190, + 231, + 181, + 151, + 119, + 44, + 85, + 72, + 21, + 21, + 44, + 33, + 116, + 172, + 78, + 152, + 177, + 123, + 123, + 125, + 106, + 188, + 188, + 188, + 188, + 188, + 188, + 188, + 208, + 159, + 78, + 152, + 152, + 120, + 191, + 123, + 173, + 158, + 163, + 181, + 231, + 106, + 166, + 188, + 123, + 123, + 123, + 123, + 125, + 125, + 37, + 244, + 195, + 189, + 81, + 189, + 181, + 121, + 181, + 181, + 161, + 175, + 24, + 21, + 139, + 231, + 231, + 151, + 119, + 32, + 32, + 21, + 21, + 42, + 61, + 175, + 231, + 172, + 78, + 191, + 123, + 123, + 123, + 125, + 147, + 146, + 188, + 188, + 188, + 188, + 208, + 159, + 78, + 152, + 85, + 163, + 152, + 120, + 114, + 173, + 66, + 88, + 121, + 231, + 231, + 191, + 186, + 148, + 123, + 123, + 123, + 123, + 125, + 21, + 51, + 231, + 222, + 189, + 81, + 151, + 151, + 81, + 181, + 181, + 161, + 231, + 72, + 21, + 50, + 195, + 231, + 172, + 21, + 21, + 21, + 42, + 61, + 175, + 184, + 69, + 231, + 169, + 96, + 123, + 188, + 123, + 125, + 51, + 146, + 146, + 166, + 203, + 235, + 152, + 152, + 85, + 85, + 151, + 151, + 85, + 85, + 85, + 88, + 47, + 79, + 151, + 121, + 151, + 119, + 123, + 214, + 84, + 123, + 123, + 123, + 123, + 125, + 44, + 135, + 231, + 222, + 189, + 81, + 81, + 81, + 92, + 81, + 121, + 161, + 231, + 110, + 44, + 44, + 190, + 190, + 172, + 44, + 42, + 61, + 175, + 133, + 44, + 22, + 26, + 231, + 122, + 216, + 188, + 188, + 240, + 171, + 166, + 202, + 233, + 231, + 151, + 85, + 85, + 163, + 151, + 85, + 85, + 85, + 85, + 85, + 151, + 161, + 151, + 88, + 85, + 119, + 78, + 44, + 123, + 192, + 98, + 188, + 123, + 123, + 123, + 125, + 37, + 243, + 231, + 222, + 189, + 181, + 81, + 78, + 78, + 78, + 81, + 121, + 231, + 172, + 44, + 125, + 139, + 189, + 181, + 87, + 231, + 178, + 69, + 63, + 151, + 24, + 41, + 231, + 106, + 147, + 188, + 240, + 187, + 222, + 244, + 231, + 231, + 175, + 85, + 119, + 119, + 119, + 119, + 85, + 85, + 85, + 85, + 85, + 85, + 85, + 85, + 85, + 54, + 44, + 56, + 71, + 213, + 188, + 129, + 188, + 123, + 123, + 123, + 125, + 77, + 243, + 231, + 149, + 189, + 181, + 189, + 81, + 78, + 44, + 81, + 81, + 175, + 69, + 44, + 125, + 74, + 222, + 181, + 140, + 231, + 181, + 110, + 151, + 102, + 44, + 83, + 195, + 147, + 192, + 123, + 187, + 231, + 231, + 231, + 231, + 151, + 85, + 32, + 44, + 21, + 44, + 33, + 26, + 85, + 85, + 24, + 21, + 32, + 54, + 54, + 24, + 24, + 35, + 97, + 123, + 189, + 213, + 166, + 185, + 217, + 188, + 123, + 123, + 206, + 243, + 244, + 104, + 127, + 189, + 181, + 92, + 78, + 44, + 79, + 81, + 121, + 81, + 157, + 125, + 196, + 228, + 190, + 201, + 231, + 231, + 194, + 122, + 71, + 87, + 231, + 222, + 166, + 192, + 214, + 195, + 231, + 231, + 231, + 151, + 151, + 75, + 32, + 114, + 21, + 41, + 184, + 85, + 85, + 85, + 32, + 21, + 16, + 88, + 24, + 24, + 44, + 86, + 181, + 123, + 115, + 147, + 244, + 250, + 250, + 250, + 217, + 196, + 252, + 244, + 244, + 58, + 25, + 126, + 189, + 156, + 120, + 44, + 32, + 78, + 81, + 92, + 44, + 44, + 123, + 192, + 190, + 189, + 190, + 195, + 194, + 120, + 123, + 130, + 231, + 244, + 166, + 228, + 189, + 190, + 231, + 231, + 175, + 151, + 151, + 151, + 24, + 21, + 21, + 9, + 24, + 54, + 54, + 54, + 24, + 21, + 32, + 69, + 24, + 44, + 44, + 71, + 223, + 214, + 214, + 166, + 250, + 250, + 244, + 244, + 250, + 206, + 252, + 244, + 244, + 58, + 1, + 49, + 126, + 152, + 120, + 44, + 21, + 21, + 125, + 79, + 122, + 125, + 123, + 192, + 190, + 181, + 187, + 181, + 205, + 125, + 123, + 187, + 244, + 244, + 222, + 214, + 218, + 231, + 231, + 175, + 85, + 85, + 85, + 85, + 54, + 24, + 26, + 39, + 24, + 32, + 32, + 24, + 24, + 24, + 24, + 24, + 44, + 44, + 96, + 124, + 147, + 146, + 206, + 231, + 253, + 252, + 252, + 250, + 250, + 250, + 252, + 244, + 246, + 29, + 29, + 1, + 49, + 126, + 120, + 125, + 44, + 44, + 125, + 71, + 156, + 125, + 123, + 196, + 166, + 195, + 244, + 231, + 226, + 123, + 196, + 231, + 244, + 231, + 228, + 223, + 187, + 231, + 175, + 85, + 85, + 119, + 54, + 24, + 24, + 26, + 151, + 93, + 32, + 21, + 21, + 26, + 24, + 32, + 32, + 21, + 44, + 87, + 147, + 228, + 197, + 123, + 243, + 231, + 250, + 250, + 239, + 146, + 239, + 252, + 250, + 244, + 246, + 29, + 29, + 29, + 1, + 49, + 101, + 125, + 125, + 21, + 125, + 123, + 216, + 123, + 123, + 196, + 166, + 231, + 231, + 231, + 222, + 146, + 214, + 231, + 231, + 195, + 188, + 214, + 231, + 194, + 119, + 81, + 231, + 24, + 24, + 6, + 81, + 157, + 32, + 21, + 21, + 21, + 21, + 9, + 21, + 6, + 7, + 43, + 147, + 228, + 197, + 123, + 123, + 123, + 241, + 231, + 250, + 250, + 239, + 146, + 188, + 146, + 250, + 244, + 170, + 29, + 29, + 29, + 29, + 1, + 98, + 107, + 125, + 125, + 71, + 123, + 166, + 123, + 123, + 196, + 228, + 231, + 231, + 231, + 166, + 166, + 244, + 231, + 231, + 222, + 153, + 231, + 245, + 173, + 90, + 116, + 231, + 32, + 21, + 21, + 64, + 24, + 21, + 21, + 21, + 21, + 21, + 6, + 43, + 166, + 166, + 166, + 221, + 125, + 125, + 125, + 125, + 123, + 255, + 239, + 252, + 244, + 250, + 239, + 188, + 146, + 250, + 244, + 170, + 29, + 29, + 29, + 29, + 29, + 1, + 98, + 100, + 125, + 123, + 188, + 166, + 188, + 123, + 196, + 231, + 231, + 231, + 231, + 252, + 250, + 231, + 231, + 231, + 226, + 187, + 231, + 176, + 87, + 231, + 251, + 157, + 44, + 44, + 21, + 0, + 31, + 21, + 21, + 4, + 27, + 95, + 147, + 166, + 244, + 228, + 176, + 125, + 125, + 125, + 125, + 125, + 125, + 206, + 252, + 250, + 250, + 250, + 239, + 146, + 166, + 228, + 238, + 193, + 46, + 46, + 14, + 10, + 10, + 10, + 25, + 155, + 105, + 123, + 146, + 250, + 224, + 123, + 196, + 231, + 231, + 244, + 244, + 243, + 244, + 231, + 231, + 231, + 160, + 231, + 227, + 123, + 187, + 178, + 59, + 21, + 21, + 21, + 21, + 9, + 60, + 27, + 95, + 188, + 166, + 166, + 244, + 228, + 197, + 123, + 125, + 125, + 125, + 125, + 125, + 125, + 125, + 252, + 252, + 239, + 146, + 192, + 146, + 202, + 203, + 203, + 202, + 203, + 228, + 189, + 229, + 195, + 113, + 46, + 45, + 55, + 162, + 123, + 192, + 250, + 248, + 188, + 196, + 231, + 195, + 250, + 244, + 244, + 244, + 231, + 231, + 231, + 231, + 195, + 123, + 187, + 195, + 123, + 125, + 21, + 21, + 21, + 4, + 27, + 95, + 146, + 166, + 244, + 244, + 228, + 197, + 123, + 125, + 125, + 125, + 125, + 125, + 125, + 125, + 125, + 125, + 166, + 222, + 225, + 214, + 181, + 189, + 189, + 181, + 181, + 231, + 181, + 181, + 181, + 181, + 223, + 189, + 229, + 195, + 70, + 98, + 105, + 196, + 250, + 250, + 146, + 188, + 244, + 253, + 244, + 244, + 250, + 244, + 231, + 195, + 231, + 231, + 220, + 214, + 231, + 228, + 188, + 123, + 125, + 4, + 95, + 188, + 146, + 166, + 244, + 244, + 228, + 225, + 200, + 200, + 200, + 200, + 100, + 100, + 68, + 125, + 125, + 125, + 125, + 125, + 231, + 231, + 228, + 189, + 189, + 213, + 213, + 189, + 189, + 181, + 181, + 231, + 181, + 181, + 123, + 216, + 213, + 223, + 228, + 166, + 162, + 196, + 146, + 250, + 146, + 188, + 244, + 252, + 244, + 253, + 250, + 244, + 231, + 244, + 231, + 222, + 166, + 231, + 222, + 188, + 188, + 123, + 95, + 147, + 166, + 166, + 228, + 228, + 192, + 188, + 188, + 191, + 223, + 223, + 223, + 228, + 228, + 228, + 228, + 203, + 108, + 100, + 68, + 125, + 228, + 228, + 213, + 213, + 189, + 189, + 189, + 189, + 189, + 189, + 181, + 231, + 231, + 181, + 118, + 156, + 189, + 216, + 212, + 192, + 166, + 188, + 146, + 239, + 146, + 146, + 250, + 239, + 244, + 253, + 243, + 254, + 231, + 231, + 244, + 166, + 231, + 222, + 188, + 188, + 188, + 147, + 166, + 166, + 228, + 192, + 188, + 188, + 123, + 123, + 123, + 123, + 191, + 191, + 123, + 191, + 191, + 191, + 191, + 191, + 223, + 223, + 223, + 162, + 213, + 213, + 213, + 181, + 189, + 189, + 189, + 189, + 189, + 151, + 151, + 151, + 151, + 151, + 181, + 132, + 181, + 156, + 123, + 123, + 192, + 166, + 146, + 146, + 146, + 188, + 166, + 239, + 244, + 252, + 252, + 253, + 244, + 231, + 222, + 231, + 222, + 219, + 188, + 188, + 188, + 147, + 166, + 192, + 188, + 123, + 123, + 123, + 123, + 123, + 123, + 173, + 173, + 173, + 173, + 173, + 125, + 191, + 123, + 191, + 191, + 191, + 191, + 188, + 213, + 189, + 189, + 181, + 181, + 181, + 189, + 181, + 189, + 156, + 66, + 81, + 81, + 156, + 151, + 151, + 223, + 216, + 123, + 188, + 188, + 192, + 166, + 188, + 146, + 188, + 146, + 239, + 250, + 252, + 252, + 243, + 231, + 244, + 244, + 244, + 219, + 188, + 188, + 147, + 147, + 188, + 188, + 123, + 123, + 123, + 123, + 123, + 123, + 125, + 114, + 44, + 96, + 96, + 44, + 44, + 44, + 123, + 123, + 123, + 213, + 123, + 191, + 191, + 213, + 231, + 231, + 181, + 181, + 189, + 189, + 189, + 156, + 156, + 173, + 78, + 92, + 79, + 78, + 114, + 123, + 123, + 216, + 188, + 192, + 147, + 166, + 146, + 192, + 188, + 188, + 239, + 252, + 252, + 252, + 244, + 244, + 250, + 250, + 219, + 188, + 147, + 203, + 192, + 188, + 123, + 188, + 125, + 123, + 123, + 123, + 125, + 216, + 44, + 21, + 21, + 21, + 21, + 44, + 44, + 44, + 114, + 216, + 87, + 181, + 96, + 191, + 191, + 181, + 231, + 231, + 231, + 231, + 181, + 151, + 180, + 78, + 78, + 44, + 44, + 44, + 32, + 21, + 38, + 92, + 114, + 138, + 192, + 146, + 252, + 252, + 166, + 188, + 188, + 188, + 239, + 252, + 252, + 252, + 244, + 250, + 252, + 219, + 146, + 166, + 228, + 188, + 123, + 123, + 196, + 224, + 188, + 188, + 125, + 125, + 125, + 114, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 44, + 44, + 114, + 79, + 157, + 173, + 173, + 173, + 181, + 231, + 231, + 231, + 181, + 189, + 152, + 78, + 44, + 78, + 44, + 21, + 21, + 21, + 21, + 21, + 32, + 32, + 123, + 123, + 192, + 250, + 252, + 252, + 188, + 188, + 188, + 239, + 252, + 252, + 252, + 250, + 252, + 146, + 146, + 166, + 166, + 146, + 188, + 146, + 217, + 188, + 188, + 125, + 125, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 44, + 44, + 44, + 44, + 44, + 44, + 96, + 191, + 231, + 231, + 231, + 231, + 181, + 189, + 152, + 92, + 24, + 44, + 44, + 21, + 21, + 21, + 21, + 21, + 0, + 47, + 44, + 123, + 196, + 166, + 239, + 250, + 224, + 123, + 188, + 239, + 252, + 252, + 250, + 252, + 146, + 146, + 239, + 239, + 239, + 239, + 239, + 250, + 166, + 224, + 123, + 125, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 44, + 44, + 44, + 44, + 44, + 44, + 44, + 96, + 191, + 189, + 181, + 231, + 231, + 231, + 181, + 181, + 181, + 92, + 120, + 125, + 125, + 21, + 21, + 21, + 21, + 23, + 62, + 21, + 125, + 123, + 197, + 214, + 250, + 215, + 188, + 188, + 239, + 252, + 252, + 239, + 146, + 146, + 146, + 146, + 146, + 146, + 146, + 146, + 146, + 146, + 146, + 188, + 123, + 44, + 21, + 21, + 21, + 21, + 21, + 24, + 26, + 75, + 47, + 21, + 21, + 21, + 21, + 21, + 44, + 44, + 44, + 44, + 173, + 189, + 189, + 181, + 181, + 231, + 231, + 231, + 181, + 152, + 92, + 47, + 44, + 44, + 44, + 21, + 21, + 21, + 21, + 21, + 21, + 125, + 71, + 192, + 166, + 250, + 166, + 188, + 188, + 239, + 146, + 147, + 166, + 166, + 166, + 166, + 146, + 146, + 166, + 166, + 146, + 146, + 188, + 208, + 125, + 21, + 21, + 21, + 21, + 22, + 72, + 32, + 9, + 40, + 54, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 66, + 47, + 152, + 181, + 231, + 231, + 231, + 231, + 181, + 181, + 181, + 181, + 151, + 92, + 44, + 44, + 125, + 44, + 44, + 44, + 44, + 125, + 125, + 125, + 144, + 228, + 192, + 188, + 188, + 146, + 192, + 192, + 192, + 146, + 146, + 146, + 166, + 146, + 192, + 225, + 192, + 192, + 188, + 145, + 191, + 92, + 24, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 9, + 24, + 21, + 21, + 21, + 21, + 44, + 44, + 78, + 21, + 78, + 179, + 151, + 189, + 189, + 181, + 231, + 231, + 231, + 231, + 151, + 151, + 152, + 96, + 173, + 96, + 125, + 125, + 125, + 125, + 125, + 125, + 125, + 96, + 216, + 123, + 123, + 123, + 147, + 203, + 200, + 123, + 123, + 188, + 188, + 214, + 202, + 226, + 166, + 224, + 217, + 188, + 197, + 123, + 142, + 44, + 44, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 26, + 31, + 47, + 21, + 21, + 21, + 21, + 21, + 21, + 32, + 124, + 213, + 163, + 181, + 181, + 231, + 231, + 181, + 181, + 123, + 191, + 152, + 152, + 96, + 96, + 125, + 71, + 125, + 125, + 125, + 125, + 125, + 87, + 150, + 123, + 123, + 216, + 147, + 210, + 222, + 224, + 188, + 188, + 188, + 192, + 237, + 222, + 250, + 248, + 250, + 215, + 200, + 123, + 179, + 123, + 142, + 44, + 21, + 44, + 44, + 21, + 21, + 44, + 26, + 61, + 116, + 178, + 44, + 21, + 21, + 21, + 44, + 66, + 81, + 191, + 191, + 213, + 189, + 189, + 189, + 189, + 189, + 189, + 213, + 213, + 213, + 177, + 191, + 191, + 123, + 123, + 125, + 125, + 125, + 123, + 123, + 89, + 123, + 123, + 123, + 223, + 192, + 188, + 239, + 228, + 146, + 146, + 216, + 174, + 125, + 125, + 164, + 228, + 166, + 231, + 233, + 201, + 200, + 96, + 81, + 78, + 44, + 66, + 78, + 21, + 21, + 9, + 73, + 128, + 141, + 69, + 44, + 44, + 44, + 125, + 81, + 125, + 125, + 191, + 191, + 223, + 223, + 213, + 181, + 189, + 213, + 213, + 213, + 213, + 213, + 191, + 213, + 213, + 213, + 191, + 123, + 123, + 125, + 123, + 123, + 123, + 123, + 123, + 123, + 216, + 188, + 188, + 197, + 197, + 188, + 188, + 179, + 78, + 21, + 21, + 21, + 21, + 138, + 244, + 231, + 195, + 222, + 213, + 191, + 96, + 96, + 44, + 44, + 44, + 44, + 44, + 44, + 47, + 44, + 44, + 44, + 44, + 44, + 21, + 123, + 125, + 125, + 188, + 147, + 166, + 228, + 223, + 189, + 189, + 181, + 181, + 181, + 181, + 189, + 189, + 213, + 213, + 213, + 191, + 191, + 191, + 123, + 123, + 123, + 123, + 123, + 123, + 123, + 188, + 188, + 188, + 21, + 21, + 78, + 44, + 21, + 9, + 21, + 21, + 21, + 21, + 21, + 138, + 231, + 244, + 244, + 166, + 213, + 191, + 191, + 96, + 96, + 96, + 96, + 96, + 191, + 191, + 96, + 191, + 191, + 191, + 191, + 96, + 191, + 125, + 123, + 239, + 166, + 166, + 146, + 188, + 200, + 190, + 231, + 195, + 181, + 181, + 181, + 181, + 189, + 181, + 181, + 213, + 213, + 123, + 123, + 123, + 123, + 123, + 123, + 123, + 123, + 196, + 203, + 188, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 32, + 138, + 238, + 250, + 244, + 231, + 201, + 213, + 191, + 191, + 191, + 191, + 191, + 191, + 191, + 191, + 191, + 191, + 191, + 191, + 191, + 123, + 123, + 212, + 204, + 204, + 239, + 146, + 214, + 228, + 214, + 195, + 228, + 189, + 181, + 181, + 181, + 181, + 181, + 189, + 189, + 189, + 216, + 240, + 201, + 123, + 123, + 216, + 188, + 188, + 216, + 192, + 146, + 107, + 21, + 21, + 44, + 21, + 21, + 21, + 44, + 21, + 21, + 21, + 21, + 44, + 111, + 166, + 244, + 231, + 195, + 202, + 201, + 191, + 191, + 191, + 191, + 191, + 191, + 123, + 123, + 234, + 216, + 191, + 191, + 191, + 191, + 191, + 29, + 13, + 13, + 76, + 165, + 230, + 181, + 181, + 228, + 228, + 228, + 228, + 213, + 228, + 228, + 213, + 213, + 213, + 213, + 216, + 223, + 232, + 166, + 228, + 197, + 191, + 213, + 188, + 146, + 162, + 21, + 21, + 9, + 24, + 21, + 21, + 21, + 24, + 47, + 21, + 21, + 44, + 44, + 111, + 244, + 231, + 231, + 231, + 222, + 188, + 216, + 216, + 216, + 216, + 191, + 212, + 123, + 179, + 191, + 191, + 123, + 216, + 191, + 191, + 29, + 13, + 13, + 12, + 12, + 12, + 76, + 165, + 207, + 229, + 231, + 231, + 233, + 233, + 233, + 233, + 231, + 233, + 231, + 195, + 228, + 221, + 167, + 125, + 123, + 191, + 191, + 188, + 188, + 146, + 65, + 21, + 9, + 52, + 34, + 21, + 21, + 21, + 40, + 54, + 21, + 21, + 44, + 96, + 239, + 244, + 231, + 222, + 188, + 147, + 166, + 222, + 188, + 188, + 217, + 188, + 123, + 188, + 147, + 188, + 188, + 147, + 188, + 123, + 29, + 8, + 48, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 76, + 117, + 165, + 165, + 207, + 237, + 236, + 236, + 197, + 134, + 125, + 125, + 21, + 21, + 125, + 125, + 173, + 106, + 188, + 146, + 162, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 11, + 75, + 44, + 44, + 125, + 192, + 231, + 244, + 219, + 146, + 166, + 228, + 166, + 166, + 146, + 166, + 192, + 123, + 188, + 197, + 188, + 188, + 192, + 192, + 188, + 3, + 12, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 71, + 123, + 123, + 123, + 71, + 123, + 125, + 125, + 125, + 125, + 21, + 21, + 125, + 125, + 188, + 146, + 166, + 107, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 44, + 44, + 44, + 125, + 123, + 238, + 228, + 146, + 166, + 166, + 146, + 250, + 166, + 146, + 192, + 123, + 123, + 21, + 21, + 21, + 21, + 21, + 82, + 82, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 71, + 188, + 123, + 123, + 123, + 125, + 125, + 125, + 125, + 125, + 125, + 21, + 21, + 21, + 21, + 123, + 188, + 250, + 162, + 125, + 125, + 125, + 21, + 44, + 21, + 125, + 125, + 44, + 125, + 125, + 125, + 191, + 192, + 146, + 166, + 166, + 239, + 146, + 166, + 166, + 166, + 192, + 123, + 125, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 37, + 188, + 188, + 123, + 123, + 125, + 125, + 125, + 125, + 125, + 21, + 21, + 21, + 21, + 21, + 21, + 19, + 188, + 146, + 166, + 125, + 125, + 44, + 21, + 21, + 44, + 44, + 44, + 44, + 96, + 125, + 125, + 123, + 123, + 146, + 239, + 146, + 146, + 146, + 146, + 146, + 188, + 188, + 123, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 28, + 17, + 17, + 17, + 17, + 2, + 2, + 17, + 17, + 15, + 15, + 20, + 188, + 188, + 123, + 123, + 125, + 123, + 123, + 125, + 125, + 125, + 44, + 21, + 21, + 21, + 21, + 21, + 21, + 123, + 146, + 166, + 182, + 120, + 44, + 44, + 21, + 22, + 88, + 44, + 44, + 96, + 183, + 96, + 123, + 123, + 188, + 146, + 146, + 146, + 192, + 188, + 188, + 188, + 123, + 44, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 29, + 29, + 29, + 13, + 13, + 13, + 2, + 13, + 29, + 29, + 18, + 112, + 188, + 188, + 123, + 123, + 123, + 123, + 123, + 125, + 125, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 19, + 188, + 250, + 224, + 125, + 125, + 44, + 44, + 44, + 78, + 44, + 96, + 96, + 223, + 191, + 191, + 123, + 196, + 146, + 146, + 188, + 188, + 188, + 188, + 188, + 123, + 71, + 123, + 44, + 21, + 21, + 21, + 21, + 21, + 21, + 29, + 29, + 13, + 13, + 13, + 13, + 13, + 13, + 29, + 29, + 53, + 166, + 192, + 188, + 123, + 123, + 123, + 123, + 123, + 125, + 125, + 21, + 21, + 44, + 44, + 21, + 21, + 44, + 21, + 21, + 123, + 146, + 166, + 123, + 123, + 99, + 44, + 44, + 44, + 44, + 96, + 96, + 123, + 191, + 123, + 191, + 196, + 188, + 188, + 123, + 123, + 123, + 123, + 123, + 188, + 188, + 123, + 125, + 125, + 44, + 125, + 44, + 21, + 21, + 29, + 13, + 13, + 13, + 13, + 13, + 13, + 13, + 29, + 30, + 166, + 192, + 188, + 216, + 147, + 188, + 123, + 123, + 125, + 44, + 44, + 42, + 81, + 157, + 92, + 57, + 81, + 78, + 120, + 44, + 50, + 188, + 166, + 188, + 212, + 180, + 78, + 44, + 96, + 96, + 96, + 96, + 123, + 240, + 201, + 123, + 196, + 188, + 103, + 103, + 123, + 123, + 123, + 123, + 196, + 192, + 188, + 188, + 123, + 125, + 125, + 125, + 125, + 125, + 13, + 13, + 29, + 29, + 13, + 13, + 13, + 13, + 13, + 53, + 166, + 188, + 147, + 166, + 188, + 123, + 123, + 123, + 125, + 66, + 81, + 180, + 78, + 81, + 189, + 189, + 156, + 173, + 114, + 44, + 44, + 188, + 146, + 224, + 123, + 96, + 96, + 96, + 191, + 96, + 191, + 191, + 191, + 212, + 236, + 123, + 196, + 188, + 197, + 125, + 125, + 123, + 123, + 123, + 123, + 188, + 192, + 224, + 188, + 123, + 123, + 123, + 123, + 123, + 13, + 29, + 29, + 29, + 13, + 13, + 12, + 12, + 5, + 166, + 146, + 188, + 146, + 188, + 123, + 123, + 125, + 125, + 66, + 191, + 78, + 66, + 81, + 151, + 151, + 156, + 173, + 125, + 125, + 44, + 125, + 123, + 146, + 166, + 123, + 123, + 96, + 191, + 191, + 191, + 191, + 191, + 216, + 191, + 191, + 123, + 188, + 188, + 125, + 125, + 125, + 21, + 21, + 123, + 188, + 188, + 213, + 213, + 213, + 224, + 188, + 188, + 123, + 123, + 29, + 29, + 29, + 13, + 13, + 12, + 21, + 21, + 51, + 239, + 146, + 146, + 188, + 123, + 123, + 123, + 125, + 71, + 125, + 125, + 96, + 191, + 191, + 191, + 191, + 125, + 125, + 125, + 125, + 96, + 125, + 71, + 188, + 239, + 188, + 123, + 191, + 191, + 191, + 191, + 191, + 191, + 191, + 191, + 123, + 123, + 188, + 209, + 21, + 21, + 125, + 21, + 21, + 21, + 21, + 188, + 213, + 213, + 213, + 213, + 228, + 228, + 203, + 200, + 29, + 29, + 13, + 13, + 13, + 12, + 21, + 2, + 146, + 188, + 146, + 188, + 123, + 123, + 125, + 125, + 123, + 125, + 44, + 71, + 123, + 123, + 123, + 188, + 125, + 71, + 125, + 123, + 81, + 216, + 216, + 123, + 188, + 146, + 146, + 188, + 123, + 191, + 191, + 191, + 191, + 191, + 191, + 123, + 188, + 146, + 239, + 154, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 50, + 188, + 213, + 213, + 213, + 213, + 228, + 228, + 228, + 29, + 29, + 29, + 13, + 13, + 12, + 21, + 51, + 239, + 146, + 188, + 188, + 123, + 123, + 125, + 125, + 125, + 44, + 123, + 123, + 123, + 123, + 123, + 125, + 125, + 123, + 216, + 213, + 213, + 213, + 189, + 213, + 213, + 146, + 239, + 146, + 123, + 216, + 191, + 191, + 191, + 191, + 216, + 188, + 188, + 239, + 146, + 91, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 125, + 123, + 188, + 213, + 213, + 213, + 213, + 228, + 228, + 29, + 29, + 29, + 13, + 13, + 12, + 2, + 146, + 239, + 146, + 188, + 123, + 123, + 123, + 123, + 125, + 71, + 123, + 123, + 123, + 123, + 123, + 71, + 123, + 216, + 213, + 189, + 213, + 213, + 189, + 213, + 213, + 213, + 147, + 239, + 206, + 146, + 188, + 216, + 123, + 191, + 123, + 196, + 188, + 188, + 239, + 247, + 21, + 21, + 21, + 21, + 21, + 21, + 125, + 125, + 125, + 125, + 188, + 213, + 213, + 213, + 213, + 228, + 228, + 29, + 29, + 13, + 13, + 13, + 13, + 5, + 239, + 239, + 192, + 188, + 123, + 125, + 123, + 125, + 71, + 123, + 123, + 123, + 123, + 123, + 123, + 123, + 216, + 214, + 228, + 228, + 213, + 213, + 189, + 213, + 213, + 203, + 192, + 146, + 252, + 206, + 188, + 216, + 213, + 191, + 123, + 188, + 188, + 188, + 250, + 198, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 125, + 125, + 125, + 123, + 213, + 213, + 213, + 213, + 228, + 228, +}; diff --git a/wolf2.data b/wolf2.data new file mode 100644 index 0000000..30c2494 Binary files /dev/null and b/wolf2.data differ diff --git a/wolf2.data.pal b/wolf2.data.pal new file mode 100644 index 0000000..385ea5d Binary files /dev/null and b/wolf2.data.pal differ diff --git a/wolf2.hpp b/wolf2.hpp new file mode 100644 index 0000000..c462d95 --- /dev/null +++ b/wolf2.hpp @@ -0,0 +1,9 @@ +#include + +extern uint32_t _binary_wolf2_data_start __asm("_binary_wolf2_data_start"); +extern uint32_t _binary_wolf2_data_end __asm("_binary_wolf2_data_end"); +extern uint32_t _binary_wolf2_data_size __asm("_binary_wolf2_data_size"); + +extern uint32_t _binary_wolf2_data_pal_start __asm("_binary_wolf2_data_pal_start"); +extern uint32_t _binary_wolf2_data_pal_end __asm("_binary_wolf2_data_pal_end"); +extern uint32_t _binary_wolf2_data_pal_size __asm("_binary_wolf2_data_pal_size"); diff --git a/wolf2.png b/wolf2.png new file mode 100644 index 0000000..75e7fea Binary files /dev/null and b/wolf2.png differ