Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - aeTIos

Pages: 1 ... 154 155 [156] 157 158 ... 274
2326
Axe / Re: Axe tile mapping! HELP!
« on: November 23, 2011, 10:33:47 pm »
You might mean 01.
And no, since you subtract 1 from the sprite number, the 1 is 0 and so on.

2327
Axe / Re: Axe tile mapping! HELP!
« on: November 23, 2011, 10:29:51 pm »
No. 01 would be
[THIS ONE]->pic1

2328
Axe / Re: Axe tile mapping! HELP!
« on: November 23, 2011, 10:03:31 pm »
Hmmm...
You can just play around with this code, throw it in a repeat getKey(15) loop, and add Dispgraph:ClrDraw after it. You can for example change numbers in the map (Create some sprites before and put them in Pic1).
Or try to figure out how to draw a 5x4 map instead of a 4x4. The possibilities are endless.
(if you really want I will create a program but not now since I am a bit tired)

2329
Axe / Re: Axe tile mapping! HELP!
« on: November 23, 2011, 09:53:19 pm »
ok.
Wait, I made a stupid mistake
Code: [Select]
T--
If T
should be
Code: (fixed) [Select]
if T
T--


{B*4    ; B is the row number counted from zero, 4 is the width of a row
+A        ; A is the column number (sorry for being wrong there)
{B*4+A  ;gets the tile number counted from upper left.
+GDB1}  ;GDB1 is the pointer to the tilemap.
->T    ;store the number that this returns in T
If T   ; only draw a tile when T is not zero (zero means no sprite)
T--   ;subtract one from T to get the tile number
pt-on(a*8,B*8,  ;draws the sprite at a*8,b*8
T*8   ;multiplies T by 8 since one sprite is 8 bytes
+Pic1  ;Pointer to sprite data

I hope it is clear now ;D


T--    ;subtracts one from T so you do not have to draw

2330
Axe / Re: Axe tile mapping! HELP!
« on: November 23, 2011, 09:39:53 pm »
A for loop repeats until the variable specified reaches the second number (it adds one to the variable each time a loop is ran)
For(variable, start, stop)
so for(a,0,3) will loop from a = 0 to a = 3. The best thing is that you can access the variable inside the loop.

2331
Axe / Re: Axe tile mapping! HELP!
« on: November 23, 2011, 09:28:51 pm »
If you experience any problems please ask.

2332
Axe / Re: Axe tile mapping! HELP!
« on: November 23, 2011, 09:22:17 pm »
Okay, very quick (basically commented code): Say what part you don't get.
Code: [Select]
[01010101]->GDB1   ;this is the tilemap in hexadecimal code.
[01000001]
[01010001]
[01000001]
(Some sprite data to pic1 here)
for(b,0,3)   ;outer loop for drawing the different columns
for(a,0,3)   ;inner loop for drawing the rows
{B*4+A+GDB1}->T  ;gets the tile number minus 1 to T
if T ;checks if a tile should be drawn
T--
pt-on(a*8,b*8,T*8+pic1)   ;draw the tile
end
end
end
That are the basics of the tilemap drawing code.

2333
Axe / Re: Axe Q&A
« on: November 23, 2011, 09:11:06 pm »
Thank you!

2334
Gaming Discussion / Re: who wants to play portal 2 coop with me?
« on: November 23, 2011, 09:06:30 pm »
I actually don't even know if I can get Portal 2 working. I will see that first right?

2335
Gaming Discussion / Re: who wants to play portal 2 coop with me?
« on: November 23, 2011, 09:04:17 pm »
Which I do not have (I live in Europe)

2336
Axe / Re: Axe Q&A
« on: November 23, 2011, 09:01:17 pm »
You are right. Eh, the syntax is fill(number, string/gdb/pic/w-e)?

2337
Axe / Re: Axe Q&A
« on: November 23, 2011, 08:54:02 pm »
:headbang:
Forgot. I always missed zeros()

2338
Gaming Discussion / Re: who wants to play portal 2 coop with me?
« on: November 23, 2011, 08:53:23 pm »
Lol in 7 hours I most likely are at school. So that won't work.

2339
Gaming Discussion / Re: who wants to play portal 2 coop with me?
« on: November 23, 2011, 08:23:18 pm »
If I can get it to run. If. Also it might take a while since I am downloading for >1.5 hour and only have 40% done.

2340
Axe / Re: Axe Q&A
« on: November 23, 2011, 08:22:08 pm »
aww. How to fill it with zeros?

Pages: 1 ... 154 155 [156] 157 158 ... 274