forgot to gitignore

This commit is contained in:
maelstrom 2024-07-25 20:28:01 +03:00
parent 086bdfca2c
commit be49deb44e
5 changed files with 42 additions and 0 deletions

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
*.bin
gfx/venv
gfx/*.asm

BIN
gfx/cursor.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 930 B

18
gfx/cvbmp.py Normal file
View file

@ -0,0 +1,18 @@
from PIL import Image
im = Image.open('cursor.bmp')
pixels = list(im.getdata())
w, h = im.size
with open('gfxd_cursor.asm', 'w') as f:
f.write(f'gfxd_cursor_dim: db {w} db {h}\n')
f.write('gfxd_cursor: ')
for px in pixels:
if px == (255, 255, 255, 255):
c = '0x0F'
elif px == (0, 0, 0, 255):
c = '0x00'
else:
c = '0xFF'
f.write(f'db {c} ')

View file

@ -0,0 +1,21 @@
VMEM equ 0xA000
; di = y*320+x
; ah = reserved
; al = color
; bx = width
; cx = height
gfx_rect:
pusha
; Set es to VMEM
push VMEM
pop es
.loop:
mov [es:di], al
jmp .loop
popa
ret

BIN
main.bin

Binary file not shown.