2006-04-24 01:14:18 +02:00
|
|
|
#ifndef MESSAGES_H__
|
|
|
|
#define MESSAGES_H__
|
|
|
|
|
2006-06-03 07:08:32 +02:00
|
|
|
#ifndef MESSAGES_SKIP_SETUP
|
2006-04-24 01:14:18 +02:00
|
|
|
#include "MessagesSetup.h"
|
2006-06-03 07:08:32 +02:00
|
|
|
#endif
|
2006-04-24 01:14:18 +02:00
|
|
|
|
2006-11-12 05:02:36 +01:00
|
|
|
#include <vector>
|
|
|
|
#include <string>
|
|
|
|
|
2006-04-24 01:14:18 +02:00
|
|
|
// TODO: organisation, documentation, etc
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2006-09-02 23:20:25 +02:00
|
|
|
MESSAGE(Init,
|
|
|
|
((bool, initsimulation)) // whether to initialise simulation/game-specific objects
|
|
|
|
);
|
2006-06-03 07:08:32 +02:00
|
|
|
|
|
|
|
MESSAGE(Shutdown, );
|
|
|
|
|
2006-11-12 05:02:36 +01:00
|
|
|
struct eRenderView { enum renderViews { NONE, GAME, ACTOR }; };
|
# Added tool for viewing models and animations outside the game.
Atlas: Added ActorViewer. Moved GL canvas into separate class for shared
use. Disabled message-handling callback while blocked on the game, and
stopped creating dialog boxes inside the game thread in order to avoid
deadlocks (hopefully). Support multiple Views (for independent sets of
camera/update/render code). Recalculate territory boundaries when
necessary. Changed default list of animations to match those currently
used by actors.
# Tidied up more code.
Moved some more #includes out of .h files, to minimise unnecessary
compilation.
MathUtil: Deleted unused/unuseful macros (M_PI (use PI instead), M_PI_2
(use PI/2), MAX3, ABS (use abs)).
ObjectManager: Removed some ScEd-specific things.
Unit: Moved creation out of UnitManager, so units can be created without
adding to the manager. Changed CStr8 to the more conventional CStr.
app_hooks: Removed warning for setting multiple times.
win: Restored SEH catcher.
GameSetup, GameView: Removed RenderNoCull, because it doesn't seem to do
what it says it does ("force renderer to load everything") since we're
loading-on-demand most stuff and it doesn't seem especially useful since
we'd prefer to minimise loading times (but feel free to correct me if
I'm wrong). (And because it crashes when things need to be initialised
in a different order, so it's easier to remove than to understand and
fix it.)
PatchRData, Renderer: Work sensibly when there's no game (hence no LOS
manager, water, etc).
LOSManager: Use entity position instead of actor position when possible.
TerritoryManager: Allow delayed recalculations (so Atlas can issue lots
of move+recalculate commands per frame).
Cinematic: Non-pointer wxTimer, so it doesn't leak and doesn't have to
be deleted manually.
This was SVN commit r4261.
2006-08-28 19:36:42 +02:00
|
|
|
|
2006-06-03 07:08:32 +02:00
|
|
|
MESSAGE(RenderEnable,
|
# Added tool for viewing models and animations outside the game.
Atlas: Added ActorViewer. Moved GL canvas into separate class for shared
use. Disabled message-handling callback while blocked on the game, and
stopped creating dialog boxes inside the game thread in order to avoid
deadlocks (hopefully). Support multiple Views (for independent sets of
camera/update/render code). Recalculate territory boundaries when
necessary. Changed default list of animations to match those currently
used by actors.
# Tidied up more code.
Moved some more #includes out of .h files, to minimise unnecessary
compilation.
MathUtil: Deleted unused/unuseful macros (M_PI (use PI instead), M_PI_2
(use PI/2), MAX3, ABS (use abs)).
ObjectManager: Removed some ScEd-specific things.
Unit: Moved creation out of UnitManager, so units can be created without
adding to the manager. Changed CStr8 to the more conventional CStr.
app_hooks: Removed warning for setting multiple times.
win: Restored SEH catcher.
GameSetup, GameView: Removed RenderNoCull, because it doesn't seem to do
what it says it does ("force renderer to load everything") since we're
loading-on-demand most stuff and it doesn't seem especially useful since
we'd prefer to minimise loading times (but feel free to correct me if
I'm wrong). (And because it crashes when things need to be initialised
in a different order, so it's easier to remove than to understand and
fix it.)
PatchRData, Renderer: Work sensibly when there's no game (hence no LOS
manager, water, etc).
LOSManager: Use entity position instead of actor position when possible.
TerritoryManager: Allow delayed recalculations (so Atlas can issue lots
of move+recalculate commands per frame).
Cinematic: Non-pointer wxTimer, so it doesn't leak and doesn't have to
be deleted manually.
This was SVN commit r4261.
2006-08-28 19:36:42 +02:00
|
|
|
((int, view)) // eRenderView
|
|
|
|
);
|
2006-04-24 01:14:18 +02:00
|
|
|
|
2006-09-26 03:44:20 +02:00
|
|
|
// SetViewParam: used for hints to the renderer, e.g. to set wireframe mode;
|
|
|
|
// unrecognised param names are ignored
|
|
|
|
MESSAGE(SetViewParamB,
|
|
|
|
((int, view)) // eRenderView
|
|
|
|
((std::wstring, name))
|
|
|
|
((bool, value))
|
|
|
|
);
|
|
|
|
MESSAGE(SetViewParamC,
|
|
|
|
((int, view)) // eRenderView
|
|
|
|
((std::wstring, name))
|
|
|
|
((Colour, value))
|
|
|
|
);
|
|
|
|
|
2007-02-02 03:17:15 +01:00
|
|
|
MESSAGE(JavaScript,
|
|
|
|
((std::wstring, command))
|
|
|
|
);
|
|
|
|
|
2006-04-24 01:14:18 +02:00
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2007-01-17 04:25:20 +01:00
|
|
|
MESSAGE(SimStateSave,
|
|
|
|
((std::wstring, label)) // named slot to store saved data
|
|
|
|
((bool, onlyentities)) // if true, ignore nonentities
|
|
|
|
);
|
|
|
|
|
|
|
|
MESSAGE(SimStateRestore,
|
|
|
|
((std::wstring, label)) // named slot to find saved data
|
|
|
|
);
|
|
|
|
|
|
|
|
MESSAGE(SimPlay,
|
|
|
|
((float, speed)) // 0 for pause, 1 for normal speed
|
|
|
|
);
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2006-07-12 16:49:10 +02:00
|
|
|
QUERY(Ping, , );
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2007-01-02 19:11:00 +01:00
|
|
|
MESSAGE(SetCanvas,
|
|
|
|
((void*, canvas))
|
2006-04-24 01:14:18 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
MESSAGE(ResizeScreen,
|
|
|
|
((int, width))
|
|
|
|
((int, height))
|
|
|
|
);
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
MESSAGE(GenerateMap,
|
|
|
|
((int, size)) // size in number of patches
|
|
|
|
);
|
|
|
|
|
|
|
|
MESSAGE(LoadMap,
|
|
|
|
((std::wstring, filename))
|
|
|
|
);
|
|
|
|
|
|
|
|
MESSAGE(SaveMap,
|
|
|
|
((std::wstring, filename))
|
|
|
|
);
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
MESSAGE(RenderStyle,
|
|
|
|
((bool, wireframe))
|
|
|
|
);
|
|
|
|
|
|
|
|
MESSAGE(MessageTrace,
|
|
|
|
((bool, enable))
|
|
|
|
);
|
|
|
|
|
|
|
|
MESSAGE(Screenshot,
|
|
|
|
((int, tiles)) // the final image will be (640*tiles)x(480*tiles)
|
|
|
|
);
|
|
|
|
|
2006-12-05 03:35:00 +01:00
|
|
|
struct sCinemaRecordCB
|
|
|
|
{
|
|
|
|
unsigned char* buffer;
|
|
|
|
};
|
|
|
|
SHAREABLE_STRUCT(sCinemaRecordCB);
|
|
|
|
|
|
|
|
QUERY(CinemaRecord,
|
|
|
|
((std::wstring, track))
|
|
|
|
((int, framerate))
|
|
|
|
((float, duration))
|
|
|
|
((Callback<sCinemaRecordCB>, cb))
|
|
|
|
,
|
|
|
|
);
|
|
|
|
|
2006-04-24 01:14:18 +02:00
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
MESSAGE(Brush,
|
|
|
|
((int, width)) // number of vertices
|
|
|
|
((int, height))
|
|
|
|
((std::vector<float>, data)) // width*height array
|
|
|
|
);
|
|
|
|
|
|
|
|
MESSAGE(BrushPreview,
|
|
|
|
((bool, enable))
|
|
|
|
((Position, pos)) // only used if enable==true
|
|
|
|
);
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
QUERY(GetTerrainGroups,
|
|
|
|
, // no inputs
|
|
|
|
((std::vector<std::wstring>, groupnames))
|
|
|
|
);
|
|
|
|
|
|
|
|
struct sTerrainGroupPreview
|
|
|
|
{
|
|
|
|
Shareable<std::wstring> name;
|
|
|
|
Shareable<std::vector<unsigned char> > imagedata; // RGB*size*size
|
|
|
|
};
|
2006-04-25 07:10:47 +02:00
|
|
|
SHAREABLE_STRUCT(sTerrainGroupPreview);
|
2006-04-24 01:14:18 +02:00
|
|
|
|
|
|
|
QUERY(GetTerrainGroupPreviews,
|
|
|
|
((std::wstring, groupname))
|
|
|
|
((int, imagewidth))
|
|
|
|
((int, imageheight))
|
|
|
|
,
|
|
|
|
((std::vector<sTerrainGroupPreview>, previews))
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
struct sObjectsListItem
|
|
|
|
{
|
|
|
|
Shareable<std::wstring> id;
|
|
|
|
Shareable<std::wstring> name;
|
|
|
|
Shareable<int> type; // 0 = entity, 1 = actor
|
|
|
|
};
|
2006-04-25 07:10:47 +02:00
|
|
|
SHAREABLE_STRUCT(sObjectsListItem);
|
2006-04-24 01:14:18 +02:00
|
|
|
|
|
|
|
QUERY(GetObjectsList,
|
|
|
|
, // no inputs
|
# Added tool for viewing models and animations outside the game.
Atlas: Added ActorViewer. Moved GL canvas into separate class for shared
use. Disabled message-handling callback while blocked on the game, and
stopped creating dialog boxes inside the game thread in order to avoid
deadlocks (hopefully). Support multiple Views (for independent sets of
camera/update/render code). Recalculate territory boundaries when
necessary. Changed default list of animations to match those currently
used by actors.
# Tidied up more code.
Moved some more #includes out of .h files, to minimise unnecessary
compilation.
MathUtil: Deleted unused/unuseful macros (M_PI (use PI instead), M_PI_2
(use PI/2), MAX3, ABS (use abs)).
ObjectManager: Removed some ScEd-specific things.
Unit: Moved creation out of UnitManager, so units can be created without
adding to the manager. Changed CStr8 to the more conventional CStr.
app_hooks: Removed warning for setting multiple times.
win: Restored SEH catcher.
GameSetup, GameView: Removed RenderNoCull, because it doesn't seem to do
what it says it does ("force renderer to load everything") since we're
loading-on-demand most stuff and it doesn't seem especially useful since
we'd prefer to minimise loading times (but feel free to correct me if
I'm wrong). (And because it crashes when things need to be initialised
in a different order, so it's easier to remove than to understand and
fix it.)
PatchRData, Renderer: Work sensibly when there's no game (hence no LOS
manager, water, etc).
LOSManager: Use entity position instead of actor position when possible.
TerritoryManager: Allow delayed recalculations (so Atlas can issue lots
of move+recalculate commands per frame).
Cinematic: Non-pointer wxTimer, so it doesn't leak and doesn't have to
be deleted manually.
This was SVN commit r4261.
2006-08-28 19:36:42 +02:00
|
|
|
((std::vector<sObjectsListItem>, objects)) // sorted by .name
|
2006-04-24 01:14:18 +02:00
|
|
|
);
|
|
|
|
|
2006-05-04 04:44:03 +02:00
|
|
|
struct sObjectSettings
|
2006-04-25 07:10:47 +02:00
|
|
|
{
|
|
|
|
Shareable<int> player;
|
2006-08-06 20:41:07 +02:00
|
|
|
Shareable<std::vector<std::wstring> > selections;
|
2006-05-31 07:27:02 +02:00
|
|
|
|
|
|
|
// Some settings are immutable and therefore are ignored (and should be left
|
|
|
|
// empty) when passed from the editor to the game:
|
|
|
|
|
2006-08-06 20:41:07 +02:00
|
|
|
Shareable<std::vector<std::vector<std::wstring> > > variantgroups;
|
2006-04-25 07:10:47 +02:00
|
|
|
};
|
2006-05-04 04:44:03 +02:00
|
|
|
SHAREABLE_STRUCT(sObjectSettings);
|
2006-04-25 07:10:47 +02:00
|
|
|
|
# Added tool for viewing models and animations outside the game.
Atlas: Added ActorViewer. Moved GL canvas into separate class for shared
use. Disabled message-handling callback while blocked on the game, and
stopped creating dialog boxes inside the game thread in order to avoid
deadlocks (hopefully). Support multiple Views (for independent sets of
camera/update/render code). Recalculate territory boundaries when
necessary. Changed default list of animations to match those currently
used by actors.
# Tidied up more code.
Moved some more #includes out of .h files, to minimise unnecessary
compilation.
MathUtil: Deleted unused/unuseful macros (M_PI (use PI instead), M_PI_2
(use PI/2), MAX3, ABS (use abs)).
ObjectManager: Removed some ScEd-specific things.
Unit: Moved creation out of UnitManager, so units can be created without
adding to the manager. Changed CStr8 to the more conventional CStr.
app_hooks: Removed warning for setting multiple times.
win: Restored SEH catcher.
GameSetup, GameView: Removed RenderNoCull, because it doesn't seem to do
what it says it does ("force renderer to load everything") since we're
loading-on-demand most stuff and it doesn't seem especially useful since
we'd prefer to minimise loading times (but feel free to correct me if
I'm wrong). (And because it crashes when things need to be initialised
in a different order, so it's easier to remove than to understand and
fix it.)
PatchRData, Renderer: Work sensibly when there's no game (hence no LOS
manager, water, etc).
LOSManager: Use entity position instead of actor position when possible.
TerritoryManager: Allow delayed recalculations (so Atlas can issue lots
of move+recalculate commands per frame).
Cinematic: Non-pointer wxTimer, so it doesn't leak and doesn't have to
be deleted manually.
This was SVN commit r4261.
2006-08-28 19:36:42 +02:00
|
|
|
// Preview object in the game world - creates a temporary unit at the given
|
|
|
|
// position, and removes it when the preview is next changed
|
2006-04-24 01:14:18 +02:00
|
|
|
MESSAGE(ObjectPreview,
|
|
|
|
((std::wstring, id)) // or empty string => disable
|
2006-05-04 04:44:03 +02:00
|
|
|
((sObjectSettings, settings))
|
2006-04-24 01:14:18 +02:00
|
|
|
((Position, pos))
|
|
|
|
((bool, usetarget)) // true => use 'target' for orientation; false => use 'angle'
|
|
|
|
((Position, target))
|
|
|
|
((float, angle))
|
|
|
|
);
|
|
|
|
|
|
|
|
COMMAND(CreateObject, NOMERGE,
|
|
|
|
((std::wstring, id))
|
2006-05-04 04:44:03 +02:00
|
|
|
((sObjectSettings, settings))
|
2006-04-24 01:14:18 +02:00
|
|
|
((Position, pos))
|
|
|
|
((bool, usetarget)) // true => use 'target' for orientation; false => use 'angle'
|
|
|
|
((Position, target))
|
|
|
|
((float, angle))
|
|
|
|
);
|
|
|
|
|
# Added tool for viewing models and animations outside the game.
Atlas: Added ActorViewer. Moved GL canvas into separate class for shared
use. Disabled message-handling callback while blocked on the game, and
stopped creating dialog boxes inside the game thread in order to avoid
deadlocks (hopefully). Support multiple Views (for independent sets of
camera/update/render code). Recalculate territory boundaries when
necessary. Changed default list of animations to match those currently
used by actors.
# Tidied up more code.
Moved some more #includes out of .h files, to minimise unnecessary
compilation.
MathUtil: Deleted unused/unuseful macros (M_PI (use PI instead), M_PI_2
(use PI/2), MAX3, ABS (use abs)).
ObjectManager: Removed some ScEd-specific things.
Unit: Moved creation out of UnitManager, so units can be created without
adding to the manager. Changed CStr8 to the more conventional CStr.
app_hooks: Removed warning for setting multiple times.
win: Restored SEH catcher.
GameSetup, GameView: Removed RenderNoCull, because it doesn't seem to do
what it says it does ("force renderer to load everything") since we're
loading-on-demand most stuff and it doesn't seem especially useful since
we'd prefer to minimise loading times (but feel free to correct me if
I'm wrong). (And because it crashes when things need to be initialised
in a different order, so it's easier to remove than to understand and
fix it.)
PatchRData, Renderer: Work sensibly when there's no game (hence no LOS
manager, water, etc).
LOSManager: Use entity position instead of actor position when possible.
TerritoryManager: Allow delayed recalculations (so Atlas can issue lots
of move+recalculate commands per frame).
Cinematic: Non-pointer wxTimer, so it doesn't leak and doesn't have to
be deleted manually.
This was SVN commit r4261.
2006-08-28 19:36:42 +02:00
|
|
|
// Set an actor to be previewed on its own (i.e. without the game world).
|
|
|
|
// (Use RenderEnable to make it visible.)
|
|
|
|
MESSAGE(SetActorViewer,
|
|
|
|
((std::wstring, id))
|
|
|
|
((std::wstring, animation))
|
|
|
|
((float, speed))
|
2006-09-22 19:43:00 +02:00
|
|
|
((bool, flushcache)) // true => unload all actor files before starting the preview (because we don't have proper hotloading yet)
|
# Added tool for viewing models and animations outside the game.
Atlas: Added ActorViewer. Moved GL canvas into separate class for shared
use. Disabled message-handling callback while blocked on the game, and
stopped creating dialog boxes inside the game thread in order to avoid
deadlocks (hopefully). Support multiple Views (for independent sets of
camera/update/render code). Recalculate territory boundaries when
necessary. Changed default list of animations to match those currently
used by actors.
# Tidied up more code.
Moved some more #includes out of .h files, to minimise unnecessary
compilation.
MathUtil: Deleted unused/unuseful macros (M_PI (use PI instead), M_PI_2
(use PI/2), MAX3, ABS (use abs)).
ObjectManager: Removed some ScEd-specific things.
Unit: Moved creation out of UnitManager, so units can be created without
adding to the manager. Changed CStr8 to the more conventional CStr.
app_hooks: Removed warning for setting multiple times.
win: Restored SEH catcher.
GameSetup, GameView: Removed RenderNoCull, because it doesn't seem to do
what it says it does ("force renderer to load everything") since we're
loading-on-demand most stuff and it doesn't seem especially useful since
we'd prefer to minimise loading times (but feel free to correct me if
I'm wrong). (And because it crashes when things need to be initialised
in a different order, so it's easier to remove than to understand and
fix it.)
PatchRData, Renderer: Work sensibly when there's no game (hence no LOS
manager, water, etc).
LOSManager: Use entity position instead of actor position when possible.
TerritoryManager: Allow delayed recalculations (so Atlas can issue lots
of move+recalculate commands per frame).
Cinematic: Non-pointer wxTimer, so it doesn't leak and doesn't have to
be deleted manually.
This was SVN commit r4261.
2006-08-28 19:36:42 +02:00
|
|
|
);
|
2006-04-24 01:14:18 +02:00
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
QUERY(Exit,,); // no inputs nor outputs
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
struct eScrollConstantDir { enum { FORWARDS, BACKWARDS, LEFT, RIGHT }; };
|
|
|
|
MESSAGE(ScrollConstant,
|
# Added tool for viewing models and animations outside the game.
Atlas: Added ActorViewer. Moved GL canvas into separate class for shared
use. Disabled message-handling callback while blocked on the game, and
stopped creating dialog boxes inside the game thread in order to avoid
deadlocks (hopefully). Support multiple Views (for independent sets of
camera/update/render code). Recalculate territory boundaries when
necessary. Changed default list of animations to match those currently
used by actors.
# Tidied up more code.
Moved some more #includes out of .h files, to minimise unnecessary
compilation.
MathUtil: Deleted unused/unuseful macros (M_PI (use PI instead), M_PI_2
(use PI/2), MAX3, ABS (use abs)).
ObjectManager: Removed some ScEd-specific things.
Unit: Moved creation out of UnitManager, so units can be created without
adding to the manager. Changed CStr8 to the more conventional CStr.
app_hooks: Removed warning for setting multiple times.
win: Restored SEH catcher.
GameSetup, GameView: Removed RenderNoCull, because it doesn't seem to do
what it says it does ("force renderer to load everything") since we're
loading-on-demand most stuff and it doesn't seem especially useful since
we'd prefer to minimise loading times (but feel free to correct me if
I'm wrong). (And because it crashes when things need to be initialised
in a different order, so it's easier to remove than to understand and
fix it.)
PatchRData, Renderer: Work sensibly when there's no game (hence no LOS
manager, water, etc).
LOSManager: Use entity position instead of actor position when possible.
TerritoryManager: Allow delayed recalculations (so Atlas can issue lots
of move+recalculate commands per frame).
Cinematic: Non-pointer wxTimer, so it doesn't leak and doesn't have to
be deleted manually.
This was SVN commit r4261.
2006-08-28 19:36:42 +02:00
|
|
|
((int, view)) // eRenderView
|
|
|
|
((int, dir)) // eScrollConstantDir
|
2006-04-24 01:14:18 +02:00
|
|
|
((float, speed)) // set speed 0.0f to stop scrolling
|
|
|
|
);
|
|
|
|
|
|
|
|
struct eScrollType { enum { FROM, TO }; };
|
|
|
|
MESSAGE(Scroll, // for scrolling by dragging the mouse FROM somewhere TO elsewhere
|
# Added tool for viewing models and animations outside the game.
Atlas: Added ActorViewer. Moved GL canvas into separate class for shared
use. Disabled message-handling callback while blocked on the game, and
stopped creating dialog boxes inside the game thread in order to avoid
deadlocks (hopefully). Support multiple Views (for independent sets of
camera/update/render code). Recalculate territory boundaries when
necessary. Changed default list of animations to match those currently
used by actors.
# Tidied up more code.
Moved some more #includes out of .h files, to minimise unnecessary
compilation.
MathUtil: Deleted unused/unuseful macros (M_PI (use PI instead), M_PI_2
(use PI/2), MAX3, ABS (use abs)).
ObjectManager: Removed some ScEd-specific things.
Unit: Moved creation out of UnitManager, so units can be created without
adding to the manager. Changed CStr8 to the more conventional CStr.
app_hooks: Removed warning for setting multiple times.
win: Restored SEH catcher.
GameSetup, GameView: Removed RenderNoCull, because it doesn't seem to do
what it says it does ("force renderer to load everything") since we're
loading-on-demand most stuff and it doesn't seem especially useful since
we'd prefer to minimise loading times (but feel free to correct me if
I'm wrong). (And because it crashes when things need to be initialised
in a different order, so it's easier to remove than to understand and
fix it.)
PatchRData, Renderer: Work sensibly when there's no game (hence no LOS
manager, water, etc).
LOSManager: Use entity position instead of actor position when possible.
TerritoryManager: Allow delayed recalculations (so Atlas can issue lots
of move+recalculate commands per frame).
Cinematic: Non-pointer wxTimer, so it doesn't leak and doesn't have to
be deleted manually.
This was SVN commit r4261.
2006-08-28 19:36:42 +02:00
|
|
|
((int, view)) // eRenderView
|
|
|
|
((int, type)) // eScrollType
|
2006-04-24 01:14:18 +02:00
|
|
|
((Position, pos))
|
|
|
|
);
|
|
|
|
|
|
|
|
MESSAGE(SmoothZoom,
|
# Added tool for viewing models and animations outside the game.
Atlas: Added ActorViewer. Moved GL canvas into separate class for shared
use. Disabled message-handling callback while blocked on the game, and
stopped creating dialog boxes inside the game thread in order to avoid
deadlocks (hopefully). Support multiple Views (for independent sets of
camera/update/render code). Recalculate territory boundaries when
necessary. Changed default list of animations to match those currently
used by actors.
# Tidied up more code.
Moved some more #includes out of .h files, to minimise unnecessary
compilation.
MathUtil: Deleted unused/unuseful macros (M_PI (use PI instead), M_PI_2
(use PI/2), MAX3, ABS (use abs)).
ObjectManager: Removed some ScEd-specific things.
Unit: Moved creation out of UnitManager, so units can be created without
adding to the manager. Changed CStr8 to the more conventional CStr.
app_hooks: Removed warning for setting multiple times.
win: Restored SEH catcher.
GameSetup, GameView: Removed RenderNoCull, because it doesn't seem to do
what it says it does ("force renderer to load everything") since we're
loading-on-demand most stuff and it doesn't seem especially useful since
we'd prefer to minimise loading times (but feel free to correct me if
I'm wrong). (And because it crashes when things need to be initialised
in a different order, so it's easier to remove than to understand and
fix it.)
PatchRData, Renderer: Work sensibly when there's no game (hence no LOS
manager, water, etc).
LOSManager: Use entity position instead of actor position when possible.
TerritoryManager: Allow delayed recalculations (so Atlas can issue lots
of move+recalculate commands per frame).
Cinematic: Non-pointer wxTimer, so it doesn't leak and doesn't have to
be deleted manually.
This was SVN commit r4261.
2006-08-28 19:36:42 +02:00
|
|
|
((int, view)) // eRenderView
|
2006-04-24 01:14:18 +02:00
|
|
|
((float, amount))
|
|
|
|
);
|
|
|
|
|
|
|
|
struct eRotateAroundType { enum { FROM, TO }; };
|
|
|
|
MESSAGE(RotateAround,
|
# Added tool for viewing models and animations outside the game.
Atlas: Added ActorViewer. Moved GL canvas into separate class for shared
use. Disabled message-handling callback while blocked on the game, and
stopped creating dialog boxes inside the game thread in order to avoid
deadlocks (hopefully). Support multiple Views (for independent sets of
camera/update/render code). Recalculate territory boundaries when
necessary. Changed default list of animations to match those currently
used by actors.
# Tidied up more code.
Moved some more #includes out of .h files, to minimise unnecessary
compilation.
MathUtil: Deleted unused/unuseful macros (M_PI (use PI instead), M_PI_2
(use PI/2), MAX3, ABS (use abs)).
ObjectManager: Removed some ScEd-specific things.
Unit: Moved creation out of UnitManager, so units can be created without
adding to the manager. Changed CStr8 to the more conventional CStr.
app_hooks: Removed warning for setting multiple times.
win: Restored SEH catcher.
GameSetup, GameView: Removed RenderNoCull, because it doesn't seem to do
what it says it does ("force renderer to load everything") since we're
loading-on-demand most stuff and it doesn't seem especially useful since
we'd prefer to minimise loading times (but feel free to correct me if
I'm wrong). (And because it crashes when things need to be initialised
in a different order, so it's easier to remove than to understand and
fix it.)
PatchRData, Renderer: Work sensibly when there's no game (hence no LOS
manager, water, etc).
LOSManager: Use entity position instead of actor position when possible.
TerritoryManager: Allow delayed recalculations (so Atlas can issue lots
of move+recalculate commands per frame).
Cinematic: Non-pointer wxTimer, so it doesn't leak and doesn't have to
be deleted manually.
This was SVN commit r4261.
2006-08-28 19:36:42 +02:00
|
|
|
((int, view)) // eRenderView
|
|
|
|
((int, type)) // eRotateAroundType
|
|
|
|
((Position, pos))
|
|
|
|
);
|
|
|
|
|
|
|
|
MESSAGE(LookAt,
|
|
|
|
((int, view)) // eRenderView
|
2006-04-24 01:14:18 +02:00
|
|
|
((Position, pos))
|
# Added tool for viewing models and animations outside the game.
Atlas: Added ActorViewer. Moved GL canvas into separate class for shared
use. Disabled message-handling callback while blocked on the game, and
stopped creating dialog boxes inside the game thread in order to avoid
deadlocks (hopefully). Support multiple Views (for independent sets of
camera/update/render code). Recalculate territory boundaries when
necessary. Changed default list of animations to match those currently
used by actors.
# Tidied up more code.
Moved some more #includes out of .h files, to minimise unnecessary
compilation.
MathUtil: Deleted unused/unuseful macros (M_PI (use PI instead), M_PI_2
(use PI/2), MAX3, ABS (use abs)).
ObjectManager: Removed some ScEd-specific things.
Unit: Moved creation out of UnitManager, so units can be created without
adding to the manager. Changed CStr8 to the more conventional CStr.
app_hooks: Removed warning for setting multiple times.
win: Restored SEH catcher.
GameSetup, GameView: Removed RenderNoCull, because it doesn't seem to do
what it says it does ("force renderer to load everything") since we're
loading-on-demand most stuff and it doesn't seem especially useful since
we'd prefer to minimise loading times (but feel free to correct me if
I'm wrong). (And because it crashes when things need to be initialised
in a different order, so it's easier to remove than to understand and
fix it.)
PatchRData, Renderer: Work sensibly when there's no game (hence no LOS
manager, water, etc).
LOSManager: Use entity position instead of actor position when possible.
TerritoryManager: Allow delayed recalculations (so Atlas can issue lots
of move+recalculate commands per frame).
Cinematic: Non-pointer wxTimer, so it doesn't leak and doesn't have to
be deleted manually.
This was SVN commit r4261.
2006-08-28 19:36:42 +02:00
|
|
|
((Position, target))
|
2006-04-24 01:14:18 +02:00
|
|
|
);
|
|
|
|
|
2006-06-03 07:08:32 +02:00
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
struct sEnvironmentSettings
|
|
|
|
{
|
2006-06-22 00:37:31 +02:00
|
|
|
Shareable<float> waterheight; // range 0..1 corresponds to min..max terrain height; out-of-bounds values allowed
|
2006-09-18 20:09:07 +02:00
|
|
|
Shareable<float> watershininess; // range ???
|
|
|
|
Shareable<float> waterwaviness; // range ???
|
|
|
|
Shareable<float> watermurkiness; // range ???
|
|
|
|
|
|
|
|
Shareable<Colour> watercolour;
|
|
|
|
Shareable<Colour> watertint;
|
|
|
|
Shareable<Colour> waterreflectiontint;
|
|
|
|
Shareable<float> waterreflectiontintstrength; // range ???
|
2006-07-12 16:49:10 +02:00
|
|
|
|
|
|
|
Shareable<float> sunrotation; // range -pi..+pi
|
2006-06-22 00:37:31 +02:00
|
|
|
Shareable<float> sunelevation; // range -pi/2 .. +pi/2
|
2006-06-03 07:08:32 +02:00
|
|
|
|
2006-06-22 00:37:31 +02:00
|
|
|
Shareable<std::wstring> skyset;
|
2006-06-11 09:03:59 +02:00
|
|
|
|
2006-06-22 00:37:31 +02:00
|
|
|
Shareable<Colour> suncolour;
|
|
|
|
Shareable<Colour> terraincolour;
|
|
|
|
Shareable<Colour> unitcolour;
|
2006-06-03 07:08:32 +02:00
|
|
|
};
|
|
|
|
SHAREABLE_STRUCT(sEnvironmentSettings);
|
|
|
|
|
|
|
|
QUERY(GetEnvironmentSettings,
|
|
|
|
// no inputs
|
|
|
|
,
|
|
|
|
((sEnvironmentSettings, settings))
|
|
|
|
);
|
|
|
|
|
|
|
|
COMMAND(SetEnvironmentSettings, MERGE,
|
|
|
|
((sEnvironmentSettings, settings))
|
|
|
|
);
|
|
|
|
|
2006-06-22 00:37:31 +02:00
|
|
|
QUERY(GetSkySets,
|
|
|
|
// no inputs
|
|
|
|
,
|
|
|
|
((std::vector<std::wstring>, skysets))
|
|
|
|
);
|
|
|
|
|
|
|
|
|
2006-04-24 01:14:18 +02:00
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
COMMAND(AlterElevation, MERGE,
|
|
|
|
((Position, pos))
|
|
|
|
((float, amount))
|
|
|
|
);
|
|
|
|
|
|
|
|
COMMAND(FlattenElevation, MERGE,
|
|
|
|
((Position, pos))
|
|
|
|
((float, amount))
|
|
|
|
);
|
|
|
|
|
|
|
|
struct ePaintTerrainPriority { enum { HIGH, LOW }; };
|
|
|
|
COMMAND(PaintTerrain, MERGE,
|
|
|
|
((Position, pos))
|
|
|
|
((std::wstring, texture))
|
# Added tool for viewing models and animations outside the game.
Atlas: Added ActorViewer. Moved GL canvas into separate class for shared
use. Disabled message-handling callback while blocked on the game, and
stopped creating dialog boxes inside the game thread in order to avoid
deadlocks (hopefully). Support multiple Views (for independent sets of
camera/update/render code). Recalculate territory boundaries when
necessary. Changed default list of animations to match those currently
used by actors.
# Tidied up more code.
Moved some more #includes out of .h files, to minimise unnecessary
compilation.
MathUtil: Deleted unused/unuseful macros (M_PI (use PI instead), M_PI_2
(use PI/2), MAX3, ABS (use abs)).
ObjectManager: Removed some ScEd-specific things.
Unit: Moved creation out of UnitManager, so units can be created without
adding to the manager. Changed CStr8 to the more conventional CStr.
app_hooks: Removed warning for setting multiple times.
win: Restored SEH catcher.
GameSetup, GameView: Removed RenderNoCull, because it doesn't seem to do
what it says it does ("force renderer to load everything") since we're
loading-on-demand most stuff and it doesn't seem especially useful since
we'd prefer to minimise loading times (but feel free to correct me if
I'm wrong). (And because it crashes when things need to be initialised
in a different order, so it's easier to remove than to understand and
fix it.)
PatchRData, Renderer: Work sensibly when there's no game (hence no LOS
manager, water, etc).
LOSManager: Use entity position instead of actor position when possible.
TerritoryManager: Allow delayed recalculations (so Atlas can issue lots
of move+recalculate commands per frame).
Cinematic: Non-pointer wxTimer, so it doesn't leak and doesn't have to
be deleted manually.
This was SVN commit r4261.
2006-08-28 19:36:42 +02:00
|
|
|
((int, priority)) // ePaintTerrainPriority
|
2006-04-24 01:14:18 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2006-05-04 04:44:03 +02:00
|
|
|
QUERY(PickObject,
|
2006-04-24 01:14:18 +02:00
|
|
|
((Position, pos))
|
|
|
|
,
|
|
|
|
((ObjectID, id))
|
|
|
|
((int, offsetx)) // offset of object centre from input position
|
|
|
|
((int, offsety)) //
|
|
|
|
);
|
|
|
|
|
|
|
|
COMMAND(MoveObject, MERGE,
|
|
|
|
((ObjectID, id))
|
|
|
|
((Position, pos))
|
|
|
|
);
|
|
|
|
|
|
|
|
COMMAND(RotateObject, MERGE,
|
|
|
|
((ObjectID, id))
|
|
|
|
((bool, usetarget)) // true => use 'target' for orientation; false => use 'angle'
|
|
|
|
((Position, target))
|
|
|
|
((float, angle))
|
|
|
|
);
|
|
|
|
|
|
|
|
COMMAND(DeleteObject, NOMERGE,
|
|
|
|
((ObjectID, id))
|
|
|
|
);
|
|
|
|
|
|
|
|
MESSAGE(SetSelectionPreview,
|
|
|
|
((std::vector<ObjectID>, ids))
|
|
|
|
);
|
|
|
|
|
2006-05-04 04:44:03 +02:00
|
|
|
QUERY(GetObjectSettings,
|
2006-09-27 18:54:23 +02:00
|
|
|
((int, view)) // eRenderView
|
2006-05-04 04:44:03 +02:00
|
|
|
((ObjectID, id))
|
|
|
|
,
|
|
|
|
((sObjectSettings, settings))
|
|
|
|
);
|
|
|
|
|
|
|
|
COMMAND(SetObjectSettings, NOMERGE,
|
2006-09-27 18:54:23 +02:00
|
|
|
((int, view)) // eRenderView
|
2006-05-04 04:44:03 +02:00
|
|
|
((ObjectID, id))
|
|
|
|
((sObjectSettings, settings))
|
|
|
|
);
|
|
|
|
|
2006-04-24 01:14:18 +02:00
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2006-07-12 16:49:10 +02:00
|
|
|
QUERY(GetCinemaTracks,
|
# Added tool for viewing models and animations outside the game.
Atlas: Added ActorViewer. Moved GL canvas into separate class for shared
use. Disabled message-handling callback while blocked on the game, and
stopped creating dialog boxes inside the game thread in order to avoid
deadlocks (hopefully). Support multiple Views (for independent sets of
camera/update/render code). Recalculate territory boundaries when
necessary. Changed default list of animations to match those currently
used by actors.
# Tidied up more code.
Moved some more #includes out of .h files, to minimise unnecessary
compilation.
MathUtil: Deleted unused/unuseful macros (M_PI (use PI instead), M_PI_2
(use PI/2), MAX3, ABS (use abs)).
ObjectManager: Removed some ScEd-specific things.
Unit: Moved creation out of UnitManager, so units can be created without
adding to the manager. Changed CStr8 to the more conventional CStr.
app_hooks: Removed warning for setting multiple times.
win: Restored SEH catcher.
GameSetup, GameView: Removed RenderNoCull, because it doesn't seem to do
what it says it does ("force renderer to load everything") since we're
loading-on-demand most stuff and it doesn't seem especially useful since
we'd prefer to minimise loading times (but feel free to correct me if
I'm wrong). (And because it crashes when things need to be initialised
in a different order, so it's easier to remove than to understand and
fix it.)
PatchRData, Renderer: Work sensibly when there's no game (hence no LOS
manager, water, etc).
LOSManager: Use entity position instead of actor position when possible.
TerritoryManager: Allow delayed recalculations (so Atlas can issue lots
of move+recalculate commands per frame).
Cinematic: Non-pointer wxTimer, so it doesn't leak and doesn't have to
be deleted manually.
This was SVN commit r4261.
2006-08-28 19:36:42 +02:00
|
|
|
, // no inputs
|
2006-07-12 16:49:10 +02:00
|
|
|
((std::vector<AtlasMessage::sCinemaTrack> , tracks))
|
|
|
|
);
|
2006-07-06 05:17:44 +02:00
|
|
|
|
2006-08-22 04:24:44 +02:00
|
|
|
QUERY(GetCameraInfo,
|
2006-07-06 05:17:44 +02:00
|
|
|
,
|
2006-08-22 04:24:44 +02:00
|
|
|
((AtlasMessage::sCameraInfo, info))
|
2006-07-12 16:49:10 +02:00
|
|
|
);
|
2006-07-06 05:17:44 +02:00
|
|
|
|
2006-08-22 04:24:44 +02:00
|
|
|
COMMAND(SetCinemaTracks, NOMERGE,
|
2006-07-12 16:49:10 +02:00
|
|
|
((std::vector<AtlasMessage::sCinemaTrack>, tracks))
|
|
|
|
);
|
|
|
|
|
2006-08-22 04:24:44 +02:00
|
|
|
MESSAGE(CinemaEvent,
|
2006-07-12 16:49:10 +02:00
|
|
|
((std::wstring, track))
|
2006-07-06 05:17:44 +02:00
|
|
|
((int, mode))
|
2006-07-12 16:49:10 +02:00
|
|
|
((float, t))
|
2006-08-22 04:24:44 +02:00
|
|
|
((bool, drawAll))
|
|
|
|
((bool, drawCurrent))
|
|
|
|
((bool, lines))
|
2006-07-12 16:49:10 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
2006-07-06 05:17:44 +02:00
|
|
|
|
2006-11-24 20:45:04 +01:00
|
|
|
enum eTriggerListType
|
|
|
|
{
|
|
|
|
CINEMA_LIST,
|
|
|
|
TRIGGER_LIST,
|
|
|
|
TRIG_GROUP_LIST //list of trigger groups
|
|
|
|
// [Eventually include things like entities and areas as the editor progresses...]
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
QUERY(GetTriggerData,
|
|
|
|
, //no inputs
|
|
|
|
((std::vector<AtlasMessage::sTriggerGroup>, groups))
|
|
|
|
((std::vector<AtlasMessage::sTriggerSpec>, conditions))
|
|
|
|
((std::vector<AtlasMessage::sTriggerSpec>, effects))
|
|
|
|
);
|
|
|
|
|
|
|
|
QUERY(GetTriggerChoices,
|
|
|
|
((std::wstring, name)),
|
|
|
|
((std::vector<std::wstring>, choices))
|
2007-01-17 00:22:25 +01:00
|
|
|
((std::vector<std::wstring>, translations))
|
2006-11-24 20:45:04 +01:00
|
|
|
);
|
|
|
|
|
|
|
|
COMMAND(SetAllTriggers, NOMERGE,
|
|
|
|
((std::vector<AtlasMessage::sTriggerGroup>, groups))
|
|
|
|
);
|
|
|
|
|
2007-01-17 00:22:25 +01:00
|
|
|
QUERY(GetWorldPosition,
|
|
|
|
((int, x))
|
|
|
|
((int, y)),
|
|
|
|
((Position, position))
|
|
|
|
);
|
|
|
|
|
|
|
|
MESSAGE(TriggerToggleSelector,
|
|
|
|
((bool, enable))
|
|
|
|
((Position, position))
|
|
|
|
);
|
|
|
|
|
2006-11-24 20:45:04 +01:00
|
|
|
|
2006-06-03 07:08:32 +02:00
|
|
|
#ifndef MESSAGES_SKIP_SETUP
|
2006-04-24 01:14:18 +02:00
|
|
|
#include "MessagesSetup.h"
|
2006-06-03 07:08:32 +02:00
|
|
|
#endif
|
2006-04-24 01:14:18 +02:00
|
|
|
|
|
|
|
#endif // MESSAGES_H__
|