Files
oot/tools/ZAPD/ZAPD/HighLevel/HLTexture.cpp
T
fig02 ba0c6965ca Remove submodule and use subrepo for ZAPD (#591)
* remove zap

* git subrepo clone https://github.com/zeldaret/ZAPD.git tools/ZAPD

subrepo:
  subdir:   "tools/ZAPD"
  merged:   "cd4a8760b"
upstream:
  origin:   "https://github.com/zeldaret/ZAPD.git"
  branch:   "master"
  commit:   "cd4a8760b"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

* remove thanks.md

* zap2 -> zapd and spec changes

* remove submodule init
2021-01-01 23:24:29 -05:00

16 lines
388 B
C++

#include "HLTexture.h"
#include "../StringHelper.h"
#include "../stb_image.h"
using namespace std;
HLTexture* HLTexture::FromPNG(std::string pngFilePath, HLTextureType texType)
{
int comp;
HLTexture* tex = new HLTexture();
tex->type = texType;
tex->bmpRgba = (uint8_t*)stbi_load((pngFilePath).c_str(), (int*)&tex->width, (int*)&tex->height, &comp, STBI_rgb_alpha);
return tex;
}