+++ /dev/null
-/* Project 16 Source Code~\r
- * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover\r
- *\r
- * This file is part of Project 16.\r
- *\r
- * Project 16 is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation; either version 3 of the License, or\r
- * (at your option) any later version.\r
- *\r
- * Project 16 is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU General Public License\r
- * along with this program. If not, see <http://www.gnu.org/licenses/>, or\r
- * write to the Free Software Foundation, Inc., 51 Franklin Street,\r
- * Fifth Floor, Boston, MA 02110-1301 USA.\r
- *\r
- */\r
-\r
-#ifndef __ZCROLL16_H_\r
-#define __ZCROLL16_H_\r
-\r
-#include "src/lib/16_head.h"\r
-//#include "src/lib/bakapee.h"\r
-#include "src/lib/modex16.h"\r
-//#include "src/lib/16_in.h"\r
-#include "src/lib/bitmap.h"\r
-#include "src/lib/16_map.h" //map is loaded here www\r
-#include "src/lib/16_timer.h"\r
-#include "src/lib/wcpu/wcpu.h"\r
-\r
-#include <hw/cpu/cpu.h>\r
-#include <hw/dos/dos.h>\r
-#include <hw/vga/vga.h>\r
-#include <hw/vga/vrl.h>\r
-\r
-#define SPRITE\r
-//#define TILERENDER\r
-\r
-//modexDrawSpritePBufRegion\r
-//modexDrawBmpPBufRegion\r
-#define PBUFSFUN modexDrawSpriteRegion\r
-#define PBUFBFUN modexDrawBmpRegion\r
-#define PLAYERBMPDATA player->data\r
-\r
-typedef struct {\r
- map_t *map;\r
- page_t *page;\r
- int tx; //appears to be the top left tile position on the viewable screen map\r
- int ty; //appears to be the top left tile position on the viewable screen map\r
- word dxThresh; //Threshold for physical tile switch\r
- word dyThresh; //Threshold for physical tile switch\r
- video_t *video; //pointer to game variables of the video\r
- pan_t *pan; //pointer the the page panning debug system\r
-} map_view_t;\r
-\r
-#define MAPW 40\r
-#define MAPH 30\r
-\r
-enum direction {STOP, UP, DOWN, LEFT, RIGHT};\r
-typedef struct {\r
- word id; /* the Identification number of the page~ For layering~ */\r
- byte far* data; /* the data for the page */\r
- word sw; /* screen width */\r
- word sh; /* screen heigth */\r
- word tw; /* screen width in tiles */\r
- word th; /* screen height in tiles */\r
- word width; /* virtual width of the page */\r
- word height; /* virtual height of the page */\r
- word tilesw; /* virtual screen width in tiles */\r
- word tilesh; /* virtual screen height in tiles */\r
- sword tilemidposscreenx; /* middle tile position */\r
- sword tilemidposscreeny; /* middle tile position */\r
- sword tileplayerposscreenx; /* player position on screen */\r
- sword tileplayerposscreeny; /* player position on screen */\r
- word stridew; /*width/4*/\r
- word pagesize; /* page size */\r
- word pi; /* incremention page by this much to preserve location */\r
- word delta; // How much should we shift the page for smooth scrolling\r
- direction d; // Direction we should shift the page\r
-} page_t;\r
-extern boolean pageflipflop, pageploop;\r
-extern unsigned char shinku_fps_indicator_page;\r
-\r
-/* Map is presumed to:\r
- * 1. Have all the required layers and tilesets within itself\r
- * 2. Have a 'fence' around accessible blocks to simplify boundary logic\r
- * 3. Have a persistent map and tile size among the layers\r
- * Map view is presumed to:\r
- * 1. Calculate, store and update a panning info, which includes, but not limited to:\r
- * combined layer information, actual map representation (reflecting real state of the game),\r
- * pixel shift for smooth tile scrolling.\r
- * 2. Provide ways to draw a visible part of map. For simplicity with smooth scrolling, \r
- * additional row/column is always drawn at the each side of the map. This implies that 'fence'\r
- * should have a sprite too. Map is drawn left-to-right, top-to-bottom.\r
- */\r
-\r
-// Move an entity around. Should actually be in 16_entity\r
-boolean walk(entity_t *ent, map_view_t *map_v);\r
-\r
-// Move player around and call map scrolling if required/possible\r
-void walk_player(player_t *player, map_view_t *map_v);\r
-\r
-// Scroll map in one direction (assumed from player's movement)\r
-void near mapScroll(map_view_t *mv, player_t *player);\r
-sword chkmap(map_t *map, word q);\r
-void mapGoTo(map_view_t *mv, int tx, int ty);\r
-void near mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y);\r
-//void qclean();\r
-void shinku(global_game_variables_t *gv);\r
-void near animatePlayer(map_view_t *pip, player_t *player, sword scrollswitch);\r
-\r
-#endif /*__ZCROLL16_H_*/\r