itch.io is community of indie game creators and players

Devlogs

c++/SDL2 : b2

Cimg
A downloadable tool for Windows and Linux

add :

  • library img_compiler.h,img_compiler.cpp
  • some graphical change for executable in console

library :

IMGCOMP* loadIMGCOMP(std::vector<std::vector<SDL_Color>> tab,SDL_Renderer* renderer)
void drawIMGCOMP(IMGCOMP* img ,SDL_Renderer* renderer)
void drawIMGCOMP(IMGCOMP* img,int x,int y,SDL_Renderer* renderer)
void drawIMGCOMP(IMGCOMP* img ,int px,int py,int pw,int ph,SDL_Renderer* renderer)
struct IMGCOMP { SDL_Texture* texture; SDL_Rect rect; };

//rect.x , rect.y , rect.w , rect.h --> x , y , width and height of texture

IMGCOMP is type , you can load with loadIMGCOMP() with pixel data and renderer.

use drawIMGCOMP() for draw image on screen.

Files

  • img_compiler_c++/SDL_b2.zip 1.5 MB
    Oct 27, 2020
Download Cimg
Leave a comment