Various graphics fixes.
This commit is contained in:
parent
f015f83425
commit
21bb032a05
|
@ -273,23 +273,26 @@ static void draw(void)
|
|||
static void drawMenu(void)
|
||||
{
|
||||
SDL_Rect r;
|
||||
|
||||
if (app.modalDialog.type == MD_NONE)
|
||||
{
|
||||
SDL_SetRenderDrawBlendMode(app.renderer, SDL_BLENDMODE_BLEND);
|
||||
SDL_SetRenderDrawColor(app.renderer, 0, 0, 0, 128);
|
||||
SDL_RenderFillRect(app.renderer, NULL);
|
||||
SDL_SetRenderDrawBlendMode(app.renderer, SDL_BLENDMODE_NONE);
|
||||
|
||||
SDL_SetRenderDrawBlendMode(app.renderer, SDL_BLENDMODE_BLEND);
|
||||
SDL_SetRenderDrawColor(app.renderer, 0, 0, 0, 128);
|
||||
SDL_RenderFillRect(app.renderer, NULL);
|
||||
SDL_SetRenderDrawBlendMode(app.renderer, SDL_BLENDMODE_NONE);
|
||||
r.w = 400;
|
||||
r.h = 400;
|
||||
r.x = (SCREEN_WIDTH / 2) - r.w / 2;
|
||||
r.y = (SCREEN_HEIGHT / 2) - r.h / 2;
|
||||
|
||||
r.w = 400;
|
||||
r.h = 400;
|
||||
r.x = (SCREEN_WIDTH / 2) - r.w / 2;
|
||||
r.y = (SCREEN_HEIGHT / 2) - r.h / 2;
|
||||
SDL_SetRenderDrawColor(app.renderer, 0, 0, 0, 255);
|
||||
SDL_RenderFillRect(app.renderer, &r);
|
||||
SDL_SetRenderDrawColor(app.renderer, 200, 200, 200, 255);
|
||||
SDL_RenderDrawRect(app.renderer, &r);
|
||||
|
||||
SDL_SetRenderDrawColor(app.renderer, 0, 0, 0, 0);
|
||||
SDL_RenderFillRect(app.renderer, &r);
|
||||
SDL_SetRenderDrawColor(app.renderer, 200, 200, 200, SDL_ALPHA_OPAQUE);
|
||||
SDL_RenderDrawRect(app.renderer, &r);
|
||||
|
||||
drawWidgets("inBattle");
|
||||
drawWidgets("inBattle");
|
||||
}
|
||||
}
|
||||
|
||||
static void handleKeyboard(void)
|
||||
|
|
|
@ -90,7 +90,7 @@ void drawRope(Entity *e)
|
|||
{
|
||||
if (e->towing)
|
||||
{
|
||||
SDL_SetRenderDrawColor(app.renderer, 200, 200, 200, SDL_ALPHA_OPAQUE);
|
||||
SDL_SetRenderDrawColor(app.renderer, 200, 200, 200, 255);
|
||||
|
||||
SDL_RenderDrawLine(app.renderer, e->x - battle.camera.x, e->y - battle.camera.y, e->towing->x - battle.camera.x, e->towing->y - battle.camera.y);
|
||||
}
|
||||
|
|
|
@ -405,7 +405,7 @@ static void drawChallenges(void)
|
|||
SDL_SetRenderDrawColor(app.renderer, 0, 0, 0, 128);
|
||||
SDL_RenderFillRect(app.renderer, &r);
|
||||
SDL_SetRenderDrawBlendMode(app.renderer, SDL_BLENDMODE_NONE);
|
||||
SDL_SetRenderDrawColor(app.renderer, 64, 64, 64, SDL_ALPHA_OPAQUE);
|
||||
SDL_SetRenderDrawColor(app.renderer, 64, 64, 64, 255);
|
||||
SDL_RenderDrawRect(app.renderer, &r);
|
||||
|
||||
r.y = 240;
|
||||
|
@ -453,7 +453,7 @@ static void drawMenu(void)
|
|||
r.x = (SCREEN_WIDTH / 2) - r.w / 2;
|
||||
r.y = (SCREEN_HEIGHT / 2) - r.h / 2;
|
||||
|
||||
SDL_SetRenderDrawColor(app.renderer, 0, 0, 0, 0);
|
||||
SDL_SetRenderDrawColor(app.renderer, 0, 0, 0, 255);
|
||||
SDL_RenderFillRect(app.renderer, &r);
|
||||
SDL_SetRenderDrawColor(app.renderer, 200, 200, 200, 255);
|
||||
SDL_RenderDrawRect(app.renderer, &r);
|
||||
|
|
|
@ -812,7 +812,7 @@ static void drawMenu(void)
|
|||
r.x = (SCREEN_WIDTH / 2) - r.w / 2;
|
||||
r.y = (SCREEN_HEIGHT / 2) - r.h / 2;
|
||||
|
||||
SDL_SetRenderDrawColor(app.renderer, 0, 0, 0, 0);
|
||||
SDL_SetRenderDrawColor(app.renderer, 0, 0, 0, 255);
|
||||
SDL_RenderFillRect(app.renderer, &r);
|
||||
SDL_SetRenderDrawColor(app.renderer, 200, 200, 200, 255);
|
||||
SDL_RenderDrawRect(app.renderer, &r);
|
||||
|
|
|
@ -110,7 +110,7 @@ void drawFighterDatabase(void)
|
|||
r.x = (SCREEN_WIDTH / 2) - r.w / 2;
|
||||
r.y = (SCREEN_HEIGHT / 2) - r.h / 2;
|
||||
|
||||
SDL_SetRenderDrawColor(app.renderer, 0, 0, 0, 0);
|
||||
SDL_SetRenderDrawColor(app.renderer, 0, 0, 0, 255);
|
||||
SDL_RenderFillRect(app.renderer, &r);
|
||||
SDL_SetRenderDrawColor(app.renderer, 200, 200, 200, 255);
|
||||
SDL_RenderDrawRect(app.renderer, &r);
|
||||
|
|
|
@ -141,7 +141,7 @@ void drawStats(void)
|
|||
r.x = (SCREEN_WIDTH / 2) - r.w / 2;
|
||||
r.y = (SCREEN_HEIGHT / 2) - r.h / 2;
|
||||
|
||||
SDL_SetRenderDrawColor(app.renderer, 0, 0, 0, 0);
|
||||
SDL_SetRenderDrawColor(app.renderer, 0, 0, 0, 255);
|
||||
SDL_RenderFillRect(app.renderer, &r);
|
||||
SDL_SetRenderDrawColor(app.renderer, 200, 200, 200, 255);
|
||||
SDL_RenderDrawRect(app.renderer, &r);
|
||||
|
|
|
@ -143,7 +143,7 @@ void drawTrophies(void)
|
|||
r.x = (SCREEN_WIDTH / 2) - r.w / 2;
|
||||
r.y = (SCREEN_HEIGHT / 2) - r.h / 2;
|
||||
|
||||
SDL_SetRenderDrawColor(app.renderer, 0, 0, 0, 0);
|
||||
SDL_SetRenderDrawColor(app.renderer, 0, 0, 0, 255);
|
||||
SDL_RenderFillRect(app.renderer, &r);
|
||||
SDL_SetRenderDrawColor(app.renderer, 200, 200, 200, 255);
|
||||
SDL_RenderDrawRect(app.renderer, &r);
|
||||
|
@ -307,10 +307,10 @@ void drawTrophyAlert(void)
|
|||
|
||||
if (alertTrophy)
|
||||
{
|
||||
SDL_SetRenderDrawColor(app.renderer, 0, 0, 0, SDL_ALPHA_OPAQUE);
|
||||
SDL_SetRenderDrawColor(app.renderer, 0, 0, 0, 255);
|
||||
SDL_RenderFillRect(app.renderer, &alertRect);
|
||||
|
||||
SDL_SetRenderDrawColor(app.renderer, 64, 64, 64, SDL_ALPHA_OPAQUE);
|
||||
SDL_SetRenderDrawColor(app.renderer, 64, 64, 64, 255);
|
||||
SDL_RenderDrawRect(app.renderer, &alertRect);
|
||||
|
||||
drawText(alertRect.x + 15, alertRect.y + 5, 30, TA_LEFT, colors.white, alertTrophy->title);
|
||||
|
|
|
@ -162,7 +162,7 @@ void drawControls(void)
|
|||
r.x = (SCREEN_WIDTH / 2) - r.w / 2;
|
||||
r.y = (SCREEN_HEIGHT / 2) - r.h / 2;
|
||||
|
||||
SDL_SetRenderDrawColor(app.renderer, 0, 0, 0, 0);
|
||||
SDL_SetRenderDrawColor(app.renderer, 0, 0, 0, 255);
|
||||
SDL_RenderFillRect(app.renderer, &r);
|
||||
SDL_SetRenderDrawColor(app.renderer, 200, 200, 200, 255);
|
||||
SDL_RenderDrawRect(app.renderer, &r);
|
||||
|
|
|
@ -63,7 +63,7 @@ static void initColor(SDL_Color *c, int r, int g, int b)
|
|||
void prepareScene(void)
|
||||
{
|
||||
SDL_SetRenderTarget(app.renderer, app.backBuffer);
|
||||
SDL_SetRenderDrawColor(app.renderer, 0, 0, 0, SDL_ALPHA_OPAQUE);
|
||||
SDL_SetRenderDrawColor(app.renderer, 0, 0, 0, 255);
|
||||
SDL_RenderClear(app.renderer);
|
||||
}
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ static void drawMain(void)
|
|||
r.x = (SCREEN_WIDTH / 2) - r.w / 2;
|
||||
r.y = (SCREEN_HEIGHT / 2) - r.h / 2;
|
||||
|
||||
SDL_SetRenderDrawColor(app.renderer, 0, 0, 0, 0);
|
||||
SDL_SetRenderDrawColor(app.renderer, 0, 0, 0, 255);
|
||||
SDL_RenderFillRect(app.renderer, &r);
|
||||
SDL_SetRenderDrawColor(app.renderer, 200, 200, 200, 255);
|
||||
SDL_RenderDrawRect(app.renderer, &r);
|
||||
|
|
|
@ -150,19 +150,19 @@ void drawWidgets(const char *group)
|
|||
}
|
||||
else
|
||||
{
|
||||
SDL_SetRenderDrawColor(app.renderer, 0, 0, 0, SDL_ALPHA_OPAQUE);
|
||||
SDL_SetRenderDrawColor(app.renderer, 0, 0, 0, 255);
|
||||
SDL_RenderFillRect(app.renderer, &w->rect);
|
||||
|
||||
if (w == selectedWidget)
|
||||
{
|
||||
SDL_SetRenderDrawColor(app.renderer, 64, 128, 200, SDL_ALPHA_OPAQUE);
|
||||
SDL_SetRenderDrawColor(app.renderer, 64, 128, 200, 255);
|
||||
SDL_RenderFillRect(app.renderer, &w->rect);
|
||||
SDL_SetRenderDrawColor(app.renderer, 128, 192, 255, SDL_ALPHA_OPAQUE);
|
||||
SDL_SetRenderDrawColor(app.renderer, 128, 192, 255, 255);
|
||||
SDL_RenderDrawRect(app.renderer, &w->rect);
|
||||
}
|
||||
else
|
||||
{
|
||||
SDL_SetRenderDrawColor(app.renderer, 64, 64, 64, SDL_ALPHA_OPAQUE);
|
||||
SDL_SetRenderDrawColor(app.renderer, 64, 64, 64, 255);
|
||||
SDL_RenderDrawRect(app.renderer, &w->rect);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue