git » fp-git.git » commit f9ab22a

drink potion event catching

author ecalot
2005-02-21 22:07:52 UTC
committer ecalot
2005-02-21 22:07:52 UTC
parent f3ee50060764dc04f7e46d66760f5d17f5fd930c

drink potion event catching

FP/src/ker/object.c +6 -0

diff --git a/FP/src/ker/object.c b/FP/src/ker/object.c
index 7f48f2d..6612bdc 100644
--- a/FP/src/ker/object.c
+++ b/FP/src/ker/object.c
@@ -37,6 +37,7 @@ object.h: Free Prince : Objects
 #include <stdio.h> /* NULL */
 #include "states.h"
 #include "object.h"
+#include "room.h" /* roomGetTile */
 
 void loadGfx(int storeMirrored, tData** gfxCache, unsigned long resId) {
 	gfxCache[DIR_LEFT]=resLoad(resId);
@@ -99,6 +100,11 @@ int objectMove(tObject* object,tKey key,tRoom* room) {
 					flags=STATE_EXIT_CODE_SPLASH;
 				}
 			}
+			if (flags&STATES_FLAG_D) {
+				tTile tile=roomGetTile(room,object->location/TILE_W,object->floor);
+				/*kidDrinkPotion(object,tile);*/
+				/* TODO: transform the tile into floor */
+			}
 			break;
 		case oGeneric:
 		default: