Mercurial > hg > index.fcgi > lj > lj046
diff src/ljds.h @ 0:c84446dfb3f5
initial add
author | paulo@localhost |
---|---|
date | Fri, 13 Mar 2009 00:39:12 -0700 |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/ljds.h Fri Mar 13 00:39:12 2009 -0700 1.3 @@ -0,0 +1,77 @@ 1.4 +/* DS frontend for LOCKJAW, an implementation of the Soviet Mind Game 1.5 + 1.6 +Copyright (C) 2006 Damian Yerrick <tepples+lj@spamcop.net> 1.7 + 1.8 +This work is free software; you can redistribute it and/or modify 1.9 +it under the terms of the GNU General Public License as published by 1.10 +the Free Software Foundation; either version 2 of the License, or 1.11 +(at your option) any later version. 1.12 + 1.13 +This program is distributed in the hope that it will be useful, 1.14 +but WITHOUT ANY WARRANTY; without even the implied warranty of 1.15 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1.16 +GNU General Public License for more details. 1.17 + 1.18 +You should have received a copy of the GNU General Public License 1.19 +along with this program; if not, write to the Free Software 1.20 +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 1.21 + 1.22 +Original game concept and design by Alexey Pajitnov. 1.23 +The Software is not sponsored or endorsed by Alexey Pajitnov, Elorg, 1.24 +or The Tetris Company LLC. 1.25 + 1.26 +*/ 1.27 + 1.28 +#ifndef LJDS_H 1.29 +#define LJDS_H 1.30 + 1.31 +#include <nds.h> 1.32 +#include <stdlib.h> 1.33 +#include "ljcontrol.h" 1.34 + 1.35 +//#define SPR_VRAM(x) ((u32 *)(0x06420000 + 32 * x)) 1.36 +#define SPR_VRAM(x) ((u32 *)(0x06400000 + 32 * x)) 1.37 +#define MAINOAM ((SpriteEntry *)0x07000000) 1.38 + 1.39 +#define PATRAM4(x, tn) ((u32 *)(BG_TILE_RAM(0) | (((x) << 14) + ((tn) << 5)) )) 1.40 + 1.41 +#ifndef MAP 1.42 +typedef u16 NAMETABLE[32][32]; 1.43 + 1.44 +#define MAP ((NAMETABLE *)BG_MAP_RAM(0)) 1.45 +#define MAP_HFLIP 0x0400 1.46 +#define MAP_VFLIP 0x0800 1.47 +#define MAP_FLIP 0x0c00 1.48 +#define MAP_PALETTE(x) ((x) << 12) 1.49 +#endif 1.50 + 1.51 +struct LJPCView { 1.52 + const u16 *sndData[4]; 1.53 + u8 sndLeft[4]; 1.54 +}; 1.55 + 1.56 +#define KEY_TOUCH_RIGHT (KEY_RIGHT << 8) 1.57 +#define KEY_TOUCH_LEFT (KEY_LEFT << 8) 1.58 +#define KEY_TOUCH_UP (KEY_UP << 8) 1.59 +#define KEY_TOUCH_DOWN (KEY_DOWN << 8) 1.60 + 1.61 +extern short mouse_x, mouse_y; 1.62 +extern LJBits mouse_b; 1.63 + 1.64 +void textout(const char *str, int x, int y, int c); 1.65 +void isr(void); 1.66 +void cls(void); 1.67 +void vsync(void); 1.68 +LJBits readPad(unsigned int player); 1.69 +extern volatile int curTime; 1.70 + 1.71 +void install_sound(void); 1.72 +void gba_poll_sound(struct LJPCView *v); 1.73 +void gba_play_sound(struct LJPCView *v, int effect); 1.74 + 1.75 +extern unsigned char customPrefs[]; 1.76 +void options(LJView *view, unsigned char *prefs); 1.77 + 1.78 +int needLidSleep(void); 1.79 +void debrief(const LJView *v); 1.80 +#endif