MCPcopy Create free account
hub / github.com/crossuo/crossuo / LoadSprite16

Method LoadSprite16

src/Sprite.cpp:9–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#include "Renderer/RenderAPI.h"
8
9void CSprite::LoadSprite16(int width, int height, uint16_t *pixels, bool skipHitMask)
10{
11 if (Texture == nullptr)
12 Texture = new CGLTexture;
13#ifndef NEW_RENDERER_ENABLED
14 g_GL.BindTexture16(*Texture, width, height, pixels);
15#else
16 Texture->Width = width;
17 Texture->Height = height;
18 Texture->Texture = Render_CreateTexture2D(
19 width,
20 height,
21 TextureGPUFormat::TextureGPUFormat_RGB5_A1,
22 pixels,
23 TextureFormat::TextureFormat_Unsigned_A1_BGR5);
24 assert(Texture->Texture != RENDER_TEXTUREHANDLE_INVALID);
25#endif
26 Init(width, height, pixels, skipHitMask);
27}
28
29void CSprite::LoadSprite32(int width, int height, uint32_t *pixels, bool skipHitMask)
30{

Callers 9

LoadMapMethod · 0.80
LoadFacetMethod · 0.80
GenerateMapMethod · 0.80
UpdateContentMethod · 0.80
LoadSpritePixelsFunction · 0.80
ReadGumpMethod · 0.80
ReadArtMethod · 0.80
ReadTextureMethod · 0.80
ReadLightMethod · 0.80

Calls 3

Render_CreateTexture2DFunction · 0.85
InitFunction · 0.85
BindTexture16Method · 0.80

Tested by

no test coverage detected