2005-04-22 21:14:50 +02:00
|
|
|
// EventTypes.h
|
2005-07-22 05:56:11 +02:00
|
|
|
// Fairly game-specific event declarations for use with DOMEvent.
|
|
|
|
// Creates unique (for the current target) names for each event.
|
|
|
|
// DOMEvent currently uses a preallocated array of EVENT_LAST elements,
|
|
|
|
// so these must be consecutive integers starting with 0.
|
2005-04-22 21:14:50 +02:00
|
|
|
|
2005-08-09 17:55:44 +02:00
|
|
|
#ifndef EVENTTYPES_H__
|
|
|
|
#define EVENTTYPES_H__
|
|
|
|
|
2005-04-22 21:14:50 +02:00
|
|
|
enum EEventType
|
|
|
|
{
|
|
|
|
// Entity events
|
|
|
|
EVENT_INITIALIZE = 0,
|
2006-02-26 10:55:20 +01:00
|
|
|
EVENT_DEATH,
|
2005-04-22 21:14:50 +02:00
|
|
|
EVENT_TICK,
|
2005-12-29 09:42:44 +01:00
|
|
|
EVENT_GENERIC,
|
2006-02-22 23:45:16 +01:00
|
|
|
EVENT_START_PRODUCTION,
|
|
|
|
EVENT_CANCEL_PRODUCTION,
|
|
|
|
EVENT_FINISH_PRODUCTION,
|
2005-04-22 21:14:50 +02:00
|
|
|
EVENT_TARGET_CHANGED,
|
|
|
|
EVENT_PREPARE_ORDER,
|
|
|
|
EVENT_ORDER_TRANSITION,
|
2006-01-08 06:57:40 +01:00
|
|
|
EVENT_NOTIFICATION,
|
2006-03-31 05:30:34 +02:00
|
|
|
EVENT_FORMATION,
|
2006-04-09 00:34:54 +02:00
|
|
|
EVENT_IDLE,
|
2005-04-22 21:14:50 +02:00
|
|
|
EVENT_LAST,
|
2005-07-22 05:56:11 +02:00
|
|
|
|
2005-05-10 09:13:25 +02:00
|
|
|
// Projectile events
|
|
|
|
EVENT_IMPACT = 0,
|
|
|
|
EVENT_MISS,
|
2005-07-22 05:56:11 +02:00
|
|
|
|
2005-04-22 21:14:50 +02:00
|
|
|
// General events
|
|
|
|
EVENT_GAME_START = 0,
|
|
|
|
EVENT_GAME_TICK,
|
|
|
|
EVENT_SELECTION_CHANGED,
|
2005-05-18 07:32:09 +02:00
|
|
|
EVENT_WORLD_CLICK,
|
2005-04-22 21:14:50 +02:00
|
|
|
};
|
|
|
|
|
2005-07-22 05:56:11 +02:00
|
|
|
// Only used for entity events... (adds them as a property)
|
2005-10-07 17:24:29 +02:00
|
|
|
static const wchar_t* const EventNames[EVENT_LAST] =
|
2005-04-22 21:14:50 +02:00
|
|
|
{
|
|
|
|
/* EVENT_INITIALIZE */ L"onInitialize",
|
2006-02-26 10:55:20 +01:00
|
|
|
/* EVENT_DEATH */ L"onDeath",
|
2005-04-22 21:14:50 +02:00
|
|
|
/* EVENT_TICK */ L"onTick",
|
2006-02-22 23:45:16 +01:00
|
|
|
/* EVENT_GENERIC */ L"onGeneric", /* For generic actions on a target unit, like attack or gather */
|
|
|
|
/* EVENT_START_PRODUCTION */ L"onStartProduction", /* We're about to start training/researching something (deduct resources, etc) */
|
|
|
|
/* EVENT_CANCEL_PRODUCTION */ L"onCancelProduction", /* Something in production has been cancelled */
|
|
|
|
/* EVENT_FINISH_PRODUCTION */ L"onFinishProduction", /* We've finished something in production */
|
2005-04-22 21:14:50 +02:00
|
|
|
/* EVENT_TARGET_CHANGED */ L"onTargetChanged", /* If this unit is selected and the mouseover object changes */
|
|
|
|
/* EVENT_PREPARE_ORDER */ L"onPrepareOrder", /* To check if a unit can execute a given order */
|
2006-01-08 06:57:40 +01:00
|
|
|
/* EVENT_ORDER_TRANSITION */ L"onOrderTransition", /* When we change orders (sometimes...) */
|
2006-03-31 05:30:34 +02:00
|
|
|
/* EVENT_NOTIFICATION */ L"onNotification", /*When we receive a notification */
|
2006-04-09 00:34:54 +02:00
|
|
|
/* EVENT_FORMATION */ L"onFormation", /* When this unit does something with a formation */
|
|
|
|
/* EVENT_IDLE */ L"onIdle" /* When this unit becomes idle, do something */
|
2005-05-18 07:32:09 +02:00
|
|
|
};
|
2005-07-22 05:56:11 +02:00
|
|
|
|
|
|
|
#endif // #ifndef EVENTTYPES_H__
|