/src/NPCManager.h
C Header | 58 lines | 27 code | 8 blank | 23 comment | 0 complexity | 6b235bd67fbd0fa3f272dbf5e18b8a73 MD5 | raw file
Possible License(s): GPL-3.0
1/* 2Copyright 2011 Clint Bellanger 3 4This file is part of FLARE. 5 6FLARE is free software: you can redistribute it and/or modify it under the terms 7of the GNU General Public License as published by the Free Software Foundation, 8either version 3 of the License, or (at your option) any later version. 9 10FLARE is distributed in the hope that it will be useful, but WITHOUT ANY 11WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12PARTICULAR PURPOSE. See the GNU General Public License for more details. 13 14You should have received a copy of the GNU General Public License along with 15FLARE. If not, see http://www.gnu.org/licenses/ 16*/ 17 18/** 19 * class NPCManager 20 * 21 * NPCs which are not combatative enemies are handled by this Manager. 22 * Most commonly this involves vendor and conversation townspeople. 23 */ 24 25#ifndef NPC_MANAGER_H 26#define NPC_MANAGER_H 27 28#include "NPC.h" 29#include "MapIso.h" 30#include "WidgetTooltip.h" 31#include "LootManager.h" 32 33#include <SDL.h> 34 35// max number of NPCs for a single map 36const int MAX_NPC_COUNT = 32; 37 38class NPCManager { 39private: 40 MapIso *map; 41 WidgetTooltip *tip; 42 LootManager *loot; 43 ItemManager *items; 44 TooltipData tip_buf; 45 46public: 47 NPCManager(MapIso *_map, LootManager *_loot, ItemManager *_items); 48 ~NPCManager(); 49 NPC *npcs[MAX_NPC_COUNT]; 50 void handleNewMap(); 51 void logic(); 52 int checkNPCClick(Point mouse, Point cam); 53 void renderTooltips(Point cam, Point mouse); 54 int npc_count; 55 int tooltip_margin; 56}; 57 58#endif