diff options
| author | tomsmeding <tom.smeding@gmail.com> | 2016-12-29 10:57:15 +0100 | 
|---|---|---|
| committer | tomsmeding <tom.smeding@gmail.com> | 2016-12-29 10:57:30 +0100 | 
| commit | 6286f890c132b9cd6a36d585735e5d7310dc0abf (patch) | |
| tree | 32b2e697fa0030fdd410eba0d2626e8fd511c7ed /src | |
| parent | ac18b3132059b5e7d5f00ccf2b56e543cf0da84b (diff) | |
Sprites, object destruction
Diffstat (limited to 'src')
| -rw-r--r-- | src/objects/obj_control.cpp | 8 | ||||
| -rw-r--r-- | src/sprites/spr_hoi.png | bin | 0 -> 1473 bytes | 
2 files changed, 6 insertions, 2 deletions
diff --git a/src/objects/obj_control.cpp b/src/objects/obj_control.cpp index 473ce5f..19b8b40 100644 --- a/src/objects/obj_control.cpp +++ b/src/objects/obj_control.cpp @@ -1,6 +1,10 @@  OUT #include <cstdio>  OUT #include <cstdlib> +double yd=0; + +double id(double a){return a;} +  EVENT(create){  	x=10;  	y=240; @@ -8,7 +12,7 @@ EVENT(create){  }  EVENT(step){ -	static double yd=0; +	// static double yd=0;  	x++;  	y+=yd;  	yd+=(double)rand()/RAND_MAX*2-y/240; @@ -16,7 +20,7 @@ EVENT(step){  EVENT(draw){  	char *s; -	asprintf(&s,"controllll: x=%g y=%g",x,y); +	asprintf(&s,"controllll: x=%g y=%g",id(x),id(y));  	draw_text(x,y,s);  	free(s);  } diff --git a/src/sprites/spr_hoi.png b/src/sprites/spr_hoi.png Binary files differnew file mode 100644 index 0000000..39800bf --- /dev/null +++ b/src/sprites/spr_hoi.png  | 
