2019-11-09 19:09:33 +00:00
|
|
|
public ITEMS_RENDER
|
|
|
|
items_render proc near
|
|
|
|
push bp
|
|
|
|
mov bp, sp
|
|
|
|
push si
|
|
|
|
push di
|
|
|
|
mov ax, GRAM_400
|
|
|
|
mov es, ax
|
|
|
|
call item_splashes_render
|
|
|
|
mov si, offset _items
|
|
|
|
xor di, di
|
|
|
|
jmp short @@more?
|
|
|
|
|
|
|
|
@@loop:
|
|
|
|
cmp [si.item_t.flag], 1
|
|
|
|
jnz short @@next
|
|
|
|
cmp [si+item_t.pos.cur.y], (-(ITEM_H / 2) shl 4)
|
|
|
|
jle short @@next
|
|
|
|
mov ax, [si+item_t.pos.cur.y]
|
|
|
|
add ax, ((PLAYFIELD_Y - (ITEM_H / 2)) shl 4)
|
|
|
|
call scroll_subpixel_y_to_vram_seg1 pascal, ax
|
|
|
|
mov dx, ax
|
|
|
|
mov ax, [si+item_t.pos.cur.x]
|
|
|
|
sar ax, 4
|
|
|
|
add ax, PLAYFIELD_X - (ITEM_W / 2)
|
[Maintenance] [th04/th05] Improve the z_super_roll_put*() naming convention
So, master.lib has:
• super_put_tiny() for tiny-format 16×n sprites
• super_roll_put_tiny() for vertically wrapped tiny-format 16×16
sprites
• super_put_tiny_small() for tiny-format 8×n sprites
• yet *no* super_roll_put_tiny_small() function
And now we have ZUN adding micro-optimized versions of:
1) vertically-wrapped tiny-format 16×16, clearly based on master.lib's
super_roll_put_tiny(), RE'd in 35f9bd7
2) vertically-wrapped tiny-format 32×32
3) vertically-wrapped non-tiny monochrome 16×16 (TH05 only)
Conclusion: Even though 1) does duplicate a master.lib function, trying
to continue following master.lib's inconsistent naming convention only
leads to more confusion here. master.lib also already designates the _8
suffix to mean "x will be byte-aligned, ⌊x/8⌋*8"…
So let's:
• spell out both coordinates of the sprite size directly in the
function
• keep the z_ prefix to encode ZUN's optimized calling convention
(left/top coordinates in registers, ES already set to the beginning
of a VRAM plane, GRCG already on) for all of these, not just 1).
• and prefix the actual functions with _raw, since C land will want
to handle the coordinate parameter registers in a macro.
Part of P0073, funded by [Anonymous] and -Tom-.
2020-02-06 21:45:59 +00:00
|
|
|
call z_super_roll_put_tiny_16x16_raw pascal, [si+item_t.ITEM_patnum]
|
2019-11-09 19:09:33 +00:00
|
|
|
|
|
|
|
@@next:
|
|
|
|
inc di
|
|
|
|
add si, size item_t
|
|
|
|
|
|
|
|
@@more?:
|
|
|
|
cmp di, ITEM_COUNT
|
|
|
|
jl short @@loop
|
|
|
|
pop di
|
|
|
|
pop si
|
|
|
|
pop bp
|
|
|
|
retn
|
|
|
|
items_render endp
|