decided to write something similar to apple II shapes drawing
;(c) 2010 Daydreamer
.model tiny
.686p
.XMM
.stack
GETKEY MACRO
mov ah,0
int 16h
ENDM
mode13 MACRO
mov ax,013h ;13h
int 10h
mov ax,0A000h
mov es,ax
ENDM
.data?
;map db 32000 dup (?)
ad dw ?
finc REAL4 ?
angle1 REAL4 ?
angle2 REAL4 ?
xm REAL4 ?
ym REAL4 ?
xf2 REAL4 ?
yf2 REAL4 ?
x dw ?
tmp REAL8 ?
.data
shape db 15,8,16,240,255,200,0
startpoint dw 32160
sc dw 200
wd dw 320
i real8 0.001
i2 real8 0.0
;anglei1 dw 0
;scale dw 4096
;squares dw 256
;xray dw 0
;yray dw 0
;degrees dw 1920
;degrees2 dw 960
;cols dw 256
;xf REAL4 64.0
;yf REAL4 64.0
.code
.startup
mode13
mov cl,6
lea bx,shape
mov di,startpoint
@@l1:
push cx
mov cl,4
@@l2: mov ax,15
stosb
dec di
mov al,[bx]
and al,3
.IF al==0
inc di
.ENDIF
.IF al==1
add di,320
.ENDIF
.IF al==2
dec di
.ENDIF
.IF al==3
sub di,320
.ENDIF
sar byte ptr [bx],2
dec cl
jne @@l2
pop cx
inc bx
dec cl
jne @@l1
GETKEY
.exit
end
sitting here trying to make a shape that looks like Scandinivia, I think I try to develop it to have a macro system ontop of it of the most used curves and lines you use to make up a map and also these macros are only allowed to make up few bits
maybe one of the macros is a special one that makes up a repeat function, set by the following bits?
so you want to create a monochrome bitmap, where each pixel/bit represend an endpoint of a line?
Quote from: qWord on June 16, 2010, 04:07:39 PM
so you want to create a monochrome bitmap, where each pixel/bit represend an endpoint of a line?
In the 1980's I ported a risk on Apple II to my atari and had to write a small assembly snippet that supported the 42 apple shapes that made out a whole Worldmap, 42 different territories
while creating Scandinavia with 2 bits/pixel I saw it is flawed and will be lots of bits for a worldmap, just because of unnesserary repeats to create diagonal \ / lines and not reusing partial circles data
so I decided to improve it with the map will instead be drawn with help of a library of tiny shapes resembling: diagonals, 1/4th circle, tiny Island, tiny peninsula etc
and reduce librarysize with help of xor the right numbers to flip it horizontally and vertically
I havent had time to do more, still tests to draw all kinds of "shapes"
maybe I end up making a race game outta this, so thats why I developed procedural curve tile to start with
what do you think?
both seem to work fine here, using XP
mode 13h was always fun to play with :P
mode13h I use just because it is easy for testing purposes, will move on to some of the VESA modes later
this new version is faster
updated version here, creates 4 different tiles rendered after each other depending on bit0 and bit1
crap, right now the latest version renders different kinds of tiles depending on bit0 and bit1 settings,so far it changes curve horizontally and vertically depending on those bits, but I am stuck right now to solve how it scrolls thru several tiles