1
0
forked from 0ad/0ad
0ad/source/tools/atlas/GameInterface/ActorViewer.h
Ykkrosh 2fac02f40a # Actor Viewer tool: added controls to toggle shadows, ground and polygon counts.
Elsewhere:
Disabled stack-trace test because it gives me assertion failures.
Fixed some uses of snprintf (which doesn't always add a \0 to the end of
the string), then got bored so there are still lots of broken ones.
Probably should replace snprintf with something more like snprintf_s
(but non-fatal) or something.
Made CLogger output valid HTML (except for the potentially dodgy
doctype). Removed its memory-logger, since we never use it and MICROLOG
can be used instead for quick execution-tracing.
Added tests to make sure CLogger handles long strings properly (which it
didn't). Made CLogger not a singleton, so it can be tested sensibly.

This was SVN commit r4424.
2006-09-28 20:41:12 +00:00

35 lines
698 B
C++

#ifndef ACTORVIEWER_H__
#define ACTORVIEWER_H__
struct ActorViewerImpl;
struct SColor4ub;
class CUnit;
class ActorViewer
{
public:
ActorViewer();
~ActorViewer();
void SetActor(const CStrW& id, const CStrW& animation);
CUnit* GetUnit();
void SetBackgroundColour(const SColor4ub& colour);
void SetWalkEnabled(bool enabled);
void SetGroundEnabled(bool enabled);
void SetShadowsEnabled(bool enabled);
void SetStatsEnabled(bool enabled);
void Render();
void Update(float dt);
// Returns whether there is a selected actor which has more than one
// frame of animation
bool HasAnimation() const;
private:
ActorViewerImpl& m;
NO_COPY_CTOR(ActorViewer);
};
#endif // ACTORVIEWER_H__