Advertisement

04.02 - Bringing Up DirectDraw

Started by May 07, 2001 09:28 AM
26 comments, last by Teej 21 years, 12 months ago
Cheers dude! I think I''m learning well

I saw someone mention FMOD somewhere. If you want to see it in action I''ll be posting my Quake2 mod on my site soon, it uses FMOD to allow you to play mp3z in Quake2 and runs fast enough for the game to keep up a good frame rate!

(I''m assuming you can find a link to my site on my profile)
I wrote only for encourage Pazu, and others members of Linux community, to continue his work to porting the excellent Teej''s tutorial on Linux platform. I''d like to learn computer game programming, but not only on Windows... am I right?

Al Sidan
Advertisement
I agree with you AL SIDAN. GO! GO! GO! PAZU! Make the world of linux a better place for game! Teach the community!

Lancelot

Life is endlessly short.
LancelotLife is endlessly short.
Can anyone tell me why the bitwise-OR operator | is used in statements such as:

// Set the cooperative level
hRet = G.lpDD->SetCooperativeLevel(G.hWnd, DDSCL_EXCLUSIVE |
DDSCL_FULLSCREEN);

in the DD_Init() function in the InitTerm.cpp source file?
mirrorman:

quote:
Can anyone tell me why the bitwise-OR operator | is used in statements such as:

// Set the cooperative level
hRet = G.lpDD->SetCooperativeLevel(G.hWnd, DDSCL_EXCLUSIVE |
DDSCL_FULLSCREEN);


DDSCL_EXCLUSIVE and DDSCL_FULLSCREEN are flags which can be added together to get a new flag that contains all the information from the original flags.

I don''t know specifically what bits are set in these flags, so I''ll use a simple example.

Suppose that variable A = 0000 0001 and variable B = 0000 0010 (I''ve separated each byte into two ''nibbles'' for better readability).

Then, C = A | B = (0000 0001) | (0000 0010) = (0000 0011)

As you can see, the variable C = (0000 0011) now contains the information (ie, the set bits) from variables A and B.
Ahh, of course. It all becomes clear. Thanks, Weatherman.

Another question:

Does anyone know of a similar (downloadable) resource to the
DX7 help documents, but for Windows? It would be really useful
to be able to look up the structure members and parameters, etc.
for windows stuff the same way you can in the DX7 help files.

mirrorman.
Advertisement
I don''t know of any "help" files but I use www.microsoft.com/msdn

There is enough information on MSDN for someone to read for many years.
I am here, you are there.Joruli
Update:

On the opening page, move mouse over libraries and click on MSDN library. It''s in similar format to the DirectX help file.
I am here, you are there.Joruli
Great, that''s exactly what I need. Thanks, joruli.

mirrorman
Can someone please show me what it would take to turn Basecode1 into a windowed directx example? I know you can use the clipper, and share the video space with GDI, but I''m having some trouble with the actual code. Please help? Teej? Teej? Bueller?

This topic is closed to new replies.

Advertisement