diff --git a/!TheEsc/!RunImage,ff8 b/!TheEsc/!RunImage,ff8 index fedce47..923708c 100644 Binary files a/!TheEsc/!RunImage,ff8 and b/!TheEsc/!RunImage,ff8 differ diff --git a/!TheEsc/Font,ff9 b/!TheEsc/Font,ff9 index 275c789..2dce9ce 100644 Binary files a/!TheEsc/Font,ff9 and b/!TheEsc/Font,ff9 differ diff --git a/!TheEsc/Tiles,ff9 b/!TheEsc/Tiles,ff9 index db914ce..2005059 100644 Binary files a/!TheEsc/Tiles,ff9 and b/!TheEsc/Tiles,ff9 differ diff --git a/!TheEsc/c/CTheEscape b/!TheEsc/c/CTheEscape index ed8e519..705dcb0 100644 --- a/!TheEsc/c/CTheEscape +++ b/!TheEsc/c/CTheEscape @@ -8,7 +8,6 @@ //#define SKIP_INTRO //#define SKIP_MISSION1 //#define SKIP_MISSION2 -//#define M2_DEBUG_HITBOXES // SWI Registers _kernel_swi_regs inreg; diff --git a/!TheEsc/c/Mission2 b/!TheEsc/c/Mission2 index 0c67a6a..e97e6fe 100644 --- a/!TheEsc/c/Mission2 +++ b/!TheEsc/c/Mission2 @@ -13,6 +13,7 @@ extern _kernel_swi_regs outreg; #define TILESX 10 #define TILESY 10 #define SMARTTILES 100 +#define AREAS 20 // map[0] is the 'master', [1] and [2] represents what is currently // believed to be displayed in the corresponding (+1) screen buffer @@ -21,6 +22,8 @@ extern _kernel_swi_regs outreg; unsigned char map[3][TILESX][TILESY]; unsigned char fullmap[10000]; +unsigned char areaname[13]; + char tilenamebuffer[4]; char textbuffer[63]; @@ -28,6 +31,12 @@ struct EntityLocation_s { short signed int X,Y; }; +struct Area_s { + unsigned char name[16]; +}; + +struct Area_s Areas[AREAS]; + struct TilePlayer_s { struct EntityLocation_s location; struct EntityLocation_s lastlocation; @@ -52,6 +61,7 @@ struct SmartTile_s { struct SmartTile_s SmartTiles[SMARTTILES]; +/************VVV TO BE REMOVED/MOVED TO MAPEDIT VVV***********/ void game2_savesmarttiles(char* filename) { // Attempt to get file info @@ -64,7 +74,19 @@ void game2_savesmarttiles(char* filename) _kernel_swi(OS_File,&inreg,&outreg); } +void game2_saveareanames(char* filename) +{ + // Attempt to get file info + inreg.r[0] = 10; + inreg.r[1] = (int) filename; + inreg.r[2] = 0xffd; + inreg.r[4] = (int) Areas; + inreg.r[5] = (int) Areas + (sizeof(Areas)); + _kernel_swi(OS_File,&inreg,&outreg); + +} +/************^^^ TO BE REMOVED/MOVED TO MAPEDIT ^^^***********/ void game2_loadsmarttiles(char* filename) { int length; @@ -224,6 +246,16 @@ void game2_setup() game2_loadmap("m2_map"); game2_loadsmarttiles("m2_smart"); + sprintf(areaname,"null"); + sprintf(Areas[0].name,"corridor"); + sprintf(Areas[1].name,"shuttle bay"); + sprintf(Areas[2].name,"briefing room"); + sprintf(Areas[3].name,"cargo bay"); + sprintf(Areas[4].name,"arboretum"); + sprintf(Areas[5].name,"torpedo room 1"); + sprintf(Areas[6].name,"torpedo room 2"); + sprintf(Areas[7].name,"sensor control"); + game2_saveareanames("m2_areas"); game2_fillmap(TilePlayer.mapoffset.X,TilePlayer.mapoffset.Y); } @@ -357,6 +389,9 @@ int game2_tick() { // Fill the map0 with our chunk of the full map game2_fillmap(TilePlayer.mapoffset.X,TilePlayer.mapoffset.Y); + + draw_spritetext("#############", 1020, 950); + draw_spritetext(areaname, 1020, 950); for(x = 0; x < TILESX; x++) { @@ -410,6 +445,8 @@ int game2_tick() // Change tile sprite if(SmartTiles[i].Action == 0) fullmap[SmartTiles[i].ActionTarget] = SmartTiles[i].ActionValue; + else if(SmartTiles[i].Action == 1) + sprintf(areaname,"%s",Areas[SmartTiles[i].ActionValue].name); } } diff --git a/!TheEsc/m2_areas,ffd b/!TheEsc/m2_areas,ffd new file mode 100644 index 0000000..ae69f9e Binary files /dev/null and b/!TheEsc/m2_areas,ffd differ diff --git a/!TheEsc/m2_map,ffd b/!TheEsc/m2_map,ffd index 11f293d..31e88e0 100644 Binary files a/!TheEsc/m2_map,ffd and b/!TheEsc/m2_map,ffd differ diff --git a/!TheEsc/m2_smart,ffd b/!TheEsc/m2_smart,ffd index c8621a0..75b6799 100644 Binary files a/!TheEsc/m2_smart,ffd and b/!TheEsc/m2_smart,ffd differ