Ejemplo n.º 1
0
int d_aphoton_check_proc(int msg, DIALOG *d, int c)
{  
    if (msg == MSG_DRAW) {
        draw_base(screen, d);
        photon_container(screen, d->x+3, d->y+d->h/2-7, 14, 14);
        rectfillwh(screen, d->x+5, d->y+d->h/2-5, 10, 10, white);
		
	if (d->flags & D_SELECTED) {
	    /* shadow */
	    line(screen, d->x+6, d->y+d->h/2-3, d->x+12, d->y+d->h/2+3, check_gray1);
	    line(screen, d->x+7, d->y+d->h/2-4, d->x+13, d->y+d->h/2+2, check_gray1);
	    line(screen, d->x+6, d->y+d->h/2+2, d->x+12, d->y+d->h/2-4, check_gray1);
	    line(screen, d->x+7, d->y+d->h/2+3, d->x+13, d->y+d->h/2-3, check_gray1);
	    
	    /* cross */
	    line(screen, d->x+6, d->y+d->h/2-4, d->x+13, d->y+d->h/2+3, check_black);
	    line(screen, d->x+6, d->y+d->h/2+3, d->x+13, d->y+d->h/2-4, check_black);
	}
	else {
  	    rect(screen, d->x+6, d->y+d->h/2-4, d->x+13, d->y+d->h/2+3, check_gray2);
	}
	
	if (d->dp)
	    photon_textout(screen, (char *)d->dp, d->x+20,
	                   d->y+d->h/2-text_height(font)/2, d->flags, FALSE);
	
	return D_O_K;
    }

    return d_button_proc(msg, d, c);
}
Ejemplo n.º 2
0
void draw(){
	clear();
	draw_base();
	draw_world();
	draw_block();
	refresh();
}
Ejemplo n.º 3
0
void az_draw_bad_jungle_chomper(
    const az_baddie_t *baddie, float frozen, az_clock_t clock) {
  assert(baddie->kind == AZ_BAD_JUNGLE_CHOMPER);
  const float flare = baddie->armor_flare;
  const az_color_t center_color =
    az_color3f(0.75f - 0.75f * frozen, 1.0f - 0.5f * flare, frozen);
  const az_color_t side_color =
    az_color3f(0.15f + 0.4f * flare, 0.3f - 0.3f * flare, 0.4f * frozen);
  draw_stalk(baddie, 3, true, 1.0, false, center_color, side_color);
  draw_base(baddie, center_color, side_color, 0);
  draw_core(baddie, flare, frozen);
  draw_pincers(baddie, true, center_color, side_color);
}
Ejemplo n.º 4
0
void az_draw_bad_fire_chomper(
    const az_baddie_t *baddie, float frozen, az_clock_t clock) {
  assert(baddie->kind == AZ_BAD_FIRE_CHOMPER);
  const float flare = baddie->armor_flare;
  const az_color_t center_color =
    az_color3f(0.8f - 0.7f * frozen, 0.3f + 0.2f * flare + 0.5f * frozen,
               0.1f - 0.1f * flare + 0.9f * frozen);
  const az_color_t side_color =
    az_color3f(0.4f - 0.4f * frozen, 0.2f + 0.2f * flare + 0.4f * frozen,
               0.1f - 0.1f * flare + 0.6f * frozen);
  draw_stalk(baddie, 3, false, 0.5, false, center_color, side_color);
  draw_base(baddie, center_color, side_color, 0);
  draw_core(baddie, flare, frozen);
  draw_pincers(baddie, true, center_color, side_color);
}
Ejemplo n.º 5
0
void az_draw_bad_aquatic_chomper(
    const az_baddie_t *baddie, float frozen, az_clock_t clock) {
  assert(baddie->kind == AZ_BAD_AQUATIC_CHOMPER);
  const float flare = baddie->armor_flare;
  const az_color_t center_color =
    az_color3f(0.4f + 0.5f * flare, 0.3f - 0.2f * flare + 0.5f * frozen,
               0.8f - 0.5f * flare);
  const az_color_t side_color =
    az_color3f(0.1f + 0.3f * flare, 0.2f - 0.2f * flare + 0.3f * frozen,
               0.35f);
  draw_stalk(baddie, 3, false, 0.5, false, center_color, side_color);
  draw_base(baddie, center_color, side_color, 0);
  draw_core(baddie, flare, frozen);
  draw_pincers(baddie, false, center_color, side_color);
}
Ejemplo n.º 6
0
int d_agtk_check_proc(int msg, DIALOG *d, int c)
{
    if (msg == MSG_DRAW) {
        BITMAP *bmp = gui_get_screen();
        draw_base(bmp, d);
        gtk_bevel(bmp, d->x+3, d->y+d->h/2-5, 10, 10, (d->flags & D_SELECTED) ? 2 : 1);
        if (d->dp) {
            gui_textout_ex(bmp, (char *)d->dp,
                           d->x+18, d->y+d->h/2-text_height(font)/2,
                           (d->flags & D_DISABLED) ? nshadow : black, -1, FALSE);
        }
        return D_O_K;
    }

    return d_button_proc(msg, d, c);
}
Ejemplo n.º 7
0
void display(void) {
    glClear(GL_COLOR_BUFFER_BIT);

    glPushMatrix();
    glTranslatef(transx, transy, 0.f);
    glRotatef(rotx, 0., 1., 0.);
    glRotatef(roty, 1., 0., 0.);
    glScalef(10,1,10);
    glTranslatef(0.f,-1.f,0.f);
    draw_base();
    draw_runway();
    draw_lights();
    draw_clouds();
    glPopMatrix();
    glutSwapBuffers();
}
Ejemplo n.º 8
0
/* d1 used for group number. */
int d_agtk_radio_proc(int msg, DIALOG *d, int c)
{
    if (msg == MSG_DRAW) {
        BITMAP *bmp = gui_get_screen();
        draw_base(bmp, d);
        draw_sprite(bmp, (d->flags & D_SELECTED) ? radio_down_bmp : radio_up_bmp, d->x+3, d->y+d->h/2-5);

        if (d->dp) {
            gui_textout_ex(bmp, (char *)d->dp,
                           d->x+18, d->y+d->h/2-text_height(font)/2,
                           (d->flags & D_DISABLED) ? nshadow : black, -1, FALSE);
        }
        return D_O_K;
    }

    return d_radio_proc(msg, d, c);
}
Ejemplo n.º 9
0
/* d1 used for group number. */
int d_aphoton_radio_proc(int msg, DIALOG *d, int c)
{
    if (msg == MSG_DRAW) {
	draw_base(screen, d);

	if (d->flags & D_SELECTED)
  	    blit(radio_sel_bmp, screen, 0, 0, d->x+3, d->y+d->h/2-7,
  	         radio_sel_bmp->w, radio_sel_bmp->h);
  	else
  	    blit(radio_bmp, screen, 0, 0, d->x+3, d->y+d->h/2-7,
  	         radio_bmp->w, radio_bmp->h);

	if (d->dp)
	    photon_textout(screen, (char *)d->dp, d->x+20,
	                   d->y+d->h/2-text_height(font)/2, d->flags, FALSE);

	return D_O_K;
    }

    return d_radio_proc(msg, d, c);
}
Ejemplo n.º 10
0
void az_draw_bad_spiked_vine(
    const az_baddie_t *baddie, float frozen, az_clock_t clock) {
  assert(baddie->kind == AZ_BAD_SPIKED_VINE);
  const float flare = baddie->armor_flare;
  const az_color_t center_color =
    az_color3f(0.4f + 0.2f * flare - 0.4f * frozen,
               0.8f - 0.3f * flare, 0.4f - 0.1f * flare + 0.6f * frozen);
  const az_color_t side_color =
    az_color3f(0.4f * flare, 0.3f - 0.1f * flare,
               0.2f - 0.1f * flare + 0.4f * frozen);
  draw_stalk(baddie, 1, true, 0.5 + fmin(0.5, baddie->param / 28.0), true,
             center_color, side_color);
  glBegin(GL_TRIANGLE_FAN); {
    const az_polygon_t tip = baddie->data->main_body.polygon;
    az_gl_color(center_color);
    az_gl_vertex(tip.vertices[0]);
    az_gl_color(side_color);
    for (int i = 1; i < tip.num_vertices; ++i) {
      az_gl_vertex(tip.vertices[i]);
    }
  } glEnd();
  draw_base(baddie, center_color, side_color,
            3.0 * fmin(1.0, baddie->param / 14.0));
}