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

📄 cpw_config.h

📁 关于游戏手柄的驱动编程
💻 H
📖 第 1 页 / 共 3 页
字号:

    #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.             */
    /****************************************************/

    #pragma comment (lib, "opengl32.lib")
    #pragma comment (lib, "glu32.lib")

    /****************************************************/
    /*  auto link to freetype                           */
    /****************************************************/

    #if defined(CPWDLL_EXPORTS)
      #if defined(_DEBUG)
      #pragma comment (lib, "freetype206MT_D.lib" )
      #else
      #pragma comment (lib, "freetype206MT.lib" )
      #endif
    #endif

    #if defined(CPW_EXTERN) 
      #pragma comment (lib, "CpwLib.lib" )
      #pragma comment (lib, "freetype206MT.lib" )
    #endif

    #if defined(CPWDLL_EXTERN) 
      #pragma comment (lib, "CpwDLL.lib" )
    #endif

    #if defined(CPWDLLDBG_EXTERN) 
      #pragma comment (lib, "CpwDLL_dbg.lib" )
    #endif

    #if defined(CPWEXTDLL_EXTERN) 
      #pragma comment (lib, "CpwExtDLL.lib" )
    #endif

    /****************************************************/
    /*  external API exporting macro                    */
    /****************************************************/
    
    #ifdef _LIB
    #define CPW_API  extern /* building the static lib */
    #elif CPWDLL_EXPORTS    /* building the dll */
    #define CPW_API __declspec(dllexport)
    #else
    #define CPW_API /* nothing */
    #endif

    /****************************************************/
    /*  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 __int8
    #define uint_16   unsigned __int16
    #define uint_32   unsigned __int32
    #define int_16    __int16
    #define int_32    __int32
    #define int_64    __int64
    #define float_32  float
    #define float_64  double
    #define long_32   LONG32

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

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

    /*************************************************************************/
    /*                                                                       */
    /* <Include Macro>                                                       */
    /*    FreeType Font Library include header location.                     */
    /*                                                                       */
    /* <Description>                                                         */
    /*    Points to your local FreeType include headers directory.           */
    /*                                                                       */
    /*    Chances are you need to change this to compile Cpw on your box.    */
    /*    The Win32 VC 6.0 projects have an include search path in them that */
    /*    is specific to my box: '../../../freetype-2.0.6/include' which     */
    /*    assumes the FreeType project sits in the same root as the Cpw      */
    /*    project directory and is FreeType version 2.0.6.                   */
    /*                                                                       */
    /*************************************************************************/

    #define CPW_FREETYPE_H "freetype/freetype.h"

    /*************************************************************************/
    /*                                                                       */
    /* <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  "\\"

    /*************************************************************************/
    /*                                                                       */
    /* <Compile Switch>                                                      */
    /*    CPW_DIRECTINPUT_JOYSTICKACCESS                                     */
    /*                                                                       */
    /* <Description>                                                         */
    /*    Direct input joystick or windows base services joystick access.    */
    /*    Comment this out if you always want to use winbase access. Note    */
    /*    Cpw will fall through to winbase joystick access if the required   */
    /*    di interfaces are not available on the host running the Cpw app.   */
    /*    See the win32 adapter for more information. Only comment this out  */
    /*    if you specifically want winbase or if you don't have the di sdk   */
    /*    installed on your development machine.                             */
    /*                                                                       */
    /*    Commenting this out removes di joystick code, saving space.        */
    /*                                                                       */
    /*************************************************************************/

    /* #define CPW_DIRECTINPUT_JOYSTICKACCESS */

    /*************************************************************************/
    /*                                                                       */
    /* <Compile Switch>                                                      */
    /*    CPW_DIRECTINPUT_MOUSEACCESS                                        */
    /*                                                                       */
    /* <Description>                                                         */
    /*    Direct input mouse access. This is primarily for game programmers. */
    /*    Mouse input with directinput has no mouse cursors! So don't use    */
    /*    this unless your writing a full screen game or app that doesn't    */
    /*    need the mouse cursor to display. (you could draw your own cursor  */
    /*    if you wanted to I suppose) Also note, di mouse access must be     */
    /*    associated with a window. The di interface is initialized the      */
    /*    first time cpwMouseState is called. (Event callbacks are not       */
    /*    supported - it is assumed your going for speed and as such,        */
    /*    would not use a callback mechanism for mouse input.) Make sure     */
    /*    your window is created and in the foreground before calling        */
    /*    cpwMouseState for the first time.                                  */
    /*                                                                       */
    /*    For mouse access you must compile with and your clients must       */
    /*    have DirectInput 3 or greater.                                     */
    /*                                                                       */
    /*    Commenting this out removes di mouse code, saving space.           */
    /*                                                                       */
    /*************************************************************************/

    /* #define CPW_DIRECTINPUT_MOUSEACCESS */

    /*************************************************************************/
    /*                                                                       */
    /* <Compile Switch>                                                      */
    /*    CPW_DIRECTINPUT_KEYBOARDACCESS                                     */
    /*                                                                       */
    /* <Description>                                                         */
    /*    Direct input keyboard access. Is there a need? I've found Cpw's    */
    /*    keyboard event callbacks more than adequate, even for game         */
    /*    programming. There just isn't that much data / cpu time associated */
    /*    with a key presses. They are 'low bandwidth'.                      */
    /*                                                                       */
    /*    * Currently NOT implemented *                                      */
    /*                                                                       */
    /*    Commenting this out removes di keyboard code, saving space.        */
    /*                                                                       */
    /*************************************************************************/

    /* #define CPW_DIRECTINPUT_KEYBOARDACCESS */

    /*************************************************************************/
    /*                                                                       */
    /* <MS Compile Switch>                                                   */
    /*    DIRECTINPUT_VERSION                                                */
    /*                                                                       */
    /* <Description>                                                         */
    /*    Direct input version to use. If you are using winbase for input    */
    /*    this value has no signifigance. DirectInput must have this defined */
    /*    or it will default to the current version of the sdk you have      */
    /*    installed. You should use to the lowest possible version so users  */
    /*    Don't have to install the latest runtime to run your game. To get  */
    /*    the latest runtime on your client's machine you can optionally     */
    /*    include the di runtime installer that comes with the disdk.        */
    /*                                                                       */
    /*    For joystick access you must compile with and your clients must    */
    /*    have DirectInput 5 or greater.                                     */
    /*                                                                       */
    /*************************************************************************/

    #define DIRECTINPUT_VERSION 0x0500
    /* #define DIRECTINPUT_VERSION 0x0700 */
    /* #define DIRECTINPUT_VERSION 0x0800 */

    /*************************************************************************/
    /*                                                                       */
    /* <Compile Switch>                                                      */

⌨️ 快捷键说明

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