diff --git a/Game/data/sprites/blockattack1.sprite b/Game/data/sprites/blockattack1.sprite index 2774d9e..bc19114 100644 --- a/Game/data/sprites/blockattack1.sprite +++ b/Game/data/sprites/blockattack1.sprite @@ -36,6 +36,15 @@ "number_of_frames" : 1, "frame_time" : 1 }, +"background_ground" : { + "texture" : "background_ground", + "topx" : 0, + "topy" : 0, + "height" : 511, + "width" : 1920, + "number_of_frames" : 1, + "frame_time" : 1 +}, "ball_blue" : { "texture" : "ball_blue", "topx" : 0, diff --git a/Game/data/textures/background_ground.png b/Game/data/textures/background_ground.png new file mode 100644 index 0000000..5e0dc35 Binary files /dev/null and b/Game/data/textures/background_ground.png differ diff --git a/source/assets/gfx/backgrounds/background_ground.svg b/source/assets/gfx/backgrounds/background_ground.svg new file mode 100644 index 0000000..cd4a141 --- /dev/null +++ b/source/assets/gfx/backgrounds/background_ground.svg @@ -0,0 +1,109 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + diff --git a/source/code/main.cpp b/source/code/main.cpp index 882422f..0ab36c8 100644 --- a/source/code/main.cpp +++ b/source/code/main.cpp @@ -271,7 +271,8 @@ void DrawBackground(SDL_Renderer* target) { } SDL_SetRenderDrawColor(target, 135, 206, 250, 255); SDL_RenderClear(target); - globalData.spriteHolder->GetSprite("background_sun").Draw(globalData.screen, SDL_GetTicks(), globalData.xsize-500, -400); + globalData.spriteHolder->GetSprite("background_sun").DrawScaled(globalData.screen, SDL_GetTicks(), globalData.xsize-320, -200, 600, 600); + globalData.spriteHolder->GetSprite("background_ground").DrawScaled(globalData.screen, SDL_GetTicks(), 0, globalData.ysize-200, globalData.xsize, 200); //backgroundImage.DrawScaled(target, SDL_GetTicks(), 0, 0, globalData.xsize, globalData.ysize); }