Jump to content

  • Log In with Google      Sign In   
  • Create Account


- - - - -

02.07 - The Readiness Test

  • You cannot reply to this topic
215 replies to this topic

#21 Device   Members   -  Reputation: 122

Like
Likes
Like

Posted 21 April 2001 - 10:38 PM

I can''t seem to find the DirectX 7 SDK anywhere. Microsoft only has 8 listed on their website. I have downloaded the SDK for version 8 already. Will 8 be suffecent?

Sponsor:

#22 Piotyr   Members   -  Reputation: 122

Like
Likes
Like

Posted 22 April 2001 - 02:37 AM

Device: Just check to make sure the files ddraw.h and ddraw.lib are on your machine from the DX 8 SDK. If you''ve got those files, then that''s all it''ll matter for doing the programming in here. You can tell DX that you want to program in version 7, as Teej does in his basecode, and it''ll listen and follow instructions.

#23 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 22 April 2001 - 03:00 AM

As has already been said, you can use the dx8 SDK, but you''ll want the dx7 documentation, Microsoft has a version available for download at:

http://http://msdn.microsoft.com/downloads/default.asp?URL=/code/topic.asp?URL=/msdn-files/028/000/114/topic.xml

This is a 14Mb download containing both the vb and the c++ documentation.

------------------
It''s me again!

#24 Taharez   Members   -  Reputation: 184

Like
Likes
Like

Posted 22 April 2001 - 03:04 AM

That was me =)

------------------
It''s me again!

#25 Higgenkreuz   Members   -  Reputation: 122

Like
Likes
Like

Posted 22 April 2001 - 05:08 PM

Hi everyone,

Could somebody send me ddraw.lib? My project doesn't link properly and I suspect this file might be corrupt. Since I would like to avoid downloading the entire SDK from Microsoft again I figured this would be faster. I use DirectX ver 8.0 and the file can be sent to my e-mail at attila_007@hotmail.com.

Thanks a lot in advance for any help,

Cheers

Edited by - Higgenkreuz on April 22, 2001 12:10:37 AM

#26 Teej   GDNet+   -  Reputation: 176

Like
Likes
Like

Posted 23 April 2001 - 05:35 AM

Fighterdude: Sorry for the bad error reporting, but it''s a lot better than I had it (returned FALSE on failures). The idea here was to give you a clue as to the nature of the error by letting you manually ''look it up'' in the source code. Not to worry though, I''m definitely introducing real debugging facilities in a future article.

As for the documentation, I recommend the online help because then you could look up a component, method, constant or whatever instantly using the help''s indexing feature. There''s nothing stopping you from grabbing both however (they''re identical though).

Mucman: No, you don''t need to understand ANYTHING in the template code. The goal here is to get it compiling and linking, and that''s it. Don''t worry, I''ll break it to ya gently...

Higgenkreuz: For the DLLs, you should download the newest runtimes from Microsoft (DirectX for home users).

Teej





#27 Hah Coe   Members   -  Reputation: 122

Like
Likes
Like

Posted 23 April 2001 - 06:40 AM

I have a quick question...

In Globals.h, the DirectDraw surfaces are declared using LPDIRECTDRAWSURFACE7. However, in the utilities functions you use IDirectDrawSurface7*. What''s the difference?

Hah Coe
hahcoe@yahoo.com


#28 marcl   Members   -  Reputation: 122

Like
Likes
Like

Posted 23 April 2001 - 02:37 PM

Here is an odd one, it complies and links find for me but I cannot run it. It comes up, changes to full screen, and closes. Very odd.

#29 Teej   GDNet+   -  Reputation: 176

Like
Likes
Like

Posted 24 April 2001 - 05:57 AM

Hah Coe: If you look at the definition of LPDIRECTDRAWSURFACE7, you''ll see that it''s a (far) pointer to a IDirectDrawSurface7 object. In other words, they''re virtually the same thing. Take a look at some of these definitions (from WINDEF.H):

  
typedef unsigned long DWORD;
typedef int BOOL;
typedef unsigned char BYTE;
typedef unsigned short WORD;
typedef float FLOAT;
typedef FLOAT *PFLOAT;
typedef BOOL near *PBOOL;
typedef BOOL far *LPBOOL;
typedef BYTE near *PBYTE;
typedef BYTE far *LPBYTE;
typedef int near *PINT;
typedef int far *LPINT;
typedef WORD near *PWORD;
typedef WORD far *LPWORD;
typedef long far *LPLONG;
typedef DWORD near *PDWORD;
typedef DWORD far *LPDWORD;
typedef void far *LPVOID;
typedef CONST void far *LPCVOID;

typedef int INT;
typedef unsigned int UINT;
typedef unsigned int *PUINT;


As you can see, there are a lot of different ways of talking about the same ''thing''. For instance, I can use

void *lpVoid;

for a void pointer, or just the same:

LPVOID lpVoid;

(ignore near and far). You do have a point in that I should be more consistent, but at the same time one is just an alias for another, so it''s only a readability issue.

All the same, thanks for the nudge -- I think I might ''fix'' that after all.

Teej



#30 darkpunk   Members   -  Reputation: 122

Like
Likes
Like

Posted 24 April 2001 - 11:26 AM

Teej,

I was just interested about how you set up your globals header and was wondering why you use the following code and put alot of the direct x global variables in a structure. There arent many tutorials explaining how to seperate your code into different source files and get it to work and I was just wondering if this was the key i''ve been looking for...BTW thanks for the good ideas!

// Global Variables
//----------------------------------------------------------------------------

#ifndef GLOBALS_OWNERSHIP
extern
#endif

