diff --git a/source/code/BlockGameSdl.inc b/source/code/BlockGameSdl.inc index be07f29..4865972 100644 --- a/source/code/BlockGameSdl.inc +++ b/source/code/BlockGameSdl.inc @@ -30,6 +30,7 @@ public: topx = tx; topy = ty; } + void DrawImgBoard(const sago::SagoSprite& img, int x, int y) const { DrawIMG(img, screen, x+topx, y+topy); @@ -46,6 +47,11 @@ public: void PrintIntRightAlignedBoard(int x, int y, int number) { nf_button_font.draw(screen, x+topx+60, y+topy+10, NFont::RIGHT, "%d", number); } + + void SetTopXY(int tx, int ty) { + topx = tx; + topy = ty; + } int GetTopX() const { return topx; diff --git a/source/code/main.cpp b/source/code/main.cpp index ea10c6f..4899bdb 100644 --- a/source/code/main.cpp +++ b/source/code/main.cpp @@ -1165,6 +1165,11 @@ static void ClampResolution(SDL_Window* win) { } #endif +static void MoveBlockGameSdls( BlockGameSdl& game1, BlockGameSdl& game2 ) { + game1.SetTopXY(50, 100); + game2.SetTopXY(xsize-500,100); +} + struct globalConfig { string savepath; vector search_paths; @@ -1480,6 +1485,7 @@ int main(int argc, char* argv[]) { theGame.NewGame(s); } DrawBackground(screen); + MoveBlockGameSdls(theGame, theGame2); DrawEverything(xsize,ysize,&theGame,&theGame2); SDL_RenderPresent(screen); if (singlePuzzle) { @@ -1652,6 +1658,7 @@ int runGame(Gametype gametype, int level) { }; mustsetupgame = false; DrawBackground(screen); + MoveBlockGameSdls(theGame, theGame2); DrawEverything(xsize,ysize,&theGame,&theGame2); SDL_RenderPresent(screen); } @@ -2093,6 +2100,7 @@ int runGame(Gametype gametype, int level) { } //Once evrything has been checked, update graphics + MoveBlockGameSdls(theGame, theGame2); DrawEverything(xsize,ysize,&theGame,&theGame2); SDL_GetMouseState(&mousex,&mousey); //Draw the mouse: