JUMPNRUN_ENEMY_SPAWNED = 128,
JUMPNRUN_ENEMY_UNAVAILABLE = 64,
JUMPNRUN_ENEMY_MOVING = 32,
- JUMPNRUN_ENEMY_EVENT_TRIGGER1 = 16,
+ JUMPNRUN_ENEMY_EVENT_TRIGGER1 = 16
};
static inline rectangle const *enemy_hitbox(jumpnrun_enemy const *enemy) { return &enemy->base.hitbox; }
+smb
+skynet
wrongturn
smb
lubiXOXO
--- /dev/null
+
+ @
+
+
+ ??? ?????
+ ????? ??????^^^^^
+ RRRRRRR ?????
+ P ^^^^???? ??????^^ ??? R ???????? R
+ ???? ????? ^ ^ ?????? ?????
+ R ??? R <?> <?>
+ R ??????????????????????????????????? ????? R >>>>>>d
+ ?????^^ ?????^ c ???????????
+ ^^^???? R ????
+ ^^^^^^^???? ?????
+
+[tiles]
+0 tube_top_left
+1 tube_top_right
+2 tube_left
+3 tube_right
+# brick
+? square
+^ spike_up
+v spike_down
+> spike_right
+< spike_left
+
+[items]
+d doc
+c checkpoint
+k key
+e doc_encrypted
+
+[enemies]
+C cat
+M mushroom
+B bunny
+S snake
+@ spiral
+R rotor
+H dog
+G giraffe
+V bird
+W bird_straight
+X bird_dip
enum {
BADGE_EVENT_USER_INPUT,
- BADGE_EVENT_GAME_TICK,
+ BADGE_EVENT_GAME_TICK
};
enum {
CPPFLAGS = $$(pkg-config --cflags gtkmm-3.0) -I. -I ../badge
CFLAGS = -Wall -Wextra -pedantic -std=c99 -Werror -O0 -g
-CXXFLAGS = -Wall -Wextra -pedantic -std=c++11 -Werror -O0 -g
+CXXFLAGS = -Wall -Wextra -pedantic -std=c++0x -Werror -O0 -g
BADGE = badge
CONVERTER = level-converter
namespace badge2013 {
lcd_drawingarea::lcd_drawingarea(BaseObjectType *cobject,
- Glib::RefPtr<Gtk::Builder> const &)
+ Glib::RefPtr<Gtk::Builder> const &)
: Gtk::DrawingArea(cobject)
{
sig_redraw_.connect(sigc::mem_fun(*this, &lcd_drawingarea::force_redraw));
double c_height = w_height / BADGE_DISPLAY_HEIGHT;
cr->save();
-
+
for(int i = 0; i < BADGE_DISPLAY_WIDTH; ++i) {
for(int j = 0; j < BADGE_DISPLAY_HEIGHT; ++j) {
- if(badge_framebuffer_pixel(&framebuffer_, i, j)) {
- cr->rectangle(c_width * i, c_height * j,
- c_width , c_height);
- }
+ if(badge_framebuffer_pixel(&framebuffer_, i, j)) {
+ cr->rectangle(c_width * i, c_height * j,
+ c_width , c_height);
+ }
}
}
lcd_window::lcd_window(BaseObjectType *cobject, Glib::RefPtr<Gtk::Builder> const &glade)
: Gtk::Window(cobject),
- worker_(this)
+ running_(false),
+ worker_(this),
+ canvas_(0),
+ key_state_(0),
+ ticks_(0)
{
glade->get_widget_derived("canvas", canvas_);
badge_event_push(badge_event_new(BADGE_EVENT_USER_INPUT, key_state_, new_state));
key_state_ = new_state;
- return true;
+ return true;
}
bool lcd_window::on_game_tick() {
class lcd_drawingarea : public Gtk::DrawingArea {
public:
lcd_drawingarea(BaseObjectType *cobject,
- Glib::RefPtr<Gtk::Builder> const &glade);
+ Glib::RefPtr<Gtk::Builder> const &glade);
virtual ~lcd_drawingarea();
void push_framebuffer(badge_framebuffer const &fb);
void force_redraw();
Glib::Dispatcher sig_redraw_;
- badge_framebuffer framebuffer_;
+ badge_framebuffer framebuffer_;
};
private:
bool on_game_tick();
- bool running_ = false;
+ bool running_;
Glib::Dispatcher sig_close_;
badge_worker worker_;
- lcd_drawingarea *canvas_ = 0;
- std::uint8_t key_state_ = 0;
- std::uint8_t ticks_ = 0;
+ lcd_drawingarea *canvas_;
+ std::uint8_t key_state_;
+ std::uint8_t ticks_;
};
}