You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
1.3 KiB
C++
64 lines
1.3 KiB
C++
//
|
|
// G A M E.O.N.E - LOW LEVEL LIB V1.0
|
|
// Copyright (C) 2001 LEVEL ONE ENTERTAINMENT,
|
|
// Licensed under the terms of LGPL.
|
|
//:---------------------------------------------------------------------------
|
|
//:Description
|
|
//
|
|
// FRAMEWORK global object eventmgr
|
|
//
|
|
|
|
|
|
#ifndef _CEVENTMGR_H
|
|
#define _CEVENTMGR_H
|
|
|
|
#include "llfrm_actor.h"
|
|
#include "../llqueue_list_tmpl.h"
|
|
|
|
using namespace llqueue;
|
|
|
|
|
|
class c_Event
|
|
{
|
|
public:
|
|
c_Event(){ state=0;i_time=0; wait=0; time=0; m_msg=NULL; repeat=0; toggle=false; fadeSet=false; };
|
|
~c_Event(){ if(m_msg)free(m_msg); };
|
|
|
|
char state; // status 0=wait, 1=fade
|
|
float wait; // wait zeit
|
|
float i_time; //initial_time
|
|
float time;
|
|
char *m_msg; //event msg
|
|
int repeat; //cnt
|
|
|
|
//faden
|
|
CVec2f i_fade; // from fade, to fade
|
|
float fadeadd; // wird zu fade addiert falls gesetzt
|
|
float fade; //running fade
|
|
bool toggle; //für fade
|
|
bool fadeSet; // true wenn fade aktiv
|
|
};
|
|
|
|
class CEventMgr : public CActor
|
|
{
|
|
public:
|
|
CEventMgr();
|
|
virtual ~CEventMgr();
|
|
|
|
bool Message( const char * message );
|
|
bool ParseMsg( const char * arg );
|
|
void Action(float delta);
|
|
void Draw(int dstgfx);
|
|
|
|
private:
|
|
void MessageAdd(const char *arg);
|
|
void MessageDelete(const char *arg);
|
|
void MessageClear(const char *arg);
|
|
void MessageSet(const char *arg);
|
|
|
|
queue<c_Event> m_Events;
|
|
queue<char> m_msgqueue;
|
|
};
|
|
|
|
#endif
|