-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtyrann.h
142 lines (106 loc) · 3.56 KB
/
tyrann.h
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
#include <lib.h>
// ============================================================================
//
// Externals
//
// ============================================================================
#include "params.h"
//#define debug 1
//
// ===== Display.s =====
//
extern unsigned char CurrentPixelX; // Coordinate X of edited pixel/byte
extern unsigned char CurrentPixelY; // Coordinate Y of edited pixel/byte
extern unsigned char OtherPixelX; // Coordinate X of other edited pixel/byte
extern unsigned char OtherPixelY; // Coordinate Y of other edited pixel/byte
/*
unsigned char CurrentPixelX; // Coordinate X of edited pixel/byte
unsigned char CurrentPixelY; // Coordinate Y of edited pixel/byte
unsigned char OtherPixelX; // Coordinate X of other edited pixel/byte
unsigned char OtherPixelY; // Coordinate Y of other edited pixel/byte
*/
//
// ===== line8.s =====
//
void DrawLine8();
/*
{
curset(CurrentPixelX, CurrentPixelY, 1);
draw(OtherPixelX-CurrentPixelX, OtherPixelY-CurrentPixelY, 1);
}
void GenerateTables();
{
}
*/
//
// ===== sedoric_io.s ======
//
extern unsigned char SPStorage;
extern void BackupSP();
extern char DiscSave(char * filename, char * pini, char * pend);
extern char DiscLoad(char * filename);
extern char Sedoric(char * command);
extern void SwitchToCommand(char * command);
// stdio.h
extern void puts(char *s);
extern void sprintf(char buf[], const char *format,...);
// string.h
extern void *memset(void *buffer, int c, int count);
// defines and structs
#define XMAX 36
#define YMAX 26
#define TIMER 20
#define A_FWBLACK 0
#define A_FWRED 1
#define A_FWGREEN 2
#define A_FWYELLOW 3
#define A_FWBLUE 4
#define A_FWMAGENTA 5
#define A_FWCYAN 6
#define A_FWWHITE 7
struct character {
char nom[11]; // nom
unsigned int ri; // richesses (nom => 2 octets)
unsigned char cp; // carrière perso
unsigned char mp; // maison
unsigned char cc; // capacité de combat
unsigned char ct; // capacité de tir
unsigned char fo; // force
unsigned char ag; // agilité
unsigned char in; // intelligence
unsigned char fm; // force mentale
unsigned char pv; // points de vie ou de blessures
unsigned char et; // état des PV
unsigned char ok; // santé
unsigned char ni; // niveau (nom => 16 octets)
unsigned int xp; // expérience
unsigned char wr; // arme droite (weapon right)
unsigned char wl; // arme gauche
unsigned char pt; // armure
unsigned char ca; // classe d'armure
unsigned char bt; // bête (nom => 23 octets)
unsigned char sad[6]; // sac à dos
unsigned char sp[8]; // sorts
};
// From common.c
// waits for some time
void wait(unsigned int val);
// puts some text at the x,y coordinate of a TEXT screen
void printAtXY(int x, int y, char *texte);
// puts a specific attribute at the x,y coordinate of a TEXT screen
void attribAtXY(int x, int y, char attrib);
// backups page zero data
void backupPageZero();
// restore page zero data before switching to Basic/OS
void restorePageZero();
// prints a title with some background color
void printTitle(char x, char y, char color, char *text, char lgText);
// prints a frame
void printFrame(int size);
// loads texts from a bin file
char *loadTexts(char *ptr, char *tab[]);
// From team.c
// loads the team
void loadCharacters(void);
// saves the team
void saveCharacters(void);