Skip to content
Snippets Groups Projects
Commit 19e0df97 authored by belkhiritaha's avatar belkhiritaha
Browse files

merge branche render et player dans main

parent 59c85060
Branches
No related tags found
No related merge requests found
...@@ -179,10 +179,10 @@ void drawFire(){ ...@@ -179,10 +179,10 @@ void drawFire(){
void drawPlayerWaterLevel(){ void drawPlayerWaterLevel(){
int borderWidth = (screenDimension.w - (MAPSIZE * CELLSIZE)) / 2; int borderWidth = (screenDimension.w - (MAPSIZE * CELLSIZE)) / 2;
SDL_Rect rect; SDL_Rect rect;
rect.h = borderWidth/3; rect.h = borderWidth/player.waterMax;
rect.w = borderWidth/3; rect.w = borderWidth/player.waterMax;
int count = player.waterLevel; int count = player.currentWater;
for (int i=0; i<3; i++){ for (int i=0; i<player.waterMax; i++){
rect.x = (i*rect.h); rect.x = (i*rect.h);
rect.y = screenDimension.h/3; rect.y = screenDimension.h/3;
if (count){ if (count){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment