BlockType* blocktype_new(char const * name, float xs, float ys, float zs, void(* tick)(Block *), void(* touch)(Block *, Block *, float, float, float), void(* destroy)(Block *), Block * (* allocate)(void), void(* post_init)(Block *)) { BlockType * self; land_alloc(self); self->name = land_strdup(name); self->xs = xs; self->ys = ys; self->zs = zs; self->dynamic = 0; self->lift = 0; self->transparent = 0; self->tick = tick; self->touch = touch; self->destroy = destroy; self->allocate = allocate; self->post_init = post_init; return self; }
int my_main(void) { All * a; land_alloc(a); #line 291 int w = 960; int h = 600; a->show_help = 1; #line 295 land_init(); #line 297 main_data_path = land_strdup("."); #line 299 if (land_argc > 1) { if (land_equals(land_argv [1], "test")) { return test(); } } //land_set_display_parameters(w, h, LAND_OPENGL) #line 304 #ifdef ANDROID #line 306 land_set_display_parameters(0, 0, LAND_FULLSCREEN | LAND_DEPTH | LAND_LANDSCAPE); #line 306 #else #line 308 land_set_display_parameters(w, h, LAND_DEPTH | LAND_RESIZE); #line 308 #endif #line 316 LandRunner * game_runner = land_runner_new("Yellow and Dangerous", runner_init, NULL, runner_update, runner_redraw, NULL, runner_done); a->w = w; a->h = h; #line 320 land_runner_register(game_runner); land_set_initial_runner(game_runner); land_mainloop(); #line 324 land_free(main_data_path); land_free(a); #line 327 return 0; }