mirror of
https://github.com/zeldaret/oot
synced 2026-07-27 23:00:01 -04:00
1ff2f0f849
* remove roompoly * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "fd4d53a26" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "fd4d53a26" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596"
16 lines
385 B
C++
16 lines
385 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;
|
|
}
|