Ejemplo n.º 1
0
void UILayer::Draw(UIManager * uiManager)
{
	DrawBossHP(uiManager->GetBossHPRatio());
	DrawPlayerHP(uiManager->GetPlayerHPRatio());
	DrawStick(uiManager->GetUIStick());
	DrawFire(uiManager->GetUIFire());
}
Ejemplo n.º 2
0
/*
 *-----------------------------------------------------------------------------
 *    Called by the mainline code periodically to update the display.
 *-----------------------------------------------------------------------------
 */
ENTRYPOINT void draw_fire(ModeInfo * mi)
{
    firestruct *fs = &fire[MI_SCREEN(mi)];

    Display *display = MI_DISPLAY(mi);
    Window window = MI_WINDOW(mi);

    MI_IS_DRAWN(mi) = True;

    if (!fs->glx_context)
	return;

    glXMakeCurrent(display, window, *(fs->glx_context));

    glShadeModel(GL_FLAT);
    glEnable(GL_DEPTH_TEST);

    /* makes particles blend with background */
    if (!MI_IS_WIREFRAME(mi)||(!fs->np))
    {
    	glEnable(GL_BLEND);
    	glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    }

    /* fog stuff */
    glEnable(GL_FOG);
    glFogi(GL_FOG_MODE, GL_EXP);
    glFogfv(GL_FOG_COLOR, fogcolor);
    glFogf(GL_FOG_DENSITY, 0.03);
    glHint(GL_FOG_HINT, GL_NICEST);

    glPushMatrix();
    glRotatef(current_device_rotation(), 0, 0, 1);
    DrawFire(mi);
    glPopMatrix();
#ifndef STANDALONE
    Reshape(mi); /* xlock mode */
#else
    reshape_fire(mi,MI_WIDTH(mi),MI_HEIGHT(mi)); /* xscreensaver mode */
#endif

    glFinish();
    glXSwapBuffers(display, window);
}
Ejemplo n.º 3
0
/*
 *-----------------------------------------------------------------------------
 *    Called by the mainline code periodically to update the display.
 *-----------------------------------------------------------------------------
 */
void draw_fire(ModeInfo * mi)
{
    firestruct *fs = &fire[MI_SCREEN(mi)];

    Display *display = MI_DISPLAY(mi);
    Window window = MI_WINDOW(mi);

    MI_IS_DRAWN(mi) = True;

    if (!fs->glx_context)
	return;
#ifdef WIN32
    wglMakeCurrent(hdc, fs->glx_context);
#else
    glXMakeCurrent(display, window, *(fs->glx_context));
#endif
    DrawFire(mi);
    reshape_fire(mi,MI_WIDTH(mi),MI_HEIGHT(mi));
    glFinish();
    glXSwapBuffers(display, window);
}
Ejemplo n.º 4
0
/*
 *-----------------------------------------------------------------------------
 *    Called by the mainline code periodically to update the display.
 *-----------------------------------------------------------------------------
 */
ENTRYPOINT void draw_fire(ModeInfo * mi)
{
    firestruct *fs = &fire[MI_SCREEN(mi)];

    Display *display = MI_DISPLAY(mi);
    Window window = MI_WINDOW(mi);

    MI_IS_DRAWN(mi) = True;

    if (!fs->glx_context)
	return;

    glXMakeCurrent(display, window, *(fs->glx_context));
    DrawFire(mi);
#ifndef STANDALONE
    Reshape(mi); /* xlock mode */
#else
    reshape_fire(mi,MI_WIDTH(mi),MI_HEIGHT(mi)); /* xscreensaver mode */
#endif

    glFinish();
    glXSwapBuffers(display, window);
}