git » fp-git.git » commit 445f03a

Improved image offsets. Added pillar resource.

author ecalot
2004-08-16 05:44:33 UTC
committer ecalot
2004-08-16 05:44:33 UTC
parent b33a1fb1c2f1620d6dbd5c66ddd7a1ffa8d34461

Improved image offsets. Added pillar resource.

FP/src/ker/kid.c +1 -1
FP/src/ker/object.c +1 -1
FP/src/ker/room.c +18 -15

diff --git a/FP/src/ker/kid.c b/FP/src/ker/kid.c
index f12dc6c..7d06af0 100644
--- a/FP/src/ker/kid.c
+++ b/FP/src/ker/kid.c
@@ -111,7 +111,7 @@ tKid kidCreate() {
 }
 
 void kidDraw(tKid kid) {
-	outputDrawBitmap(kid.action->pFrames[kid.frame],kid.location,100+kid.floor*20);
+	outputDrawBitmap(kid.action->pFrames[kid.frame],kid.location,110+kid.floor*60); /* TODO: use TILE_H */
 }
 
 int kidMove(tKid* kid,tKey key/*,tRoom room*/) {
diff --git a/FP/src/ker/object.c b/FP/src/ker/object.c
index f12dc6c..7d06af0 100644
--- a/FP/src/ker/object.c
+++ b/FP/src/ker/object.c
@@ -111,7 +111,7 @@ tKid kidCreate() {
 }
 
 void kidDraw(tKid kid) {
-	outputDrawBitmap(kid.action->pFrames[kid.frame],kid.location,100+kid.floor*20);
+	outputDrawBitmap(kid.action->pFrames[kid.frame],kid.location,110+kid.floor*60); /* TODO: use TILE_H */
 }
 
 int kidMove(tKid* kid,tKey key/*,tRoom room*/) {
diff --git a/FP/src/ker/room.c b/FP/src/ker/room.c
index d136c6b..693b9c6 100644
--- a/FP/src/ker/room.c
+++ b/FP/src/ker/room.c
@@ -106,6 +106,9 @@ tTile roomGetTile(tRoom* room,int x, int y) {
 	return result;
 }
 
+#define TILE_W 32
+#define TILE_H 60
+
 void roomDrawBackground(tRoom* room) {
 	int x,y;
 	tTile tile;
@@ -117,39 +120,39 @@ void roomDrawBackground(tRoom* room) {
 			if (tile.hasTorch) {
 				outputDrawBitmap(
 					roomGfx.torch->pFrames[(map->time+2*x+y)%(roomGfx.torch->frames)],
-					x*32,
-					y*48
+					x*TILE_W-30,
+					y*TILE_H-40
 				);
 			}
 			if (tile.hasFloor) {
 				outputDrawBitmap(
 					roomGfx.environment->pFrames[10],
-					x*32,
-					y*48
+					x*TILE_W,
+					y*TILE_H
 				);
 				outputDrawBitmap(
 					roomGfx.environment->pFrames[9],
-					x*32,
-					y*48+2
+					x*TILE_W,
+					y*TILE_H+2
 				);
 			}
 			if (tile.hasBrokenTile) {
 				outputDrawBitmap(
 					roomGfx.environment->pFrames[2],
-					x*32,
-					y*48
+					x*TILE_W,
+					y*TILE_H
 				);
 				outputDrawBitmap(
 					roomGfx.environment->pFrames[1],
-					x*32,
-					y*48+2
+					x*TILE_W,
+					y*TILE_H+2
 				);
 			}
 			if (tile.walkable) {
 				outputDrawBitmap(
 					roomGfx.environment->pFrames[8],
-					x*32+32,
-					y*48+1
+					x*TILE_W+TILE_W,
+					y*TILE_H+1
 				);
 			}
 		}
@@ -166,9 +169,9 @@ void roomDrawForeground(tRoom* room) {
 			tile=roomGetTile(room,x,y);
 			if (tile.hasPillar) {
 				outputDrawBitmap(
-					roomGfx.environment->pFrames[14],
-					x*32+32,
-					y*48+1
+					roomGfx.environment->pFrames[25],
+					x*TILE_W+TILE_W,
+					y*TILE_H+1
 				);
 			}
 		}