• Create Account

NEWBIE - Help with bitmap templates?

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

2 replies to this topic

#1Gollum  Members

122
Like
Likes
Like

Posted 05 January 2000 - 03:59 AM

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.

#2Chris F  Members

122
Like
Likes
Like

Posted 13 January 2000 - 01:10 AM

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

#3BenB  Members

122
Like
Likes
Like

Posted 13 January 2000 - 01:27 AM

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!

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.