Skip to content

Commit

Permalink
Prepare 0.6 packet decoding
Browse files Browse the repository at this point in the history
  • Loading branch information
ChillerDragon committed Dec 16, 2024
1 parent 590a894 commit 8eee4e1
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/on_packet.asm
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,20 @@ on_message:
ret

on_packet:
push rax
mov al, byte [connection_version]
cmp al, 7
je on_packet7 ; jumps to on_packet_end
jmp on_packet6 ; jumps to on_packet_end
on_packet_end:
pop rax
ret

on_packet6:
puts "0.6 not implemented yet"
jmp on_packet_end

on_packet7:
push rax
mov rax, udp_recv_buf
call unpack_packet_header
Expand Down Expand Up @@ -187,6 +201,6 @@ on_packet:
mov rsi, on_message
call on_system_or_game_messages

on_packet_end:
ret
; TODO: i think this code is unreachable
jmp on_packet_end

0 comments on commit 8eee4e1

Please sign in to comment.