#include "action.h"
-using namespace Msp;
+namespace Msp {
+namespace DemoScene {
InterpolationAction::InterpolationAction(Mode m):
mode(m),
DataFile::ObjectLoader<Action>(a),
demo(d)
{ }
+
+} // namespace DemoScene
+} // namespace Msp
#include <msp/datafile/objectloader.h>
+namespace Msp {
+namespace DemoScene {
+
class Demo;
class Action
virtual void interpolate(float, float) { }
};
+} // namespace DemoScene
+} // namespace Msp
+
#endif
#include "demo.h"
using namespace std;
-using namespace Msp;
+
+namespace Msp {
+namespace DemoScene {
Animate::Animate():
target(0),
{
obj.target = &demo.get_thing<GL::Placeable>(n);
}
+
+} // namespace DemoScene
+} // namespace Msp
#include <msp/gl/animationplayer.h>
#include "action.h"
+namespace Msp {
+namespace DemoScene {
+
class Animate: public Action
{
public:
virtual void start(float, float);
};
+} // namespace DemoScene
+} // namespace Msp
+
#endif
#include <msp/strings/format.h>
#include "beatcounter.h"
-using namespace Msp;
+namespace Msp {
+namespace DemoScene {
BeatCounter::BeatCounter(Resources &resources):
text(resources.get_ui_font(), &resources.get_ui_text_technique()),
{
instance.render(renderer, tag);
}
+
+} // namespace DemoScene
+} // namespace Msp
#include "resources.h"
#include "action.h"
+namespace Msp {
+namespace DemoScene {
+
class BeatCounter: public Msp::GL::Renderable, public Action
{
private:
virtual void render(Msp::GL::Renderer &, const Msp::GL::Tag &) const;
};
+} // namespace DemoScene
+} // namespace Msp
+
#endif
#include "colorfade.h"
-using namespace Msp;
+namespace Msp {
+namespace DemoScene {
ColorFadeAction::ColorFadeAction(const GL::Color &c):
InterpolationAction(HERMITE),
c.a = start_color.a*(1-t)+end_color.a*t;
set_color(c);
}
+
+} // namespace DemoScene
+} // namespace Msp
#include <msp/gl/color.h>
#include "action.h"
+namespace Msp {
+namespace DemoScene {
+
class ColorFadeAction: public InterpolationAction
{
protected:
virtual void set_color(const Msp::GL::Color &) = 0;
};
+} // namespace DemoScene
+} // namespace Msp
+
#endif
#include "stage.h"
using namespace std;
-using namespace Msp;
+
+namespace Msp {
+namespace DemoScene {
Demo::Demo(Graphics::Window &window, Graphics::GLContext &gl_ctx, DataFile::Collection &r):
resources(r),
{
player.tick(d*Time::sec);
}
+
+} // namespace DemoScene
+} // namespace Msp
#include "action.h"
#include "sequencer.h"
+namespace Msp {
+namespace DemoScene {
+
class Stage;
class Demo
return *get_item(things, name).value<T *>();
}
+} // namespace DemoScene
+} // namespace Msp
+
#endif
#include "demo.h"
#include "fadeoverlay.h"
-using namespace Msp;
using namespace std;
+namespace Msp {
+namespace DemoScene {
+
FadeOverlay::FadeOverlay(DataFile::Collection &resources):
mesh(get_fullscreen_quad()),
shprog(resources.get<GL::Program>("fade.glsl")),
{
obj.end_color = GL::Color(r, g, b, a);
}
+
+} // namespace DemoScene
+} // namespace Msp
#include "colorfade.h"
#include "sequencer.h"
+namespace Msp {
+namespace DemoScene {
+
class FadeOverlay: public Msp::GL::PostProcessor
{
public:
virtual void render(Msp::GL::Renderer &, const Msp::GL::Texture2D &, const Msp::GL::Texture2D &);
};
+} // namespace DemoScene
+} // namespace Msp
+
#endif
#include "launchscreen.h"
using namespace std;
-using namespace Msp;
+
+namespace Msp {
+namespace DemoScene {
LauncherBase::Options::Options(Graphics::Display &dpy, int argc, char **argv):
start_fullscreen(-1),
else if(key==Input::KEY_ESC)
exit(0);
}
+
+} // namespace DemoScene
+} // namespace Msp
#include <msp/time/timestamp.h>
#include "resources.h"
+namespace Msp {
+namespace DemoScene {
+
class Demo;
class LaunchScreen;
virtual void exit(int c) { Msp::Application::exit(c); }
};
+} // namespace DemoScene
+} // namespace Msp
+
#endif
#include <msp/strings/format.h>
#include "launchscreen.h"
-using namespace Msp;
+namespace Msp {
+namespace DemoScene {
LaunchScreen::LaunchScreen(Resources &resources):
font(resources.get_ui_font()),
renderer.transform(GL::Matrix::translation(0, -1.2, 0));
esc_prompt.render(renderer);
}
+
+} // namespace DemoScene
+} // namespace Msp
#include <msp/gl/text.h>
#include "resources.h"
+namespace Msp {
+namespace DemoScene {
+
class LaunchScreen
{
private:
void render();
};
+} // namespace DemoScene
+} // namespace Msp
+
#endif
#include "resources.h"
using namespace std;
-using namespace Msp;
+
+namespace Msp {
+namespace DemoScene {
Resources::Resources(const string &pack_name):
ui_font(0),
ui_font = &get<GL::Font>(font);
ui_text_technique = &get<GL::Technique>(tech);
}
+
+} // namespace DemoScene
+} // namespace Msp
#include <msp/gl/resources.h>
#include <msp/gl/technique.h>
+namespace Msp {
+namespace DemoScene {
+
class Resources: public Msp::GL::Resources
{
private:
void set_ui_text_resources(const std::string &, const std::string &);
};
+} // namespace DemoScene
+} // namespace Msp
+
#endif
#include "stage.h"
using namespace std;
-using namespace Msp;
+
+namespace Msp {
+namespace DemoScene {
Sequencer::Sequencer(float bpm):
started(false),
{
obj.add_action(*get_item(obj.named_actions, n), start_beat, end_beat);
}
+
+} // namespace DemoScene
+} // namespace Msp
#include <msp/time/timestamp.h>
#include "action.h"
+namespace Msp {
+namespace DemoScene {
+
class Demo;
class Sequencer
obj.anonymous_actions.push_back(act.release());
}
+} // namespace DemoScene
+} // namespace Msp
+
#endif
#include "stage.h"
using namespace std;
-using namespace Msp;
+
+namespace Msp {
+namespace DemoScene {
Stage::Stage():
pipeline(0),
{
obj.camera = &demo.get_resources().get<GL::Camera>(n);
}
+
+} // namespace DemoScene
+} // namespace Msp
#include "action.h"
#include "demo.h"
+namespace Msp {
+namespace DemoScene {
+
class Stage
{
public:
virtual void create_pipeline(Msp::GL::View &) = 0;
};
+} // namespace DemoScene
+} // namespace Msp
+
#endif