00001 /* 00002 * ucmachine.cc - Interpreter for usecode. 00003 * 00004 * Copyright (C) 1999 Jeffrey S. Freedman 00005 * Copyright (C) 2000-2001 The Exult Team 00006 * 00007 * This program is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation; either version 2 of the License, or 00010 * (at your option) any later version. 00011 * 00012 * This program is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with this program; if not, write to the Free Software 00019 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00020 */ 00021 00022 #ifdef HAVE_CONFIG_H 00023 # include <config.h> 00024 #endif 00025 00026 #include "ucmachine.h" 00027 #include "keyring.h" 00028 #include "conversation.h" 00029 00030 00031 Usecode_machine::Usecode_machine 00032 ( 00033 ) : keyring(0), conv(0) 00034 { 00035 // Clear global flags. 00036 std::memset(gflags, 0, sizeof(gflags)); 00037 conv = new Conversation; 00038 keyring = new Keyring; 00039 } 00040 00041 /* 00042 * Delete. 00043 */ 00044 00045 Usecode_machine::~Usecode_machine 00046 ( 00047 ) 00048 { 00049 delete conv; 00050 delete keyring; 00051 } 00052 00053 void Usecode_machine::init_conversation() 00054 { 00055 conv->init_faces(); 00056 } 00057 00058 int Usecode_machine::get_num_faces_on_screen() const 00059 { 00060 return conv->get_num_faces_on_screen(); 00061 } 00062