⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cpw_config.h

📁 关于游戏手柄的驱动编程
💻 H
📖 第 1 页 / 共 3 页
字号:
    /*    CPW_PLATFORMINFO_LITTLEENDIAN                                      */
    /*                                                                       */
    /* <Description>                                                         */
    /*    This platform is little endian. Do not define this if your         */
    /*    compiling on a big endian (MAC hardware for example) machine.      */
    /*                                                                       */
    /*************************************************************************/

    #define CPW_PLATFORMINFO_LITTLEENDIAN

#endif

  /*************************************************************************/
  /*                                                                       */
  /*   SunOS specific configurations.                                      */
  /*                                                                       */
  /*************************************************************************/

#ifdef __SunOS__
#endif

  /*************************************************************************/
  /*                                                                       */
  /*   CygWin specific configurations.                                     */
  /*                                                                       */
  /*************************************************************************/

#ifdef CygWin

    /****************************************************/
    /*  this platform identifier                        */
    /****************************************************/

    #define CPW_THIS_PLATFORM   CPW_PLATFORM_WIN

    /****************************************************/
    /*  standard include(s) for this platform           */
    /****************************************************/

    #include <windows.h>
    #include <winuser.h>
    #include <stdio.h>
    #include <stddef.h>
    #include <stdbool.h>
    #include <float.h>
    #include <stdio.h>

    /****************************************************/
    /*  platform specific adapter include file          */
    /****************************************************/

    #define CPW_LOCALHOST_H  "../win32/cpw_win32.h"

    /****************************************************/
    /*  platform's OpenGL header includes               */
    /****************************************************/

    #define CPW_OPENGL_H  <GL/gl.h>

    /****************************************************/
    /*  platform's GLU header includes                  */
    /****************************************************/

    #define CPW_GLU_H  <GL/glu.h>

    /****************************************************/
    /*  auto link WIN32's OpenGL library's. change this */
    /*  if your using an alternate library.             */
    /****************************************************/

    /****************************************************/
    /*  auto link Cpw and freetype                      */
    /****************************************************/

    /****************************************************/
    /*  external API exporting macro                    */
    /****************************************************/
    
    #define CPW_API  extern /* building the static lib */

    /****************************************************/
    /*  platform's inline function declaration          */
    /****************************************************/
       
    #define CPW_INLINE  inline

    /****************************************************/
    /*  platform's type definitions                     */
    /****************************************************/

    #ifndef bool
    #define bool      BOOL
    #endif

    #ifndef false
    #define false     FALSE
    #endif

    #ifndef true
    #define true      TRUE
    #endif

    #ifndef null
    #define null      NULL
    #endif

    #define pVoid     void*
    #define pChar     char*
    #define uint_8    unsigned char
    #define uint_16   unsigned short
    #define uint_32   unsigned int
    #define int_16    short
    #define int_32    int
    #define int_64    int
    #define float_32  float
    #define float_64  double
    #define long_32   long

    /****************************************************/
    /*  memory allocators - override to suit you needs  */
    /****************************************************/

    #define cpwmalloc         malloc
    #define cpwrealloc        realloc
    #define cpwfree           free

    /*************************************************************************/
    /*                                                                       */
    /* <Limits Define>                                                       */
    /*    CPW_MAX_BUTTONS                                                    */
    /*                                                                       */
    /* <Description>                                                         */
    /*    The maximum number of buttons on a mouse.                          */
    /*    For Win32, we have 2 standard plus the wheel/middle button.        */
    /*                                                                       */
    /*************************************************************************/

    #define CPW_MAX_BUTTONS 3

    /*************************************************************************/
    /*                                                                       */
    /* <Define>                                                              */
    /*    CPW_LOCALHOST_DIRDIV                                               */
    /*                                                                       */
    /* <Description>                                                         */
    /*    The directory dividing character. Used in cpw_fonts.c              */
    /*                                                                       */
    /*************************************************************************/

    #define CPW_LOCALHOST_DIRDIV  "\\"

    /*************************************************************************/
    /*                                                                       */
    /* <Include Macro>                                                       */
    /*    Freetype Font rendering library include header location.           */
    /*                                                                       */
    /* <Description>                                                         */
    /*    Points to your local freetype include header.                      */
    /*    Chances are you need to edit this.                                 */
    /*                                                                       */
    /*************************************************************************/

    #define CPW_FREETYPE_H "/cygdrive/f/Projects/freetype-2.0.6/include/freetype/freetype.h"
    /*#define CPW_FREETYPE_H "/d/freetype-2.0.6/include/freetype/freetype.h"*/

#endif

  /*************************************************************************/
  /*                                                                       */
  /*   OSX specific configurations.                                        */
  /*                                                                       */
  /*************************************************************************/

#ifdef OSX
#endif

  /*************************************************************************/
  /*                                                                       */
  /*   Linux specific configurations.                                      */
  /*                                                                       */
  /*************************************************************************/

#ifdef X11
#endif

  /*************************************************************************/
  /*                                                                       */
  /* <Section>                                                             */
  /*    Configuration cross checks.                                        */
  /*                                                                       */
  /* <Description>                                                         */
  /*    Confirm configuration has been set correctly.                      */
  /*                                                                       */
  /*************************************************************************/

#if defined(CPW_INTERN)
#elif defined(CPW_EXTERN)
#elif defined(CPWDLL_EXTERN)
#elif defined(CPWEXTDLL_EXTERN)
#elif defined(CPWDLLDBG_EXTERN)
#else
#error your compile isnt configured correctly. (CPW_EXTERN, CPWDLL_EXTERN or CPW_INTERN)
#endif

#if !defined(CPW_OPENGL_H) | !defined(CPW_GLU_H)
#error cpw_config.h isnt configured correctly. (gl headers)
#endif

#if !defined(CPW_API) | !defined(CPW_INLINE)
#error cpw_config.h isnt configured correctly. (inline or api)
#endif

#if !defined(CPW_LOCALHOST_H)
#error cpw_config.h isnt configured correctly. (localhost)
#endif

#if !defined(CPW_FREETYPE_H)
#error cpw_config.h isnt configured correctly. (freetype)
#endif

#if !defined(bool) | !defined(true) | !defined(false) | !defined(null) | !defined(pVoid) | !defined(pChar) | !defined(uint_8) | !defined(uint_16) | !defined(uint_32) | !defined(int_32) | !defined(int_64) | !defined(float_32) | !defined(float_64) | !defined(long_32)
#error cpw_config.h isnt configured correctly. (types)
#endif

#if !defined(cpwmalloc) | !defined(cpwrealloc) | !defined(cpwfree)
#error cpw_config.h isnt configured correctly. (memory allocation handlers)
#endif

#if !defined(CPW_MENUS_MAXENTRIES)
#error cpw_config.h isnt configured correctly. (menuentries max)
#endif

#if !defined(CPW_MAX_BUTTONS)
#error cpw_config.h isnt configured correctly. (mouse buttons max)
#endif

#if !defined(CPW_LOCALHOST_DIRDIV)
#error cpw_config.h isnt configured correctly. (directory divider)
#endif

CPW_END_HEADER
#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -