fix background rendering
This commit is contained in:
parent
ae1e3e5aa3
commit
f04bdc6e31
11 changed files with 335 additions and 18 deletions
|
@ -1,8 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
// GFX constants
|
||||
#define SCREEN_WIDTH 1000
|
||||
#define SCREEN_HEIGHT 1000
|
||||
//#define SCREEN_WIDTH 1000
|
||||
//#define SCREEN_HEIGHT 1000
|
||||
|
||||
// 32x32 textures
|
||||
#define TEXTURE_WIDTH 32
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#pragma once
|
||||
#include <SDL.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
@ -27,3 +28,5 @@ Map PLoadMapFromFile(std::string filepath);
|
|||
Map PCreateNewMap(std::string filepath);
|
||||
void PSaveMapToFile(Map *map, std::string filepath);
|
||||
void PRenderMap(Map *map, bool debug = false);
|
||||
void PRenderMapBackground(Map *map);
|
||||
SDL_Rect PGetMapRect(Map *map);
|
||||
|
|
|
@ -15,6 +15,9 @@ struct GlobalState {
|
|||
std::vector<PCollisionRect> collisions;
|
||||
PhoenixAssets assets;
|
||||
int scale = 20;
|
||||
|
||||
int screenWidth = 1000;
|
||||
int screenHeight = 1000;
|
||||
};
|
||||
|
||||
extern GlobalState state;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue