Search found 11 matches

by TGH
Mon Oct 24, 2011 1:00 pm
Forum: DS/DSi Development
Topic: Big background problem
Replies: 21
Views: 18562

Re: Big background problem

I can't edit the post, i can't find it...

I solved it. The problem was in the fact that I retracted the x-pos and the offset of x in the image, so that is why it was mirrored.
by TGH
Mon Oct 24, 2011 12:31 pm
Forum: DS/DSi Development
Topic: Big background problem
Replies: 21
Views: 18562

Re: Big background problem

OMG, I feel so goddamn stupid. My image is now shown correctly, among the mirroring. The header is useless to me, so I want to get that out of the screen. I looked on the Wikipedia page and i found out that the header is 14 bytes. That means that I don't want to copy these first 14 bytes to the buff...
by TGH
Mon Oct 24, 2011 10:42 am
Forum: DS/DSi Development
Topic: Big background problem
Replies: 21
Views: 18562

Re: Big background problem

http://i51.tinypic.com/nprpt0.jpg This is the original image. 1: My image is indeed mirrored. I see it now. 2: That can be true, I don't know. 3: The color is good, look at the source image. 4: Im copying a BMP image, so I presume i missed the header. Am I copying it wrong to the buffer or something?
by TGH
Sun Oct 23, 2011 10:05 pm
Forum: DS/DSi Development
Topic: Big background problem
Replies: 21
Views: 18562

Re: Big background problem

Thanks for the reply, but I think that isn't really the problem.

Image

As you can see here the image is actually copied to the buffer, only it is drawn wrong, the image is rotated, but i didn't rotated it at all.
by TGH
Sun Oct 23, 2011 2:01 pm
Forum: DS/DSi Development
Topic: Big background problem
Replies: 21
Views: 18562

Re: Big background problem

I can say a couple of things about your code. First, you're performing a lot of steps that are automatically done before main() begins and setting up registers that are easier done with the libnds API. Here are some snippets that would be equivalent to what you have: void init_displays() { // Enabl...
by TGH
Sat Oct 22, 2011 5:46 pm
Forum: DS/DSi Development
Topic: Big background problem
Replies: 21
Views: 18562

Re: Big background problem

Ok, I have a small breakthrough. I have successfully copied my image to the buffer in the correct order. Only my image is shown diagonal... void create_buffers() { main_buffer = (Color*)calloc(SCREEN_PIXEL_COUNT, sizeof(Color)); sub_buffer = (Color*)calloc(SCREEN_PIXEL_COUNT, sizeof(Color)); } void ...
by TGH
Fri Oct 21, 2011 8:42 pm
Forum: DS/DSi Development
Topic: Big background problem
Replies: 21
Views: 18562

Re: Big background problem

dmacopy() also doesn't give me any option to only copy sectors of a bitmap to the memory so I'm kinda stuck.
Other dmacopy() functions also doesn't gave the solution, or am I missing something...?
by TGH
Thu Oct 20, 2011 9:54 pm
Forum: DS/DSi Development
Topic: Big background problem
Replies: 21
Views: 18562

Re: Big background problem

You don't need to cut the image in pieces, you just need to be able to copy a strip from the source image to the destination buffer. Start by copying a 256x192 section from the source image to the bitmap buffer, for that you can start by copying a 256 pixel row to your 512x256 bitmap layer.. Hint: ...
by TGH
Thu Oct 20, 2011 1:39 pm
Forum: DS/DSi Development
Topic: Big background problem
Replies: 21
Views: 18562

Re: Big background problem

For a strip scroller you set up your background to wrap then when the user scrolls the image you draw strips of the image in the offscreen parts of the bitmap at the location that's about to become visible. When the place you need to draw the strip is outside the bitmap area you wrap it round and d...
by TGH
Thu Oct 20, 2011 10:15 am
Forum: DS/DSi Development
Topic: Big background problem
Replies: 21
Views: 18562

Re: Big background problem

Thanks for the info. I already found out that the destination was clearly not good, I used 512x256, 1024x512 (that gave me nothing on screen, because it wasn't 16 bit) and I think that 512x256 is indeed a good call. But then I'm stuck at somehow the same point, because my image is 952x192 and I only...