|
-
Dec 16th, 2001, 11:37 PM
#1
Thread Starter
Fanatic Member
Please advice on my DirectX programming
I have made a small project using DirectX. It uses Direct Draw to blt frames from a bitmap based on the input keys. I just want you guys to check my source code and tell me if it is programmed in an optimized form or I can still make improvements.
One major improvement would be memory management. Every time I run the program my memory page size increases by about 42mb. How do I remove the memory allocated for my program
The compressed size of the bitmap even in GIF format was 163 kb, so I had to split the file in 2 attachments due to the limitations of this site.
THE TIME/WEATHER IS 
Don't know how to use APIs or have problem with them,
Download API-Guide & API-Viewer from http://www.allapi.net
-
Dec 16th, 2001, 11:42 PM
#2
Thread Starter
Fanatic Member
The second half of the sprite bitmap
Here is the second half of the sprite bitmap. Open actionpic0.bmp from the previous zip file. Increase the height attribute to 980pxl.
Paste the bitmap in actionpic1.zip to the new area and Save as 'actionpic.bmp' in project directory. Sorry for the inconvenience.
actionpic0.bmp + actionpic1.bmp = actionpic.bmp (In App.Path)
THE TIME/WEATHER IS 
Don't know how to use APIs or have problem with them,
Download API-Guide & API-Viewer from http://www.allapi.net
-
Dec 18th, 2001, 07:29 AM
#3
Frenzied Member
-
Dec 18th, 2001, 07:30 AM
#4
Frenzied Member
Btw, you also forgot to set the color key for the sprites
-
Dec 18th, 2001, 11:41 AM
#5
Thread Starter
Fanatic Member
Thanks.
Anyway what about the memory page size problem. Can I remove the virtual memory allocated for it.
And about the setting the Color Key, I found a link in vbexplorer.com about make sprite have transparent background. But It linked me to an article on setting 16-Bit Colors.
Can you please give me the Syntax for setting the color key for transparent background.
THE TIME/WEATHER IS 
Don't know how to use APIs or have problem with them,
Download API-Guide & API-Viewer from http://www.allapi.net
-
Dec 18th, 2001, 11:55 AM
#6
Thread Starter
Fanatic Member
OK no problem on Setting Color Key to make a color transparent. I found the answer from some of your other posts in this matter.
THE TIME/WEATHER IS 
Don't know how to use APIs or have problem with them,
Download API-Guide & API-Viewer from http://www.allapi.net
-
Dec 18th, 2001, 02:01 PM
#7
Frenzied Member
To make the surface smaller you just have to remove the spaces around the frames, Paintbrush is enough to do that, you don't need PSP or something
-
Dec 18th, 2001, 03:57 PM
#8
Good Ol' Platypus
If the image is too large to fit in Video Memory (as yours was) it's stored in the slow system memory (the swap file). Using a smaller image helped, as Jotaf said. It let your computer store the image in actual video memory instead of virtual memory.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|