Jim Adams GameCore (Core_Graphics) Problem!

Started by
7 comments, last by Hedos 20 years, 11 months ago
Hi... I have the book "Programming RPG games with DirectX 8.0" from Jim Adams... For the first time, I tried to use his gamecore... But there is a big problem, a really strange problem... When I try to compilate my program ( I only included the graphic core for now )... There are errors and a lots of warning in the Graphic Core...
  
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(222) : warning C4305: 'argument' : truncation from 'const int' to 'char'
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(222) : warning C4309: 'argument' : truncation of constant value
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(222) : warning C4305: 'argument' : truncation from 'const int' to 'char'
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(222) : warning C4309: 'argument' : truncation of constant value
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(222) : warning C4305: 'argument' : truncation from 'const int' to 'char'
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(222) : warning C4309: 'argument' : truncation of constant value
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(1124) : error C2660: 'UpdateSkinnedMesh' : function does not take 2 parameters
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(1280) : error C2660: 'GenerateSkinnedMesh' : function does not take 5 parameters
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(1788) : error C2660: 'UpdateSkinnedMesh' : function does not take 2 parameters
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(2386) : warning C4305: 'argument' : truncation from 'const int' to 'char'
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(2386) : warning C4309: 'argument' : truncation of constant value
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(2386) : warning C4305: 'argument' : truncation from 'const int' to 'char'
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(2386) : warning C4309: 'argument' : truncation of constant value
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(2386) : warning C4305: 'argument' : truncation from 'const int' to 'char'
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(2386) : warning C4309: 'argument' : truncation of constant value
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(2387) : warning C4305: 'argument' : truncation from 'const int' to 'char'
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(2387) : warning C4309: 'argument' : truncation of constant value
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(2387) : warning C4305: 'argument' : truncation from 'const int' to 'char'
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(2387) : warning C4309: 'argument' : truncation of constant value
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(2387) : warning C4305: 'argument' : truncation from 'const int' to 'char'
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(2387) : warning C4309: 'argument' : truncation of constant value
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(2388) : warning C4305: 'argument' : truncation from 'const int' to 'char'
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(2388) : warning C4309: 'argument' : truncation of constant value
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(2388) : warning C4305: 'argument' : truncation from 'const int' to 'char'
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(2388) : warning C4309: 'argument' : truncation of constant value
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(2388) : warning C4305: 'argument' : truncation from 'const int' to 'char'
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(2388) : warning C4309: 'argument' : truncation of constant value
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(2507) : warning C4305: 'argument' : truncation from 'const int' to 'char'
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(2507) : warning C4309: 'argument' : truncation of constant value
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(2507) : warning C4305: 'argument' : truncation from 'const int' to 'char'
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(2507) : warning C4309: 'argument' : truncation of constant value
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(2507) : warning C4305: 'argument' : truncation from 'const int' to 'char'
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(2507) : warning C4309: 'argument' : truncation of constant value
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(2508) : warning C4305: 'argument' : truncation from 'const int' to 'char'
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(2508) : warning C4309: 'argument' : truncation of constant value
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(2508) : warning C4305: 'argument' : truncation from 'const int' to 'char'
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(2508) : warning C4309: 'argument' : truncation of constant value
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(2508) : warning C4305: 'argument' : truncation from 'const int' to 'char'
c:\directxprogrammation\gamecoretesting\core_graphics.cpp(2508) : warning C4309: 'argument' : truncation of constant value
WinMain.cpp
Skipping... (no relevant changes detected)
Core_System.cpp
Error executing cl.exe.
GameCoreTesting.exe - 3 error(s), 36 warning(s)
  
First, there is really much warning with truncation from "const int" to "char"... Do I have to change something in my compilator option to avoid that ? And the 3 errors... I really don't know what can be the problem, I didnt ever modify his gamecore... Thanks [edited by - Hedos on May 3, 2003 6:29:43 PM]
Advertisement
Hey,

I also have his book and even though I don''t like how he does several things it has been really helpful in getting me started. I haven''t touched his core files for a while but I remember having those same problems. Make sure you define the directx version to be 8.0. The code was written for directx8.0 and I bet you have the direct9 sdk.
I personally was only able to make ambient lighting work but never point light like in his examples and that''s where those warnings come from. I never tried fixing it up though sicne I only used his core files to understand how he organized his engine and why it works.
Sorry that I can''t be more helpful.
Good Luck.
Hedos:
I don't know how experienced you are with compilers, but first of all, you only have 3 actual errors:

    C:\DirectXprogrammation\GameCoreTesting\Core_Graphics.cpp(1124) : error C2660: 'UpdateSkinnedMesh' : function does not take 2 parametersC:\DirectXprogrammation\GameCoreTesting\Core_Graphics.cpp(1280) : error C2660: 'GenerateSkinnedMesh' : function does not take 5 parametersC:\DirectXprogrammation\GameCoreTesting\Core_Graphics.cpp(1788) : error C2660: 'UpdateSkinnedMesh' : function does not take 2 parameters    


Basically, you need to find the prototypes of these functions and find out how many parameters they take. Once you do that, make sure you are calling these functions with the proper parameters. Are these functions part of the DX SDK? If they are then you can find out full documentation on them and find out what parameters you need. If they aren't part of the SDK and are part of the code you copied from the book, then just make sure a parameter wasn't left out or added where it should/shouldn't have been.

AP:
How did you post as an AP? I've tried doing that a couple times in the past month and I always get the "Annonymous posting has been disabled due to abuse" message.
WTF?



