dos33fsprogs/gr-sim/tfv.c

81 lines
1.2 KiB
C
Raw Normal View History

2017-05-03 14:53:27 +00:00
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
2017-05-03 14:53:27 +00:00
#include "gr-sim.h"
2017-08-13 00:15:34 +00:00
#include "tfv_utils.h"
#include "tfv_zp.h"
2017-05-03 14:53:27 +00:00
2017-07-08 21:06:43 +00:00
#include "tfv_sprites.h"
2017-08-13 00:52:18 +00:00
#include "tfv_backgrounds.h"
2017-05-04 18:32:41 +00:00
/* stats */
2017-08-13 00:15:34 +00:00
unsigned char level=0;
unsigned char hp=50,max_hp=100;
unsigned char limit=2;
unsigned char money=0,experience=0;
unsigned char time_hours=0,time_minutes=0;
unsigned char items1=0xff,items2=0xff;
unsigned char steps=0;
2017-07-22 20:45:53 +00:00
/* location */
2017-08-13 00:15:34 +00:00
unsigned char map_x=5;
char tfv_x=15,tfv_y=19;
unsigned char ground_color;
2017-07-08 21:06:43 +00:00
2017-08-13 19:38:49 +00:00
char nameo[9];
2017-07-08 21:06:43 +00:00
int main(int argc, char **argv) {
2017-07-20 17:16:37 +00:00
int result;
2017-07-08 21:06:43 +00:00
grsim_init();
home();
gr();
2017-08-13 00:35:36 +00:00
/* Clear bottom of zero page */
apple_memset(&ram[0],0,16);
/* clear top page0 */
/* clear top page1 */
clear_top(PAGE0);
clear_top(PAGE1);
2017-08-13 00:35:36 +00:00
/* clear bottom page0 */
/* clear bottom page1 */
clear_bottom(PAGE0);
clear_bottom(PAGE1);
2017-08-13 00:35:36 +00:00
2017-07-08 21:06:43 +00:00
/* Do Opening */
opening();
/* Title Screen */
2017-07-20 17:16:37 +00:00
title_loop:
result=title();
if (result!=0) goto title_loop;
2017-07-08 21:06:43 +00:00
nameo[0]=0;
2017-07-08 21:06:43 +00:00
/* Get Name */
name_screen();
if (nameo[0]==0) {
strcpy(nameo,"DEATER");
}
2017-07-08 21:06:43 +00:00
/* Flying */
2017-07-20 18:06:13 +00:00
home();
2017-07-08 21:06:43 +00:00
flying();
/* World Map */
world_map();
2017-07-10 04:39:38 +00:00
/* Game Over, Man */
game_over();
2017-07-08 21:06:43 +00:00
return 0;
}