Advertisement

04.01 - Some Code to Ponder

Started by April 23, 2001 04:41 PM
41 comments, last by Teej 22 years, 5 months ago
Mortation: The magic is in the extern keyword. Look that there is something like this in the globals.h file:

#ifndef GLOBALS_OWNERSHIPextern#endifstruct G...


So, every file EXCEPT the one which defines GLOBAL_OWNERSHIP (which is gamemain.cpp) gets an external reference to G.

This was a nice trick, Teej!
Ja ne, Pazu mailto: pazu@animegaiden.com.brClose the world, open the neXt
So if I was to do
#ifndef INPUT_OWNERSHIP
extern
#endif
struct M

and call
#define INPUT_OWNERSHIP in input.cpp
I will be ok? No more already defined errors?

V^^^V
** |Mortation| **
@hotmail.com
AOL:M0RTATI0N ICQ:2515421
MortÔ¿Ô¬
Advertisement
Teej: I believe the problem is by solved now. Like Pezy says, the BaseCode1 project is written in C++, but without the OO concepts... My code was in _pure_ C, and that was why I couldn''t get it to work (by doing it the way you did).


\JWA
Anyone kind enough to post somewhere BaseCode1.zip?

Seems that WebJump''s less than reliable and I''m unable to dig into the tutorial (though excellent as they may be) without ''em.

Thanks in advance!
Anon - are you sure you've got your second and third parameters round the right way?

Teej - There was an article recently about using multiple threads. Would it be a good idea to put Game_Main() in a seperate thread? I understand that you don't want to clutter the tutorial with Win32 code, but in my own programs...?

Superpig
- saving pigs from untimely fates

Edited by - superpig on June 6, 2001 4:39:40 PM

Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse

I''m afraid i must be showing up a few months too late...
it seems all of the code examples have gone missing (even
at the second URL posted below).

does anyone know where i can find this stuff?






Advertisement
Sorry ''bout that -- the webpage went dead.

Here''s the new location:

http://www.angelfire.com/home/gamedev

Teej


I dont seem to get anything when I try that url, just a parent directory and cant find anything useful in there, am I being really dumb?
yea I come too late too

I am desperatly looking for the directx7.0 manual and I cant find it anywhere

If someone who have it come back to the forume plz help me
Ible has mirrored all the files (including the DX7 help files) at http://www.sfu.ca/~dbrokens/index.html.

This topic is closed to new replies.

Advertisement