Backport auf gcc 4.6
authorWintermute <wintermute@hannover.ccc.de>
Sun, 20 Oct 2013 14:56:27 +0000 (16:56 +0200)
committerWintermute <wintermute@hannover.ccc.de>
Sun, 20 Oct 2013 14:56:27 +0000 (16:56 +0200)
badge/jumpnrun/enemies.h
badge/jumpnrun/levels.txt
badge/jumpnrun/skynet.lv [new file with mode: 0644]
badge/ui/event.h
mock/Makefile
mock/mock/lcd-window.cc
mock/mock/lcd-window.hh

index 075255e..c7dfa7e 100644 (file)
@@ -50,7 +50,7 @@ enum {
   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; }
index 9ba98e6..9757ad3 100644 (file)
@@ -1,3 +1,5 @@
+smb
+skynet
 wrongturn
 smb
 lubiXOXO
diff --git a/badge/jumpnrun/skynet.lv b/badge/jumpnrun/skynet.lv
new file mode 100644 (file)
index 0000000..705b1fb
--- /dev/null
@@ -0,0 +1,45 @@
+                                                                                                                                                                                                                                                                                 
+                                                            @                                                                                                                                                                                                                    
+                                                                                                                                                                                                                                                                                 
+                                                                                                                                                                                                                                                                                 
+                                                                                                                         ???                                                                                                     ?????                                           
+                                                      ?????                                                                                                                                             ??????^^^^^                                                              
+                                                                                                                        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
index 24fd501..cfaa47c 100644 (file)
@@ -9,7 +9,7 @@ extern "C" {
 
   enum {
     BADGE_EVENT_USER_INPUT,
-    BADGE_EVENT_GAME_TICK,
+    BADGE_EVENT_GAME_TICK
   };
 
   enum {
index b0639c9..969b2b4 100644 (file)
@@ -2,7 +2,7 @@
 
 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
index 8b1de24..039aaf5 100644 (file)
@@ -6,7 +6,7 @@
 
 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));
@@ -36,13 +36,13 @@ namespace badge2013 {
     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);
+        }
       }
     }
 
@@ -58,7 +58,11 @@ namespace badge2013 {
 
   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_);
 
@@ -111,7 +115,7 @@ namespace badge2013 {
     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() {
index dc31b99..0d6df9f 100644 (file)
@@ -19,7 +19,7 @@ namespace badge2013 {
   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);
@@ -31,7 +31,7 @@ namespace badge2013 {
     void force_redraw();
 
     Glib::Dispatcher  sig_redraw_;
-    badge_framebuffer framebuffer_;  
+    badge_framebuffer framebuffer_;
   };
 
 
@@ -51,12 +51,12 @@ namespace badge2013 {
   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_;
   };
 }
 
This page took 0.030309 seconds and 4 git commands to generate.