|
-
Jun 18th, 2002, 06:12 PM
#1
Thread Starter
Fanatic Member
Masks?
What is the best way to animate sprites... without using keyboard characters?!
My friend along time ago use to use a XOR mask... each character was stored in afile... that looekd like
0 0 1 0 0
0 1 0 1 0
0 1 0 1 0
0 0 1 0 0
where each 1 would be the color that was read, and inputed with PSET.
Anyone hird of this method?
ok, so... windows takes 1 minute to search for a file on my PC yet google.com takes 1 second to search the entire internet? 
-
Jul 29th, 2002, 07:08 AM
#2
Fanatic Member
You write them to a file, then read them into an array
Then you test each byte, if its a zero, dont draw it, else, pset it
ASM,C,C++,BASIC,VB,JAVA,VBS,HTML,ASP,PHP,mySQL,VB.NET,MATLAB
Programming is fun, but only if you're not on a tight deadline 
So I consider all those working engineers sad people
VB FTP class
3 page PHP crash course
Crash Course on DX9 Managed with VB.NET covering basics till terrain creation
-
Jul 29th, 2002, 05:11 PM
#3
Thread Starter
Fanatic Member
Ohhh ya its all coming back to me, thank you!
..I just thought there was something elsem ore to it... hmmm... isent psetting the values every time a slow process?
ok, so... windows takes 1 minute to search for a file on my PC yet google.com takes 1 second to search the entire internet? 
-
Jul 31st, 2002, 07:27 AM
#4
Fanatic Member
What's really slow is testing it for zero, not pset
HOwever, u can speed things up further by using poke
'Example
DEF SEG = &HA000
FOR I& = 0 TO 65535
POKE I&,INT(RND*255)
NEXT
DEF SEG
This is still very slow, try using ASM codes
FYI, indeed u need to pset every bit, if u need to use MASK
Otherwise, you could just move them in blocks to the destination
You could use REP MOVSD in ASM codes to move them
quickly
ASM,C,C++,BASIC,VB,JAVA,VBS,HTML,ASP,PHP,mySQL,VB.NET,MATLAB
Programming is fun, but only if you're not on a tight deadline 
So I consider all those working engineers sad people
VB FTP class
3 page PHP crash course
Crash Course on DX9 Managed with VB.NET covering basics till terrain creation
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|