Results 1 to 4 of 4

Thread: Masks?

  1. #1

    Thread Starter
    Fanatic Member invitro's Avatar
    Join Date
    Jan 2000
    Location
    Outside your window
    Posts
    547

    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?

  2. #2
    Fanatic Member jian2587's Avatar
    Join Date
    Aug 2000
    Location
    I bet u need a fusion powered shuttle to reach my place...
    Posts
    963
    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

  3. #3

    Thread Starter
    Fanatic Member invitro's Avatar
    Join Date
    Jan 2000
    Location
    Outside your window
    Posts
    547
    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?

  4. #4
    Fanatic Member jian2587's Avatar
    Join Date
    Aug 2000
    Location
    I bet u need a fusion powered shuttle to reach my place...
    Posts
    963
    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
  •  



Click Here to Expand Forum to Full Width