Search found 15 matches
- Thu Jun 04, 2009 7:33 pm
- Forum: DS/DSi Development
- Topic: Possible bug... need help verifying.
- Replies: 5
- Views: 5782
Re: Possible bug... need help verifying.
This is incredibly misleading, new has zero advantages over malloc for standard memory allocation. The difference between malloc and new is that the latter calls constructors for instantiated objects and calls abort by default when memory is exhausted. Not quite what I was meaning. I wasn't ...
- Wed Jun 03, 2009 9:27 pm
- Forum: DS/DSi Development
- Topic: sub engine LCD access
- Replies: 2
- Views: 3769
Re: sub engine LCD access
If you're just wanting direct access to the sub-engine then it can be done. I've got a test program that uses the main engine for 3D and I've experimented with using banks H and I for the sub-engine (there's just enough RAM there). Try something like: videoSetModeSub(MODE_5_2D); vramSetBankH(VRAM_H ...
- Wed Jun 03, 2009 9:11 pm
- Forum: DS/DSi Development
- Topic: Possible bug... need help verifying.
- Replies: 5
- Views: 5782
Re: Possible bug... need help verifying.
If I were a betting man then my money would be on heap (or possibly stack) corruption. Toss in a bit of compiler optimisation and it's not surprising you're getting different results. It's quite likely that the first call to iprintf will push the value you've just assigned to alive onto the stack ...
- Sat May 23, 2009 9:02 pm
- Forum: Bug Reports
- Topic: libnds: setBrightness
- Replies: 5
- Views: 7804
Re: libnds: setBrightness
Excellent - I didn't realise it had been set up to do that. In that case yes, that's a much better way than manually copying.
- Thu May 21, 2009 9:56 pm
- Forum: Bug Reports
- Topic: libnds: setBrightness
- Replies: 5
- Views: 7804
Re: libnds: setBrightness
If you've just installed the devkitpro updater (the obvious download link) then you probably won't have it. You need to download the libnds source code, modify the files and then build it. Not sure if this link will work, but try http://sourceforge.net/project/showfiles.php?group_id=114505&package ...
- Tue May 12, 2009 8:34 pm
- Forum: DS/DSi Development
- Topic: Converting a structs to a unsigned short-pointer ??
- Replies: 2
- Views: 3593
Re: Converting a structs to a unsigned short-pointer ??
Never used those functions myself, but you'd probably need to change the line to something like:
(i.e. take the reference to variable test2).
Code: Select all
bytesRead = Wifi_RxRawReadPacket(packetID, readlength, (unsigned short*)&test2);
- Mon May 04, 2009 7:22 pm
- Forum: DS/DSi Development
- Topic: Load BMP Sprites
- Replies: 6
- Views: 6815
Re: Load BMP Sprites
I think all is correct. If I only declare an array for the sprite and another one for pallette all works. But if i declare another array, the sprite is showed bad. Some colors disapears. Yes - but simply loading the palette information into an array isn't enough - you must be using some method to ...
- Mon May 04, 2009 1:22 pm
- Forum: DS/DSi Development
- Topic: Load BMP Sprites
- Replies: 6
- Views: 6815
Re: Load BMP Sprites
When you declared the palette as u16 palette[256]; you've allocated it on the stack, when you used "new" you've allocating it on the heap. Both approaches should work - but if you're trying to load the palette into palette memory with dmaCopy then it won't work from the stack. It appears that stack ...
- Thu Apr 30, 2009 10:10 pm
- Forum: DS/DSi Development
- Topic: I'm retarded with Trig Functions...
- Replies: 5
- Views: 6430
Re: I'm retarded with Trig Functions...
There's probably a good reason that passing a constant value worked (C++ function parameter overloading?) but linking with the maths library is normally the right approach anyway. If you're worried about speed then you could investigate the functions in trig_lut.h. You'd either need to use the acos ...
- Mon Apr 27, 2009 10:07 pm
- Forum: Bug Reports
- Topic: libnds: glTexImage2D use of DynamicArray
- Replies: 3
- Views: 6555
Re: libnds: glTexImage2D use of DynamicArray
That's probably a good idea - but I don't think that call is actually called from anywhere at the moment. To be honest, there are other potential problems with the DynamicArray implementation. For example, code such as: DynamicArray *NewArray = new DynamicArray; DynamicArrayInit(NewArray, 16 ...