Compare commits

...

4 Commits

Author SHA1 Message Date
a0d516803b example: remove frame_ix double semicolon 2024-05-19 08:42:07 -05:00
39e97a3f1b font_outline*: fix examples
Fix frame_ix increment.

Remove unncessary differences between the two examples.
2024-05-19 08:40:44 -05:00
0510598233 generic_sparse_struct: constexpr constructors
ta_polygon_converter_transfer: const buf
2024-05-19 08:23:13 -05:00
b874ec56b5 common: remove subalign from data/rodata
SUBALIGN in the linker script overrides __attribute__((aligned(...)))
2024-05-19 08:22:05 -05:00
28 changed files with 419 additions and 423 deletions

View File

@ -16,13 +16,13 @@ SECTIONS
*(.text) *(.text)
} > p1ram } > p1ram
.data ALIGN(4) : SUBALIGN(4) .data ALIGN(4) :
{ {
*(.data) *(.data)
*(.data.*) *(.data.*)
} > p1ram } > p1ram
.rodata ALIGN(4) : SUBALIGN(4) .rodata ALIGN(4) :
{ {
*(.rodata) *(.rodata)
*(.rodata.*) *(.rodata.*)

View File

@ -312,7 +312,7 @@ void main()
core_flip(frame_ix); core_flip(frame_ix);
while (spg_status::vsync(holly.SPG_STATUS)); while (spg_status::vsync(holly.SPG_STATUS));
frame_ix = (frame_ix + 1) & 1;; frame_ix = (frame_ix + 1) & 1;
theta += (2.f * pi) / 720.f; theta += (2.f * pi) / 720.f;
} }
} }

View File

@ -288,6 +288,6 @@ void main()
core_flip(frame_ix); core_flip(frame_ix);
while (spg_status::vsync(holly.SPG_STATUS)); while (spg_status::vsync(holly.SPG_STATUS));
frame_ix = (frame_ix + 1) & 1;; frame_ix = (frame_ix + 1) & 1;
} }
} }

View File

@ -329,6 +329,6 @@ void main()
core_flip(frame_ix); core_flip(frame_ix);
while (spg_status::vsync(holly.SPG_STATUS)); while (spg_status::vsync(holly.SPG_STATUS));
frame_ix = (frame_ix + 1) & 1;; frame_ix = (frame_ix + 1) & 1;
} }
} }

View File

@ -206,6 +206,6 @@ void main()
while (spg_status::vsync(holly.SPG_STATUS)); while (spg_status::vsync(holly.SPG_STATUS));
theta += half_degree; theta += half_degree;
frame_ix = (frame_ix + 1) & 1;; frame_ix = (frame_ix + 1) & 1;
} }
} }

View File

