Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / plz take a look at my tile map. prints map wrong.

Author
Message
hwoarang
7
Years of Service
User Offline
Joined: 19th May 2012
Location:
Posted: 20th May 2012 12:35
i have a array 10X13. where it say 1 i want to print image called wall.

ok so the array part is easy. iam pretty sure its fine. less continue.





less look at my main part of code. here iam trying to loop through array and where i see 1 paste image. i sound easy but for some reason its not working.




when i run this here is what i am getting.
111111111
1
1
111
111111111

but i should get some thing like this
11111111111
1 1
1 1
1 1
1 1
11111111111

note size of 1's is not right. i should be 10x13






iam not sure but i think in dbpasteImage() i have to *32? or some thing. any thingk will be helpfull. iam stuck on this for a week.
DeadTomGC
9
Years of Service
User Offline
Joined: 11th Aug 2010
Location: LU
Posted: 21st May 2012 20:21
I would just take your y in dbSprite(1, x*32, y*32, 1);(get rid of the //) and replace it with an r and replace the x with a c.
Also, I'd drop the paste image thing.

If that doesn't work, do it the other way around.


Mister Fuzzy
8
Years of Service
User Offline
Joined: 27th Feb 2011
Location: XNA
Posted: 3rd Jun 2012 19:18 Edited at: 3rd Jun 2012 19:20
[Whoops! Wrong topic]

ALIEN(S)!!!!!!!!1!! (and sausages)
Eccentric Developer
7
Years of Service
User Offline
Joined: 2nd Jun 2012
Location:
Posted: 3rd Jun 2012 19:21 Edited at: 3rd Jun 2012 23:46
Your code can be compressed down to this:




Your X and Y values are unnecessary, as the values called by the for loop can easily perform the same exact function. I'm not on a computer that I can check this code on, but that SHOULD work, based on tile printers I've done before.

Login to post a reply

Server time is: 2019-08-22 06:07:00
Your offset time is: 2019-08-22 06:07:00