Working on tile16 blockset

This commit is contained in:
Justin Scofield
2022-06-20 20:44:52 -04:00
parent 367fe3552f
commit 6dd18c3418
12 changed files with 254 additions and 239 deletions

View File

@@ -1,16 +1,15 @@
#include "bitmap.h"
#include <SDL2/SDL.h>
#include <rommapping.h>
#include "app/core/constants.h"
#include "app/rom.h"
#include "app/gfx/snes_palette.h"
namespace yaze {
namespace app {
namespace gfx {
Bitmap::Bitmap(int width, int height, int depth, char *data)
Bitmap::Bitmap(int width, int height, int depth, uchar *data)
: width_(width), height_(height), depth_(depth), pixel_data_(data) {
surface_ = SDL_CreateRGBSurfaceWithFormat(0, width, height, depth,
SDL_PIXELFORMAT_INDEX8);
@@ -27,7 +26,7 @@ void Bitmap::Create(int width, int height, int depth, uchar *data) {
width_ = width;
height_ = height;
depth_ = depth;
pixel_data_ = (char *)data;
pixel_data_ = data;
surface_ = SDL_CreateRGBSurfaceWithFormat(0, width, height, depth,
SDL_PIXELFORMAT_INDEX8);
// Default grayscale palette