mirror of
https://github.com/Ed94/pikuma_ps1.git
synced 2026-06-01 18:41:13 -07:00
stack parameters gp routine!
This commit is contained in:
@@ -46,26 +46,28 @@ main:
|
||||
gcmd_push gp0, rtmp_1, -30 * -1 + Display_HalfHeight << gp_b16_Y | -100 + Display_HalfWidth << gp_b16_X
|
||||
gcmd_push gp0, rtmp_1, -50 * -1 + Display_HalfHeight << gp_b16_Y | 55 + Display_HalfWidth << gp_b16_X
|
||||
; Draw a flat-shaded triangle
|
||||
move rarg_0, reg_io_offset ; arg 1 for gp_draw_tri_flat
|
||||
load_imm rarg_1, Color_PS_GoldenPoppy
|
||||
load_imm rarg_2, 100 * -1 + Display_HalfHeight << gp_b16_Y | -100 + Display_HalfWidth << gp_b16_X
|
||||
load_imm rarg_3, 20 * -1 + Display_HalfHeight << gp_b16_Y | 20 + Display_HalfWidth << gp_b16_X
|
||||
load_imm rstatic_0, 50 * -1 + Display_HalfHeight << gp_b16_Y | 30 + Display_HalfWidth << gp_b16_X
|
||||
stack_alloc gp_draw_tri_flat__sp_size ; (used for following call)
|
||||
move rarg_0, reg_io_offset ; (used for following call)
|
||||
load_imm rarg_1, Color_PS_GoldenPoppy
|
||||
load_imm rarg_2, 100 * -1 + Display_HalfHeight << gp_b16_Y | -100 + Display_HalfWidth << gp_b16_X :: sw rarg_2, 0 * gp_vec2($sp)
|
||||
load_imm rarg_2, 20 * -1 + Display_HalfHeight << gp_b16_Y | 20 + Display_HalfWidth << gp_b16_X :: sw rarg_2, 1 * gp_vec2($sp)
|
||||
load_imm rarg_2, 50 * -1 + Display_HalfHeight << gp_b16_Y | 30 + Display_HalfWidth << gp_b16_X :: sw rarg_2, 2 * gp_vec2($sp)
|
||||
jump_nlink gp_draw_tri_flat :: nop
|
||||
; Bonus traingle
|
||||
load_imm rarg_1, Color_PS_CadmiumRed
|
||||
load_imm rarg_2, 50 * -1 + Display_HalfHeight << gp_b16_Y | -100 + Display_HalfWidth << gp_b16_X
|
||||
load_imm rarg_3, 0 * -1 + Display_HalfHeight << gp_b16_Y | 20 + Display_HalfWidth << gp_b16_X
|
||||
load_imm rstatic_0, -100 * -1 + Display_HalfHeight << gp_b16_Y | 30 + Display_HalfWidth << gp_b16_X
|
||||
load_imm rarg_1, Color_PS_CadmiumRed
|
||||
load_imm rarg_2, 50 * -1 + Display_HalfHeight << gp_b16_Y | -100 + Display_HalfWidth << gp_b16_X :: sw rarg_2, 0 * gp_vec2($sp)
|
||||
load_imm rarg_2, 0 * -1 + Display_HalfHeight << gp_b16_Y | 20 + Display_HalfWidth << gp_b16_X :: sw rarg_2, 1 * gp_vec2($sp)
|
||||
load_imm rarg_2, -100 * -1 + Display_HalfHeight << gp_b16_Y | 30 + Display_HalfWidth << gp_b16_X :: sw rarg_2, 2 * gp_vec2($sp)
|
||||
jump_nlink gp_draw_tri_flat :: nop
|
||||
stack_release gp_draw_tri_flat__sp_size
|
||||
; Gourand shaded triangle
|
||||
load_imm rarg_1, Color_PS_PersianGreen
|
||||
load_imm rstatic_1, Color_PS_GoldenPoppy
|
||||
load_imm rstatic_2, Color_PS_CadmiumRed
|
||||
load_imm rarg_2, -35 * -1 + Display_HalfHeight << gp_b16_Y | 145 + Display_HalfWidth << gp_b16_X
|
||||
load_imm rarg_3, 0 * -1 + Display_HalfHeight << gp_b16_Y | 50 + Display_HalfWidth << gp_b16_X
|
||||
load_imm rstatic_0, 40 * -1 + Display_HalfHeight << gp_b16_Y | 60 + Display_HalfWidth << gp_b16_X
|
||||
jump_nlink gp_draw_tri_grouand :: nop
|
||||
load_imm rarg_2, -35 * -1 + Display_HalfHeight << gp_b16_Y | 145 + Display_HalfWidth << gp_b16_X
|
||||
load_imm rarg_3, 0 * -1 + Display_HalfHeight << gp_b16_Y | 50 + Display_HalfWidth << gp_b16_X
|
||||
load_imm rstatic_0, 40 * -1 + Display_HalfHeight << gp_b16_Y | 60 + Display_HalfWidth << gp_b16_X
|
||||
jump_nlink gp_draw_tri_gouraud :: nop
|
||||
|
||||
idle:
|
||||
jump idle :: nop
|
||||
|
||||
Reference in New Issue
Block a user