@ -229,7 +229,7 @@ void main()
core_flip(frame_ix); core_flip(frame_ix);
while (spg_status::vsync(holly.SPG_STATUS)); while (spg_status::vsync(holly.SPG_STATUS));
frame_ix = (frame_ix + 1) & 1;; frame_ix = (frame_ix + 1) & 1;
if (frame_ix == 10 && dumped == false) { if (frame_ix == 10 && dumped == false) {
dump(); dump();

View File

@ -40,11 +40,11 @@ const struct vertex strip_vertices[4] = {
constexpr uint32_t strip_length = (sizeof (strip_vertices)) / (sizeof (struct vertex)); constexpr uint32_t strip_length = (sizeof (strip_vertices)) / (sizeof (struct vertex));
uint32_t transform(ta_parameter_writer& parameter, uint32_t transform(ta_parameter_writer& parameter,
const uint32_t texture_width, uint32_t texture_height, const uint32_t texture_width, uint32_t texture_height,
const uint32_t first_char_code, const uint32_t first_char_code,
const glyph * glyphs, const glyph * glyphs,
const char * s, const uint32_t len, const char * s, const uint32_t len,
const uint32_t y_offset) const uint32_t y_offset)
{ {
uint32_t advance = 0; // in 26.6 fixed-point uint32_t advance = 0; // in 26.6 fixed-point
@ -57,33 +57,33 @@ uint32_t transform(ta_parameter_writer& parameter,
} }
const uint32_t parameter_control_word = para_control::para_type::polygon_or_modifier_volume const uint32_t parameter_control_word = para_control::para_type::polygon_or_modifier_volume
| para_control::list_type::translucent | para_control::list_type::translucent
| obj_control::col_type::packed_color | obj_control::col_type::packed_color
| obj_control::texture; | obj_control::texture;
const uint32_t isp_tsp_instruction_word = isp_tsp_instruction_word::depth_compare_mode::greater const uint32_t isp_tsp_instruction_word = isp_tsp_instruction_word::depth_compare_mode::greater
| isp_tsp_instruction_word::culling_mode::no_culling; | isp_tsp_instruction_word::culling_mode::no_culling;
const uint32_t tsp_instruction_word = tsp_instruction_word::src_alpha_instr::src_alpha const uint32_t tsp_instruction_word = tsp_instruction_word::src_alpha_instr::src_alpha
| tsp_instruction_word::dst_alpha_instr::one | tsp_instruction_word::dst_alpha_instr::one
| tsp_instruction_word::fog_control::no_fog | tsp_instruction_word::fog_control::no_fog
| tsp_instruction_word::use_alpha | tsp_instruction_word::use_alpha
| tsp_instruction_word::texture_u_size::from_int(texture_width) | tsp_instruction_word::texture_u_size::from_int(texture_width)
| tsp_instruction_word::texture_v_size::from_int(texture_height); | tsp_instruction_word::texture_v_size::from_int(texture_height);
const uint32_t texture_address = texture_memory_alloc::texture.start; const uint32_t texture_address = texture_memory_alloc::texture.start;
const uint32_t texture_control_word = texture_control_word::pixel_format::_4bpp_palette const uint32_t texture_control_word = texture_control_word::pixel_format::_4bpp_palette
| texture_control_word::scan_order::twiddled | texture_control_word::scan_order::twiddled
| texture_control_word::texture_address(texture_address / 8); | texture_control_word::texture_address(texture_address / 8);
parameter.append<ta_global_parameter::polygon_type_0>() = parameter.append<ta_global_parameter::polygon_type_0>() =
ta_global_parameter::polygon_type_0(parameter_control_word, ta_global_parameter::polygon_type_0(parameter_control_word,
isp_tsp_instruction_word, isp_tsp_instruction_word,
tsp_instruction_word, tsp_instruction_word,
texture_control_word, texture_control_word,
0, // data_size_for_sort_dma 0, // data_size_for_sort_dma
0 // next_address_for_sort_dma 0 // next_address_for_sort_dma
); );
for (uint32_t i = 0; i < strip_length; i++) { for (uint32_t i = 0; i < strip_length; i++) {
float x = strip_vertices[i].x; float x = strip_vertices[i].x;
@ -108,12 +108,12 @@ uint32_t transform(ta_parameter_writer& parameter,
bool end_of_strip = i == strip_length - 1; bool end_of_strip = i == strip_length - 1;
parameter.append<ta_vertex_parameter::polygon_type_3>() = parameter.append<ta_vertex_parameter::polygon_type_3>() =
ta_vertex_parameter::polygon_type_3(polygon_vertex_parameter_control_word(end_of_strip), ta_vertex_parameter::polygon_type_3(polygon_vertex_parameter_control_word(end_of_strip),
x, y, z, x, y, z,
u, v, u, v,
0, // base_color 0, // base_color
0 // offset_color 0 // offset_color
); );
} }
advance += glyph.metrics.horiAdvance; advance += glyph.metrics.horiAdvance;
@ -123,35 +123,35 @@ uint32_t transform(ta_parameter_writer& parameter,
} }
uint32_t transform2(ta_parameter_writer& parameter, uint32_t transform2(ta_parameter_writer& parameter,
const uint32_t texture_width, uint32_t texture_height) const uint32_t texture_width, uint32_t texture_height)
{ {
const uint32_t parameter_control_word = para_control::para_type::polygon_or_modifier_volume const uint32_t parameter_control_word = para_control::para_type::polygon_or_modifier_volume
| para_control::list_type::translucent | para_control::list_type::translucent
| obj_control::col_type::packed_color | obj_control::col_type::packed_color
| obj_control::texture; | obj_control::texture;
const uint32_t isp_tsp_instruction_word = isp_tsp_instruction_word::depth_compare_mode::greater const uint32_t isp_tsp_instruction_word = isp_tsp_instruction_word::depth_compare_mode::greater
| isp_tsp_instruction_word::culling_mode::no_culling; | isp_tsp_instruction_word::culling_mode::no_culling;
const uint32_t tsp_instruction_word = tsp_instruction_word::src_alpha_instr::src_alpha const uint32_t tsp_instruction_word = tsp_instruction_word::src_alpha_instr::src_alpha
| tsp_instruction_word::dst_alpha_instr::zero | tsp_instruction_word::dst_alpha_instr::zero
| tsp_instruction_word::fog_control::no_fog | tsp_instruction_word::fog_control::no_fog
| tsp_instruction_word::texture_u_size::from_int(texture_width) | tsp_instruction_word::texture_u_size::from_int(texture_width)
| tsp_instruction_word::texture_v_size::from_int(texture_height); | tsp_instruction_word::texture_v_size::from_int(texture_height);
const uint32_t texture_address = texture_memory_alloc::texture.start; const uint32_t texture_address = texture_memory_alloc::texture.start;
const uint32_t texture_control_word = texture_control_word::pixel_format::_4bpp_palette const uint32_t texture_control_word = texture_control_word::pixel_format::_4bpp_palette
| texture_control_word::scan_order::twiddled | texture_control_word::scan_order::twiddled
| texture_control_word::texture_address(texture_address / 8); | texture_control_word::texture_address(texture_address / 8);
parameter.append<ta_global_parameter::polygon_type_0>() = parameter.append<ta_global_parameter::polygon_type_0>() =
ta_global_parameter::polygon_type_0(parameter_control_word, ta_global_parameter::polygon_type_0(parameter_control_word,
isp_tsp_instruction_word, isp_tsp_instruction_word,
tsp_instruction_word, tsp_instruction_word,
texture_control_word, texture_control_word,
0, // data_size_for_sort_dma 0, // data_size_for_sort_dma
0 // next_address_for_sort_dma 0 // next_address_for_sort_dma
); );
for (uint32_t i = 0; i < strip_length; i++) { for (uint32_t i = 0; i < strip_length; i++) {
float x = strip_vertices[i].x; float x = strip_vertices[i].x;
@ -168,13 +168,13 @@ uint32_t transform2(ta_parameter_writer& parameter,
float v = strip_vertices[i].v; float v = strip_vertices[i].v;
bool end_of_strip = i == strip_length - 1; bool end_of_strip = i == strip_length - 1;
parameter.append<ta_vertex_parameter::polygon_type_3>() = parameter.append<ta_vertex_parameter::polygon_type_3>() =
ta_vertex_parameter::polygon_type_3(polygon_vertex_parameter_control_word(end_of_strip), ta_vertex_parameter::polygon_type_3(polygon_vertex_parameter_control_word(end_of_strip),
x, y, z, x, y, z,
u, v, u, v,
0, // base_color 0, // base_color
0 // offset_color 0 // offset_color
); );
} }
return parameter.offset; return parameter.offset;
@ -190,14 +190,14 @@ void init_texture_memory(const struct opb_size& opb_size)
} }
void inflate_font(const uint32_t * src, void inflate_font(const uint32_t * src,
const uint32_t stride, const uint32_t stride,
const uint32_t curve_end_ix) const uint32_t curve_end_ix)
{ {
auto texture = reinterpret_cast<volatile uint16_t *>(&texture_memory64[texture_memory_alloc::texture.start / 4]); auto texture = reinterpret_cast<volatile uint16_t *>(&texture_memory64[texture_memory_alloc::texture.start / 4]);
twiddle::texture3<4, 8>(texture, reinterpret_cast<const uint8_t *>(src), twiddle::texture3<4, 8>(texture, reinterpret_cast<const uint8_t *>(src),
stride, stride,
curve_end_ix); curve_end_ix);
} }
uint32_t _ta_parameter_buf[((32 * 10 * 17) + 32) / 4]; uint32_t _ta_parameter_buf[((32 * 10 * 17) + 32) / 4];
@ -223,8 +223,8 @@ void main()
*/ */
inflate_font(texture, inflate_font(texture,
font->texture_stride, font->texture_stride,
font->max_z_curve_ix); font->max_z_curve_ix);
palette_data<16>(); palette_data<16>();
// The address of `ta_parameter_buf` must be a multiple of 32 bytes. // The address of `ta_parameter_buf` must be a multiple of 32 bytes.
@ -232,20 +232,20 @@ void main()
uint32_t * ta_parameter_buf = align_32byte(_ta_parameter_buf); uint32_t * ta_parameter_buf = align_32byte(_ta_parameter_buf);
constexpr uint32_t ta_alloc = ta_alloc_ctrl::pt_opb::no_list constexpr uint32_t ta_alloc = ta_alloc_ctrl::pt_opb::no_list
| ta_alloc_ctrl::tm_opb::no_list | ta_alloc_ctrl::tm_opb::no_list
| ta_alloc_ctrl::t_opb::_16x4byte | ta_alloc_ctrl::t_opb::_16x4byte
| ta_alloc_ctrl::om_opb::no_list | ta_alloc_ctrl::om_opb::no_list
| ta_alloc_ctrl::o_opb::no_list; | ta_alloc_ctrl::o_opb::no_list;
constexpr struct opb_size opb_size = { .opaque = 0 constexpr struct opb_size opb_size = { .opaque = 0
, .opaque_modifier = 0 , .opaque_modifier = 0
, .translucent = 16 * 4 , .translucent = 16 * 4
, .translucent_modifier = 0 , .translucent_modifier = 0
, .punch_through = 0 , .punch_through = 0
}; };
holly.SOFTRESET = softreset::pipeline_soft_reset holly.SOFTRESET = softreset::pipeline_soft_reset
| softreset::ta_soft_reset; | softreset::ta_soft_reset;
holly.SOFTRESET = 0; holly.SOFTRESET = 0;
core_init(); core_init();
@ -265,21 +265,21 @@ void main()
auto parameter = ta_parameter_writer(ta_parameter_buf); auto parameter = ta_parameter_writer(ta_parameter_buf);
transform2(parameter, transform2(parameter,
font->texture_width, font->texture_height); font->texture_width, font->texture_height);
transform(parameter, transform(parameter,
font->texture_width, font->texture_height, font->texture_width, font->texture_height,
font->first_char_code, font->first_char_code,
glyphs, glyphs,
ana, 17, ana, 17,
font->glyph_height * 0); font->glyph_height * 0);
transform(parameter, transform(parameter,
font->texture_width, font->texture_height, font->texture_width, font->texture_height,
font->first_char_code, font->first_char_code,
glyphs, glyphs,
cabal, 26, cabal, 26,
font->glyph_height * 1); font->glyph_height * 1);
parameter.append<ta_global_parameter::end_of_list>() = ta_global_parameter::end_of_list(para_control::para_type::end_of_list); parameter.append<ta_global_parameter::end_of_list>() = ta_global_parameter::end_of_list(para_control::para_type::end_of_list);
@ -293,6 +293,6 @@ void main()
core_flip(frame_ix); core_flip(frame_ix);
while (spg_status::vsync(holly.SPG_STATUS)); while (spg_status::vsync(holly.SPG_STATUS));
frame_ix++; frame_ix = (frame_ix + 1) & 1;
} }
} }

View File

@ -57,32 +57,32 @@ uint32_t transform(ta_parameter_writer& parameter,
} }
const uint32_t parameter_control_word = para_control::para_type::polygon_or_modifier_volume const uint32_t parameter_control_word = para_control::para_type::polygon_or_modifier_volume
| para_control::list_type::punch_through | para_control::list_type::punch_through
| obj_control::col_type::packed_color | obj_control::col_type::packed_color
| obj_control::texture; | obj_control::texture;
const uint32_t isp_tsp_instruction_word = isp_tsp_instruction_word::depth_compare_mode::greater const uint32_t isp_tsp_instruction_word = isp_tsp_instruction_word::depth_compare_mode::greater
| isp_tsp_instruction_word::culling_mode::no_culling; | isp_tsp_instruction_word::culling_mode::no_culling;
const uint32_t tsp_instruction_word = tsp_instruction_word::src_alpha_instr::src_alpha const uint32_t tsp_instruction_word = tsp_instruction_word::src_alpha_instr::src_alpha
| tsp_instruction_word::dst_alpha_instr::zero | tsp_instruction_word::dst_alpha_instr::zero
| tsp_instruction_word::fog_control::no_fog | tsp_instruction_word::fog_control::no_fog
| tsp_instruction_word::texture_u_size::from_int(texture_width) | tsp_instruction_word::texture_u_size::from_int(texture_width)
| tsp_instruction_word::texture_v_size::from_int(texture_height); | tsp_instruction_word::texture_v_size::from_int(texture_height);
const uint32_t texture_address = texture_memory_alloc::texture.start; const uint32_t texture_address = texture_memory_alloc::texture.start;
const uint32_t texture_control_word = texture_control_word::pixel_format::_4bpp_palette const uint32_t texture_control_word = texture_control_word::pixel_format::_4bpp_palette
| texture_control_word::scan_order::twiddled | texture_control_word::scan_order::twiddled
| texture_control_word::texture_address(texture_address / 8); | texture_control_word::texture_address(texture_address / 8);
parameter.append<ta_global_parameter::polygon_type_0>() = parameter.append<ta_global_parameter::polygon_type_0>() =
ta_global_parameter::polygon_type_0(parameter_control_word, ta_global_parameter::polygon_type_0(parameter_control_word,
isp_tsp_instruction_word, isp_tsp_instruction_word,
tsp_instruction_word, tsp_instruction_word,
texture_control_word, texture_control_word,
0, // data_size_for_sort_dma 0, // data_size_for_sort_dma
0 // next_address_for_sort_dma 0 // next_address_for_sort_dma
); );
for (uint32_t i = 0; i < strip_length; i++) { for (uint32_t i = 0; i < strip_length; i++) {
float x = strip_vertices[i].x; float x = strip_vertices[i].x;
@ -107,12 +107,12 @@ uint32_t transform(ta_parameter_writer& parameter,
bool end_of_strip = i == strip_length - 1; bool end_of_strip = i == strip_length - 1;
parameter.append<ta_vertex_parameter::polygon_type_3>() = parameter.append<ta_vertex_parameter::polygon_type_3>() =
ta_vertex_parameter::polygon_type_3(polygon_vertex_parameter_control_word(end_of_strip), ta_vertex_parameter::polygon_type_3(polygon_vertex_parameter_control_word(end_of_strip),
x, y, z, x, y, z,
u, v, u, v,
0, // base_color 0, // base_color
0 // offset_color 0 // offset_color
); );
} }
advance += glyph.metrics.horiAdvance; advance += glyph.metrics.horiAdvance;
@ -125,32 +125,32 @@ uint32_t transform2(ta_parameter_writer& parameter,
const uint32_t texture_width, uint32_t texture_height) const uint32_t texture_width, uint32_t texture_height)
{ {
const uint32_t parameter_control_word = para_control::para_type::polygon_or_modifier_volume const uint32_t parameter_control_word = para_control::para_type::polygon_or_modifier_volume
| para_control::list_type::opaque | para_control::list_type::opaque
| obj_control::col_type::packed_color | obj_control::col_type::packed_color
| obj_control::texture; | obj_control::texture;
const uint32_t isp_tsp_instruction_word = isp_tsp_instruction_word::depth_compare_mode::greater const uint32_t isp_tsp_instruction_word = isp_tsp_instruction_word::depth_compare_mode::greater
| isp_tsp_instruction_word::culling_mode::no_culling; | isp_tsp_instruction_word::culling_mode::no_culling;
const uint32_t tsp_instruction_word = tsp_instruction_word::src_alpha_instr::src_alpha const uint32_t tsp_instruction_word = tsp_instruction_word::src_alpha_instr::src_alpha
| tsp_instruction_word::dst_alpha_instr::zero | tsp_instruction_word::dst_alpha_instr::zero
| tsp_instruction_word::fog_control::no_fog | tsp_instruction_word::fog_control::no_fog
| tsp_instruction_word::texture_u_size::from_int(texture_width) | tsp_instruction_word::texture_u_size::from_int(texture_width)
| tsp_instruction_word::texture_v_size::from_int(texture_height); | tsp_instruction_word::texture_v_size::from_int(texture_height);
const uint32_t texture_address = texture_memory_alloc::texture.start; const uint32_t texture_address = texture_memory_alloc::texture.start;
const uint32_t texture_control_word = texture_control_word::pixel_format::_4bpp_palette const uint32_t texture_control_word = texture_control_word::pixel_format::_4bpp_palette
| texture_control_word::scan_order::twiddled | texture_control_word::scan_order::twiddled
| texture_control_word::texture_address(texture_address / 8); | texture_control_word::texture_address(texture_address / 8);
parameter.append<ta_global_parameter::polygon_type_0>() = parameter.append<ta_global_parameter::polygon_type_0>() =
ta_global_parameter::polygon_type_0(parameter_control_word, ta_global_parameter::polygon_type_0(parameter_control_word,
isp_tsp_instruction_word, isp_tsp_instruction_word,
tsp_instruction_word, tsp_instruction_word,
texture_control_word, texture_control_word,
0, // data_size_for_sort_dma 0, // data_size_for_sort_dma
0 // next_address_for_sort_dma 0 // next_address_for_sort_dma
); );
for (uint32_t i = 0; i < strip_length; i++) { for (uint32_t i = 0; i < strip_length; i++) {
float x = strip_vertices[i].x; float x = strip_vertices[i].x;
@ -169,11 +169,11 @@ uint32_t transform2(ta_parameter_writer& parameter,
bool end_of_strip = i == strip_length - 1; bool end_of_strip = i == strip_length - 1;
parameter.append<ta_vertex_parameter::polygon_type_3>() = parameter.append<ta_vertex_parameter::polygon_type_3>() =
ta_vertex_parameter::polygon_type_3(polygon_vertex_parameter_control_word(end_of_strip), ta_vertex_parameter::polygon_type_3(polygon_vertex_parameter_control_word(end_of_strip),
x, y, z, x, y, z,
u, v, u, v,
0, // base_color 0, // base_color
0 // offset_color 0 // offset_color
); );
} }
return parameter.offset; return parameter.offset;
@ -188,11 +188,6 @@ void init_texture_memory(const struct opb_size& opb_size)
background_parameter(0xff0000ff); background_parameter(0xff0000ff);
} }
constexpr inline uint32_t b(uint32_t v, uint32_t n)
{
return ((v >> n) & 1) << (4 * n);
}
void inflate_font(const uint32_t * src, void inflate_font(const uint32_t * src,
const uint32_t stride, const uint32_t stride,
const uint32_t curve_end_ix) const uint32_t curve_end_ix)
@ -218,6 +213,7 @@ void main()
serial::integer<uint32_t>(font->first_char_code); serial::integer<uint32_t>(font->first_char_code);
serial::integer<uint32_t>(font->glyph_count); serial::integer<uint32_t>(font->glyph_count);
serial::integer<uint32_t>(font->glyph_height); serial::integer<uint32_t>(font->glyph_height);
serial::integer<uint32_t>(font->texture_stride);
serial::integer<uint32_t>(font->texture_width); serial::integer<uint32_t>(font->texture_width);
serial::integer<uint32_t>(font->texture_height); serial::integer<uint32_t>(font->texture_height);
serial::character('\n'); serial::character('\n');
@ -299,6 +295,6 @@ void main()
core_flip(frame_ix); core_flip(frame_ix);
while (spg_status::vsync(holly.SPG_STATUS)); while (spg_status::vsync(holly.SPG_STATUS));
frame_ix++; frame_ix = (frame_ix + 1) & 1;
} }
} }

