c++/SDL2 : b2


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 MB
Oct 27, 2020

Get Cimg

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.