diff --git a/src/Application/Graphics/bitmap.cc b/src/Application/Graphics/bitmap.cc index 1cc85e73..f548f0db 100644 --- a/src/Application/Graphics/bitmap.cc +++ b/src/Application/Graphics/bitmap.cc @@ -175,50 +175,6 @@ void CreateAllGfxData(char *romData, char *allgfx16Ptr) { } } -Bitmap::Bitmap(int width, int height, char *data) - : width_(width), height_(height), pixel_data_(data) {} - -int Bitmap::GetWidth() { return width_; } -int Bitmap::GetHeight() { return height_; } - -// Simple helper function to load an image into a OpenGL texture with common -// settings -bool Bitmap::LoadBitmapFromROM(unsigned char *texture_data, int *out_width, - int *out_height) { - // // Load from file - // int image_width = 0; - // int image_height = 0; - // if (texture_data == NULL) return false; - - // // Create a OpenGL texture identifier - // GLuint image_texture; - // glGenTextures(1, &image_texture); - // glBindTexture(GL_TEXTURE_2D, image_texture); - - // // Setup filtering parameters for display - // glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - // glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - // glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, - // GL_CLAMP_TO_EDGE); // This is required on WebGL for non - // // power-of-two textures - // glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); // - // Same - - // // Upload pixels into texture - // #if defined(GL_UNPACK_ROW_LENGTH) && !defined(__EMSCRIPTEN__) - // glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); - // #endif - // glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, image_width, image_height, 0, - // GL_RGBA, - // GL_UNSIGNED_BYTE, texture_data); - - // *out_texture = image_texture; - // *out_width = image_width; - // *out_height = image_height; - - return true; -} - } // namespace Graphics } // namespace Application } // namespace yaze diff --git a/src/Application/Graphics/bitmap.h b/src/Application/Graphics/bitmap.h index 57d262ae..e5a26ac1 100644 --- a/src/Application/Graphics/bitmap.h +++ b/src/Application/Graphics/bitmap.h @@ -3,8 +3,6 @@ #include -#include - #include "Core/constants.h" namespace yaze { @@ -14,13 +12,11 @@ namespace Graphics { class Bitmap { public: Bitmap() = default; - Bitmap(int width, int height, char *data); + Bitmap(int width, int height, char *data) + : width_(width), height_(height), pixel_data_(data) {} - int GetWidth(); - int GetHeight(); - - bool LoadBitmapFromROM(unsigned char *texture_data, int *out_width, - int *out_height); + int GetWidth() const { return width_; } + int GetHeight() const { return height_; } private: int width_;