/* Copyright (C) 1994-2003 Revolution Software Ltd * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Header$ */ //------------------------------------------------------------------------------------ #include #include "stdafx.h" //#include "src\driver96.h" #include "console.h" #include "debug.h" #include "defs.h" #include "events.h" #include "interpreter.h" #include "logic.h" #include "memory.h" #include "object.h" #include "sync.h" //------------------------------------------------------------------------------------ _event_unit event_list[MAX_events]; //------------------------------------------------------------------------------------ void Init_event_system(void) //Tony4Dec96 { uint32 j; for (j=0;jlooping = 0; // reset the 'looping' flag // start the event LLogic.Logic_one(event_list[j].interact_id); // run 3rd script of target object on level 1 event_list[j].id = 0; // clear the event slot return(IR_TERMINATE); } } // no event, so do the FN_pause bit if (ob_logic->looping==0) // start the pause { ob_logic->looping = 1; ob_logic->pause = params[1]; // no. of game cycles } if (ob_logic->pause) // if non-zero { ob_logic->pause--; // decrement the pause count return(IR_REPEAT); // drop out of script, but call this again next cycle } else // pause count is zerp { ob_logic->looping = 0; return(IR_CONT); // continue script } } //------------------------------------------------------------------------------------ uint32 Check_event_waiting(void) //Tony4Dec96 { //returns yes/no uint32 j; for (j=0;j