🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

NEWBIE - Help with bitmap templates?

Started by
1 comment, last by Gollum 24 years, 5 months ago
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.
Advertisement
Why dont you just use the ddutil functions that come with directx, but if you have your heart set on doing it yourself then sorry this my post is pointless...

Edited by - Chris F on 1/13/00 7:10:57 AM
"I have realised that maths can explain everything. How it can is unimportant, I want to know why." -Me
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!

This topic is closed to new replies.

Advertisement