Skip to content

Commit

Permalink
make pump network a function
Browse files Browse the repository at this point in the history
  • Loading branch information
ChillerDragon committed Jul 28, 2024
1 parent a98d00e commit fa92c0a
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/teeworlds_asmr.asm
Original file line number Diff line number Diff line change
Expand Up @@ -396,17 +396,22 @@ connect:

ret

key_a:
print s_you_pressed_a
call connect
pump_network:
print s_blocking_read
call recv_udp
mov rax, [udp_read_len]
test rax, rax
; if recvfrom returned negative
; we do not process the udp payload
js keypress_end
js .pump_network_no_data
call on_udp_packet
.pump_network_no_data
ret

key_a:
print s_you_pressed_a
call connect
call pump_network
jmp keypress_end

key_d:
Expand Down

0 comments on commit fa92c0a

Please sign in to comment.