struct
{

Thanks,
MikeD

#31 luizh   Members   -  Reputation: 122

Like
Likes
Like

Posted 24 April 2001 - 06:50 PM

I''m trying to compile the basecode under Borland C++ Builder 4, but i keep getting these errors:

[Linker Error] Unresolved external ''_IID_IDirectDraw7'' referenced from C:\CG\HANDSON\PROJETO\BASECODE1\INITTERM.OBJ.
[Linker Error] Unresolved external ''DirectDrawCreateEx'' referenced from C:\CG\HANDSON\PROJETO\BASECODE1\INITTERM.OBJ.
[Linker Error] Unresolved external ''_IID_IDirectInput7A'' referenced from C:\CG\HANDSON\PROJETO\BASECODE1\INITTERM.OBJ.
[Linker Error] Unresolved external ''DirectInputCreateEx'' referenced from C:\CG\HANDSON\PROJETO\BASECODE1\INITTERM.OBJ.
[Linker Error] Unresolved external ''_IID_IDirectInputDevice7A'' referenced from C:\CG\HANDSON\PROJETO\BASECODE1\INITTERM.OBJ.
[Linker Error] Unresolved external ''_c_dfDIKeyboard'' referenced from C:\CG\HANDSON\PROJETO\BASECODE1\INITTERM.OBJ.

All my .h and .lib seems to be Ok. Does anyone have any idea about what can be happening?

#32 Weatherman   Members   -  Reputation: 122

Like
Likes
Like

Posted 25 April 2001 - 02:32 AM

luizh:

Did you link dxguid.lib into your program?

#33 Teej   GDNet+   -  Reputation: 176

Like
Likes
Like

Posted 25 April 2001 - 06:27 AM

Darkpunk: I''ll be discussing that little ''technique'' in an article coming up shortly, but I can tell you that it''s a nice way of organizing globals. One of the really frustrating things when dealing with multiple headers/source files is keeping the compiler/linker happy, and this method sure helps.

Teej



#34 Mogrem   Members   -  Reputation: 122

Like
Likes
Like

Posted 25 April 2001 - 07:28 AM

Hiya all!
I just got the whole thing to compile, link, and run with the free Borland 5.5 compiler and VIDE. It only took me about 12 hours . If anyone needs help with 5.5 and VIDE will do my best to help out. It was in the end very simple to do. Have Fun!

Mogrem

#35 darkpunk   Members   -  Reputation: 122

Like
Likes
Like

Posted 25 April 2001 - 07:30 AM

Yeah globals are really rough, and id love to figure that out since it would be really useful for when i''ve developed my own dx functions and want to make a seperate file to include in future games.

I cant wait to read the article!! Will this way of global defining also work when attempting to make a *.lib file? I was trying to compile my dx init stuff into one lib so i can constant reuse it with all my idea testing programs. It gets monotonous to type out winapi a billion times as well as dx objects.

Anyway, i look forward to reading more of this forum.

MikeD

#36 Beachside   Members   -  Reputation: 122

Like
Likes
Like

Posted 25 April 2001 - 03:29 PM

Hooray! Compiled and linked and ready to rock.

#37 luizh   Members   -  Reputation: 122

Like
Likes
Like

Posted 25 April 2001 - 03:45 PM

weatherman:

hey, thx for the tip! i forgot to link some libs (ddraw.lib, dxguid.lib and c_dinput.lib). Now its really working! thx again.

HAUHUAHUAHUAHAUHA now i''m ready....

#38 Pippen33   Members   -  Reputation: 122

Like
Likes
Like

Posted 25 April 2001 - 05:58 PM

Help me please...
I couldn''t get your BaseCode1 working.
Probably because I don''t have Directx7 SDK installed.
Could someone give me a URL for this? I can''t find it.

Also, I am using MSVC++ 6 and found that it has its own default "ddraw.h", "dsound.h" and "dinput.h" header files. What versions are these? Can we use these? I found that some functions had different name and different parameter lists to what TeeJ had used.
e.g. ''LPDIRECTDRAW7'' would be ''LPDIRECTDRAW''

I know next to nothing about DirectX so this is probably be silly question but I''d be grateful if someone could answer my questions nonethless...



Go Blazers~~!!!

#39 jamal   Members   -  Reputation: 122

Like
Likes
Like

Posted 25 April 2001 - 09:53 PM

pippen33: what you see are old verions of directx files. you can get the newest files at www.microsoft.com/directx. you need to download the directx 8 sdk and runtime files.

#40 Higgenkreuz   Members   -  Reputation: 122

Like
Likes
Like

Posted 26 April 2001 - 03:34 AM

OK, now I am getting desperate. I still have the same problem:


Linking...

d:\dxvcsdk\lib\ddraw.lib : fatal error LNK1106: invalid file or disk full: cannot seek to 0x389bc793

Error executing link.exe.


Here are the steps I have taken so far to solve this problem:

  • Checked HD, it is not full

  • Moved ddraw.lib and its directory to a different HD to make sure that my HD wasn't damaged, had bad blocks, etc.(made appropriate changes in my IDE to reflect these changes)

  • Re-downloaded and re-installed the entire SDK (ver 8.0) as well as the run-time libraries (ver 8.0a)to ensure that none of the files are corrupt in the kit.

  • Read countless articles and postings on the Net, still found no reasonable explication


I am using MS Visual C++ 5.0 with the minimum installation configuration, so some of my /lib and /include directories as well as other misc. stuff are running from the CD-Rom. I heard that if the .lib file was compiled using VC 6.0 and you are still using VC 5.0 you might run into this problem. I doubt it though, I imagine many of you are using VC 5.0 with the DirectX SDK ver 8.0 and nobody seems to have this problem.

Anyway, ANY idea would be greatly appreciated as I am running out of them and don't know what else to do, I am really stuck.

Thanks in advance




Edited by - Higgenkreuz on April 26, 2001 10:52:59 AM





PARTNERS