wolfpros Levelansatz. Problem scheint behoben zu sein.
authorWintermute <wintermute@hannover.ccc.de>
Mon, 14 Oct 2013 18:31:02 +0000 (20:31 +0200)
committerWintermute <wintermute@hannover.ccc.de>
Mon, 14 Oct 2013 18:31:02 +0000 (20:31 +0200)
badge/jumpnrun/enemies.c
badge/jumpnrun/foo.lv [new file with mode: 0644]
badge/jumpnrun/gnobbel.lv
badge/jumpnrun/levels.txt
badge/util/fixed_point.h

index dfcc439..3900a27 100644 (file)
@@ -192,7 +192,7 @@ void enemy_tick_swing_up_and_down(struct jumpnrun_enemy            *self,
   }
 
   self->base.inertia.y = fixed_point_add(self->base.inertia.y, 
-                                        fixed_point_mul(FIXED_POINT(0, 5),
+                                        fixed_point_mul(fixed_point_div(self->type->spawn_inertia.y, FIXED_INT(40)),
                                                         fixed_point_sub(self->spawn_pos.y,
                                                                         self->base.current_box.pos.y)));
 
diff --git a/badge/jumpnrun/foo.lv b/badge/jumpnrun/foo.lv
new file mode 100644 (file)
index 0000000..b4cf314
--- /dev/null
@@ -0,0 +1,31 @@
+                                  #############                                                                                                                                                                                          
+                                ##                                                                                                                                                                                                       
+                              ##                                                                                                                                                                                                         
+                            ##                                                                                                                                                                                                           
+                          ##                                                                                                                                                                                                             
+                        ##                                                                                                                                                                                                               
+                      01                                                                                                                                                                                                                 
+                      23                                                                                                                                                                                                                 
+                      23                                                                                                                                                                                                                 
+                      23                                                                                                                                                                                                                 
+  P                 M 23                                                                                                                                                                                                           D     
+                      23                                                                                                                                                                                                                 
+#########################################################################################################################################################################################################################################
+
+[tiles]
+0 tube_top_left
+1 tube_top_right
+2 tube_left
+3 tube_right
+# brick
+? square
+
+[items]
+D doc
+
+[enemies]
+C cat
+M mushroom
+B bunny
+S snake
+@ spiral
index 73d790c..d31670d 100644 (file)
@@ -11,6 +11,7 @@
                 #######
                ########                                                                                                                                                                                                                        DC           
 ######################################                                                                                                                                                              #################   ##      ##      #########                                            
+
 [tiles]
 0 tube_top_left
 1 tube_top_right
index f1f803c..c6bfbe0 100644 (file)
@@ -1,2 +1,4 @@
 smb
+foo
+gnobbel
 mean
index 8af7e82..49bfa7c 100644 (file)
@@ -25,12 +25,12 @@ static inline bool fixed_point_ne(fixed_point x, fixed_point y) { return x.data
 #define FIXED_POINT_I(x, y) { ((x) * 256) + ((y) * 256 / 1000) }
 #define FIXED_INT_I(x) FIXED_POINT_I(x, 0)
 
-static inline fixed_point FIXED_POINT(unsigned x, unsigned y) {
-  fixed_point r = { ((int) x * 256) + ((int) y * 256 / 1000) };
+static inline fixed_point FIXED_POINT(int32_t x, int32_t y) {
+  fixed_point r = { (x * 256) + (y * 256 / 1000) };
   return r;
 }
 
-static inline fixed_point FIXED_INT(unsigned x) { return FIXED_POINT(x, 0); }
+static inline fixed_point FIXED_INT(int32_t x) { return FIXED_POINT(x, 0); }
 
 static inline int fixed_point_cast_int(fixed_point x) { return x.data / 256; }
 
This page took 0.031167 seconds and 4 git commands to generate.