PropWare
C++ objects and CMake build system for Parallax Propeller
Home
Download
Getting Started
Documentation
Reference
About
Related Links
Namespace List
Class List
File List
Examples
Build System
File List
File Members
propsideworkspace
Propeller GCC Demos
vgademo
draw.h
1
/*
2
############################################################################
3
# Written by Dave Hein
4
# Copyright (c) 2012 Parallax, Inc.
5
# MIT Licensed
6
############################################################################
7
*/
8
#ifndef DRAW_DEFINED
9
#define DRAW_DEFINED
10
#include <stdint.h>
11
12
#define uchar unsigned char
13
14
#define COLOR_BLUE 0
15
#define COLOR_BLACK 1
16
#define COLOR_CYAN 2
17
#define COLOR_WHITE 3
18
#define COLOR_RED 4
19
#define COLOR_GREEN 5
20
#define COLOR_YELLOW 6
21
#define COLOR_MAGENTA 7
22
#define COLOR_MAX 8
23
24
static
unsigned
char
color_table[COLOR_MAX][3] = {
25
255, 0, 0,
26
0, 0, 0,
27
255, 255, 0,
28
255, 255, 255,
29
0, 0, 255,
30
0, 255, 0,
31
0, 255, 255,
32
255, 0, 255};
33
34
void
drawdot(
int
col,
int
row,
int
color);
35
36
void
drawhorzline(
int
col0,
int
col1,
int
row,
int
color);
37
38
void
drawvertline(
int
col,
int
row0,
int
row1,
int
color);
39
40
void
drawline(
int
col0,
int
row0,
int
col1,
int
row1,
int
color);
41
42
void
inittiles(
int
val);
43
44
void
drawobject(
int
col,
int
row,
unsigned
int
*ptr,
int
width,
int
height);
45
#endif
46
/*
47
+--------------------------------------------------------------------
48
| TERMS OF USE: MIT License
49
+--------------------------------------------------------------------
50
Permission is hereby granted, free of charge, to any person obtaining
51
a copy of this software and associated documentation files
52
(the "Software"), to deal in the Software without restriction,
53
including without limitation the rights to use, copy, modify, merge,
54
publish, distribute, sublicense, and/or sell copies of the Software,
55
and to permit persons to whom the Software is furnished to do so,
56
subject to the following conditions:
57
58
The above copyright notice and this permission notice shall be
59
included in all copies or substantial portions of the Software.
60
61
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
62
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
63
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
64
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
65
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
66
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
67
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
68
+------------------------------------------------------------------
69
*/
70
Generated on Sat Aug 27 2016 00:58:10 for PropWare by
1.8.12