View File

@ -322,6 +322,6 @@ void main()
constexpr float half_degree = 0.01745329f / 2; constexpr float half_degree = 0.01745329f / 2;
theta += half_degree; theta += half_degree;
frame_ix = (frame_ix + 1) & 1;; frame_ix = (frame_ix + 1) & 1;
} }
} }

View File

@ -301,6 +301,6 @@ void main()
while (spg_status::vsync(holly.SPG_STATUS)); while (spg_status::vsync(holly.SPG_STATUS));
theta += half_degree; theta += half_degree;
frame_ix = (frame_ix + 1) & 1;; frame_ix = (frame_ix + 1) & 1;
} }
} }

View File

@ -212,6 +212,6 @@ void main()
while (spg_status::vsync(holly.SPG_STATUS)); while (spg_status::vsync(holly.SPG_STATUS));
theta += half_degree; theta += half_degree;
frame_ix = (frame_ix + 1) & 1;; frame_ix = (frame_ix + 1) & 1;
} }
} }

View File

@ -286,6 +286,6 @@ void main()
while (spg_status::vsync(holly.SPG_STATUS)); while (spg_status::vsync(holly.SPG_STATUS));
theta += half_degree; theta += half_degree;
frame_ix = (frame_ix + 1) & 1;; frame_ix = (frame_ix + 1) & 1;
} }
} }

