paulo@0: /* DS frontend for LOCKJAW, an implementation of the Soviet Mind Game paulo@0: paulo@0: Copyright (C) 2006 Damian Yerrick paulo@0: paulo@0: This work is free software; you can redistribute it and/or modify paulo@0: it under the terms of the GNU General Public License as published by paulo@0: the Free Software Foundation; either version 2 of the License, or paulo@0: (at your option) any later version. paulo@0: paulo@0: This program is distributed in the hope that it will be useful, paulo@0: but WITHOUT ANY WARRANTY; without even the implied warranty of paulo@0: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the paulo@0: GNU General Public License for more details. paulo@0: paulo@0: You should have received a copy of the GNU General Public License paulo@0: along with this program; if not, write to the Free Software paulo@0: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA paulo@0: paulo@0: Original game concept and design by Alexey Pajitnov. paulo@0: The Software is not sponsored or endorsed by Alexey Pajitnov, Elorg, paulo@0: or The Tetris Company LLC. paulo@0: paulo@0: */ paulo@0: paulo@0: #ifndef LJDS_H paulo@0: #define LJDS_H paulo@0: paulo@0: #include paulo@0: #include paulo@0: #include "ljcontrol.h" paulo@0: paulo@0: //#define SPR_VRAM(x) ((u32 *)(0x06420000 + 32 * x)) paulo@0: #define SPR_VRAM(x) ((u32 *)(0x06400000 + 32 * x)) paulo@0: #define MAINOAM ((SpriteEntry *)0x07000000) paulo@0: paulo@0: #define PATRAM4(x, tn) ((u32 *)(BG_TILE_RAM(0) | (((x) << 14) + ((tn) << 5)) )) paulo@0: paulo@0: #ifndef MAP paulo@0: typedef u16 NAMETABLE[32][32]; paulo@0: paulo@0: #define MAP ((NAMETABLE *)BG_MAP_RAM(0)) paulo@0: #define MAP_HFLIP 0x0400 paulo@0: #define MAP_VFLIP 0x0800 paulo@0: #define MAP_FLIP 0x0c00 paulo@0: #define MAP_PALETTE(x) ((x) << 12) paulo@0: #endif paulo@0: paulo@0: struct LJPCView { paulo@0: const u16 *sndData[4]; paulo@0: u8 sndLeft[4]; paulo@0: }; paulo@0: paulo@0: #define KEY_TOUCH_RIGHT (KEY_RIGHT << 8) paulo@0: #define KEY_TOUCH_LEFT (KEY_LEFT << 8) paulo@0: #define KEY_TOUCH_UP (KEY_UP << 8) paulo@0: #define KEY_TOUCH_DOWN (KEY_DOWN << 8) paulo@0: paulo@0: extern short mouse_x, mouse_y; paulo@0: extern LJBits mouse_b; paulo@0: paulo@0: void textout(const char *str, int x, int y, int c); paulo@0: void isr(void); paulo@0: void cls(void); paulo@0: void vsync(void); paulo@0: LJBits readPad(unsigned int player); paulo@0: extern volatile int curTime; paulo@0: paulo@0: void install_sound(void); paulo@0: void gba_poll_sound(struct LJPCView *v); paulo@0: void gba_play_sound(struct LJPCView *v, int effect); paulo@0: paulo@0: extern unsigned char customPrefs[]; paulo@0: void options(LJView *view, unsigned char *prefs); paulo@0: paulo@0: int needLidSleep(void); paulo@0: void debrief(const LJView *v); paulo@0: #endif