/* 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 #include #include "stdafx.h" #include "driver/driver96.h" #include "console.h" #include "icons.h" #include "interpreter.h" #include "logic.h" #include "mouse.h" #include "object.h" //------------------------------------------------------------------------------------ menu_object temp_list[TOTAL_engine_pockets]; uint32 total_temp=0; //tempory list menu_object master_menu_list[TOTAL_engine_pockets]; uint32 total_masters=0; //------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------ int32 FN_add_menu_object(int32 *params) //Tony1Oct96 { //param 0 pointer to a menu_object structure to copy down // Zdebug("FN_add_menu_object icon res"); #ifdef _SWORD2_DEBUG if (total_temp == TOTAL_engine_pockets) Con_fatal_error("TOTAL_engine_pockets exceeded! (%s line %u)",__FILE__,__LINE__); #endif // copy the structure to our in-the-engine list memcpy( &temp_list[total_temp], (uint8*) *params, sizeof(menu_object)); // total_temp++; return(IR_CONT); // script continue } //------------------------------------------------------------------------------------ int32 FN_refresh_inventory(int32 *params) // (James28aug97) { // called from 'menu_look_or_combine' script in 'menu_master' object // to update the menu to display a combined object while George runs voice-over // Note that 'object_held' must be set to the graphic of the combined object COMBINE_BASE=0; // can reset this now examining_menu_icon=1; // so that the icon in 'object_held' is coloured while the rest are grey Build_top_menu(); examining_menu_icon=0; return(IR_CONT); // script continue } //------------------------------------------------------------------------------------ void Build_top_menu(void) //Tony19Nov96 { // create and start the inventory menu - NOW AT THE BOTTOM OF THE SCREEN! uint32 null_pc=0; uint32 j,k; uint8 icon_coloured; uint8 *icon; uint8 *head; uint32 res; total_temp=0; //reset temp list which will be totally rebuilt // Zdebug("\nbuild top menu %d", total_masters); //clear the temp list before building a new temp list in-case list gets smaller for (j=0;j