add more hax to CallButton
[openc2e.git] / SimpleAgent.cpp
blob91c2a605d8e2ee695896a28bce789cf6ea5cc6cc
1 /*
2 * SimpleAgent.cpp
3 * openc2e
5 * Created by Alyssa Milburn on Tue May 25 2004.
6 * Copyright (c) 2004 Alyssa Milburn. All rights reserved.
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
20 #include "SimpleAgent.h"
22 SimpleAgent::SimpleAgent(unsigned char family, unsigned char genus, unsigned short species, unsigned int plane,
23 std::string spritefile, unsigned int firstimage, unsigned int imagecount) :
24 Agent(family, genus, species, plane) {
25 dullpart = new DullPart(this, 0, spritefile, firstimage, 0, 0, 0);
28 SimpleAgent::~SimpleAgent() {
29 delete dullpart;
32 void SimpleAgent::setZOrder(unsigned int plane) {
33 Agent::setZOrder(plane);
34 dullpart->zapZOrder();
35 dullpart->addZOrder();
38 CompoundPart *SimpleAgent::part(unsigned int id) {
39 return dullpart;
42 void SimpleAgent::tick() {
43 if (!paused) dullpart->tick();
44 Agent::tick();
47 /* vim: set noet: */