VOGONS


First post, by vgagame

User metadata
Rank Newbie
Rank
Newbie

I am learning to program in the C programming language.

I've decided I am not interested in Game Development. I am more interested in rendering and programming in C.

I have attached blit.c which I got from an archive for the Allegro 4.0 game library which uses Direct X 7.

All feel like I am unfamiliar with all of the code in this game development library.

But specifically I have a question about this part:

static void blit_from_16(BITMAP *src, BITMAP *dest, int s_x, int s_y, int d_x, int d_y, int w, int h)

Is this a reference to functions from directX 7? And is the BITMAP *src function parameters fundamental to directX 7? Was the concept of source and destination "surfaces" used as far back as directX 5?

Reply 1 of 1, by vgagame

User metadata
Rank Newbie
Rank
Newbie

My background is with mode 13h. I found the concept of copying bytes to a frame buffer to be understandable.

The file I attached to my first message, blit.c is from Allegro 4.0 which uses directX 7.

When I try to examine blit.c I have difficulty understanding how to blit bitmaps to the screen.

I have things that I think may be going on but I don't know for sure. I believe directX is primary accessed with C++ through an interface called COM. I believe Allegro indirectly accesses directX through COM using the C programming language.

The function I referred to earlier is as follows:

static void blit_from_16(BITMAP *src, BITMAP *dest, int s_x, int s_y, int d_x, int d_y, int w, int h)

Is allegro using directX 7 to blit bitmaps to the screen? Is the structure BITMAP part of directX 7? Is this how blitting is done with directX 7?

How is Allegro able to blit a bit map to the screen using directX?