git » fp-git.git » commit f3e39a2

Supported torch with debris.

author ecalot
2004-08-23 00:04:11 UTC
committer ecalot
2004-08-23 00:04:11 UTC
parent df9cdba74c68e2de29eafe237ed80978f664e6a2

Supported torch with debris.

FP/src/conf/files.conf +2 -2
FP/src/conf/resources.conf +5 -1
FP/src/ker/room.c +4 -2
FP/src/res/maps.c +1 -1

diff --git a/FP/src/conf/files.conf b/FP/src/conf/files.conf
index 978fa31..e83d79c 100644
--- a/FP/src/conf/files.conf
+++ b/FP/src/conf/files.conf
@@ -1,4 +1,4 @@
-#files!
+#files
 
 LEVEL	  levels.dat
 KID     kid.dat
@@ -8,5 +8,5 @@ PCSOUND	ibmsnd1.dat	ibmsnd2.dat
 TITLES	title.dat
 GUARD   guard1.dat
 PV      pv.dat
-
+PALACE  vpalace.dat
 
diff --git a/FP/src/conf/resources.conf b/FP/src/conf/resources.conf
index 2c29a46..ff49085 100644
--- a/FP/src/conf/resources.conf
+++ b/FP/src/conf/resources.conf
@@ -27,7 +27,11 @@ IMG_BACKGROUND       IMG PV      950 951
 #dungeon environment
 
 IMG_ENV_DUNGEON      IMG DUNGEON 200 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 269 270 271 272 273 274 285 292 293 294 295 296 297 298 299 300 324 325 326 344 346 347 348 349 350 351 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 1230 1231 1286 1287 1288 1289 1290 1291 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343
-#200 297 298 300 1327 1333 1230 1231 241-243 269-274 235 296 236 347 348 232 292-295 361 364 366 368
+
+#dungeon environment
+
+IMG_ENV_PALACE      IMG PALACE 200 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 269 270 271 272 273 274 285 292 293 294 295 296 297 298 299 300 324 325 326 344 346 347 348 349 350 351 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 1230 1231 1286 1287 1288 1289 1290 1291 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343
+
 
 IMG_MAIN_BACKGROUND  IMG TITLES  50-55 
 IMG_TEXT_BACKGROUND  IMG TITLES  40-45
diff --git a/FP/src/ker/room.c b/FP/src/ker/room.c
index 32fcb39..c887cbe 100644
--- a/FP/src/ker/room.c
+++ b/FP/src/ker/room.c
@@ -78,6 +78,7 @@ tTile roomGetTile(tRoom* room,int x, int y) {
 	case T_BTN_RAISE:
 	case T_BTN_DROP:
 	case T_GATE:
+	case T_TORCH_DEBRIS:
 	case T_EXIT_LEFT:
 	case T_EXIT_RIGHT:
 	case T_SKELETON:
@@ -93,9 +94,9 @@ tTile roomGetTile(tRoom* room,int x, int y) {
 		result.isPressable=(result.code==T_BTN_RAISE);
 		result.hasSkeleton=(result.code==T_SKELETON);
 		result.hasSpikes=(result.code==T_SPIKES);
-		result.hasTorch=(result.code==T_TORCH);
+		result.hasTorch=(result.code==T_TORCH)|(result.code==T_TORCH_DEBRIS);
 		result.hasFloor=((result.code==T_FLOOR)|(result.code==T_TORCH)|(result.code==T_LOOSE)|(result.code==T_POTION)|(result.code==T_BTN_DROP)|(result.code==T_SWORD));
-		result.hasBrokenTile=(result.code==T_DEBRIS);
+		result.hasBrokenTile=(result.code==T_DEBRIS)|(result.code==T_TORCH_DEBRIS);
 		result.isWall=0;
 		result.hasSword=(result.code==T_SWORD);
 		break;
@@ -116,6 +117,7 @@ tTile roomGetTile(tRoom* room,int x, int y) {
 		result.hasSword=0;
 		break;
 	case T_EMPTY:
+	case T_TAPESTRY_TOP:
 	default:
 		result.bricks=back;
 		result.hasPillar=0;
diff --git a/FP/src/res/maps.c b/FP/src/res/maps.c
index 098b5a8..57d0b7d 100644
--- a/FP/src/res/maps.c
+++ b/FP/src/res/maps.c
@@ -225,7 +225,7 @@ void  mapStart(tData* map, tKid* kid, tRoomId *roomId, int level) {
 	static char environments[]=MAP_ENVIRONMENTS;
 	*roomId=slevel(start)[0];
 	printf("mapStart: binding kid to map in room %d using the %d environment\n",*roomId,environments[level]);
-	roomLoadGfx(RES_IMG_ENV_DUNGEON);
+	roomLoadGfx(/*environments[level]?RES_IMG_ENV_PALACE:*/RES_IMG_ENV_DUNGEON);
 }
 
 void  mapMove(tData* map) {