mirror of
https://github.com/stevenhowes/CTheEscape.git
synced 2026-05-26 15:53:29 +01:00
Finish cargo bay door. Copy/paste of smart tile info.
This commit is contained in:
Binary file not shown.
+24
-2
@@ -157,7 +157,7 @@ void game2_savesmarttiles(char* filename)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void game2_getnewsmarttile()
|
int game2_getnewsmarttile()
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for(i = 0; i < SMARTTILES; i++)
|
for(i = 0; i < SMARTTILES; i++)
|
||||||
@@ -167,9 +167,14 @@ void game2_getnewsmarttile()
|
|||||||
SmartTiles[i].Tile = TilePlayer.rawtile;
|
SmartTiles[i].Tile = TilePlayer.rawtile;
|
||||||
SmartTiles[i].Action = 0;
|
SmartTiles[i].Action = 0;
|
||||||
SmartTiles[i].ActionValue = 0;
|
SmartTiles[i].ActionValue = 0;
|
||||||
return;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
screen_nobuffer();
|
||||||
|
printf("Couldn't allocate new spart tile.");
|
||||||
|
exit(0);
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void game2_loadmap(char* filename)
|
void game2_loadmap(char* filename)
|
||||||
@@ -252,6 +257,8 @@ void game2_tick_input()
|
|||||||
{
|
{
|
||||||
int x,y;
|
int x,y;
|
||||||
int oldselectedsmart;
|
int oldselectedsmart;
|
||||||
|
int i,tmptileid;
|
||||||
|
|
||||||
oldselectedsmart = selectedsmart;
|
oldselectedsmart = selectedsmart;
|
||||||
if(editsmart == 1)
|
if(editsmart == 1)
|
||||||
{
|
{
|
||||||
@@ -468,6 +475,21 @@ void game2_tick_input()
|
|||||||
if(tick > readmodkey)
|
if(tick > readmodkey)
|
||||||
{
|
{
|
||||||
fullmap[TilePlayer.rawtile] = clipboard;
|
fullmap[TilePlayer.rawtile] = clipboard;
|
||||||
|
|
||||||
|
for(i = 0; i < SMARTTILES; i++)
|
||||||
|
{
|
||||||
|
if(SmartTiles[i].Tile == clipboard_tileid)
|
||||||
|
{
|
||||||
|
tmptileid = game2_getnewsmarttile();
|
||||||
|
|
||||||
|
if(tmptileid > -1)
|
||||||
|
{
|
||||||
|
SmartTiles[tmptileid].ActionTarget = SmartTiles[i].ActionTarget;
|
||||||
|
SmartTiles[tmptileid].Action = SmartTiles[i].Action;
|
||||||
|
SmartTiles[tmptileid].ActionValue = SmartTiles[i].ActionValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
readmodkey = tick + 10;
|
readmodkey = tick + 10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user