Oolite 1.91.0.7604-240417-a536cbe
Loading...
Searching...
No Matches
Classes | Macros | Functions
OOPNGTextureLoader.m File Reference
import "OOPNGTextureLoader.h"
import "OOFunctionAttributes.h"
import "OOLogging.h"
import "OOCPUInfo.h"
import "NSDataOOExtensions.h"
+ Include dependency graph for OOPNGTextureLoader.m:

Go to the source code of this file.

Classes

category  OOPNGTextureLoader(OOPrivate)
 

Macros

#define MSG_TERMINATOR   ""
 

Functions

static void PNGError (png_structp png, png_const_charp message)
 
static void PNGWarning (png_structp png, png_const_charp message)
 
static void PNGRead (png_structp png, png_bytep bytes, png_size_t size)
 

Macro Definition Documentation

◆ MSG_TERMINATOR

#define MSG_TERMINATOR   ""

Definition at line 216 of file OOPNGTextureLoader.m.

Referenced by PNGError(), and PNGWarning().

Function Documentation

◆ PNGError()

static void PNGError ( png_structp png,
png_const_charp message )
static

Definition at line 220 of file OOPNGTextureLoader.m.

221{
222 OOPNGTextureLoader *loader = png_get_io_ptr(png);
223 OOLog(@"texture.load.png.error", @"***** A PNG loading error occurred for %@: %s" MSG_TERMINATOR, [loader path], message);
224
225#if PNG_LIBPNG_VER >= 10500
226 png_longjmp(png, 1);
227#else
228 longjmp(png_jmpbuf(png), 1);
229#endif
230}
#define OOLog(class, format,...)
Definition OOLogging.h:88
#define MSG_TERMINATOR

References MSG_TERMINATOR, and OOLog.

◆ PNGRead()

static void PNGRead ( png_structp png,
png_bytep bytes,
png_size_t size )
static

Definition at line 240 of file OOPNGTextureLoader.m.

241{
242 OOPNGTextureLoader *loader = png_get_io_ptr(png);
243 [loader readBytes:bytes count:size];
244}
void readBytes:count:(png_bytep bytes,[count] png_size_t count)

◆ PNGWarning()

static void PNGWarning ( png_structp png,
png_const_charp message )
static

Definition at line 233 of file OOPNGTextureLoader.m.

234{
235 OOPNGTextureLoader *loader = png_get_io_ptr(png);
236 OOLog(@"texture.load.png.warning", @"----- A PNG loading warning occurred for %@: %s" MSG_TERMINATOR, [loader path], message);
237}

References MSG_TERMINATOR, and OOLog.