Search found 45 matches

by xXFracXx
December 9th, 2013, 11:31 am
Forum: Everything
Topic: [Help]Sprite not loading...
Replies: 11
Views: 3775

Re: [Help]Sprite not loading...

I would also point out that when you use malloc or new you should free the momory after leaving the scope, or when destructing the class: For malloc use "free( pData );" and for new "delete[ ]pData;". And since we are using C++ you should be using "new" and "delete". I didn't add that, as I am not ...
by xXFracXx
December 9th, 2013, 11:22 am
Forum: Everything
Topic: Question to Chili/Lux and others who can help!
Replies: 31
Views: 10245

Re: Question to Chili/Lux and others who can help!

http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx :) Thanks :) Well I just updated the .h and .cpp files, and just tried to compile it to see if it works, and I get this error: 1>------ Build started: Project: Chili DirectX Framework, Configuration: Debug Win32 ------ 1...
by xXFracXx
December 9th, 2013, 10:31 am
Forum: Everything
Topic: Question to Chili/Lux and others who can help!
Replies: 31
Views: 10245

Re: Question to Chili/Lux and others who can help!

http://www.planetchili.net/forum/viewtopic.php?f=3&t=961#p3028 it would be in the platformer.zip download, and yes, you can just update the keyboard.h/cpp files :) Thank you very much :) I guess I have to use this code: void OnKeyPressed( unsigned char keycode ); So the keycode would be what? Is th...
by xXFracXx
December 9th, 2013, 10:03 am
Forum: Everything
Topic: Question to Chili/Lux and others who can help!
Replies: 31
Views: 10245

Re: Question to Chili/Lux and others who can help!

Yeah, if you had to poll every key individually it would be a chore indeed. If you're dead-set on using the framework to create a UI, you should really get the most recent framework code with the keyboard class enhancements. As for the actual implementation, just handle mouse clicks by testing whet...
by xXFracXx
December 9th, 2013, 10:00 am
Forum: Everything
Topic: Need Help: Lesson 20
Replies: 5
Views: 2246

Re: Need Help: Lesson 20

Oh I see, that makes sense, I was keeping the file in the wrong location. Thanks :)
by xXFracXx
December 9th, 2013, 8:40 am
Forum: Everything
Topic: [Help]Sprite not loading...
Replies: 11
Views: 3775

Re: [Help]Sprite not loading...

that would be because the top code line is using a width that is a multiple of 4 (which had a bug in the LoadBMP function which chili gave the fix for later on, probably next lesson) the fix is pretty much on the line that nPaddingBytesPerRow is declared to change it to int nPaddingBytesPerRow = (4...
by xXFracXx
December 9th, 2013, 8:00 am
Forum: Everything
Topic: [Help]Sprite not loading...
Replies: 11
Views: 3775

Re: [Help]Sprite not loading...

Go to cplusplus.com look up new or malloc in the search bar. malloc is what chili uses in the beginner series, then uses new in the intermediate series. Both are used for allocating more memory. Here is an example using D3DCOLOR as the type: D3DCOLOR *ptr; To use malloc ptr = (D3DCOLOR*) malloc( si...
by xXFracXx
December 9th, 2013, 7:14 am
Forum: Everything
Topic: [Help]Sprite not loading...
Replies: 11
Views: 3775

Re: [Help]Sprite not loading...

If someone can do it for me, that would be awesome!
As today is like the pushing the last day that I have for working on this project.
by xXFracXx
December 9th, 2013, 7:12 am
Forum: Everything
Topic: [Help]Sprite not loading...
Replies: 11
Views: 3775

Re: [Help]Sprite not loading...

watch the next 2 lessons, chili will explain it. You have to allocate system memory if you are wanting to load int something large...the size of the bmp is 1,329,780 bytes...more than the default stack can handle. chili goes over how to allocate heap memory in the next lesson or 2. Well he does loa...
by xXFracXx
December 9th, 2013, 5:25 am
Forum: Everything
Topic: [Help]Sprite not loading...
Replies: 11
Views: 3775

Re: [Help]Sprite not loading...

What's the whole function? You probably don't allocate your memory. Yeah, I don't think I did that, how can I give it more juice? void LoadSprite( Sprite* sprite, D3DCOLOR* surface, const char* fileName, unsigned int width, unsigned int height, D3DCOLOR key) { LoadBmp(fileName, surface); sprite->he...