b8

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.vgx.fr/b8
Log | Files | Refs

commit 2c2770ea64e428a0f8c1f959e767a5009dffcd72
parent 7c4446f91d0419f7fc0ad1f0f861fa77ea10ee02
Author: Léo Villeveygoux <leo.villeveygoux@etu.u-bordeaux.fr>
Date:   Sun, 23 Jul 2017 19:13:04 +0200

draw.asm: ajust radius in palette mode

Diffstat:
Mdraw.asm | 32++++++++++++++++++++++++++++++--
1 file changed, 30 insertions(+), 2 deletions(-)

diff --git a/draw.asm b/draw.asm @@ -100,7 +100,7 @@ palette_loop: mov [state_fun], ecx ret - ;move color cursor + ; move color cursor .check_left: mov eax, 0 @@ -118,13 +118,41 @@ palette_loop: .check_right: mov cl, 10b and cl, al - jz .check_end + jz .check_up mov cl, [selected] dec cl and cl, [palette_mask] mov byte [selected], cl + ; change draw point radius + .check_up: + mov cl, 100b + and cl, al + jz .check_down + + mov cl, [radius] + inc cl + cmp cl, 5 + jle .no_huge_radius + dec cl + .no_huge_radius + and cl, [palette_mask] + mov byte [radius], cl + + .check_down: + mov cl, 1000b + and cl, al + jz .check_end + + mov cl, [radius] + dec cl + jnz .no_null_radius + inc cl + .no_null_radius: + and cl, [palette_mask] + mov byte [radius], cl + .check_end: ret