From b0d771b325f9d47007136fe0b1f920cab2e14397 Mon Sep 17 00:00:00 2001 From: cxy004 Date: Tue, 17 Aug 2021 09:56:24 +0800 Subject: [PATCH] game --- resources/ping-pong-mips32/game/game/game.S | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/resources/ping-pong-mips32/game/game/game.S b/resources/ping-pong-mips32/game/game/game.S index 6deaadb..1c18c99 100644 --- a/resources/ping-pong-mips32/game/game/game.S +++ b/resources/ping-pong-mips32/game/game/game.S @@ -200,19 +200,20 @@ kb_readbuffer: sll t1, random, 3 subu t1, t1, random addu random, random, t1 - sra t1, random, 7 + srl t1, random, 7 xor random, random, t1 - addi random, random, 5 + addiu random, random, 5 xor random, random, t5 - sra t3, random, 2 - andi t3, t3, 0x7 + srl t3, random, 2 la t2, spx_table - add t3, t3, t2 - lw ball_spx, 0(t3) - sra t3, random, 5 andi t3, t3, 0x7 + addu t3, t3, t2 + lw ball_spx, 0(t3) + srl t3, random, 5 la t2, spy_table - add t3, t3, t2 + andi t3, t3, 0x7 + addu t3, t3, t2 + sub ball_x, ball_x, ball_dx lw ball_spy, 0(t3) sub ball_x, ball_x, ball_dx j GAME_START