I am very new, just learning directx (from the Andre''s latest book), and I am up to the part about loading bitmaps. As I understand it, there are two main ways to do it:
1. Create and load individual bitmap files.
2. Create bitmap files that are templated, and then write a script(or engine? what''s the dif?) to extract them.
Number two sounds much better, but he doesn''t explain how to write this extraction engine.
Anyone know of a good tutorial and/or source code? Are there speed issues I should be aware of? I''m going to try to build a sprite-based scrolling type game as I read the book.
Thanx in advance, Chris the newbie.
If I understand you well, it is very simple! all you have to do is just put some bitmaps in equal size (like 32 X 32, or something else), put a line seperating them, and then load them: Load first 32 X 32 bitmap, move one pixel (for the seperating line), and then again, load another bitmap. Put it in a function like this: Load_Bitmap(int cellx, celly, int width, int height, the bitmap). so let''s say cellx = 4, celly = 2, width = 32, and height = 32: load_bitmap_x = cellx + 1 * width load_bitmap_y = celly + 1 * height
Beside, if you have the book Windows Game programming for dummies, you have a library that contains function that does that. For info about the library look chapter 12. Hope that help!