1
0
mirror of git://projects.qi-hardware.com/ben-scans.git synced 2024-11-22 03:43:09 +02:00

Minor level.c cleanup.

- solidify/level.c (draw_map): remove, and use draw_image instead
- solidify/level.c (scroll_z): removed commented-out root->window
  initialization
This commit is contained in:
Werner Almesberger 2010-09-23 22:30:47 -03:00
parent cef7cd5e18
commit fbbbd29a28

View File

@ -24,7 +24,7 @@
#define NEAR 1
static void draw_map(GtkWidget *widget, struct face *f)
static void draw_image(GtkWidget *widget, struct face *f)
{
int x, y, z;
double z0;
@ -70,13 +70,6 @@ static void draw_map(GtkWidget *widget, struct face *f)
}
static void draw_image(GtkWidget *da, struct face *f)
{
fprintf(stderr, "%d %g %g\n", f->z_ref, f->fx, f->fy);
draw_map(da, f);
}
static void scroll_z(GtkWidget *da, struct face *f, int up)
{
if (up) {
@ -157,7 +150,7 @@ static void make_screen(GtkWidget *root, struct face *f)
gtk_container_add(GTK_CONTAINER(evbox), da);
gtk_container_add(GTK_CONTAINER(root), evbox);
gtk_widget_show_all(root);
draw_map(da, f);
draw_image(da, f);
g_signal_connect(G_OBJECT(evbox), "scroll-event",
G_CALLBACK(scroll_event), f);
@ -175,11 +168,6 @@ void level(struct face *f)
root = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_position(GTK_WINDOW(root), GTK_WIN_POS_CENTER);
#if 0
/* get root->window */
gtk_widget_show_all(root);
#endif
g_signal_connect(G_OBJECT(root), "destroy",
G_CALLBACK(gtk_main_quit), NULL);
make_screen(root, f);