1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164
|
/*
===========================================================================
Copyright (C) 2015 the OpenMoHAA team
This file is part of OpenMoHAA source code.
OpenMoHAA source code 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.
OpenMoHAA source code 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 OpenMoHAA source code; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
// parm.cpp : Event parameters
#include "glb_local.h"
#include "parm.h"
#include "scriptmaster.h"
#include "scriptthread.h"
#include "scriptvm.h"
Parm parm;
Event EV_Parm_GetPreviousThread
(
"previousthread",
EV_DEFAULT,
NULL,
NULL,
"previousthread",
EV_GETTER
);
Event EV_Parm_GetOther
(
"other",
EV_DEFAULT,
NULL,
NULL,
"other",
EV_GETTER
);
Event EV_Parm_GetOwner
(
"owner",
EV_DEFAULT,
NULL,
NULL,
"owner",
EV_GETTER
);
Event EV_Parm_Movedone
(
"movedone",
EV_DEFAULT,
NULL,
NULL,
"movedone",
EV_GETTER
);
Event EV_Parm_Movefail
(
"movefail",
EV_DEFAULT,
NULL,
NULL,
"movefail",
EV_GETTER
);
Event EV_Parm_Motionfail
(
"motionfail",
EV_DEFAULT,
NULL,
NULL,
"motionfail",
EV_GETTER
);
Event EV_Parm_Upperfail
(
"upperfail",
EV_DEFAULT,
NULL,
NULL,
"upperfail",
EV_GETTER
);
Event EV_Parm_Sayfail
(
"sayfail",
EV_DEFAULT,
NULL,
NULL,
"sayfail",
EV_GETTER
);
void Parm::Archive(Archiver& arc)
{
Listener::Archive(arc);
arc.ArchiveSafePointer(&other);
arc.ArchiveSafePointer(&owner);
}
void Parm::GetMotionFail(Event *ev)
{
ev->AddInteger(motionfail);
}
void Parm::GetMovedone(Event *ev)
{
ev->AddInteger(movedone);
}
void Parm::GetMovefail(Event *ev)
{
ev->AddInteger(movefail);
}
void Parm::GetOther(Event *ev)
{
ev->AddListener(other);
}
void Parm::GetOwner(Event *ev)
{
ev->AddListener(owner);
}
void Parm::GetPreviousThread(Event *ev)
{
ev->AddListener(Director.PreviousThread());
}
void Parm::GetSayFail(Event *ev)
{
ev->AddInteger(sayfail);
}
void Parm::GetUpperFail(Event *ev)
{
ev->AddInteger(upperfail);
}
CLASS_DECLARATION(Listener, Parm, NULL) {
{&EV_Parm_GetPreviousThread, &Parm::GetPreviousThread},
{&EV_Parm_GetOther, &Parm::GetOther },
{&EV_Parm_GetOwner, &Parm::GetOwner },
{&EV_Parm_Movedone, &Parm::GetMovedone },
{&EV_Parm_Movefail, &Parm::GetMovefail },
{&EV_Parm_Motionfail, &Parm::GetMotionFail },
{&EV_Parm_Upperfail, &Parm::GetUpperFail },
{&EV_Parm_Sayfail, &Parm::GetSayFail },
{NULL, NULL }
};
|