| ## Public API Reference

- Main Page
- Classes
- Files

# tools/questmanager.h

    00001 /*
    00002     Crystal Space Entity Layer
    00003     Copyright (C) 2004-2006 by Jorrit Tyberghein
    00004
    00005     This library is free software; you can redistribute it and/or
    00006     modify it under the terms of the GNU Library General Public
    00007     License as published by the Free Software Foundation; either
    00008     version 2 of the License, or (at your option) any later version.
    00009
    00010     This library is distributed in the hope that it will be useful,
    00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
    00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00013     Library General Public License for more details.
    00014
    00015     You should have received a copy of the GNU Library General Public
    00016     License along with this library; if not, write to the Free
    00017     Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    00018 */
    00019
    00020 #ifndef __CEL_MGR_QUEST__
    00021 #define __CEL_MGR_QUEST__
    00022
    00023 #include "cstypes.h"
    00024 #include "csutil/scf.h"
    00025 #include "csutil/hash.h"
    00026 #include "csgeom/vector3.h"
    00027
    00028 struct iDocumentNode;
    00029 struct iChangePropertyQuestRewardFactory;
    00030 struct iCelDataBuffer;
    00031 struct iQuest;
    00032
    00033 /*
    00034 <quest name="test">
    00035     <state name="notstarted">
    00036     </state>
    00037
    00038     <state name="start">
    00039         <trigger type="ininventory">
    00040             <fireon entity="$actor_entity" new_entity="computer_part" />
    00041             <reward type="newstate" state="state2" />
    00042             <reward type="increasestats" statname="HP" value="3" />
    00043         </trigger>
    00044         <trigger type="objectdestroyed">
    00045             <fireon entity="barrel" />
    00046             <reward type="newstate" state="finalstate" />
    00047             <reward type="increasestats" statname="HP" value="10" />
    00048         </trigger>
    00049     </state>
    00050
    00051     <state name="state2">
    00052         <trigger type="clickonentity">
    00053             <fireon entity="" />
    00054         </trigger>
    00055         <trigger type="cel.questtrigger.entersector">
    00056             <fireon entity="player" sector="room" />
    00057         </trigger>
    00058     </state>
    00059
    00060     <sequence name="seqTest">
    00061         <op type="movemesh" duration="2000" entity="door"
    00062                 x="0" y="4" z="0" />
    00063         <op type="lightcolor" duration="2000" entity="lightbulb"
    00064                 red="1" green="1" blue="1" />
    00065         <delay time="2000" />
    00066     </sequence>
    00067
    00068     <start>notstarted</start>
    00069 </quest>
    00070 */
    00071
    00072 typedef csHash<csStrKey,csStrKey> celQuestParams;
    00073
    00074 //-------------------------------------------------------------------------
    00075 // Triggers
    00076 //-------------------------------------------------------------------------
    00077
    00078 struct iQuestTrigger;
    00079
    00086 struct iQuestTriggerCallback : public virtual iBase
    00087 {
    00088   SCF_INTERFACE (iQuestTriggerCallback, 0, 0, 1);
    00089
    00091   virtual void TriggerFired (iQuestTrigger* trigger) = 0;
    00092 };
    00093
    00106 struct iQuestTrigger : public virtual iBase
    00107 {
    00108   SCF_INTERFACE (iQuestTrigger, 0, 0, 1);
    00109
    00114   virtual void RegisterCallback (iQuestTriggerCallback* callback) = 0;
    00115
    00119   virtual void ClearCallback () = 0;
    00120
    00124   virtual void ActivateTrigger () = 0;
    00125
    00129   virtual void DeactivateTrigger () = 0;
    00130
    00136   virtual bool Check () = 0;
    00137
    00143   virtual bool LoadAndActivateTrigger (iCelDataBuffer* databuf) = 0;
    00144
    00148   virtual void SaveTriggerState (iCelDataBuffer* databuf) = 0;
    00149 };
    00150
    00155 struct iQuestTriggerFactory : public virtual iBase
    00156 {
    00157   SCF_INTERFACE (iQuestTriggerFactory, 0, 0, 1);
    00158
    00165   virtual csPtr<iQuestTrigger> CreateTrigger (iQuest* quest,
    00166         const celQuestParams& params) = 0;
    00167
    00173   virtual bool Load (iDocumentNode* node) = 0;
    00174 };
    00175
    00183 struct iQuestTriggerType : public virtual iBase
    00184 {
    00185   SCF_INTERFACE (iQuestTriggerType, 0, 0, 1);
    00186
    00190   virtual const char* GetName () const = 0;
    00191
    00195   virtual csPtr<iQuestTriggerFactory> CreateTriggerFactory () = 0;
    00196 };
    00197
    00198 //-------------------------------------------------------------------------
    00199 // Rewards
    00200 //-------------------------------------------------------------------------
    00201
    00209 struct iQuestReward : public virtual iBase
    00210 {
    00211   SCF_INTERFACE (iQuestReward, 0, 0, 1);
    00215   virtual void Reward () = 0;
    00216 };
    00217
    00222 struct iQuestRewardFactory : public virtual iBase
    00223 {
    00224   SCF_INTERFACE (iQuestRewardFactory, 0, 0, 1);
    00225
    00232   virtual csPtr<iQuestReward> CreateReward (iQuest* quest,
    00233         const celQuestParams& params) = 0;
    00234
    00240   virtual bool Load (iDocumentNode* node) = 0;
    00241 };
    00242
    00250 struct iQuestRewardType : public virtual iBase
    00251 {
    00252   SCF_INTERFACE (iQuestRewardType, 0, 0, 1);
    00253
    00257   virtual const char* GetName () const = 0;
    00258
    00262   virtual csPtr<iQuestRewardFactory> CreateRewardFactory () = 0;
    00263 };
    00264
    00265 //-------------------------------------------------------------------------
    00266 // Sequence operations
    00267 //-------------------------------------------------------------------------
    00268
    00275 struct iQuestSeqOp : public virtual iBase
    00276 {
    00277   SCF_INTERFACE (iQuestSeqOp, 0, 0, 1);
    00278
    00285   virtual void Init () = 0;
    00286
    00290   virtual bool Load (iCelDataBuffer* databuf) = 0;
    00291
    00295   virtual void Save (iCelDataBuffer* databuf) = 0;
    00296
    00302   virtual void Do (float time) = 0;
    00303 };
    00304
    00309 struct iQuestSeqOpFactory : public virtual iBase
    00310 {
    00311   SCF_INTERFACE (iQuestSeqOpFactory, 0, 0, 1);
    00312
    00318   virtual csPtr<iQuestSeqOp> CreateSeqOp (const celQuestParams& params) = 0;
    00319
    00325   virtual bool Load (iDocumentNode* node) = 0;
    00326 };
    00327
    00335 struct iQuestSeqOpType : public virtual iBase
    00336 {
    00337   SCF_INTERFACE (iQuestSeqOpType, 0, 0, 1);
    00338
    00342   virtual const char* GetName () const = 0;
    00343
    00347   virtual csPtr<iQuestSeqOpFactory> CreateSeqOpFactory () = 0;
    00348 };
    00349
    00350 struct iQuestSequence;
    00351
    00356 struct iQuestSequenceCallback : public virtual iBase
    00357 {
    00358   SCF_INTERFACE (iQuestSequenceCallback, 0, 0, 1);
    00359
    00361   virtual void SequenceFinished (iQuestSequence* sequence) = 0;
    00362 };
    00363
    00367 struct iQuestSequence : public virtual iBase
    00368 {
    00369   SCF_INTERFACE (iQuestSequence, 0, 0, 1);
    00370
    00374   virtual const char* GetName () const = 0;
    00375
    00381   virtual bool Start (csTicks delay) = 0;
    00382
    00389   virtual void Finish () = 0;
    00390
    00396   virtual void Abort () = 0;
    00397
    00401   virtual bool IsRunning () = 0;
    00402
    00406   virtual void AddSequenceCallback (iQuestSequenceCallback* cb) = 0;
    00410   virtual void RemoveSequenceCallback (iQuestSequenceCallback* cb) = 0;
    00411 };
    00412
    00413 //-------------------------------------------------------------------------
    00414 // The Quest
    00415 //-------------------------------------------------------------------------
    00416
    00421 struct iQuest : public virtual iBase
    00422 {
    00423   SCF_INTERFACE (iQuest, 0, 0, 1);
    00424
    00429   virtual bool SwitchState (const char* state) = 0;
    00430
    00434   virtual const char* GetCurrentState () const = 0;
    00435
    00441   virtual bool LoadState (const char* state, iCelDataBuffer* databuf) = 0;
    00442
    00447   virtual void SaveState (iCelDataBuffer* databuf) = 0;
    00448
    00452   virtual iQuestSequence* FindSequence (const char* name) = 0;
    00453 };
    00454
    00460 struct iQuestTriggerResponseFactory : public virtual iBase
    00461 {
    00462   SCF_INTERFACE (iQuestTriggerResponseFactory, 0, 0, 1);
    00463
    00468   virtual void SetTriggerFactory (iQuestTriggerFactory* trigger_fact) = 0;
    00469
    00474   virtual void AddRewardFactory (iQuestRewardFactory* reward_fact) = 0;
    00475 };
    00476
    00481 struct iQuestStateFactory : public virtual iBase
    00482 {
    00483   SCF_INTERFACE (iQuestStateFactory, 0, 0, 1);
    00484
    00488   virtual const char* GetName () const = 0;
    00489
    00493   virtual iQuestTriggerResponseFactory* CreateTriggerResponseFactory () = 0;
    00494 };
    00495
    00500 struct iQuestSequenceFactory : public virtual iBase
    00501 {
    00502   SCF_INTERFACE (iQuestSequenceFactory, 0, 0, 1);
    00503
    00507   virtual const char* GetName () const = 0;
    00508
    00514   virtual bool Load (iDocumentNode* node) = 0;
    00515
    00523   virtual void AddSeqOpFactory (iQuestSeqOpFactory* seqopfact,
    00524         const char* duration) = 0;
    00525
    00530   virtual void AddDelay (const char* delay) = 0;
    00531 };
    00532
    00547 struct iQuestFactory : public virtual iBase
    00548 {
    00549   SCF_INTERFACE (iQuestFactory, 0, 0, 1);
    00550
    00554   virtual const char* GetName () const = 0;
    00555
    00563   virtual csPtr<iQuest> CreateQuest (const celQuestParams& params) = 0;
    00564
    00570   virtual bool Load (iDocumentNode* node) = 0;
    00571
    00576   virtual iQuestStateFactory* GetState (const char* name) = 0;
    00577
    00582   virtual iQuestStateFactory* CreateState (const char* name) = 0;
    00583
    00588   virtual iQuestSequenceFactory* GetSequence (const char* name) = 0;
    00589
    00594   virtual iQuestSequenceFactory* CreateSequence (const char* name) = 0;
    00595
    00600   virtual const char* GetDefaultParameter (const char* name) const = 0;
    00601
    00606   virtual void SetDefaultParameter (const char* name,const char* value) = 0;
    00607
    00611   virtual void ClearDefaultParameters () = 0;
    00612
    00613 };
    00614
    00615 //-------------------------------------------------------------------------
    00616 // The Quest Manager
    00617 //-------------------------------------------------------------------------
    00618
    00624 struct iQuestManager : public virtual iBase
    00625 {
    00626   SCF_INTERFACE (iQuestManager, 0, 0, 1);
    00627
    00657   virtual bool RegisterTriggerType (iQuestTriggerType* trigger) = 0;
    00658
    00663   virtual iQuestTriggerType* GetTriggerType (const char* name) = 0;
    00664
    00694   virtual bool RegisterRewardType (iQuestRewardType* trigger) = 0;
    00695
    00700   virtual iQuestRewardType* GetRewardType (const char* name) = 0;
    00701
    00721   virtual bool RegisterSeqOpType (iQuestSeqOpType* seqop) = 0;
    00722
    00727   virtual iQuestSeqOpType* GetSeqOpType (const char* name) = 0;
    00728
    00732   virtual iQuestFactory* GetQuestFactory (const char* name) = 0;
    00733
    00739   virtual iQuestFactory* CreateQuestFactory (const char* name) = 0;
    00740
    00748   virtual const char* ResolveParameter (
    00749         const celQuestParams& params,
    00750         const char* param) = 0;
    00751
    00757   virtual bool Load (iDocumentNode* node) = 0;
    00758
    00763   virtual iQuestRewardFactory* AddNewStateReward (
    00764         iQuestTriggerResponseFactory* response,
    00765         const char* entity_par, const char* state_par) = 0;
    00766
    00771   virtual iQuestRewardFactory* AddDebugPrintReward (
    00772         iQuestTriggerResponseFactory* response,
    00773         const char* msg_par) = 0;
    00774
    00779   virtual iQuestRewardFactory* AddInventoryReward (
    00780         iQuestTriggerResponseFactory* response,
    00781         const char* entity_par, const char* child_entity_par) = 0;
    00782
    00787   virtual iQuestRewardFactory* AddSequenceReward (
    00788         iQuestTriggerResponseFactory* response,
    00789         const char* entity_par, const char* sequence_par,
    00790         const char* delay_par) = 0;
    00791
    00796   virtual iQuestRewardFactory* AddSequenceFinishReward (
    00797         iQuestTriggerResponseFactory* response,
    00798         const char* entity_par, const char* sequence_par) = 0;
    00799
    00805   virtual iChangePropertyQuestRewardFactory* AddChangePropertyReward (
    00806         iQuestTriggerResponseFactory* response,
    00807         const char* entity_par, const char* prop_par) = 0;
    00808
    00813   virtual iQuestTriggerFactory* SetTimeoutTrigger (
    00814         iQuestTriggerResponseFactory* response,
    00815         const char* timeout_par) = 0;
    00816
    00821   virtual iQuestTriggerFactory* SetEnterSectorTrigger (
    00822         iQuestTriggerResponseFactory* response,
    00823         const char* entity_par, const char* sector_par) = 0;
    00824
    00829   virtual iQuestTriggerFactory* SetMeshEnterSectorTrigger (
    00830         iQuestTriggerResponseFactory* response,
    00831         const char* entity_par, const char* sector_par) = 0;
    00832
    00837   virtual iQuestTriggerFactory* SetSequenceFinishTrigger (
    00838         iQuestTriggerResponseFactory* response,
    00839         const char* entity_par, const char* sequence_par) = 0;
    00840
    00845   virtual iQuestTriggerFactory* SetPropertyChangeTrigger (
    00846         iQuestTriggerResponseFactory* response,
    00847         const char* entity_par, const char* prop_par,
    00848         const char* value_par) = 0;
    00849
    00854   virtual iQuestTriggerFactory* SetTriggerTrigger (
    00855         iQuestTriggerResponseFactory* response,
    00856         const char* entity_par, bool do_leave = false) = 0;
    00857
    00862   virtual iQuestTriggerFactory* SetWatchTrigger (
    00863         iQuestTriggerResponseFactory* response,
    00864         const char* entity_par, const char* target_entity_par,
    00865         const char* checktime_par,
    00866         const char* radius_par) = 0;
    00867 };
    00868
    00869 //-------------------------------------------------------------------------
    00870 // Specific trigger implementations.
    00871 //-------------------------------------------------------------------------
    00872
    00887 struct iTimeoutQuestTriggerFactory : public virtual iBase
    00888 {
    00889   SCF_INTERFACE (iTimeoutQuestTriggerFactory, 0, 0, 1);
    00890
    00896   virtual void SetTimeoutParameter (const char* timeout_par) = 0;
    00897 };
    00898
    00921 struct iPropertyChangeQuestTriggerFactory : public virtual iBase
    00922 {
    00923   SCF_INTERFACE (iPropertyChangeQuestTriggerFactory, 0, 0, 1);
    00924
    00933   virtual void SetEntityParameter (const char* entity, const char* tag = 0) = 0;
    00934
    00940   virtual void SetPropertyParameter (const char* prop) = 0;
    00941
    00948   virtual void SetValueParameter (const char* value) = 0;
    00949 };
    00950
    00969 struct iMeshSelectQuestTriggerFactory : public virtual iBase
    00970 {
    00971   SCF_INTERFACE (iMeshSelectQuestTriggerFactory, 0, 0, 1);
    00972
    00981   virtual void SetEntityParameter (const char* entity, const char* tag = 0) = 0;
    00982 };
    00983
    01005 struct iInventoryQuestTriggerFactory : public virtual iBase
    01006 {
    01007   SCF_INTERFACE (iInventoryQuestTriggerFactory, 0, 0, 1);
    01008
    01017   virtual void SetEntityParameter (const char* entity, const char* tag = 0) = 0;
    01018
    01026   virtual void SetChildEntityParameter (const char* child_entity) = 0;
    01027 };
    01028
    01051 struct iEnterSectorQuestTriggerFactory : public virtual iBase
    01052 {
    01053   SCF_INTERFACE (iEnterSectorQuestTriggerFactory, 0, 0, 1);
    01054
    01063   virtual void SetEntityParameter (const char* entity, const char* tag = 0) = 0;
    01064
    01071   virtual void SetSectorParameter (const char* sector) = 0;
    01072 };
    01073
    01093 struct iSequenceFinishQuestTriggerFactory : public virtual iBase
    01094 {
    01095   SCF_INTERFACE (iSequenceFinishQuestTriggerFactory, 0, 0, 1);
    01096
    01105   virtual void SetEntityParameter (const char* entity, const char* tag = 0) = 0;
    01106
    01112   virtual void SetSequenceParameter (const char* sequence) = 0;
    01113 };
    01114
    01134 struct iTriggerQuestTriggerFactory : public virtual iBase
    01135 {
    01136   SCF_INTERFACE (iTriggerQuestTriggerFactory, 0, 0, 1);
    01137
    01146   virtual void SetEntityParameter (const char* entity, const char* tag = 0) = 0;
    01147
    01152   virtual void EnableLeave () = 0;
    01153 };
    01154
    01179 struct iWatchQuestTriggerFactory : public virtual iBase
    01180 {
    01181   SCF_INTERFACE (iWatchQuestTriggerFactory, 0, 0, 1);
    01182
    01191   virtual void SetEntityParameter (const char* entity, const char* tag = 0) = 0;
    01192
    01201   virtual void SetTargetEntityParameter (const char* entity,
    01202       const char* tag = 0) = 0;
    01203
    01211   virtual void SetChecktimeParameter (const char* time) = 0;
    01212
    01219   virtual void SetRadiusParameter (const char* radius) = 0;
    01220 };
    01221
    01222 //-------------------------------------------------------------------------
    01223 // Specific reward implementations.
    01224 //-------------------------------------------------------------------------
    01225
    01240 struct iDebugPrintQuestRewardFactory : public virtual iBase
    01241 {
    01242   SCF_INTERFACE (iDebugPrintQuestRewardFactory, 0, 0, 1);
    01243
    01248   virtual void SetMessageParameter (const char* msg) = 0;
    01249 };
    01250
    01269 struct iNewStateQuestRewardFactory : public virtual iBase
    01270 {
    01271   SCF_INTERFACE (iNewStateQuestRewardFactory, 0, 0, 1);
    01272
    01279   virtual void SetStateParameter (const char* state) = 0;
    01280
    01289   virtual void SetEntityParameter (const char* entity, const char* tag = 0) = 0;
    01290 };
    01291
    01318 struct iChangePropertyQuestRewardFactory : public virtual iBase
    01319 {
    01320   SCF_INTERFACE (iChangePropertyQuestRewardFactory, 0, 0, 1);
    01321
    01328   virtual void SetEntityParameter (const char* entity) = 0;
    01329
    01339   virtual void SetPCParameter (const char* pc, const char* tag) = 0;
    01340
    01346   virtual void SetPropertyParameter (const char* prop) = 0;
    01347
    01352   virtual void SetStringParameter (const char* pstring) = 0;
    01353
    01358   virtual void SetLongParameter (const char* plong) = 0;
    01359
    01364   virtual void SetFloatParameter (const char* pfloat) = 0;
    01365
    01370   virtual void SetBoolParameter (const char* pbool) = 0;
    01371
    01376   virtual void SetDiffParameter (const char* pdiff) = 0;
    01377
    01381   virtual void SetToggle () = 0;
    01382 };
    01383
    01405 struct iInventoryQuestRewardFactory : public virtual iBase
    01406 {
    01407   SCF_INTERFACE (iInventoryQuestRewardFactory, 0, 0, 1);
    01408
    01417   virtual void SetEntityParameter (const char* entity, const char* tag = 0) = 0;
    01418
    01424   virtual void SetChildEntityParameter (const char* entity,
    01425         const char* tag = 0) = 0;
    01426
    01427 };
    01428
    01447 struct iSequenceQuestRewardFactory : public virtual iBase
    01448 {
    01449   SCF_INTERFACE (iSequenceQuestRewardFactory, 0, 0, 1);
    01450
    01459   virtual void SetEntityParameter (const char* entity, const char* tag = 0) = 0;
    01460
    01466   virtual void SetSequenceParameter (const char* sequence) = 0;
    01467
    01472   virtual void SetDelayParameter (const char* delay) = 0;
    01473 };
    01474
    01492 struct iSequenceFinishQuestRewardFactory : public virtual iBase
    01493 {
    01494   SCF_INTERFACE (iSequenceFinishQuestRewardFactory, 0, 0, 1);
    01495
    01504   virtual void SetEntityParameter (const char* entity, const char* tag = 0) = 0;
    01505
    01511   virtual void SetSequenceParameter (const char* sequence) = 0;
    01512 };
    01513
    01529 struct iMessageQuestRewardFactory : public virtual iBase
    01530 {
    01531   SCF_INTERFACE (iMessageQuestRewardFactory, 0, 0, 1);
    01532
    01538   virtual void SetEntityParameter (const char* entity) = 0;
    01539
    01544   virtual void SetIDParameter (const char* id) = 0;
    01545
    01555   virtual void AddParameter (celDataType type, csStringID id,
    01556       const char* name, const char* value) = 0;
    01557 };
    01558
    01576 struct iActionQuestRewardFactory : public virtual iBase
    01577 {
    01578   SCF_INTERFACE (iActionQuestRewardFactory, 0, 0, 1);
    01579
    01585   virtual void SetEntityParameter (const char* entity) = 0;
    01586
    01591   virtual void SetIDParameter (const char* id) = 0;
    01592
    01598   virtual void SetPropertyClassParameter (const char* propertyclass) = 0;
    01599
    01605   virtual void SetTagParameter (const char* tag) = 0;
    01606
    01616   virtual void AddParameter (celDataType type, csStringID id,
    01617       const char* name, const char* value) = 0;
    01618 };
    01619
    01633 struct iDestroyEntityQuestRewardFactory : public virtual iBase
    01634 {
    01635   SCF_INTERFACE (iDestroyEntityQuestRewardFactory, 0, 0, 1);
    01636
    01642   virtual void SetEntityParameter (const char* entity) = 0;
    01643 };
    01644
    01645
    01646 //-------------------------------------------------------------------------
    01647 // Specific sequence operation implementations.
    01648 //-------------------------------------------------------------------------
    01649
    01664 struct iDebugPrintQuestSeqOpFactory : public virtual iBase
    01665 {
    01666   SCF_INTERFACE (iDebugPrintQuestSeqOpFactory, 0, 0, 1);
    01667
    01672   virtual void SetMessageParameter (const char* msg) = 0;
    01673 };
    01674
    01700 struct iTransformQuestSeqOpFactory : public virtual iBase
    01701 {
    01702   SCF_INTERFACE (iTransformQuestSeqOpFactory, 0, 0, 1);
    01703
    01710   virtual void SetEntityParameter (const char* entity, const char* tag = 0) = 0;
    01711
    01715   virtual void SetVectorParameter (const char* vectorx, const char* vectory,
    01716         const char* vectorz) = 0;
    01717
    01723   virtual void SetRotationParameter (int rot_axis, const char* rot_angle) = 0;
    01724 };
    01725
    01747 struct iMovePathQuestSeqOpFactory : public virtual iBase
    01748 {
    01749   SCF_INTERFACE (iMovePathQuestSeqOpFactory, 0, 0, 1);
    01750
    01757   virtual void SetEntityParameter (const char* entity, const char* tag = 0) = 0;
    01758
    01768   virtual void AddPathNode (const char* sectorname, const char* node,
    01769         const char* time) = 0;
    01770 };
    01771
    01794 struct iLightQuestSeqOpFactory : public virtual iBase
    01795 {
    01796   SCF_INTERFACE (iLightQuestSeqOpFactory, 0, 0, 1);
    01797
    01804   virtual void SetEntityParameter (const char* entity, const char* tag = 0) = 0;
    01805
    01809   virtual void SetRelColorParameter (const char* red, const char* green,
    01810         const char* blue) = 0;
    01811
    01815   virtual void SetAbsColorParameter (const char* red, const char* green,
    01816         const char* blue) = 0;
    01817 };
    01818
    01819 //-------------------------------------------------------------------------
    01820
    01824 #define CEL_DECLARE_REWARDTYPE(name,id)                                 \
    01825 class cel##name##RewardType : public scfImplementation1<                \
    01826                 cel##name##RewardType,iQuestRewardType>                 \
    01827 {                                                                       \
    01828 public:                                                                 \
    01829   iObjectRegistry* object_reg;                                          \
    01830   cel##name##RewardType (iObjectRegistry* object_reg);                  \
    01831   virtual ~cel##name##RewardType () { }                                 \
    01832   virtual const char* GetName () const { return id; }                   \
    01833   virtual csPtr<iQuestRewardFactory> CreateRewardFactory ();            \
    01834 };
    01835
    01839 #define CEL_IMPLEMENT_REWARDTYPE(name)                                  \
    01840 cel##name##RewardType::cel##name##RewardType (                          \
    01841         iObjectRegistry* object_reg) : scfImplementationType (this)     \
    01842 {                                                                       \
    01843   cel##name##RewardType::object_reg = object_reg;                       \
    01844 }                                                                       \
    01845 csPtr<iQuestRewardFactory> cel##name##RewardType::CreateRewardFactory ()\
    01846 {                                                                       \
    01847   cel##name##RewardFactory* fact = new                                  \
    01848         cel##name##RewardFactory (this);                                \
    01849   return fact;                                                          \
    01850 }
    01851
    01855 #define CEL_DECLARE_TRIGGERTYPE(name,id)                                \
    01856 class cel##name##TriggerType : public scfImplementation1<               \
    01857                 cel##name##TriggerType,iQuestTriggerType>               \
    01858 {                                                                       \
    01859 public:                                                                 \
    01860   iObjectRegistry* object_reg;                                          \
    01861   cel##name##TriggerType (iObjectRegistry* object_reg);                 \
    01862   virtual ~cel##name##TriggerType () { }                                \
    01863   virtual const char* GetName () const { return id; }                   \
    01864   virtual csPtr<iQuestTriggerFactory> CreateTriggerFactory ();          \
    01865 };
    01866
    01870 #define CEL_IMPLEMENT_TRIGGERTYPE(name)                                 \
    01871 cel##name##TriggerType::cel##name##TriggerType (                        \
    01872         iObjectRegistry* object_reg) : scfImplementationType (this)     \
    01873 {                                                                       \
    01874   cel##name##TriggerType::object_reg = object_reg;                      \
    01875 }                                                                       \
    01876 csPtr<iQuestTriggerFactory> cel##name##TriggerType::CreateTriggerFactory () \
    01877 {                                                                       \
    01878   cel##name##TriggerFactory* fact = new cel##name##TriggerFactory (this); \
    01879   return fact;                                                          \
    01880 }
    01881
    01885 #define CEL_DECLARE_SEQOPTYPE(name,id)                                  \
    01886 class cel##name##SeqOpType : public scfImplementation1<                 \
    01887         cel##name##SeqOpType,iQuestSeqOpType>                           \
    01888 {                                                                       \
    01889 public:                                                                 \
    01890   iObjectRegistry* object_reg;                                          \
    01891   cel##name##SeqOpType (iObjectRegistry* object_reg);                   \
    01892   virtual ~cel##name##SeqOpType () { }                                  \
    01893   virtual const char* GetName () const { return id; }                   \
    01894   virtual csPtr<iQuestSeqOpFactory> CreateSeqOpFactory ();              \
    01895 };
    01896
    01900 #define CEL_IMPLEMENT_SEQOPTYPE(name)                                   \
    01901 cel##name##SeqOpType::cel##name##SeqOpType (                            \
    01902         iObjectRegistry* object_reg) : scfImplementationType (this)     \
    01903 {                                                                       \
    01904   cel##name##SeqOpType::object_reg = object_reg;                        \
    01905 }                                                                       \
    01906 csPtr<iQuestSeqOpFactory> cel##name##SeqOpType::CreateSeqOpFactory ()   \
    01907 {                                                                       \
    01908   cel##name##SeqOpFactory* fact = new cel##name##SeqOpFactory (this);   \
    01909   return fact;                                                          \
    01910 }
    01911
    01912 #endif // __CEL_MGR_QUEST__
    01913