-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplayground.h
More file actions
67 lines (54 loc) · 1.92 KB
/
playground.h
File metadata and controls
67 lines (54 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*****************************************************************
* Project: c64 shooter
*
* $Revision$
* $Date$
* $Author$
*****************************************************************
*
* Copyright(c) 2016 Andreas Rueckert <arueckert67@t-online.de>
*
* This file may be licensed under the terms of of the
* GNU General Public License Version 2 (the ``GPL'').
*
* Software distributed under the License is distributed
* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
* express or implied. See the GPL for the specific language
* governing rights and limitations.
*
* You should have received a copy of the GPL along with this
* program. If not, go to http://www.gnu.org/licenses/gpl.html
* or write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*****************************************************************/
/*
* Create a playground for a game.
*/
#ifndef _PLAYGROUND_H
#define _PLAYGROUND_H
#include <stdbool.h>
/*
* Create a playground from tiles.
*/
#define TILE_WIDTH 2
#define TILE_HEIGHT 2
#define TILE_LENGTH (TILE_WIDTH*TILE_HEIGTH)
/*
* A tile is created from characters stored in a character rom.
*/
#define PLAYGROUND_WIDTH 20 /* The number of tile in a a screen line. */
/* Initialize the playground for the next level. */
bool playgroundInitialize(unsigned char);
/* Load the playground data for the next level. */
bool playgroundLoad(unsigned char);
/* Scroll the playground by 1 pixel. */
void playgroundScroll( void);
/* Create one screenline of the playground. */
void playgroundWriteLine(unsigned char *, int, unsigned char *, unsigned char *);
/* Write a line of a tile to the videoram. */
void playgroundWriteTile( unsigned char *, char, unsigned char *);
/* Unpack 1 character line of the current tiles to the video buffer,
that is used after the next scolling. */
extern void _playground_unpack_tile_line( void);
#endif