|
From: Atani <at...@at...> - 2007-07-09 05:32:35
|
Yeah, after sending this over I realized that there are a number of
references to preprocessor blocks which will only work in the case of a
#define. How many of these blocks do we have in place and how many of
them should be abstracted a bit to remove this sort of logic from being
all over the place in the tree?
Mike
Sam Steele wrote:
> I'm for moving it into a common header, but I have a lot of code that
> depends on it being a preprocessor definition. For example:
>
> #if TIKI_PLAT == TIKI_NDS
> #include <nds.h>
> #endif
>
> and
>
> #if TIKI_PLAT == TIKI_DC
> #include <kos.h>
> #endif
>
> That kind of stuff requires the preprocessor to know the platform,
> since those headers are platform-specific. Tiki itself uses that
> construct to locate the GL header on OS X, since it's in a non-
> standard location.
>
> -Sam
>
> On Jul 7, 2007, at 9:23 PM, Atani wrote:
>
>
>> Since this is not the first time that the various platforms have
>> gotten
>> out of sync, why don't we convert this to an enum and a "global"
>> variable for TIKI_PLAT...
>>
>> something like:
>>
>> in Tiki.h:
>> namespace Tiki {
>> enum TIKI_PLATS {
>> TIKI_WIN32,
>> TIKI_SDL,
>> TIKI_DC,
>> TIKI_GP2X,
>> TIKI_NDS
>> };
>> };
>>
>> in tikitypes.h:
>>
>> namespace Tiki {
>> const TIKI_PLATS TIKI_PLAT = TIKI_WIN32;
>> };
>>
>> Mike
>>
>> c99...@us... wrote:
>>
>>> Revision: 416
>>> http://svn.sourceforge.net/cadcdev/?rev=416&view=rev
>>> Author: c99koder
>>> Date: 2007-07-07 18:05:36 -0700 (Sat, 07 Jul 2007)
>>>
>>> Log Message:
>>> -----------
>>> Tiki: win32: add missing TIKI_GP2X and TIKI_NDS definitions
>>>
>>> Modified Paths:
>>> --------------
>>> tiki/win32/include/Tiki/tikitypes.h
>>>
>>> Modified: tiki/win32/include/Tiki/tikitypes.h
>>> ===================================================================
>>> --- tiki/win32/include/Tiki/tikitypes.h 2007-07-02 16:59:18 UTC
>>> (rev 415)
>>> +++ tiki/win32/include/Tiki/tikitypes.h 2007-07-08 01:05:36 UTC
>>> (rev 416)
>>> @@ -17,6 +17,8 @@
>>> #define TIKI_WIN32 1
>>> #define TIKI_SDL 2
>>> #define TIKI_DC 3
>>> +#define TIKI_GP2X 4
>>> +#define TIKI_NDS 5
>>> #define TIKI_PLAT TIKI_WIN32
>>>
>>> namespace Tiki {
>>>
>>>
>>> This was sent by the SourceForge.net collaborative development
>>> platform, the world's largest Open Source development site.
>>>
>>> ---------------------------------------------------------------------
>>> ----
>>> This SF.net email is sponsored by DB2 Express
>>> Download DB2 Express C - the FREE version of DB2 express and take
>>> control of your XML. No limits. Just data. Click to get it now.
>>> http://sourceforge.net/powerbar/db2/
>>> _______________________________________________
>>> cadcdev-svn-commits mailing list
>>> cad...@li...
>>> https://lists.sourceforge.net/lists/listinfo/cadcdev-svn-commits
>>>
>>>
>> ----------------------------------------------------------------------
>> ---
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> _______________________________________________
>> cadcdev-tiki mailing list
>> cad...@li...
>> https://lists.sourceforge.net/lists/listinfo/cadcdev-tiki
>>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> cadcdev-tiki mailing list
> cad...@li...
> https://lists.sourceforge.net/lists/listinfo/cadcdev-tiki
>
|