Prev: 37018 Up: Map Next: 37490
37363: TickMessageQueue
Per-frame ticker for the on-screen status-message display. Decrements the message-visible countdown at MsgVisibleTimer; when it expires, peeks at the queued-message head at MsgDrawnCol and either swaps in the next queued message (copying a 21-byte entry from MessageQueue to MessageQueueBody and re-invoking the renderer at 37221) or clears the message line. Called twice per frame from the main loop at 36457.
Input
Used by the routine at 36457.
37363 LD A,(33709) A = current message-visible timer
37366 AND A
37367 JR Z,37383
37369 DEC A
37370 LD (33709),A
37373 RET NZ
37374 LD A,(33710)
37377 AND 31
37379 LD (33708),A
37382 RET
37383 LD A,(33708)
37386 AND A
37387 JR NZ,37432
37389 LD A,(33741)
37392 LD HL,33714
37395 CP L
37396 JR NZ,37399
37398 RET
37399 LD A,(HL)
37400 INC HL
37401 LD E,(HL)
37402 INC HL
37403 LD D,(HL)
37404 LD (33712),DE
37408 LD BC,21
37411 LD DE,33714
37414 LD HL,33717
37417 LDIR
37419 LD HL,(33741)
37422 DEC HL
37423 DEC HL
37424 DEC HL
37425 LD (33741),HL
37428 CALL 37221
37431 RET
37432 BIT 7,A
37434 JR Z,37477
37436 LD HL,(33710)
37439 LD (HL),40
37441 INC HL
37442 LD (HL),82
37444 LD (33710),HL
37447 DEC A
37448 CP 128
37450 JR Z,37456
37452 LD (33708),A
37455 RET
37456 XOR A
37457 LD (33708),A
37460 LD A,(33741)
37463 LD HL,33714
37466 CP L
37467 LD A,50
37469 JR Z,37473
37471 LD A,2
37473 LD (33709),A
37476 RET
37477 LD HL,(33710)
37480 LD (HL),0
37482 DEC HL
37483 LD (HL),82
37485 LD (33710),HL
37488 DEC A
37489 DEFB 50 opcode of "LD (msg-head var),A": its operands are the XOR H / ADD A,E at 37490, so falling through stores A and hits that entry's RET
Prev: 37018 Up: Map Next: 37490