-MG a.k.a. Qa303asmGuru (until I get my account fixed).

| My Unfinished Page | | I need answers! | | Genaside presents: Hazard Ball | | Maddox |


[edited by - mindguru on May 3, 2003 2:47:37 PM]
-MG a.k.a. Qa303asmGuru (until I get my account fixed).| My Unfinished Page | | I need answers! | | Genaside presents: Hazard Ball | | Maddox |
quote:Are these functions part of the DX SDK?

yeah they are.

In DX8 they had to parameters, in Dx8.1 they have 3 prameters, and in dx9 they have 4 params, so depending on which DX version you have the parameters are changed. Jim''s book used Dx8.0. He has an update on his site for DX8.1 code

I think you should just pass a NULL to the end of those functions and it should be fine then.

Not too sure about all this though, might be mistaken.

:::: [ Triple Buffer V2.0 ] ::::
[size=2]aliak.net
Anonymous: No, i''m using version 8.1, but i''ll try to define to v8.0

MindGuru:I did not modify the game core, every Errors or Warning should not been there...
I never used that:

  C:\DirectXprogrammation\GameCoreTesting\Core_Graphics.cpp(1124) : error C2660: ''UpdateSkinnedMesh'' : function does not take 2 parametersC:\DirectXprogrammation\GameCoreTesting\Core_Graphics.cpp(1280) : error C2660: ''GenerateSkinnedMesh'' : function does not take 5 parametersC:\DirectXprogrammation\GameCoreTesting\Core_Graphics.cpp(1788) : error C2660: ''UpdateSkinnedMesh'' : function does not take 2 parameters  

The problem just come from the gamecore itself..

-------------------------
Account: Hedos - Level 2 Programmer
Go to http://home.att.net/~rpgbook and update your corefiles from there.

Good luck.
I already updated everything, and looked to the errata...

Now, I looked into the DirectX8 SDK informations, and I''ve been able to fix the 3 errors...
I still have all the warnings, but at least the compilation can be continued...

After fixing the 3 errors, now, I have LINKING errors, argh

Look as this:

  Linking...Core_Graphics.obj : error LNK2001: unresolved external symbol _Direct3DCreate8@4Core_Graphics.obj : error LNK2001: unresolved external symbol _D3DXCreateSprite@8Core_Graphics.obj : error LNK2001: unresolved external symbol _D3DXMatrixPerspectiveFovLH@20Core_Graphics.obj : error LNK2001: unresolved external symbol _D3DXMatrixTranslation@16Core_Graphics.obj : error LNK2001: unresolved external symbol _D3DXMatrixRotationYawPitchRoll@16Core_Graphics.obj : error LNK2001: unresolved external symbol _D3DXMatrixScaling@16Core_Graphics.obj : error LNK2001: unresolved external symbol _D3DXMatrixMultiply@12Core_Graphics.obj : error LNK2001: unresolved external symbol _D3DXMatrixTranspose@8Core_Graphics.obj : error LNK2001: unresolved external symbol _D3DXMatrixRotationZ@8Core_Graphics.obj : error LNK2001: unresolved external symbol _D3DXMatrixRotationY@8Core_Graphics.obj : error LNK2001: unresolved external symbol _D3DXMatrixRotationX@8Core_Graphics.obj : error LNK2001: unresolved external symbol _D3DXCreateFontIndirect@12Core_Graphics.obj : error LNK2001: unresolved external symbol _DirectXFileCreate@4Core_Graphics.obj : error LNK2001: unresolved external symbol _IID_IDirectXFileDataCore_Graphics.obj : error LNK2001: unresolved external symbol _IID_IDirectXFileDataReferenceCore_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMAnimationKeyCore_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMAnimationCore_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMAnimationSetCore_Graphics.obj : error LNK2001: unresolved external symbol _D3DXCreateTextureFromFileA@12Core_Graphics.obj : error LNK2001: unresolved external symbol _D3DXComputeBoundingSphere@20Core_Graphics.obj : error LNK2001: unresolved external symbol _D3DXComputeBoundingBox@20Core_Graphics.obj : error LNK2001: unresolved external symbol _D3DXLoadSkinMeshFromXof@36Core_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMMeshCore_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMFrameTransformMatrixCore_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMFrameCore_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMAnimationOptionsCore_Graphics.obj : error LNK2001: unresolved external symbol _D3DXCreateTextureFromFileExA@56Core_Graphics.obj : error LNK2001: unresolved external symbol _D3DXMatrixRotationQuaternion@8Core_Graphics.obj : error LNK2001: unresolved external symbol _D3DXQuaternionSlerp@16Core_Graphics.obj : error LNK2001: unresolved external symbol _D3DXGetFVFVertexSize@4  


Someone has an idea about what can be the problem ?

-------------------------
Account: Hedos - Level 2 Programmer
Go to Project(menu)->Settings->Link and in the object/library modules box, add:

quartz.lib d3d8.lib ddraw.lib d3dx8.lib d3dxof.lib winmm.lib dinput8.lib dplayx.lib dsound.lib dxguid.lib

That should be all you need, note that I''m not including directplay libraries though, so if you want directplay, you''d have to specify those lib files aswell.

Make sure you''ve set up your directories correctly aswell, though I assume you''ve done that being as the steps are specified in the book.

Cheers,

Steve
Cheers,SteveLiquidigital Online
Lol, thanks!

I''m stupid, after I remade a new project, I forgot to add the .lib

Thanks again

-------------------------
Account: Hedos - Level 2 Programmer

This topic is closed to new replies.

Advertisement