Author Topic: Help with filling the screen or drawing a sprite or checkerboard?  (Read 4492 times)

0 Members and 1 Guest are viewing this topic.

Offline BrownyTCat

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 420
  • Rating: +37/-8
    • View Profile
I need some help with it. All attempts crashed.  :-\
I also need details on the options for setPixel's "color" parameter.
All I can do is clear the screen and draw a sprite painstakingly pixel-by-pixel. I'll need a template for a sprite data like the .db and sprite (ion) of ASM.
I just want a sprite thing like
Code: [Select]
table =
10001
01010
00100
01010
10001

Would be a small "x"

Offline apcalc

  • The Game
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1393
  • Rating: +120/-2
  • VGhlIEdhbWUh (Base 64 :))
    • View Profile
Re: Help with filling the screen or drawing a sprite or checkerboard?
« Reply #1 on: March 05, 2011, 11:34:28 am »
Well, this sprite would normally be defined by:

Code: [Select]
table[25]={
1,0,0,0,1,
0,1,0,1,0,
0,0,1,0,0,
0,1,0,1,0,
1,0,0,0,1};

But, in order to help you out more, I need to know which sprite routine (if any) you are using.  The latest one in bwang's (somewhat old) static library would take a different format.

Also, the color parameter is an integer from 0-15, with 0 and 1 representing black and 15 representing white.


Offline BrownyTCat

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 420
  • Rating: +37/-8
    • View Profile
Re: Help with filling the screen or drawing a sprite or checkerboard?
« Reply #2 on: March 05, 2011, 07:14:38 pm »
Can you tell me where to obtain the lib and basic instructions? It will make drawing objects much easier....

Offline apcalc

  • The Game
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1393
  • Rating: +120/-2
  • VGhlIEdhbWUh (Base 64 :))
    • View Profile
Re: Help with filling the screen or drawing a sprite or checkerboard?
« Reply #3 on: March 05, 2011, 10:01:58 pm »
Download the library here:

http://ourl.ca/4852

I think there might be documentation of it somewhere in the thread.  If you have any specific questions, feel free to ask! :)


Offline fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Re: Help with filling the screen or drawing a sprite or checkerboard?
« Reply #4 on: March 06, 2011, 09:37:23 am »
Are you trying to use 16 as a color parameter for setpixel?