> 1) I presume I can convert all the straighforward #Defines into consts?

Watch your datatypes and check where the defines are being used as
behaviour can differ if any C code is doing naughty under-the-covers
bit-fiddling
 
> 2) Can I convert the macro defines into functions? eg what would:
>      #define AlphaByte(x)   (((x))>>ALPHA_SHIFT)
>     map to?

something like...

function AlphaByte(x :Integer):Integer; 
begin
   Result := X shr ALPHA_SHIFT;
end;

>      #ifndef DLLEXPORT
>      #define DLLEXPORT    __declspec( dllexport )
>      #endif
>    I understand that DLLEXPORT will be replaced with __declspec( dllexport ),
> but it's the only place so why bother defining it? And what does it do? and can
> I achieve the same thing in Delphi?

It may have been defined externally... It allows an outside force to provide their own
replacement... It's specifying a calling convention...

--
Aaron Scott-Boddendijk
Jump Productions
(07) 838-3371 Voice
(07) 838-3372 Fax


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to