View File

@ -182,6 +182,6 @@ void main()
while (spg_status::vsync(holly.SPG_STATUS)); while (spg_status::vsync(holly.SPG_STATUS));
theta += half_degree; theta += half_degree;
frame_ix = (frame_ix + 1) & 1;; frame_ix = (frame_ix + 1) & 1;
} }
} }

View File

@ -229,6 +229,6 @@ void main()
core_flip(frame_ix); core_flip(frame_ix);
while (spg_status::vsync(holly.SPG_STATUS)); while (spg_status::vsync(holly.SPG_STATUS));
frame_ix = (frame_ix + 1) & 1;; frame_ix = (frame_ix + 1) & 1;
} }
} }

View File

@ -263,6 +263,6 @@ void main()
constexpr float half_degree = 0.01745329f / 2; constexpr float half_degree = 0.01745329f / 2;
theta += half_degree; theta += half_degree;
frame_ix = (frame_ix + 1) & 1;; frame_ix = (frame_ix + 1) & 1;
} }
} }

View File

@ -446,6 +446,6 @@ void main()
core_flip(frame_ix); core_flip(frame_ix);
while (spg_status::vsync(holly.SPG_STATUS)); while (spg_status::vsync(holly.SPG_STATUS));
frame_ix = (frame_ix + 1) & 1;; frame_ix = (frame_ix + 1) & 1;
} }
} }

View File

@ -232,7 +232,7 @@ void main()
core_flip(frame_ix); core_flip(frame_ix);
while (spg_status::vsync(holly.SPG_STATUS)); while (spg_status::vsync(holly.SPG_STATUS));
frame_ix = (frame_ix + 1) & 1;; frame_ix = (frame_ix + 1) & 1;
theta += half_degree; theta += half_degree;
} }
} }

View File

@ -134,6 +134,6 @@ void main()
core_flip(frame_ix); core_flip(frame_ix);
while (spg_status::vsync(holly.SPG_STATUS)); while (spg_status::vsync(holly.SPG_STATUS));
frame_ix = (frame_ix + 1) & 1;; frame_ix = (frame_ix + 1) & 1;
} }
} }

View File

