Page 1 of 1

DarkGame SDK & PureBasic .DESC Files ...

Posted: Sun Jan 16, 2005 8:32 pm
by freddix
I try to convert DarkGame SDK from TGC to purebasic .
It's builded around .LIB files and .H
I try to adapt the .H to create .DESC files .
but, all isn't explained in README.TXT given with purebasic.

the sample given use 2 functions that return an integer value :
PeekS, Long (Address) - Retrieve a string from the specified address
String
;
PeekL, Long (Address) - Retrieve a long from the specified address
Long | DebuggerCheck
I didn't understand how I must do to create command that does not return value.
is it something like :
MyCommand, Long - Help
My2ndCommand, ...
Should I leave a blank line telling that there is no return ?

Should I do something else ?

Posted: Sun Jan 16, 2005 8:42 pm
by Denis
For no return value, use None
like this

Code: Select all

MyCommand, Long, ()
None

Posted: Sun Jan 16, 2005 9:31 pm
by freddix
thanks :)

but, why should I use () ???
and when . I'm not sure to understand exactly the syntax .
( sorry I'm frensh and far to be perfect in english speaking ... :oops: )

Imagine that I need a command that need 1 long . Should I use exactly the same line than your ?

Posted: Sun Jan 16, 2005 9:43 pm
by traumatic
freddix wrote:but, why should I use () ???
and when . I'm not sure to understand exactly the syntax .

() is just the description as explained in the Library-SDK ReadMe:

Code: Select all

  ; Library functions: 
  ; FunctionName, Arg1Type, Arg2Type, ... (DescriptionArg1, Arg2) - Description of the command show on the QuickHelp status bar
  ; Return type. Can be one of the following type: 'Long', 'Word', 'Byte', 'Float' 'String', 'None', 'InitFunction' (for a function
  ; which is called automatically at the start of a PureBasic program), 'EndFunction' (called at the end, for cleaning)
  ; and 'DebuggerCheck' which tell is there is a debugger handler function for this command.
  ;

Imagine that I need a command that need 1 long . Should I use exactly the same line than your ?
This is enough (if you don't want to show anything in the statusbar of the editor) :

YourFunction, Long
None

Posted: Sun Jan 16, 2005 10:44 pm
by freddix
wowow !

Thanks for your precise and "Faster Than Light" answer ;)

you grantly helped me ... I'll now work on migrating DGSDK 2 PB :)