mirror of
https://github.com/Ed94/pikuma_ps1.git
synced 2026-06-01 18:41:13 -07:00
missing adjustments
This commit is contained in:
+1
-1
@@ -27,4 +27,4 @@ typedef def_struct(Rect_S4) { S4 x; S4 y; S4 width; S4 height; };
|
|||||||
|
|
||||||
typedef def_struct(M3_S2) { A3A3_S2 m; A3_S4 t; };
|
typedef def_struct(M3_S2) { A3A3_S2 m; A3_S4 t; };
|
||||||
|
|
||||||
#define v2_s2(x, y) (V2_S2){ x, y }
|
#define v2s2(x, y) (V2_S2){ x, y }
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ void gp_display_frame(DoubleBuffer* screen_buf, S2* active_buf_id, U4* ordering_
|
|||||||
draw_orderingtbl(ordering_buf + OrderingTbl_Len - 1);
|
draw_orderingtbl(ordering_buf + OrderingTbl_Len - 1);
|
||||||
pa->used = 0;
|
pa->used = 0;
|
||||||
}
|
}
|
||||||
* active_buf_id = ! (* active_buf_id); // Swap current buffer
|
active_buf_id[0] = ! active_buf_id[0]; // Swap current buffer
|
||||||
}
|
}
|
||||||
|
|
||||||
void render(void) {
|
void render(void) {
|
||||||
@@ -187,40 +187,40 @@ void update(PrimitiveArena* pa, U4* ordering_buf)
|
|||||||
gte_matrix_set_rotation (& static_mem.tform_world);
|
gte_matrix_set_rotation (& static_mem.tform_world);
|
||||||
gte_matrix_set_translation(& static_mem.tform_world);
|
gte_matrix_set_translation(& static_mem.tform_world);
|
||||||
|
|
||||||
TriFlat* tri = prim_alloc(TriFlat); set_tri_flat(tri);
|
// TriFlat* tri = prim_alloc(TriFlat); set_tri_flat(tri);
|
||||||
tri->color = rgba8(255, 0, 0);
|
// tri->color = rgba8(255, 0, 0);
|
||||||
|
|
||||||
S4 otz = 0;
|
S4 otz = 0;
|
||||||
// otz += vec_3s16_rtp(& )
|
// otz += vec_3s16_rtp(& )
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
Tile* tile = prim_alloc(Tile); set_tile(tile);
|
Tile* tile = prim_alloc(Tile); set_tile(tile);
|
||||||
tile->rect = (Rect_S16){ 82, 32, 64, 64 };
|
tile->rect = (Rect_S2){ 82, 32, 64, 64 };
|
||||||
tile->color = (RGB8){ 0, 255, 0};
|
tile->color = (RGB8){ 0, 255, 0};
|
||||||
orderingtbl_add_primitive(ordering_buf, tile);
|
orderingtbl_add_primitive(ordering_buf, tile);
|
||||||
|
|
||||||
TriFlat* tri = prim_alloc(TriFlat); set_tri_flat(tri);
|
TriFlat* tri = prim_alloc(TriFlat); set_tri_flat(tri);
|
||||||
tri->p0 = vec_2s16(64, 100);
|
tri->p0 = v2s2(64, 100);
|
||||||
tri->p1 = vec_2s16(200, 150);
|
tri->p1 = v2s2(200, 150);
|
||||||
tri->p2 = vec_2s16(50, 220);
|
tri->p2 = v2s2(50, 220);
|
||||||
tri->color = rgba8(255, 0, 255);
|
tri->color = rgba8(255, 0, 255);
|
||||||
orderingtbl_add_primitive(ordering_buf, tri);
|
orderingtbl_add_primitive(ordering_buf, tri);
|
||||||
|
|
||||||
QuadGouraud* quad = prim_alloc(QuadGouraud); set_quad_gouraud(quad);
|
QuadGouraud* quad = prim_alloc(QuadGouraud); set_quad_gouraud(quad);
|
||||||
quad->p0 = vec_2s16(140, 50);
|
quad->p0 = v2s2(140, 50);
|
||||||
quad->p1 = vec_2s16(200, 40);
|
quad->p1 = v2s2(200, 40);
|
||||||
quad->p2 = vec_2s16(170, 120);
|
quad->p2 = v2s2(170, 120);
|
||||||
quad->p3 = vec_2s16(220, 80);
|
quad->p3 = v2s2(220, 80);
|
||||||
quad->c0 = rgba8(255, 0, 0);
|
quad->c0 = rgba8(255, 0, 0);
|
||||||
quad->c1 = rgba8(0, 255, 0);
|
quad->c1 = rgba8(0, 255, 0);
|
||||||
quad->c3 = rgba8(0, 0, 255);
|
quad->c3 = rgba8(0, 0, 255);
|
||||||
orderingtbl_add_primitive(ordering_buf, quad);
|
orderingtbl_add_primitive(ordering_buf, quad);
|
||||||
|
|
||||||
QuadFlat* quadf = prim_alloc(QuadFlat); set_quad_flat(quadf);
|
QuadFlat* quadf = prim_alloc(QuadFlat); set_quad_flat(quadf);
|
||||||
quadf->p0 = vec_2s16(140 + 15, 50 + 9);
|
quadf->p0 = v2s2(140 + 15, 50 + 9);
|
||||||
quadf->p1 = vec_2s16(200 + 15, 40 + 9);
|
quadf->p1 = v2s2(200 + 15, 40 + 9);
|
||||||
quadf->p2 = vec_2s16(170 + 15, 120 + 9);
|
quadf->p2 = v2s2(170 + 15, 120 + 9);
|
||||||
quadf->p3 = vec_2s16(220 + 15, 80 + 9);
|
quadf->p3 = v2s2(220 + 15, 80 + 9);
|
||||||
quadf->color = rgba8(22, 22, 22);
|
quadf->color = rgba8(22, 22, 22);
|
||||||
orderingtbl_add_primitive(ordering_buf, quadf);
|
orderingtbl_add_primitive(ordering_buf, quadf);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user