LiteC and the SDK

Posted By: RedPhoenix

LiteC and the SDK - 09/11/07 12:56

Ok I have not much experience with C++ and writing plugin dlls with the sdk, so I may be mixing something up here.

I tried writing a dll with the A7 SDK files (adll.h, avars.h afuncs.h atyped.h)
I got a lot of errors indicated in VC++
looking like this:
Code:
 
avars.h(636) : error C2061: Syntaxfehler: Bezeichner 'UINT'
Syntaxfehler: Fehlendes ';' vor Bezeichner 'isPointer'
Fehlender Typspezifizierer - int wird angenommen.
avars.h(660) : error C2146: Syntaxfehler: Fehlendes ';' vor Bezeichner 'hWnd'
avars.h(660) : error C4430: Fehlender Typspezifizierer - int wird angenommen.


All these errors happen in connection with special var types like BOOL hwnd etc.
Those var types are defined for LiteC in the Litec.h so I wondered why LiteC.h isn't part of the sdk files too.

EDIT: Including LiteC.h seems to solve the problems, but may be there has to be another header file made for it, as litec.h also includes a lot of other headers, which may be aren't needed for the dll.
Posted By: MichaelGale

Re: LiteC and the SDK - 09/11/07 13:00

Code:

#include <windows.h>



should solve this problem. Some of the types, which are being used in the SDK, are defined in the windows header file from the WinSDK. If you do not have the WinSDK installed, you can download it from the microsoft developer network.
Posted By: jcl

Re: LiteC and the SDK - 09/11/07 13:05

The manual is your friend. Under "Other languages" is described how to create a DLL with VC++.
Posted By: RedPhoenix

Re: LiteC and the SDK - 09/11/07 13:05

Yes I just realised that too
That's why liteC.h seemed to be the solution!

(This has to be made clear in the manual for other beginners like me!)
EDIT: Auf Deutsch: Wir haben gerade aneinander vorbei geredet, Sie meinten die Section engine implementation, ich die section engine plugins. Mein Fehler
Posted By: RedPhoenix

Re: LiteC and the SDK - 09/12/07 12:28

Ok I hope that I haven't missed anything again, I'm searching for the source code for the mdl7 and hmp5 libs. The med plginsdk contains the headers and the .lib files but not the c++ source for the .lib files. But for understanding how to use these sdk I need at least the source code of the libs or a description of the functions of it.
Posted By: jcl

Re: LiteC and the SDK - 09/12/07 17:28

The .lib source is not available, but there's a basic exporter / importer in the SDK. You can use it as a template for for your project. The doc is in the .txt file.
Posted By: RedPhoenix

Re: LiteC and the SDK - 09/15/07 08:33

Ok I'm got a lot things done by now. I can write hmp5 files right, but they seem to be shown not really right when I load them in GS. If I convert the files in med to hmp7 everything is alright though.
So I have a question belonging the hmp7 format:
I think the only difference between those two formats is the vertex format. Here the difference in the class:

From HMP7W:
bool Vertex(short z, float nx, float ny, float nz);

From HMP5W:
bool Vertex(short z, int normal_index, int pad=0);

I think nx,ny,nz means the normalinformation of that vertex. Is that right? So the only thing I have to change for righting to HMP7 is to use the HMP7W class and give the normalinformation in the vertex struct?
© 2024 lite-C Forums