Portal-Farben angepasst, damit man zsmgehörige Portale erkennt
This commit is contained in:
parent
5a14a05d60
commit
4c9b7cdb6b
14
src/render.c
14
src/render.c
@ -35,15 +35,25 @@ void renderGame(){
|
|||||||
//______Portal kreieren________________________________________________________________________
|
//______Portal kreieren________________________________________________________________________
|
||||||
for (int i = 0; i < game.map.portalCount; i++)
|
for (int i = 0; i < game.map.portalCount; i++)
|
||||||
{
|
{
|
||||||
|
switch(i) { //Farben je nach Start-Portal-Nr.
|
||||||
|
case 0: SDL_SetRenderDrawColor(renderer, 90, 150, 255, 255); break; //Start: hellblau
|
||||||
|
case 1: SDL_SetRenderDrawColor(renderer, 255, 150, 255, 255); break; //Start: rosa
|
||||||
|
default: SDL_SetRenderDrawColor(renderer, 255, 150, 150, 255); break; //Start: hellrot
|
||||||
|
}
|
||||||
|
|
||||||
//Start-Portal
|
//Start-Portal
|
||||||
SDL_SetRenderDrawColor(renderer, 0, 191, 255, 255); //RGB-Farbe Start-Portal
|
|
||||||
rect.x = (game.map.portals[i].posX * config.blockSizePx);
|
rect.x = (game.map.portals[i].posX * config.blockSizePx);
|
||||||
rect.y = (game.map.portals[i].posY * config.blockSizePx);
|
rect.y = (game.map.portals[i].posY * config.blockSizePx);
|
||||||
|
|
||||||
SDL_RenderDrawRect(renderer, &rect); //Rechteck rendern
|
SDL_RenderDrawRect(renderer, &rect); //Rechteck rendern
|
||||||
|
|
||||||
|
switch(i) { //Farben je nach Ausgangs-Portal-Nr.
|
||||||
|
case 0: SDL_SetRenderDrawColor(renderer, 45, 45, 255, 255); break; //Ausgang: dunkelblau
|
||||||
|
case 1: SDL_SetRenderDrawColor(renderer, 204, 0, 204, 255); break; //Ausgang: violett
|
||||||
|
default: SDL_SetRenderDrawColor(renderer, 255, 50, 0, 255); break; //Ausgang: rot
|
||||||
|
}
|
||||||
|
|
||||||
//Ausgangs-Portal
|
//Ausgangs-Portal
|
||||||
SDL_SetRenderDrawColor(renderer, 0, 0, 200, 255); //RGB-Farbe Start-Portal
|
|
||||||
rect.x = (game.map.portals[i].targetX * config.blockSizePx);
|
rect.x = (game.map.portals[i].targetX * config.blockSizePx);
|
||||||
rect.y = (game.map.portals[i].targetY * config.blockSizePx);
|
rect.y = (game.map.portals[i].targetY * config.blockSizePx);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user