Search
lxdream.org :: lxdream/src/maple/controller.h
lxdream 0.9.1
released Jun 29
Download Now
filename src/maple/controller.h
changeset 148:3f31c2d9b783
prev31:495e480360d7
next561:533f6b478071
author nkeynes
date Mon Jan 29 11:24:44 2007 +0000 (17 years ago)
permissions -rw-r--r--
last change Get render size from the tile segment array
Set near clip to just 0 rather than scanning the scene
Fixup modulate RGB to force fragment alpha to 1.0
Add some debugging fprintfs
view annotate diff log raw
     1 /**
     2  * $Id: controller.h,v 1.3 2006-05-20 02:40:51 nkeynes Exp $
     3  *
     4  * Definitions for the standard controller device
     5  *
     6  * Copyright (c) 2005 Nathan Keynes.
     7  *
     8  * This program is free software; you can redistribute it and/or modify
     9  * it under the terms of the GNU General Public License as published by
    10  * the Free Software Foundation; either version 2 of the License, or
    11  * (at your option) any later version.
    12  *
    13  * This program is distributed in the hope that it will be useful,
    14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16  * GNU General Public License for more details.
    17  */
    19 /* First word of controller condition */
    20 #define BUTTON_C            0x00000001 /* not on standard controller */
    21 #define BUTTON_B            0x00000002
    22 #define BUTTON_A            0x00000004
    23 #define BUTTON_START        0x00000008
    24 #define BUTTON_DPAD_UP      0x00000010
    25 #define BUTTON_DPAD_DOWN    0x00000020
    26 #define BUTTON_DPAD_LEFT    0x00000040
    27 #define BUTTON_DPAD_RIGHT   0x00000080
    28 #define BUTTON_Z            0x00000100 /* not on standard controller */
    29 #define BUTTON_Y            0x00000200
    30 #define BUTTON_X            0x00000400
    31 #define BUTTON_D            0x00000800 /* not on standard controller */
    32 #define BUTTON_LEFT_TRIGGER 0xFF000000 /* Bitmask */
    33 #define BUTTON_RIGHT_TRIGGER 0x00FF0000 /* Bitmask */
    35 /* Second word of controller condition (bitmasks) */
    36 #define JOY_X_AXIS          0x000000FF
    37 #define JOY_Y_AXIS          0x0000FF00
    38 #define JOY_X_AXIS_CENTER   0x00000080
    39 #define JOY_Y_AXIS_CENTER   0x00008000
    40 #define JOY2_X_AXIS         0x00FF0000 /* not on standard controller */
    41 #define JOY2_Y_AXIS         0xFF000000 /* not on standard controller */
    43 /* The following bits are used by the emulator for flags but don't actually
    44  * appear in the hardware
    45  */
    46 #define JOY_LEFT            0x80000001
    47 #define JOY_RIGHT           0x80000002
    48 #define JOY_UP              0x80000004
    49 #define JOY_DOWN            0x80000008
    51 /* Standard controller ID */
    52 #define CONTROLLER_IDENT {0x00, 0x00, 0x00, 0x01,  0x00, 0x0f, 0x06, 0xfe,  0x00, 0x00, 0x00, 0x00, \
    53 0x00, 0x00, 0x00, 0x00,  0xff, 0x00, 0x44, 0x72,  0x65, 0x61, 0x6d, 0x63,  0x61, 0x73, 0x74, 0x20,  \
    54  0x43, 0x6f, 0x6e, 0x74,  0x72, 0x6f, 0x6c, 0x6c,  0x65, 0x72, 0x20, 0x20,  0x20, 0x20, 0x20, 0x20, \
    55  0x20, 0x20, 0x20, 0x20,  0x50, 0x72, 0x6f, 0x64,  0x75, 0x63, 0x65, 0x64,  0x20, 0x42, 0x79, 0x20, \
    56  0x6f, 0x72, 0x20, 0x55,  0x6e, 0x64, 0x65, 0x72,  0x20, 0x4c, 0x69, 0x63,  0x65, 0x6e, 0x73, 0x65, \
    57  0x20, 0x46, 0x72, 0x6f,  0x6d, 0x20, 0x53, 0x45,  0x47, 0x41, 0x20, 0x45,  0x4e, 0x54, 0x45, 0x52, \
    58  0x50, 0x52, 0x49, 0x53,  0x45, 0x53, 0x2c, 0x4c,  0x54, 0x44, 0x2e, 0x20,  0x20, 0x20, 0x20, 0x20, \
    59             0xae, 0x01, 0xf4, 0x01}
    60 #define CONTROLLER_VERSION {0x56, 0x65, 0x72, 0x73,  0x69, 0x6f, 0x6e, 0x20,  0x31, 0x2e, 0x30, 0x31, \
    61  0x30, 0x2c, 0x31, 0x39,  0x39, 0x38, 0x2f, 0x30,  0x39, 0x2f, 0x32, 0x38,  0x2c, 0x33, 0x31, 0x35, \
    62  0x2d, 0x36, 0x32, 0x31,  0x31, 0x2d, 0x41, 0x42,  0x20, 0x20, 0x20, 0x2c,  0x41, 0x6e, 0x61, 0x6c, \
    63  0x6f, 0x67, 0x20, 0x4d,  0x6f, 0x64, 0x75, 0x6c,  0x65, 0x20, 0x3a, 0x20,  0x54, 0x68, 0x65, 0x20, \
    64  0x34, 0x74, 0x68, 0x20,  0x45, 0x64, 0x69, 0x74,  0x69, 0x6f, 0x6e, 0x2e,  0x35, 0x2f, 0x38, 0x20, \
    65             0x20, 0x2b, 0x44, 0x46 }
.