@ -251,7 +251,7 @@ void main()
core_flip(frame_ix); core_flip(frame_ix);
while (spg_status::vsync(holly.SPG_STATUS)); while (spg_status::vsync(holly.SPG_STATUS));
frame_ix = (frame_ix + 1) & 1;; frame_ix = (frame_ix + 1) & 1;
if (frame_ix > 10) if (frame_ix > 10)
break; break;

View File

@ -202,6 +202,6 @@ void main()
while (spg_status::vsync(holly.SPG_STATUS)); while (spg_status::vsync(holly.SPG_STATUS));
theta += half_degree; theta += half_degree;
frame_ix = (frame_ix + 1) & 1;; frame_ix = (frame_ix + 1) & 1;
} }
} }

View File

@ -175,6 +175,6 @@ void main()
constexpr float half_degree = 0.01745329f / 2.f; constexpr float half_degree = 0.01745329f / 2.f;
theta += half_degree; theta += half_degree;
frame_ix = (frame_ix + 1) & 1;; frame_ix = (frame_ix + 1) & 1;
} }
} }

View File

@ -212,7 +212,7 @@ void main()
core_flip(frame_ix); core_flip(frame_ix);
while (spg_status::vsync(holly.SPG_STATUS)); while (spg_status::vsync(holly.SPG_STATUS));
frame_ix = (frame_ix + 1) & 1;; frame_ix = (frame_ix + 1) & 1;
delta += pi * 2 / 360; delta += pi * 2 / 360;
} }
} }

View File

@ -312,6 +312,6 @@ void main()
while (spg_status::vsync(holly.SPG_STATUS)); while (spg_status::vsync(holly.SPG_STATUS));
theta += half_degree; theta += half_degree;
frame_ix = (frame_ix + 1) & 1;; frame_ix = (frame_ix + 1) & 1;
} }
} }

View File

