Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

KeyPad.cpp File Reference

#include "KeyPad.hpp"
#include <NDS/system.h>
#include <NDS/ARM9/video.h>

Include dependency graph for KeyPad.cpp:

Include dependency graph

Defines

#define TOUCH_CAL_X1   (*(vu16*)0x027FFCD8)
#define TOUCH_CAL_Y1   (*(vu16*)0x027FFCDA)
#define TOUCH_CAL_X2   (*(vu16*)0x027FFCDE)
#define TOUCH_CAL_Y2   (*(vu16*)0x027FFCE0)
#define max(a, b)   (((a) > (b)) ? (a) : (b))
#define min(a, b)   (((a) < (b)) ? (a) : (b))

Variables

const int32 TOUCH_WIDTH = TOUCH_CAL_X2 - TOUCH_CAL_X1
const int32 TOUCH_HEIGHT = TOUCH_CAL_Y2 - TOUCH_CAL_Y1
const int32 TOUCH_OFFSET_X = ( ((SCREEN_WIDTH -60) * TOUCH_CAL_X1) / TOUCH_WIDTH ) - 28
const int32 TOUCH_OFFSET_Y = ( ((SCREEN_HEIGHT-60) * TOUCH_CAL_Y1) / TOUCH_HEIGHT ) - 28

Detailed Description

This is part of the first sprite tutorial. Information was gather from several locations to get this to work. At the minimum, the following sites were consulted to get this far:

This code has been tested in both dualis realease 2 as well as on an actual Nintendo DS via a PassMe device.

PhoenixRising


Generated on Fri Apr 22 13:47:43 2005 for PhoenixRising NDS Library by doxygen 1.3.6