header housekeeping
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
#ifndef YAZE_APP_UTILS_BITMAP_H
|
#ifndef YAZE_APP_GFX_BITMAP_H
|
||||||
#define YAZE_APP_UTILS_BITMAP_H
|
#define YAZE_APP_GFX_BITMAP_H
|
||||||
|
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL.h>
|
||||||
|
|
||||||
@@ -31,10 +31,10 @@ class Bitmap {
|
|||||||
SDL_Texture *GetTexture() const { return texture_; }
|
SDL_Texture *GetTexture() const { return texture_; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int width_;
|
int width_ = 0;
|
||||||
int height_;
|
int height_ = 0;
|
||||||
int depth_;
|
int depth_ = 0;
|
||||||
int data_size_;
|
int data_size_ = 0;
|
||||||
uchar *pixel_data_;
|
uchar *pixel_data_;
|
||||||
SDL_Surface *surface_;
|
SDL_Surface *surface_;
|
||||||
SDL_Texture *texture_;
|
SDL_Texture *texture_;
|
||||||
@@ -45,4 +45,4 @@ class Bitmap {
|
|||||||
} // namespace app
|
} // namespace app
|
||||||
} // namespace yaze
|
} // namespace yaze
|
||||||
|
|
||||||
#endif
|
#endif // YAZE_APP_GFX_BITMAP_H
|
||||||
@@ -32,9 +32,9 @@ class pseudo_vram {
|
|||||||
auto GetGraphicsData() const { return gfx_data_; }
|
auto GetGraphicsData() const { return gfx_data_; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
static const uint32_t REAL_VRAM_SIZE = 0x8000;
|
||||||
uchar* gfx_data_ = new uchar[(128 * 512) / 2];
|
uchar* gfx_data_ = new uchar[(128 * 512) / 2];
|
||||||
std::unordered_map<int, Bitmap> m_vram;
|
std::unordered_map<int, Bitmap> m_vram;
|
||||||
static const uint32_t REAL_VRAM_SIZE = 0x8000;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
std::vector<Bitmap> CreateGraphicsSet(
|
std::vector<Bitmap> CreateGraphicsSet(
|
||||||
@@ -46,4 +46,4 @@ std::vector<Bitmap> CreateSpriteSet(
|
|||||||
} // namespace app
|
} // namespace app
|
||||||
} // namespace yaze
|
} // namespace yaze
|
||||||
|
|
||||||
#endif
|
#endif // YAZE_APP_GFX_PSEUDO_VRAM_H
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#ifndef YAZE_APP_gfx_PALETTE_H
|
#ifndef YAZE_APP_GFX_PALETTE_H
|
||||||
#define YAZE_APP_gfx_PALETTE_H
|
#define YAZE_APP_GFX_PALETTE_H
|
||||||
|
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL.h>
|
||||||
#include <imgui/imgui.h>
|
#include <imgui/imgui.h>
|
||||||
@@ -50,4 +50,4 @@ class SNESPalette {
|
|||||||
} // namespace app
|
} // namespace app
|
||||||
} // namespace yaze
|
} // namespace yaze
|
||||||
|
|
||||||
#endif // YAZE_APP_gfx_PALETTE_H
|
#endif // YAZE_APP_GFX_PALETTE_H
|
||||||
@@ -17,11 +17,6 @@ typedef struct {
|
|||||||
unsigned int palette_id;
|
unsigned int palette_id;
|
||||||
} tile8;
|
} tile8;
|
||||||
|
|
||||||
using ushort = unsigned short;
|
|
||||||
using uchar = unsigned char;
|
|
||||||
using ulong = unsigned long;
|
|
||||||
using uint = unsigned int;
|
|
||||||
|
|
||||||
// vhopppcc cccccccc
|
// vhopppcc cccccccc
|
||||||
// [0, 1]
|
// [0, 1]
|
||||||
// [2, 3]
|
// [2, 3]
|
||||||
|
|||||||
Reference in New Issue
Block a user