@ -54,7 +54,7 @@ void ta_polygon_converter_cont(uint32_t ol_base_offset,
(void)_dummy_read; (void)_dummy_read;
} }
void ta_polygon_converter_transfer(volatile uint32_t * buf, uint32_t size) void ta_polygon_converter_transfer(volatile uint32_t const * const buf, uint32_t size)
{ {
/* wait for previous transfer to complete (if any) */ /* wait for previous transfer to complete (if any) */
//while ((system.C2DST & C2DST__STATUS) != 0); /* 1 == transfer is in progress */ //while ((system.C2DST & C2DST__STATUS) != 0); /* 1 == transfer is in progress */

View File

@ -8,7 +8,7 @@ void ta_polygon_converter_init(uint32_t opb_total_size, // for one tile, for all
uint32_t tile_height); // in tile units (e.g: (480 / 32)) uint32_t tile_height); // in tile units (e.g: (480 / 32))
void ta_polygon_converter_cont(uint32_t ol_base_offset, void ta_polygon_converter_cont(uint32_t ol_base_offset,
uint32_t ta_alloc); uint32_t ta_alloc);
void ta_polygon_converter_transfer(volatile uint32_t * buf, uint32_t size); void ta_polygon_converter_transfer(volatile uint32_t const * const buf, uint32_t size);
void ta_wait_opaque_list(); void ta_wait_opaque_list();
void ta_wait_opaque_modifier_volume_list(); void ta_wait_opaque_modifier_volume_list();
void ta_wait_translucent_list(); void ta_wait_translucent_list();

View File

@ -14,8 +14,8 @@ namespace ta_global_parameter {
uint32_t _res5; uint32_t _res5;
uint32_t _res6; uint32_t _res6;
end_of_list(const uint32_t parameter_control_word constexpr end_of_list(const uint32_t parameter_control_word
) )
: parameter_control_word(parameter_control_word) : parameter_control_word(parameter_control_word)
, _res0(0) , _res0(0)
, _res1(0) , _res1(0)
@ -51,12 +51,12 @@ namespace ta_global_parameter {
uint32_t user_clip_x_max; uint32_t user_clip_x_max;
uint32_t user_clip_y_max; uint32_t user_clip_y_max;
user_tile_clip(const uint32_t parameter_control_word, constexpr user_tile_clip(const uint32_t parameter_control_word,
const uint32_t user_clip_x_min, const uint32_t user_clip_x_min,
const uint32_t user_clip_y_min, const uint32_t user_clip_y_min,
const uint32_t user_clip_x_max, const uint32_t user_clip_x_max,
const uint32_t user_clip_y_max const uint32_t user_clip_y_max
) )
: parameter_control_word(parameter_control_word) : parameter_control_word(parameter_control_word)
, _res0(0) , _res0(0)
, _res1(0) , _res1(0)
@ -92,13 +92,13 @@ namespace ta_global_parameter {
uint32_t bounding_box_x_max; uint32_t bounding_box_x_max;
uint32_t bounding_box_y_max; uint32_t bounding_box_y_max;
object_list_set(const uint32_t parameter_control_word, constexpr object_list_set(const uint32_t parameter_control_word,
const uint32_t object_pointer, const uint32_t object_pointer,
const uint32_t bounding_box_x_min, const uint32_t bounding_box_x_min,
const uint32_t bounding_box_y_min, const uint32_t bounding_box_y_min,
const uint32_t bounding_box_x_max, const uint32_t bounding_box_x_max,
const uint32_t bounding_box_y_max const uint32_t bounding_box_y_max
) )
: parameter_control_word(parameter_control_word) : parameter_control_word(parameter_control_word)
, object_pointer(object_pointer) , object_pointer(object_pointer)
, _res0(0) , _res0(0)
@ -134,13 +134,13 @@ namespace ta_global_parameter {
uint32_t data_size_for_sort_dma; uint32_t data_size_for_sort_dma;
uint32_t next_address_for_sort_dma; uint32_t next_address_for_sort_dma;
polygon_type_0(const uint32_t parameter_control_word, constexpr polygon_type_0(const uint32_t parameter_control_word,
const uint32_t isp_tsp_instruction_word, const uint32_t isp_tsp_instruction_word,
const uint32_t tsp_instruction_word, const uint32_t tsp_instruction_word,
const uint32_t texture_control_word, const uint32_t texture_control_word,
const uint32_t data_size_for_sort_dma, const uint32_t data_size_for_sort_dma,
const uint32_t next_address_for_sort_dma const uint32_t next_address_for_sort_dma
) )
: parameter_control_word(parameter_control_word) : parameter_control_word(parameter_control_word)
, isp_tsp_instruction_word(isp_tsp_instruction_word) , isp_tsp_instruction_word(isp_tsp_instruction_word)
, tsp_instruction_word(tsp_instruction_word) , tsp_instruction_word(tsp_instruction_word)
@ -176,15 +176,15 @@ namespace ta_global_parameter {
float face_color_g; float face_color_g;
float face_color_b; float face_color_b;
polygon_type_1(const uint32_t parameter_control_word, constexpr polygon_type_1(const uint32_t parameter_control_word,
const uint32_t isp_tsp_instruction_word, const uint32_t isp_tsp_instruction_word,
const uint32_t tsp_instruction_word, const uint32_t tsp_instruction_word,
const uint32_t texture_control_word, const uint32_t texture_control_word,
const float face_color_alpha, const float face_color_alpha,
const float face_color_r, const float face_color_r,
const float face_color_g, const float face_color_g,
const float face_color_b const float face_color_b
) )
: parameter_control_word(parameter_control_word) : parameter_control_word(parameter_control_word)
, isp_tsp_instruction_word(isp_tsp_instruction_word) , isp_tsp_instruction_word(isp_tsp_instruction_word)
, tsp_instruction_word(tsp_instruction_word) , tsp_instruction_word(tsp_instruction_word)
@ -228,21 +228,21 @@ namespace ta_global_parameter {
float face_offset_color_g; float face_offset_color_g;
float face_offset_color_b; float face_offset_color_b;
polygon_type_2(const uint32_t parameter_control_word, constexpr polygon_type_2(const uint32_t parameter_control_word,
const uint32_t isp_tsp_instruction_word, const uint32_t isp_tsp_instruction_word,
const uint32_t tsp_instruction_word, const uint32_t tsp_instruction_word,
const uint32_t texture_control_word, const uint32_t texture_control_word,
const uint32_t data_size_for_sort_dma, const uint32_t data_size_for_sort_dma,
const uint32_t next_address_for_sort_dma, const uint32_t next_address_for_sort_dma,
const float face_color_alpha, const float face_color_alpha,
const float face_color_r, const float face_color_r,
const float face_color_g, const float face_color_g,
const float face_color_b, const float face_color_b,
const float face_offset_color_alpha, const float face_offset_color_alpha,
const float face_offset_color_r, const float face_offset_color_r,
const float face_offset_color_g, const float face_offset_color_g,
const float face_offset_color_b const float face_offset_color_b
) )
: parameter_control_word(parameter_control_word) : parameter_control_word(parameter_control_word)
, isp_tsp_instruction_word(isp_tsp_instruction_word) , isp_tsp_instruction_word(isp_tsp_instruction_word)
, tsp_instruction_word(tsp_instruction_word) , tsp_instruction_word(tsp_instruction_word)
@ -294,15 +294,15 @@ namespace ta_global_parameter {
uint32_t data_size_for_sort_dma; uint32_t data_size_for_sort_dma;
uint32_t next_address_for_sort_dma; uint32_t next_address_for_sort_dma;
polygon_type_3(const uint32_t parameter_control_word, constexpr polygon_type_3(const uint32_t parameter_control_word,
const uint32_t isp_tsp_instruction_word, const uint32_t isp_tsp_instruction_word,
const uint32_t tsp_instruction_word_0, const uint32_t tsp_instruction_word_0,
const uint32_t texture_control_word_0, const uint32_t texture_control_word_0,
const uint32_t tsp_instruction_word_1, const uint32_t tsp_instruction_word_1,
const uint32_t texture_control_word_1, const uint32_t texture_control_word_1,
const uint32_t data_size_for_sort_dma, const uint32_t data_size_for_sort_dma,
const uint32_t next_address_for_sort_dma const uint32_t next_address_for_sort_dma
) )
: parameter_control_word(parameter_control_word) : parameter_control_word(parameter_control_word)
, isp_tsp_instruction_word(isp_tsp_instruction_word) , isp_tsp_instruction_word(isp_tsp_instruction_word)
, tsp_instruction_word_0(tsp_instruction_word_0) , tsp_instruction_word_0(tsp_instruction_word_0)
@ -346,23 +346,23 @@ namespace ta_global_parameter {
float face_color_g_1; float face_color_g_1;
float face_color_b_1; float face_color_b_1;
polygon_type_4(const uint32_t parameter_control_word, constexpr polygon_type_4(const uint32_t parameter_control_word,
const uint32_t isp_tsp_instruction_word, const uint32_t isp_tsp_instruction_word,
const uint32_t tsp_instruction_word_0, const uint32_t tsp_instruction_word_0,
const uint32_t texture_control_word_0, const uint32_t texture_control_word_0,
const uint32_t tsp_instruction_word_1, const uint32_t tsp_instruction_word_1,
const uint32_t texture_control_word_1, const uint32_t texture_control_word_1,
const uint32_t data_size_for_sort_dma, const uint32_t data_size_for_sort_dma,
const uint32_t next_address_for_sort_dma, const uint32_t next_address_for_sort_dma,
const float face_color_alpha_0, const float face_color_alpha_0,
const float face_color_r_0, const float face_color_r_0,
const float face_color_g_0, const float face_color_g_0,
const float face_color_b_0, const float face_color_b_0,
const float face_color_alpha_1, const float face_color_alpha_1,
const float face_color_r_1, const float face_color_r_1,
const float face_color_g_1, const float face_color_g_1,
const float face_color_b_1 const float face_color_b_1
) )
: parameter_control_word(parameter_control_word) : parameter_control_word(parameter_control_word)
, isp_tsp_instruction_word(isp_tsp_instruction_word) , isp_tsp_instruction_word(isp_tsp_instruction_word)
, tsp_instruction_word_0(tsp_instruction_word_0) , tsp_instruction_word_0(tsp_instruction_word_0)
@ -414,15 +414,15 @@ namespace ta_global_parameter {
uint32_t data_size_for_sort_dma; uint32_t data_size_for_sort_dma;
uint32_t next_address_for_sort_dma; uint32_t next_address_for_sort_dma;
sprite(const uint32_t parameter_control_word, constexpr sprite(const uint32_t parameter_control_word,
const uint32_t isp_tsp_instruction_word, const uint32_t isp_tsp_instruction_word,
const uint32_t tsp_instruction_word, const uint32_t tsp_instruction_word,
const uint32_t texture_control_word, const uint32_t texture_control_word,
const uint32_t base_color, const uint32_t base_color,
const uint32_t offset_color, const uint32_t offset_color,
const uint32_t data_size_for_sort_dma, const uint32_t data_size_for_sort_dma,
const uint32_t next_address_for_sort_dma const uint32_t next_address_for_sort_dma
) )
: parameter_control_word(parameter_control_word) : parameter_control_word(parameter_control_word)
, isp_tsp_instruction_word(isp_tsp_instruction_word) , isp_tsp_instruction_word(isp_tsp_instruction_word)
, tsp_instruction_word(tsp_instruction_word) , tsp_instruction_word(tsp_instruction_word)
@ -458,9 +458,9 @@ namespace ta_global_parameter {
uint32_t _res4; uint32_t _res4;
uint32_t _res5; uint32_t _res5;
modifier_volume(const uint32_t parameter_control_word, constexpr modifier_volume(const uint32_t parameter_control_word,
const uint32_t isp_tsp_instruction_word const uint32_t isp_tsp_instruction_word
) )
: parameter_control_word(parameter_control_word) : parameter_control_word(parameter_control_word)
, isp_tsp_instruction_word(isp_tsp_instruction_word) , isp_tsp_instruction_word(isp_tsp_instruction_word)
, _res0(0) , _res0(0)

View File

@ -14,12 +14,12 @@ namespace ta_vertex_parameter {
uint32_t base_color; uint32_t base_color;
uint32_t _res2; uint32_t _res2;
polygon_type_0(const uint32_t parameter_control_word, constexpr polygon_type_0(const uint32_t parameter_control_word,
const float x, const float x,
const float y, const float y,
const float z, const float z,
const uint32_t base_color const uint32_t base_color
) )
: parameter_control_word(parameter_control_word) : parameter_control_word(parameter_control_word)
, x(x) , x(x)
, y(y) , y(y)
@ -55,15 +55,15 @@ namespace ta_vertex_parameter {
float base_color_g; float base_color_g;
float base_color_b; float base_color_b;
polygon_type_1(const uint32_t parameter_control_word, constexpr polygon_type_1(const uint32_t parameter_control_word,
const float x, const float x,
const float y, const float y,
const float z, const float z,
const float base_color_alpha, const float base_color_alpha,
const float base_color_r, const float base_color_r,
const float base_color_g, const float base_color_g,
const float base_color_b const float base_color_b
) )
: parameter_control_word(parameter_control_word) : parameter_control_word(parameter_control_word)
, x(x) , x(x)
, y(y) , y(y)
@ -99,12 +99,12 @@ namespace ta_vertex_parameter {
float base_intensity; float base_intensity;
uint32_t _res2; uint32_t _res2;
polygon_type_2(const uint32_t parameter_control_word, constexpr polygon_type_2(const uint32_t parameter_control_word,
const float x, const float x,
const float y, const float y,
const float z, const float z,
const float base_intensity const float base_intensity
) )
: parameter_control_word(parameter_control_word) : parameter_control_word(parameter_control_word)
, x(x) , x(x)
, y(y) , y(y)
@ -140,15 +140,15 @@ namespace ta_vertex_parameter {
uint32_t base_color; uint32_t base_color;
uint32_t offset_color; uint32_t offset_color;
polygon_type_3(const uint32_t parameter_control_word, constexpr polygon_type_3(const uint32_t parameter_control_word,
const float x, const float x,
const float y, const float y,
const float z, const float z,
const float u, const float u,
const float v, const float v,
const uint32_t base_color, const uint32_t base_color,
const uint32_t offset_color const uint32_t offset_color
) )
: parameter_control_word(parameter_control_word) : parameter_control_word(parameter_control_word)
, x(x) , x(x)
, y(y) , y(y)
@ -184,14 +184,14 @@ namespace ta_vertex_parameter {
uint32_t base_color; uint32_t base_color;
uint32_t offset_color; uint32_t offset_color;
polygon_type_4(const uint32_t parameter_control_word, constexpr polygon_type_4(const uint32_t parameter_control_word,
const float x, const float x,
const float y, const float y,
const float z, const float z,
const uint32_t u_v, const uint32_t u_v,
const uint32_t base_color, const uint32_t base_color,
const uint32_t offset_color const uint32_t offset_color
) )
: parameter_control_word(parameter_control_word) : parameter_control_word(parameter_control_word)
, x(x) , x(x)
, y(y) , y(y)
@ -235,21 +235,21 @@ namespace ta_vertex_parameter {
float offset_color_g; float offset_color_g;
float offset_color_b; float offset_color_b;
polygon_type_5(const uint32_t parameter_control_word, constexpr polygon_type_5(const uint32_t parameter_control_word,
const float x, const float x,
const float y, const float y,
const float z, const float z,
const float u, const float u,
const float v, const float v,
const float base_color_alpha, const float base_color_alpha,
const float base_color_r, const float base_color_r,
const float base_color_g, const float base_color_g,
const float base_color_b, const float base_color_b,
const float offset_color_alpha, const float offset_color_alpha,
const float offset_color_r, const float offset_color_r,
const float offset_color_g, const float offset_color_g,
const float offset_color_b const float offset_color_b
) )
: parameter_control_word(parameter_control_word) : parameter_control_word(parameter_control_word)
, x(x) , x(x)
, y(y) , y(y)
@ -309,20 +309,20 @@ namespace ta_vertex_parameter {
float offset_color_g; float offset_color_g;
float offset_color_b; float offset_color_b;
polygon_type_6(const uint32_t parameter_control_word, constexpr polygon_type_6(const uint32_t parameter_control_word,
const float x, const float x,
const float y, const float y,
const float z, const float z,
const uint32_t u_v, const uint32_t u_v,
const float base_color_alpha, const float base_color_alpha,
const float base_color_r, const float base_color_r,
const float base_color_g, const float base_color_g,
const float base_color_b, const float base_color_b,
const float offset_color_alpha, const float offset_color_alpha,
const float offset_color_r, const float offset_color_r,
const float offset_color_g, const float offset_color_g,
const float offset_color_b const float offset_color_b
) )
: parameter_control_word(parameter_control_word) : parameter_control_word(parameter_control_word)
, x(x) , x(x)
, y(y) , y(y)
@ -374,15 +374,15 @@ namespace ta_vertex_parameter {
float base_intensity; float base_intensity;
float offset_intensity; float offset_intensity;
polygon_type_7(const uint32_t parameter_control_word, constexpr polygon_type_7(const uint32_t parameter_control_word,
const float x, const float x,
const float y, const float y,
const float z, const float z,
const float u, const float u,
const float v, const float v,
const float base_intensity, const float base_intensity,
const float offset_intensity const float offset_intensity
) )
: parameter_control_word(parameter_control_word) : parameter_control_word(parameter_control_word)
, x(x) , x(x)
, y(y) , y(y)
@ -418,14 +418,14 @@ namespace ta_vertex_parameter {
float base_intensity; float base_intensity;
float offset_intensity; float offset_intensity;
polygon_type_8(const uint32_t parameter_control_word, constexpr polygon_type_8(const uint32_t parameter_control_word,
const float x, const float x,
const float y, const float y,
const float z, const float z,
const uint32_t u_v, const uint32_t u_v,
const float base_intensity, const float base_intensity,
const float offset_intensity const float offset_intensity
) )
: parameter_control_word(parameter_control_word) : parameter_control_word(parameter_control_word)
, x(x) , x(x)
, y(y) , y(y)
@ -461,13 +461,13 @@ namespace ta_vertex_parameter {
uint32_t _res0; uint32_t _res0;
uint32_t _res1; uint32_t _res1;
polygon_type_9(const uint32_t parameter_control_word, constexpr polygon_type_9(const uint32_t parameter_control_word,
const float x, const float x,
const float y, const float y,
const float z, const float z,
const uint32_t base_color_0, const uint32_t base_color_0,
const uint32_t base_color_1 const uint32_t base_color_1
) )
: parameter_control_word(parameter_control_word) : parameter_control_word(parameter_control_word)
, x(x) , x(x)
, y(y) , y(y)
@ -503,13 +503,13 @@ namespace ta_vertex_parameter {
uint32_t _res0; uint32_t _res0;
uint32_t _res1; uint32_t _res1;
polygon_type_10(const uint32_t parameter_control_word, constexpr polygon_type_10(const uint32_t parameter_control_word,
const float x, const float x,
const float y, const float y,
const float z, const float z,
const uint32_t base_intensity_0, const uint32_t base_intensity_0,
const uint32_t base_intensity_1 const uint32_t base_intensity_1
) )
: parameter_control_word(parameter_control_word) : parameter_control_word(parameter_control_word)
, x(x) , x(x)
, y(y) , y(y)
@ -553,19 +553,19 @@ namespace ta_vertex_parameter {
uint32_t _res2; uint32_t _res2;
uint32_t _res3; uint32_t _res3;
polygon_type_11(const uint32_t parameter_control_word, constexpr polygon_type_11(const uint32_t parameter_control_word,
const float x, const float x,
const float y, const float y,
const float z, const float z,
const float u_0, const float u_0,
const float v_0, const float v_0,
const uint32_t base_color_0, const uint32_t base_color_0,
const uint32_t offset_color_0, const uint32_t offset_color_0,
const float u_1, const float u_1,
const float v_1, const float v_1,
const uint32_t base_color_1, const uint32_t base_color_1,
const uint32_t offset_color_1 const uint32_t offset_color_1
) )
: parameter_control_word(parameter_control_word) : parameter_control_word(parameter_control_word)
, x(x) , x(x)
, y(y) , y(y)
@ -625,17 +625,17 @@ namespace ta_vertex_parameter {
uint32_t _res4; uint32_t _res4;
uint32_t _res5; uint32_t _res5;
polygon_type_12(const uint32_t parameter_control_word, constexpr polygon_type_12(const uint32_t parameter_control_word,
const float x, const float x,
const float y, const float y,
const float z, const float z,
const uint32_t u_v_0, const uint32_t u_v_0,
const uint32_t base_color_0, const uint32_t base_color_0,
const uint32_t offset_color_0, const uint32_t offset_color_0,
const uint32_t u_v_1, const uint32_t u_v_1,
const uint32_t base_color_1, const uint32_t base_color_1,
const uint32_t offset_color_1 const uint32_t offset_color_1
) )
: parameter_control_word(parameter_control_word) : parameter_control_word(parameter_control_word)
, x(x) , x(x)
, y(y) , y(y)
@ -695,19 +695,19 @@ namespace ta_vertex_parameter {
uint32_t _res2; uint32_t _res2;
uint32_t _res3; uint32_t _res3;
polygon_type_13(const uint32_t parameter_control_word, constexpr polygon_type_13(const uint32_t parameter_control_word,
const float x, const float x,
const float y, const float y,
const float z, const float z,
const float u_0, const float u_0,
const float v_0, const float v_0,
const uint32_t base_intensity_0, const uint32_t base_intensity_0,
const float offset_intensity_0, const float offset_intensity_0,
const float u_1, const float u_1,
const float v_1, const float v_1,
const uint32_t base_intensity_1, const uint32_t base_intensity_1,
const float offset_intensity_1 const float offset_intensity_1
) )
: parameter_control_word(parameter_control_word) : parameter_control_word(parameter_control_word)
, x(x) , x(x)
, y(y) , y(y)
@ -767,17 +767,17 @@ namespace ta_vertex_parameter {
uint32_t _res4; uint32_t _res4;
uint32_t _res5; uint32_t _res5;
polygon_type_14(const uint32_t parameter_control_word, constexpr polygon_type_14(const uint32_t parameter_control_word,
const float x, const float x,
const float y, const float y,
const float z, const float z,
const uint32_t u_v_0, const uint32_t u_v_0,
const uint32_t base_intensity_0, const uint32_t base_intensity_0,
const float offset_intensity_0, const float offset_intensity_0,
const uint32_t u_v_1, const uint32_t u_v_1,
const uint32_t base_intensity_1, const uint32_t base_intensity_1,
const float offset_intensity_1 const float offset_intensity_1
) )
: parameter_control_word(parameter_control_word) : parameter_control_word(parameter_control_word)
, x(x) , x(x)
, y(y) , y(y)
@ -837,19 +837,19 @@ namespace ta_vertex_parameter {
uint32_t _res2; uint32_t _res2;
uint32_t _res3; uint32_t _res3;
sprite_type_0(const uint32_t parameter_control_word, constexpr sprite_type_0(const uint32_t parameter_control_word,
const float a_x, const float a_x,
const float a_y, const float a_y,
const float a_z, const float a_z,
const float b_x, const float b_x,
const float b_y, const float b_y,
const float b_z, const float b_z,
const float c_x, const float c_x,
const float c_y, const float c_y,
const float c_z, const float c_z,
const float d_x, const float d_x,
const float d_y const float d_y
) )
: parameter_control_word(parameter_control_word) : parameter_control_word(parameter_control_word)
, a_x(a_x) , a_x(a_x)
, a_y(a_y) , a_y(a_y)
@ -909,22 +909,22 @@ namespace ta_vertex_parameter {
uint32_t b_u_b_v; uint32_t b_u_b_v;
uint32_t c_u_c_v; uint32_t c_u_c_v;
sprite_type_1(const uint32_t parameter_control_word, constexpr sprite_type_1(const uint32_t parameter_control_word,
const float a_x, const float a_x,
const float a_y, const float a_y,
const float a_z, const float a_z,
const float b_x, const float b_x,
const float b_y, const float b_y,
const float b_z, const float b_z,
const float c_x, const float c_x,
const float c_y, const float c_y,
const float c_z, const float c_z,
const float d_x, const float d_x,
const float d_y, const float d_y,
const uint32_t a_u_a_v, const uint32_t a_u_a_v,
const uint32_t b_u_b_v, const uint32_t b_u_b_v,
const uint32_t c_u_c_v const uint32_t c_u_c_v
) )
: parameter_control_word(parameter_control_word) : parameter_control_word(parameter_control_word)
, a_x(a_x) , a_x(a_x)
, a_y(a_y) , a_y(a_y)
@ -984,17 +984,17 @@ namespace ta_vertex_parameter {
uint32_t _res4; uint32_t _res4;
uint32_t _res5; uint32_t _res5;
modifier_volume(const uint32_t parameter_control_word, constexpr modifier_volume(const uint32_t parameter_control_word,
const float a_x, const float a_x,
const float a_y, const float a_y,
const float a_z, const float a_z,
const float b_x, const float b_x,
const float b_y, const float b_y,
const float b_z, const float b_z,
const float c_x, const float c_x,
const float c_y, const float c_y,
const float c_z const float c_z
) )
: parameter_control_word(parameter_control_word) : parameter_control_word(parameter_control_word)
, a_x(a_x) , a_x(a_x)
, a_y(a_y) , a_y(a_y)

View File

@ -94,7 +94,7 @@ def parse(rows, expected_offset, expected_sizes):
return declarations return declarations
def render_initializer(declaration, get_type): def render_initializer(declaration, get_type):
initializer = f"{declaration.name}(" initializer = f"constexpr {declaration.name}("
padding = " " * len(initializer) padding = " " * len(initializer)
def start(i): def start(i):
if i == 0: if i == 0: