#include <openb3d.mod/ddsloader.mod/.bmx/ddsloader.bmx.debug.win32.x86.h>
struct BBString_2{BBClass_String* clas;BBULONG hash;int length;BBChar buf[2];};
struct BBString_15{BBClass_String* clas;BBULONG hash;int length;BBChar buf[15];};
struct BBString_38{BBClass_String* clas;BBULONG hash;int length;BBChar buf[38];};
struct BBString_25{BBClass_String* clas;BBULONG hash;int length;BBChar buf[25];};
struct BBString_9{BBClass_String* clas;BBULONG hash;int length;BBChar buf[9];};
struct BBString_13{BBClass_String* clas;BBULONG hash;int length;BBChar buf[13];};
struct BBString_17{BBClass_String* clas;BBULONG hash;int length;BBChar buf[17];};
struct BBString_8{BBClass_String* clas;BBULONG hash;int length;BBChar buf[8];};
struct BBString_12{BBClass_String* clas;BBULONG hash;int length;BBChar buf[12];};
struct BBString_6{BBClass_String* clas;BBULONG hash;int length;BBChar buf[6];};
struct BBString_10{BBClass_String* clas;BBULONG hash;int length;BBChar buf[10];};
struct BBString_14{BBClass_String* clas;BBULONG hash;int length;BBChar buf[14];};
struct BBString_18{BBClass_String* clas;BBULONG hash;int length;BBChar buf[18];};
struct BBString_7{BBClass_String* clas;BBULONG hash;int length;BBChar buf[7];};
struct BBString_11{BBClass_String* clas;BBULONG hash;int length;BBChar buf[11];};
static struct BBString_2 _s2={
	&bbStringClass,
	0xd080db24ebb0e205,
	2,
	{32,32}
};
static struct BBString_15 _s3={
	&bbStringClass,
	0xae280b9b50c2ae3a,
	15,
	{32,68,68,83,32,105,110,115,116,97,110,99,101,58,32}
};
static struct BBString_38 _s1={
	&bbStringClass,
	0x545127d9e0c1e898,
	38,
	{32,77,97,120,50,100,32,110,111,116,32,99,111,109,112,114,101
	,115,115,101,100,32,116,101,120,116,117,114,101,115,32,118,101
	,114,115,105,111,110}
};
static struct BBString_25 _s0={
	&bbStringClass,
	0xf4490c625a8e770d,
	25,
	{32,78,111,32,112,105,120,109,97,112,32,105,109,97,103,101,32
	,108,111,97,100,101,100,58,32}
};
static struct BBString_9 _s4={
	&bbStringClass,
	0x1d057fd34d86b0a9,
	9,
	{32,98,117,102,102,101,114,58,32}
};
static struct BBString_13 _s5={
	&bbStringClass,
	0xa94f21246012c9c3,
	13,
	{32,98,117,102,102,101,114,58,32,78,117,108,108}
};
static struct BBString_13 _s22={
	&bbStringClass,
	0xf0a56f4af279e018,
	13,
	{32,99,111,109,112,111,110,101,110,116,115,58,32}
};
static struct BBString_17 _s23={
	&bbStringClass,
	0x9b23fd3bce630308,
	17,
	{32,99,111,109,112,111,110,101,110,116,115,58,32,78,117,108,108
}
};
static struct BBString_8 _s12={
	&bbStringClass,
	0x47ee8d984e9968c,
	8,
	{32,100,101,112,116,104,58,32}
};
static struct BBString_12 _s13={
	&bbStringClass,
	0x437372f5aff13d86,
	12,
	{32,100,101,112,116,104,58,32,78,117,108,108}
};
static struct BBString_6 _s6={
	&bbStringClass,
	0x558a9a9299e22ae1,
	6,
	{32,100,120,116,58,32}
};
static struct BBString_10 _s7={
	&bbStringClass,
	0x6961dde11a423cd6,
	10,
	{32,100,120,116,58,32,78,117,108,108}
};
static struct BBString_9 _s20={
	&bbStringClass,
	0xcb2fb643e3598fd3,
	9,
	{32,102,111,114,109,97,116,58,32}
};
static struct BBString_13 _s21={
	&bbStringClass,
	0x5f2c27721097402c,
	13,
	{32,102,111,114,109,97,116,58,32,78,117,108,108}
};
static struct BBString_9 _s10={
	&bbStringClass,
	0x9a2a1bd266a67e9e,
	9,
	{32,104,101,105,103,104,116,58,32}
};
static struct BBString_13 _s11={
	&bbStringClass,
	0xd438dfaa662b8939,
	13,
	{32,104,101,105,103,104,116,58,32,78,117,108,108}
};
static struct BBString_14 _s14={
	&bbStringClass,
	0xe9e20e05c0e44abc,
	14,
	{32,109,105,112,109,97,112,99,111,117,110,116,58,32}
};
static struct BBString_18 _s15={
	&bbStringClass,
	0x86ac4e6b17ab6e82,
	18,
	{32,109,105,112,109,97,112,99,111,117,110,116,58,32,78,117,108
	,108}
};
static struct BBString_8 _s16={
	&bbStringClass,
	0xe7a6809462b943a6,
	8,
	{32,112,105,116,99,104,58,32}
};
static struct BBString_12 _s17={
	&bbStringClass,
	0xdb0121302a991c68,
	12,
	{32,112,105,116,99,104,58,32,78,117,108,108}
};
static struct BBString_7 _s18={
	&bbStringClass,
	0x9a89c1ded579ac26,
	7,
	{32,115,105,122,101,58,32}
};
static struct BBString_11 _s19={
	&bbStringClass,
	0x1b5a053d0aacf8b,
	11,
	{32,115,105,122,101,58,32,78,117,108,108}
};
static struct BBString_9 _s24={
	&bbStringClass,
	0x825655db7a2d2c94,
	9,
	{32,116,97,114,103,101,116,58,32}
};
static struct BBString_13 _s25={
	&bbStringClass,
	0x6c749337fe23334e,
	13,
	{32,116,97,114,103,101,116,58,32,78,117,108,108}
};
static struct BBString_8 _s8={
	&bbStringClass,
	0x5bcf81ddbebe12a0,
	8,
	{32,119,105,100,116,104,58,32}
};
static struct BBString_12 _s9={
	&bbStringClass,
	0x58a79411f9ae208f,
	12,
	{32,119,105,100,116,104,58,32,78,117,108,108}
};
struct BBDebugScope_1{int kind; const char *name; BBDebugDecl decls[2]; };
struct BBDebugScope_10{int kind; const char *name; BBDebugDecl decls[11]; };
struct BBDebugScope_12{int kind; const char *name; BBDebugDecl decls[13]; };
struct BBDebugScope_14{int kind; const char *name; BBDebugDecl decls[15]; };
struct BBDebugScope_16{int kind; const char *name; BBDebugDecl decls[17]; };
struct BBDebugScope_2{int kind; const char *name; BBDebugDecl decls[3]; };
struct BBDebugScope_3{int kind; const char *name; BBDebugDecl decls[4]; };
struct BBDebugScope_34{int kind; const char *name; BBDebugDecl decls[35]; };
struct BBDebugScope_4{int kind; const char *name; BBDebugDecl decls[5]; };
struct BBDebugScope_5{int kind; const char *name; BBDebugDecl decls[6]; };
void _openb3d_ddsloader_TPixmapLoaderDDS_New(struct openb3d_ddsloader_TPixmapLoaderDDS_obj* o) {
	_brl_pixmap_TPixmapLoader_New((struct brl_pixmap_TPixmapLoader_obj*)o);
	o->clas = &openb3d_ddsloader_TPixmapLoaderDDS;
}
struct brl_pixmap_TPixmap_obj* _openb3d_ddsloader_TPixmapLoaderDDS_LoadPixmap_TTStream(struct openb3d_ddsloader_TPixmapLoaderDDS_obj* o,struct brl_stream_TStream_obj* bbt_stream){
	((struct openb3d_ddsloader_TPixmapLoaderDDS_obj*)bbNullObjectTest((BBObject*)o));
	BBSIZET bbt_bufLen=0;
	BBBYTE* bbt_buffer=0;
	struct brl_ramstream_TRamStream_obj* bbt_ram=(struct brl_ramstream_TRamStream_obj*)((struct brl_ramstream_TRamStream_obj*)&bbNullObject);
	struct brl_pixmap_TPixmap_obj* bbt_pixmap=(struct brl_pixmap_TPixmap_obj*)((struct brl_pixmap_TPixmap_obj*)&bbNullObject);
	BBBYTE* bbt_imgPtr=0;
	BBINT bbt_width=0;
	BBINT bbt_height=0;
	BBINT bbt_channels=0;
	BBSTRING bbt_file=(&bbEmptyString);
	BBBYTE* bbt_cString=0;
	struct BBDebugScope_12 __scope = {
		BBDEBUGSCOPE_FUNCTION,
		"LoadPixmap",
		{
			{
				BBDEBUGDECL_LOCAL,
				"Self",
				":TPixmapLoaderDDS",
				.var_address=&o
			},
			{
				BBDEBUGDECL_LOCAL,
				"stream",
				":TStream",
				.var_address=&bbt_stream
			},
			{
				BBDEBUGDECL_LOCAL,
				"bufLen",
				"t",
				.var_address=&bbt_bufLen
			},
			{
				BBDEBUGDECL_LOCAL,
				"buffer",
				"*b",
				.var_address=&bbt_buffer
			},
			{
				BBDEBUGDECL_LOCAL,
				"ram",
				":TRamStream",
				.var_address=&bbt_ram
			},
			{
				BBDEBUGDECL_LOCAL,
				"pixmap",
				":TPixmap",
				.var_address=&bbt_pixmap
			},
			{
				BBDEBUGDECL_LOCAL,
				"imgPtr",
				"*b",
				.var_address=&bbt_imgPtr
			},
			{
				BBDEBUGDECL_LOCAL,
				"width",
				"i",
				.var_address=&bbt_width
			},
			{
				BBDEBUGDECL_LOCAL,
				"height",
				"i",
				.var_address=&bbt_height
			},
			{
				BBDEBUGDECL_LOCAL,
				"channels",
				"i",
				.var_address=&bbt_channels
			},
			{
				BBDEBUGDECL_LOCAL,
				"file",
				"$",
				.var_address=&bbt_file
			},
			{
				BBDEBUGDECL_LOCAL,
				"cString",
				"*b",
				.var_address=&bbt_cString
			},
			{
				BBDEBUGDECL_END
			}
		}
	};
	bbOnDebugEnterScope((BBDebugScope *)&__scope);
	struct BBDebugStm __stmt_0 = {0xad75d41c69058a6, 81, 0};
	bbOnDebugEnterStm(&__stmt_0);
	bbt_bufLen=((BBSIZET)brl_stream_StreamSize((struct brl_stream_TStream_obj*)bbt_stream));
	struct BBDebugStm __stmt_1 = {0xad75d41c69058a6, 85, 0};
	bbOnDebugEnterStm(&__stmt_1);
	bbt_buffer=bbMemAlloc((size_t)bbt_bufLen);
	struct BBDebugStm __stmt_2 = {0xad75d41c69058a6, 86, 0};
	bbOnDebugEnterStm(&__stmt_2);
	bbt_ram=(struct brl_ramstream_TRamStream_obj*)brl_ramstream_CreateRamStream(bbt_buffer,((BBLONG)bbt_bufLen),1,1);
	struct BBDebugStm __stmt_3 = {0xad75d41c69058a6, 87, 0};
	bbOnDebugEnterStm(&__stmt_3);
	brl_stream_CopyStream((struct brl_stream_TStream_obj*)bbt_stream,(struct brl_stream_TStream_obj*)((struct brl_stream_TStream_obj*)bbObjectDowncast((BBOBJECT)bbt_ram,(BBClass*)&brl_stream_TStream)),4096);
	struct BBDebugStm __stmt_4 = {0xad75d41c69058a6, 89, 0};
	bbOnDebugEnterStm(&__stmt_4);
	bbt_pixmap=(struct brl_pixmap_TPixmap_obj*)((struct brl_pixmap_TPixmap_obj*)&bbNullObject);
	struct BBDebugStm __stmt_5 = {0xad75d41c69058a6, 89, 0};
	bbOnDebugEnterStm(&__stmt_5);
	bbt_imgPtr=0;
	struct BBDebugStm __stmt_6 = {0xad75d41c69058a6, 89, 0};
	bbOnDebugEnterStm(&__stmt_6);
	bbt_width=0;
	struct BBDebugStm __stmt_7 = {0xad75d41c69058a6, 89, 0};
	bbOnDebugEnterStm(&__stmt_7);
	bbt_height=0;
	struct BBDebugStm __stmt_8 = {0xad75d41c69058a6, 89, 0};
	bbOnDebugEnterStm(&__stmt_8);
	bbt_channels=0;
	struct BBDebugStm __stmt_9 = {0xad75d41c69058a6, 91, 0};
	bbOnDebugEnterStm(&__stmt_9);
	bbt_file=((BBString*)&bbEmptyString);
	struct BBDebugStm __stmt_10 = {0xad75d41c69058a6, 92, 0};
	bbOnDebugEnterStm(&__stmt_10);
	bbt_cString=bbStringToCString((BBSTRING)bbt_file);
	struct BBDebugStm __stmt_11 = {0xad75d41c69058a6, 93, 0};
	bbOnDebugEnterStm(&__stmt_11);
	bbt_imgPtr=DDSLoadSurface_(bbt_cString,0,bbt_buffer,bbt_bufLen);
	struct BBDebugStm __stmt_12 = {0xad75d41c69058a6, 94, 0};
	bbOnDebugEnterStm(&__stmt_12);
	bbMemFree((void*)bbt_cString);
	struct BBDebugStm __stmt_13 = {0xad75d41c69058a6, 96, 0};
	bbOnDebugEnterStm(&__stmt_13);
	if(bbt_imgPtr){
		struct openb3d_ddsloader_TDDS_obj* bbt_dds=(struct openb3d_ddsloader_TDDS_obj*)((struct openb3d_ddsloader_TDDS_obj*)&bbNullObject);
		BBINT bbt_pf=0;
		struct BBDebugScope_2 __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_LOCAL,
					"dds",
					":TDDS",
					.var_address=&bbt_dds
				},
				{
					BBDEBUGDECL_LOCAL,
					"pf",
					"i",
					.var_address=&bbt_pf
				},
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xad75d41c69058a6, 97, 0};
		bbOnDebugEnterStm(&__stmt_0);
		bbt_dds=(struct openb3d_ddsloader_TDDS_obj*)openb3d_ddsloader_TDDS_CreateObject_TTDDS_pb(bbt_imgPtr);
		struct BBDebugStm __stmt_1 = {0xad75d41c69058a6, 98, 0};
		bbOnDebugEnterStm(&__stmt_1);
		brl_linkedlist_ListAddLast((struct brl_linkedlist_TList_obj*)openb3d_ddsloader_TDDS_dds_list,(BBOBJECT)bbt_dds);
		struct BBDebugStm __stmt_2 = {0xad75d41c69058a6, 99, 0};
		bbOnDebugEnterStm(&__stmt_2);
		bbt_channels=((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_components [0];
		struct BBDebugStm __stmt_3 = {0xad75d41c69058a6, 100, 0};
		bbOnDebugEnterStm(&__stmt_3);
		bbt_width=((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_width [0];
		struct BBDebugStm __stmt_4 = {0xad75d41c69058a6, 101, 0};
		bbOnDebugEnterStm(&__stmt_4);
		bbt_height=((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_height [0];
		struct BBDebugStm __stmt_5 = {0xad75d41c69058a6, 103, 0};
		bbOnDebugEnterStm(&__stmt_5);
		bbt_pf=0;
		struct BBDebugStm __stmt_6 = {0xad75d41c69058a6, 104, 0};
		bbOnDebugEnterStm(&__stmt_6);
		BBINT bbt_=bbt_channels;
		struct BBDebugStm __stmt_7 = {0xad75d41c69058a6, 105, 0};
		bbOnDebugEnterStm(&__stmt_7);
		if(bbt_==3){
			struct BBDebugScope __scope = {
				BBDEBUGSCOPE_LOCALBLOCK,
				0,
				{
					{
						BBDEBUGDECL_END
					}
				}
			};
			bbOnDebugEnterScope((BBDebugScope *)&__scope);
			struct BBDebugStm __stmt_0 = {0xad75d41c69058a6, 106, 0};
			bbOnDebugEnterStm(&__stmt_0);
			bbt_pf=4;
			bbOnDebugLeaveScope();
		}else{
			struct BBDebugScope __scope = {
				BBDEBUGSCOPE_LOCALBLOCK,
				0,
				{
					{
						BBDEBUGDECL_END
					}
				}
			};
			bbOnDebugEnterScope((BBDebugScope *)&__scope);
			struct BBDebugStm __stmt_0 = {0xad75d41c69058a6, 107, 0};
			bbOnDebugEnterStm(&__stmt_0);
			if(bbt_==4){
				struct BBDebugScope __scope = {
					BBDEBUGSCOPE_LOCALBLOCK,
					0,
					{
						{
							BBDEBUGDECL_END
						}
					}
				};
				bbOnDebugEnterScope((BBDebugScope *)&__scope);
				struct BBDebugStm __stmt_0 = {0xad75d41c69058a6, 108, 0};
				bbOnDebugEnterStm(&__stmt_0);
				bbt_pf=6;
				bbOnDebugLeaveScope();
			}
			bbOnDebugLeaveScope();
		}
		struct BBDebugStm __stmt_8 = {0xad75d41c69058a6, 111, 0};
		bbOnDebugEnterStm(&__stmt_8);
		if(bbt_pf!=0){
			struct BBDebugScope __scope = {
				BBDEBUGSCOPE_LOCALBLOCK,
				0,
				{
					{
						BBDEBUGDECL_END
					}
				}
			};
			bbOnDebugEnterScope((BBDebugScope *)&__scope);
			struct BBDebugStm __stmt_0 = {0xad75d41c69058a6, 112, 0};
			bbOnDebugEnterStm(&__stmt_0);
			bbt_pixmap=(struct brl_pixmap_TPixmap_obj*)brl_pixmap_CreatePixmap(bbt_width,bbt_height,bbt_pf,((BBINT*)BBARRAYDATAINDEX((brl_pixmap_pixel_BytesPerPixel),(brl_pixmap_pixel_BytesPerPixel)->dims,((BBUINT)bbt_pf)))[((BBUINT)bbt_pf)]);
			struct BBDebugStm __stmt_1 = {0xad75d41c69058a6, 113, 0};
			bbOnDebugEnterStm(&__stmt_1);
			DDSCopyRect_(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_dxt ,((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_width [0],((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_height [0],0,0,((struct brl_pixmap_TPixmap_obj*)bbNullObjectTest((BBObject*)bbt_pixmap))->_brl_pixmap_tpixmap_pixels ,((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_width [0],((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_height [0],((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_components [0],0,((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_format [0]);
			struct BBDebugStm __stmt_2 = {0xad75d41c69058a6, 114, 0};
			bbOnDebugEnterStm(&__stmt_2);
			((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_pixmap =(struct brl_pixmap_TPixmap_obj*)bbt_pixmap;
			bbOnDebugLeaveScope();
		}
		struct BBDebugStm __stmt_9 = {0xad75d41c69058a6, 117, 0};
		bbOnDebugEnterStm(&__stmt_9);
		brl_stream_CloseStream((struct brl_stream_TStream_obj*)((struct brl_stream_TStream_obj*)bbObjectDowncast((BBOBJECT)bbt_ram,(BBClass*)&brl_stream_TStream)));
		struct BBDebugStm __stmt_10 = {0xad75d41c69058a6, 118, 0};
		bbOnDebugEnterStm(&__stmt_10);
		((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_bmx_buffer =bbt_buffer;
		bbOnDebugLeaveScope();
	}
	struct BBDebugStm __stmt_14 = {0xad75d41c69058a6, 122, 0};
	bbOnDebugEnterStm(&__stmt_14);
	bbOnDebugLeaveScope();
	return (struct brl_pixmap_TPixmap_obj*)bbt_pixmap;
}
struct BBDebugScope_2 openb3d_ddsloader_TPixmapLoaderDDS_scope ={
	BBDEBUGSCOPE_USERTYPE,
	"TPixmapLoaderDDS",
	{
		{
			BBDEBUGDECL_TYPEMETHOD,
			"New",
			"()",
			.func_ptr=(BBFuncPtr)&_openb3d_ddsloader_TPixmapLoaderDDS_New
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"LoadPixmap",
			"(:TStream):TPixmap",
			.func_ptr=(BBFuncPtr)&_openb3d_ddsloader_TPixmapLoaderDDS_LoadPixmap_TTStream
		},
		{
			BBDEBUGDECL_END
		}
	}
};
struct BBClass_openb3d_ddsloader_TPixmapLoaderDDS openb3d_ddsloader_TPixmapLoaderDDS={
	&brl_pixmap_TPixmapLoader,
	bbObjectFree,
	(BBDebugScope*)&openb3d_ddsloader_TPixmapLoaderDDS_scope,
	sizeof(struct openb3d_ddsloader_TPixmapLoaderDDS_obj),
	(void (*)(BBOBJECT))_openb3d_ddsloader_TPixmapLoaderDDS_New,
	bbObjectDtor,
	bbObjectToString,
	bbObjectCompare,
	bbObjectSendMessage,
	0,
	0,
	0
	,0
	,sizeof(void*)
	,_openb3d_ddsloader_TPixmapLoaderDDS_LoadPixmap_TTStream
};

void _openb3d_ddsloader_TDDS_New(struct openb3d_ddsloader_TDDS_obj* o) {
	bbObjectCtor((BBOBJECT)o);
	o->clas = &openb3d_ddsloader_TDDS;
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_buffer = 0;
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_mipmaps = bbArrayNew1D(":TDDS", 1);
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_width = 0;
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_height = 0;
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_depth = 0;
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_mipmapcount = 0;
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_pitch = 0;
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_size = 0;
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_dxt = 0;
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_format = 0;
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_components = 0;
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_target = 0;
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_pixmap = (struct brl_pixmap_TPixmap_obj*)((struct brl_pixmap_TPixmap_obj*)&bbNullObject);
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_bmx_buffer = 0;
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_instance = 0;
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_exists = 0;
}
struct openb3d_ddsloader_TDDS_obj* openb3d_ddsloader_TDDS_CreateObject_TTDDS_pb(BBBYTE* bbt_inst){
	struct openb3d_ddsloader_TDDS_obj* bbt_obj=(struct openb3d_ddsloader_TDDS_obj*)((struct openb3d_ddsloader_TDDS_obj*)&bbNullObject);
	struct BBDebugScope_2 __scope = {
		BBDEBUGSCOPE_FUNCTION,
		"CreateObject",
		{
			{
				BBDEBUGDECL_LOCAL,
				"inst",
				"*b",
				.var_address=&bbt_inst
			},
			{
				BBDEBUGDECL_LOCAL,
				"obj",
				":TDDS",
				.var_address=&bbt_obj
			},
			{
				BBDEBUGDECL_END
			}
		}
	};
	bbOnDebugEnterScope((BBDebugScope *)&__scope);
	struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 142, 0};
	bbOnDebugEnterStm(&__stmt_0);
	if(bbt_inst==0){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 142, 0};
		bbOnDebugEnterStm(&__stmt_0);
		bbOnDebugLeaveScope();
		bbOnDebugLeaveScope();
		return (struct openb3d_ddsloader_TDDS_obj*)&bbNullObject;
	}
	struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 143, 0};
	bbOnDebugEnterStm(&__stmt_1);
	bbt_obj=(struct openb3d_ddsloader_TDDS_obj*)(struct openb3d_ddsloader_TDDS_obj*)bbObjectNew((BBClass *)&openb3d_ddsloader_TDDS);
	struct BBDebugStm __stmt_2 = {0xcf91fea8dbe5382b, 145, 0};
	bbOnDebugEnterStm(&__stmt_2);
	((struct brl_map_ptrmap_TPtrMap_obj*)bbNullObjectTest((BBObject*)openb3d_ddsloader_TDDS_dds_map))->clas->m_Insert_pbTObject((struct brl_map_ptrmap_TPtrMap_obj*)openb3d_ddsloader_TDDS_dds_map,bbt_inst,(BBOBJECT)bbt_obj);
	struct BBDebugStm __stmt_3 = {0xcf91fea8dbe5382b, 149, 0};
	bbOnDebugEnterStm(&__stmt_3);
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_obj))->_openb3d_ddsloader_tdds_instance =bbt_inst;
	struct BBDebugStm __stmt_4 = {0xcf91fea8dbe5382b, 150, 0};
	bbOnDebugEnterStm(&__stmt_4);
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_obj))->clas->m_InitFields((struct openb3d_ddsloader_TDDS_obj*)bbt_obj);
	struct BBDebugStm __stmt_5 = {0xcf91fea8dbe5382b, 151, 0};
	bbOnDebugEnterStm(&__stmt_5);
	bbOnDebugLeaveScope();
	return (struct openb3d_ddsloader_TDDS_obj*)bbt_obj;
}
void openb3d_ddsloader_TDDS_FreeObject_v_pb(BBBYTE* bbt_inst){
	struct BBDebugScope_1 __scope = {
		BBDEBUGSCOPE_FUNCTION,
		"FreeObject",
		{
			{
				BBDEBUGDECL_LOCAL,
				"inst",
				"*b",
				.var_address=&bbt_inst
			},
			{
				BBDEBUGDECL_END
			}
		}
	};
	bbOnDebugEnterScope((BBDebugScope *)&__scope);
	struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 158, 0};
	bbOnDebugEnterStm(&__stmt_0);
	((struct brl_map_ptrmap_TPtrMap_obj*)bbNullObjectTest((BBObject*)openb3d_ddsloader_TDDS_dds_map))->clas->m_Remove_pb((struct brl_map_ptrmap_TPtrMap_obj*)openb3d_ddsloader_TDDS_dds_map,bbt_inst);
	bbOnDebugLeaveScope();
}
struct openb3d_ddsloader_TDDS_obj* openb3d_ddsloader_TDDS_GetObject_TTDDS_pb(BBBYTE* bbt_inst){
	struct BBDebugScope_1 __scope = {
		BBDEBUGSCOPE_FUNCTION,
		"GetObject",
		{
			{
				BBDEBUGDECL_LOCAL,
				"inst",
				"*b",
				.var_address=&bbt_inst
			},
			{
				BBDEBUGDECL_END
			}
		}
	};
	bbOnDebugEnterScope((BBDebugScope *)&__scope);
	struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 168, 0};
	bbOnDebugEnterStm(&__stmt_0);
	bbOnDebugLeaveScope();
	return (struct openb3d_ddsloader_TDDS_obj*)((struct openb3d_ddsloader_TDDS_obj*)bbObjectDowncast((BBOBJECT)((struct brl_map_ptrmap_TPtrMap_obj*)bbNullObjectTest((BBObject*)openb3d_ddsloader_TDDS_dds_map))->clas->m_ValueForKey_pb((struct brl_map_ptrmap_TPtrMap_obj*)openb3d_ddsloader_TDDS_dds_map,bbt_inst),(BBClass*)&openb3d_ddsloader_TDDS));
}
BBBYTE* openb3d_ddsloader_TDDS_GetInstance_pb_TTDDS(struct openb3d_ddsloader_TDDS_obj* bbt_obj){
	struct BBDebugScope_1 __scope = {
		BBDEBUGSCOPE_FUNCTION,
		"GetInstance",
		{
			{
				BBDEBUGDECL_LOCAL,
				"obj",
				":TDDS",
				.var_address=&bbt_obj
			},
			{
				BBDEBUGDECL_END
			}
		}
	};
	bbOnDebugEnterScope((BBDebugScope *)&__scope);
	struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 177, 0};
	bbOnDebugEnterStm(&__stmt_0);
	if(((BBOBJECT)bbt_obj)==&bbNullObject){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 177, 0};
		bbOnDebugEnterStm(&__stmt_0);
		bbOnDebugLeaveScope();
		bbOnDebugLeaveScope();
		return 0;
	}
	struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 178, 0};
	bbOnDebugEnterStm(&__stmt_1);
	bbOnDebugLeaveScope();
	return ((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_obj))->_openb3d_ddsloader_tdds_instance ;
}
void _openb3d_ddsloader_TDDS_InitFields(struct openb3d_ddsloader_TDDS_obj* o){
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o));
	struct BBDebugScope_1 __scope = {
		BBDEBUGSCOPE_FUNCTION,
		"InitFields",
		{
			{
				BBDEBUGDECL_LOCAL,
				"Self",
				":TDDS",
				.var_address=&o
			},
			{
				BBDEBUGDECL_END
			}
		}
	};
	bbOnDebugEnterScope((BBDebugScope *)&__scope);
	struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 185, 0};
	bbOnDebugEnterStm(&__stmt_0);
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_buffer =DirectDrawSurfaceUChar_(o->clas->f_GetInstance_pb_TTDDS((struct openb3d_ddsloader_TDDS_obj*)o),1);
	struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 186, 0};
	bbOnDebugEnterStm(&__stmt_1);
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_dxt =DirectDrawSurfaceUChar_(o->clas->f_GetInstance_pb_TTDDS((struct openb3d_ddsloader_TDDS_obj*)o),9);
	struct BBDebugStm __stmt_2 = {0xcf91fea8dbe5382b, 189, 0};
	bbOnDebugEnterStm(&__stmt_2);
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_width =DirectDrawSurfaceInt_(o->clas->f_GetInstance_pb_TTDDS((struct openb3d_ddsloader_TDDS_obj*)o),3);
	struct BBDebugStm __stmt_3 = {0xcf91fea8dbe5382b, 190, 0};
	bbOnDebugEnterStm(&__stmt_3);
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_height =DirectDrawSurfaceInt_(o->clas->f_GetInstance_pb_TTDDS((struct openb3d_ddsloader_TDDS_obj*)o),4);
	struct BBDebugStm __stmt_4 = {0xcf91fea8dbe5382b, 191, 0};
	bbOnDebugEnterStm(&__stmt_4);
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_depth =DirectDrawSurfaceInt_(o->clas->f_GetInstance_pb_TTDDS((struct openb3d_ddsloader_TDDS_obj*)o),5);
	struct BBDebugStm __stmt_5 = {0xcf91fea8dbe5382b, 192, 0};
	bbOnDebugEnterStm(&__stmt_5);
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_mipmapcount =DirectDrawSurfaceInt_(o->clas->f_GetInstance_pb_TTDDS((struct openb3d_ddsloader_TDDS_obj*)o),6);
	struct BBDebugStm __stmt_6 = {0xcf91fea8dbe5382b, 193, 0};
	bbOnDebugEnterStm(&__stmt_6);
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_pitch =DirectDrawSurfaceInt_(o->clas->f_GetInstance_pb_TTDDS((struct openb3d_ddsloader_TDDS_obj*)o),7);
	struct BBDebugStm __stmt_7 = {0xcf91fea8dbe5382b, 194, 0};
	bbOnDebugEnterStm(&__stmt_7);
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_size =DirectDrawSurfaceInt_(o->clas->f_GetInstance_pb_TTDDS((struct openb3d_ddsloader_TDDS_obj*)o),8);
	struct BBDebugStm __stmt_8 = {0xcf91fea8dbe5382b, 197, 0};
	bbOnDebugEnterStm(&__stmt_8);
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_format =DirectDrawSurfaceUInt_(o->clas->f_GetInstance_pb_TTDDS((struct openb3d_ddsloader_TDDS_obj*)o),10);
	struct BBDebugStm __stmt_9 = {0xcf91fea8dbe5382b, 198, 0};
	bbOnDebugEnterStm(&__stmt_9);
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_components =DirectDrawSurfaceUInt_(o->clas->f_GetInstance_pb_TTDDS((struct openb3d_ddsloader_TDDS_obj*)o),11);
	struct BBDebugStm __stmt_10 = {0xcf91fea8dbe5382b, 199, 0};
	bbOnDebugEnterStm(&__stmt_10);
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_target =DirectDrawSurfaceUInt_(o->clas->f_GetInstance_pb_TTDDS((struct openb3d_ddsloader_TDDS_obj*)o),12);
	struct BBDebugStm __stmt_11 = {0xcf91fea8dbe5382b, 202, 0};
	bbOnDebugEnterStm(&__stmt_11);
	if(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_mipmapcount [0]>0){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 203, 0};
		bbOnDebugEnterStm(&__stmt_0);
		((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_mipmaps =bbArraySlice(":TDDS",((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_mipmaps ,0,((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_mipmapcount [0]);
		struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 204, 0};
		bbOnDebugEnterStm(&__stmt_1);
		{
			BBINT bbt_id=0;
			BBINT bbt_=((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_mipmapcount [0];
			for(;(bbt_id<bbt_);bbt_id=(bbt_id+1)){
				BBBYTE* bbt_inst=0;
				struct BBDebugScope_2 __scope = {
					BBDEBUGSCOPE_LOCALBLOCK,
					0,
					{
						{
							BBDEBUGDECL_LOCAL,
							"id",
							"i",
							.var_address=&bbt_id
						},
						{
							BBDEBUGDECL_LOCAL,
							"inst",
							"*b",
							.var_address=&bbt_inst
						},
						{
							BBDEBUGDECL_END
						}
					}
				};
				bbOnDebugEnterScope((BBDebugScope *)&__scope);
				struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 205, 0};
				bbOnDebugEnterStm(&__stmt_0);
				bbt_inst=DirectDrawSurfaceArray_(o->clas->f_GetInstance_pb_TTDDS((struct openb3d_ddsloader_TDDS_obj*)o),2,bbt_id);
				struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 206, 0};
				bbOnDebugEnterStm(&__stmt_1);
				((struct openb3d_ddsloader_TDDS_obj**)BBARRAYDATAINDEX((((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_mipmaps ),(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_mipmaps )->dims,((BBUINT)bbt_id)))[((BBUINT)bbt_id)]=(struct openb3d_ddsloader_TDDS_obj*)o->clas->f_GetObject_TTDDS_pb(bbt_inst);
				struct BBDebugStm __stmt_2 = {0xcf91fea8dbe5382b, 207, 0};
				bbOnDebugEnterStm(&__stmt_2);
				if((((BBOBJECT)((struct openb3d_ddsloader_TDDS_obj**)BBARRAYDATAINDEX((((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_mipmaps ),(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_mipmaps )->dims,((BBUINT)bbt_id)))[((BBUINT)bbt_id)])==&bbNullObject) && (bbt_inst!=0)){
					struct BBDebugScope __scope = {
						BBDEBUGSCOPE_LOCALBLOCK,
						0,
						{
							{
								BBDEBUGDECL_END
							}
						}
					};
					bbOnDebugEnterScope((BBDebugScope *)&__scope);
					struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 207, 0};
					bbOnDebugEnterStm(&__stmt_0);
					((struct openb3d_ddsloader_TDDS_obj**)BBARRAYDATAINDEX((((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_mipmaps ),(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_mipmaps )->dims,((BBUINT)bbt_id)))[((BBUINT)bbt_id)]=(struct openb3d_ddsloader_TDDS_obj*)o->clas->f_CreateObject_TTDDS_pb(bbt_inst);
					bbOnDebugLeaveScope();
				}
				bbOnDebugLeaveScope();
			}
		}
		bbOnDebugLeaveScope();
	}
	struct BBDebugStm __stmt_12 = {0xcf91fea8dbe5382b, 211, 0};
	bbOnDebugEnterStm(&__stmt_12);
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_exists =1;
	bbOnDebugLeaveScope();
}
BBSTRING openb3d_ddsloader_TDDS_StringPtr_S_pb(BBBYTE* bbt_inst){
	struct BBDebugScope_1 __scope = {
		BBDEBUGSCOPE_FUNCTION,
		"StringPtr",
		{
			{
				BBDEBUGDECL_LOCAL,
				"inst",
				"*b",
				.var_address=&bbt_inst
			},
			{
				BBDEBUGDECL_END
			}
		}
	};
	bbOnDebugEnterScope((BBDebugScope *)&__scope);
	struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 218, 0};
	bbOnDebugEnterStm(&__stmt_0);
	bbOnDebugLeaveScope();
	return bbStringFromSizet(bbt_inst);
}
void _openb3d_ddsloader_TDDS_DebugFields_ii(struct openb3d_ddsloader_TDDS_obj* o,BBINT bbt_debug_subobjects,BBINT bbt_debug_base_types){
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o));
	BBSTRING bbt_pad=(&bbEmptyString);
	BBINT bbt_loop=0;
	struct BBDebugScope_5 __scope = {
		BBDEBUGSCOPE_FUNCTION,
		"DebugFields",
		{
			{
				BBDEBUGDECL_LOCAL,
				"Self",
				":TDDS",
				.var_address=&o
			},
			{
				BBDEBUGDECL_LOCAL,
				"debug_subobjects",
				"i",
				.var_address=&bbt_debug_subobjects
			},
			{
				BBDEBUGDECL_LOCAL,
				"debug_base_types",
				"i",
				.var_address=&bbt_debug_base_types
			},
			{
				BBDEBUGDECL_LOCAL,
				"pad",
				"$",
				.var_address=&bbt_pad
			},
			{
				BBDEBUGDECL_LOCAL,
				"loop",
				"i",
				.var_address=&bbt_loop
			},
			{
				BBDEBUGDECL_END
			}
		}
	};
	bbOnDebugEnterScope((BBDebugScope *)&__scope);
	struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 227, 0};
	bbOnDebugEnterStm(&__stmt_0);
	bbt_pad=((BBString*)&bbEmptyString);
	struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 228, 0};
	bbOnDebugEnterStm(&__stmt_1);
	bbt_loop=bbt_debug_subobjects;
	struct BBDebugStm __stmt_2 = {0xcf91fea8dbe5382b, 229, 0};
	bbOnDebugEnterStm(&__stmt_2);
	if(bbt_debug_base_types>bbt_debug_subobjects){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 229, 0};
		bbOnDebugEnterStm(&__stmt_0);
		bbt_loop=bbt_debug_base_types;
		bbOnDebugLeaveScope();
	}
	struct BBDebugStm __stmt_3 = {0xcf91fea8dbe5382b, 230, 0};
	bbOnDebugEnterStm(&__stmt_3);
	{
		BBINT bbt_i=1;
		BBINT bbt_=bbt_loop;
		for(;(bbt_i<bbt_);bbt_i=(bbt_i+1)){
			struct BBDebugScope_1 __scope = {
				BBDEBUGSCOPE_LOCALBLOCK,
				0,
				{
					{
						BBDEBUGDECL_LOCAL,
						"i",
						"i",
						.var_address=&bbt_i
					},
					{
						BBDEBUGDECL_END
					}
				}
			};
			bbOnDebugEnterScope((BBDebugScope *)&__scope);
			struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 231, 0};
			bbOnDebugEnterStm(&__stmt_0);
			bbt_pad=bbStringConcat(bbt_pad,((BBString*)&_s2));
			bbOnDebugLeaveScope();
		}
	}
	struct BBDebugStm __stmt_4 = {0xcf91fea8dbe5382b, 233, 0};
	bbOnDebugEnterStm(&__stmt_4);
	if(bbt_debug_subobjects!=0){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 233, 0};
		bbOnDebugEnterStm(&__stmt_0);
		bbt_debug_subobjects+=1;
		bbOnDebugLeaveScope();
	}
	struct BBDebugStm __stmt_5 = {0xcf91fea8dbe5382b, 234, 0};
	bbOnDebugEnterStm(&__stmt_5);
	if(bbt_debug_base_types!=0){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 234, 0};
		bbOnDebugEnterStm(&__stmt_0);
		bbt_debug_base_types+=1;
		bbOnDebugLeaveScope();
	}
	struct BBDebugStm __stmt_6 = {0xcf91fea8dbe5382b, 235, 0};
	bbOnDebugEnterStm(&__stmt_6);
	brl_blitz_DebugLog(bbStringConcat(bbStringConcat(bbt_pad,((BBString*)&_s3)),o->clas->f_StringPtr_S_pb(o->clas->f_GetInstance_pb_TTDDS((struct openb3d_ddsloader_TDDS_obj*)o))));
	struct BBDebugStm __stmt_7 = {0xcf91fea8dbe5382b, 238, 0};
	bbOnDebugEnterStm(&__stmt_7);
	if(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_buffer !=0){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 238, 0};
		bbOnDebugEnterStm(&__stmt_0);
		brl_blitz_DebugLog(bbStringConcat(bbStringConcat(bbt_pad,((BBString*)&_s4)),o->clas->f_StringPtr_S_pb(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_buffer )));
		bbOnDebugLeaveScope();
	}else{
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 238, 0};
		bbOnDebugEnterStm(&__stmt_0);
		brl_blitz_DebugLog(bbStringConcat(bbt_pad,((BBString*)&_s5)));
		bbOnDebugLeaveScope();
	}
	struct BBDebugStm __stmt_8 = {0xcf91fea8dbe5382b, 239, 0};
	bbOnDebugEnterStm(&__stmt_8);
	if(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_dxt !=0){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 239, 0};
		bbOnDebugEnterStm(&__stmt_0);
		brl_blitz_DebugLog(bbStringConcat(bbStringConcat(bbt_pad,((BBString*)&_s6)),o->clas->f_StringPtr_S_pb(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_dxt )));
		bbOnDebugLeaveScope();
	}else{
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 239, 0};
		bbOnDebugEnterStm(&__stmt_0);
		brl_blitz_DebugLog(bbStringConcat(bbt_pad,((BBString*)&_s7)));
		bbOnDebugLeaveScope();
	}
	struct BBDebugStm __stmt_9 = {0xcf91fea8dbe5382b, 242, 0};
	bbOnDebugEnterStm(&__stmt_9);
	if(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_width !=0){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 242, 0};
		bbOnDebugEnterStm(&__stmt_0);
		brl_blitz_DebugLog(bbStringConcat(bbStringConcat(bbt_pad,((BBString*)&_s8)),bbStringFromInt(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_width [0])));
		bbOnDebugLeaveScope();
	}else{
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 242, 0};
		bbOnDebugEnterStm(&__stmt_0);
		brl_blitz_DebugLog(bbStringConcat(bbt_pad,((BBString*)&_s9)));
		bbOnDebugLeaveScope();
	}
	struct BBDebugStm __stmt_10 = {0xcf91fea8dbe5382b, 243, 0};
	bbOnDebugEnterStm(&__stmt_10);
	if(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_height !=0){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 243, 0};
		bbOnDebugEnterStm(&__stmt_0);
		brl_blitz_DebugLog(bbStringConcat(bbStringConcat(bbt_pad,((BBString*)&_s10)),bbStringFromInt(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_height [0])));
		bbOnDebugLeaveScope();
	}else{
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 243, 0};
		bbOnDebugEnterStm(&__stmt_0);
		brl_blitz_DebugLog(bbStringConcat(bbt_pad,((BBString*)&_s11)));
		bbOnDebugLeaveScope();
	}
	struct BBDebugStm __stmt_11 = {0xcf91fea8dbe5382b, 244, 0};
	bbOnDebugEnterStm(&__stmt_11);
	if(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_depth !=0){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 244, 0};
		bbOnDebugEnterStm(&__stmt_0);
		brl_blitz_DebugLog(bbStringConcat(bbStringConcat(bbt_pad,((BBString*)&_s12)),bbStringFromInt(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_depth [0])));
		bbOnDebugLeaveScope();
	}else{
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 244, 0};
		bbOnDebugEnterStm(&__stmt_0);
		brl_blitz_DebugLog(bbStringConcat(bbt_pad,((BBString*)&_s13)));
		bbOnDebugLeaveScope();
	}
	struct BBDebugStm __stmt_12 = {0xcf91fea8dbe5382b, 245, 0};
	bbOnDebugEnterStm(&__stmt_12);
	if(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_mipmapcount !=0){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 245, 0};
		bbOnDebugEnterStm(&__stmt_0);
		brl_blitz_DebugLog(bbStringConcat(bbStringConcat(bbt_pad,((BBString*)&_s14)),bbStringFromInt(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_mipmapcount [0])));
		bbOnDebugLeaveScope();
	}else{
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 245, 0};
		bbOnDebugEnterStm(&__stmt_0);
		brl_blitz_DebugLog(bbStringConcat(bbt_pad,((BBString*)&_s15)));
		bbOnDebugLeaveScope();
	}
	struct BBDebugStm __stmt_13 = {0xcf91fea8dbe5382b, 246, 0};
	bbOnDebugEnterStm(&__stmt_13);
	if(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_pitch !=0){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 246, 0};
		bbOnDebugEnterStm(&__stmt_0);
		brl_blitz_DebugLog(bbStringConcat(bbStringConcat(bbt_pad,((BBString*)&_s16)),bbStringFromInt(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_pitch [0])));
		bbOnDebugLeaveScope();
	}else{
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 246, 0};
		bbOnDebugEnterStm(&__stmt_0);
		brl_blitz_DebugLog(bbStringConcat(bbt_pad,((BBString*)&_s17)));
		bbOnDebugLeaveScope();
	}
	struct BBDebugStm __stmt_14 = {0xcf91fea8dbe5382b, 247, 0};
	bbOnDebugEnterStm(&__stmt_14);
	if(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_size !=0){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 247, 0};
		bbOnDebugEnterStm(&__stmt_0);
		brl_blitz_DebugLog(bbStringConcat(bbStringConcat(bbt_pad,((BBString*)&_s18)),bbStringFromInt(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_size [0])));
		bbOnDebugLeaveScope();
	}else{
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 247, 0};
		bbOnDebugEnterStm(&__stmt_0);
		brl_blitz_DebugLog(bbStringConcat(bbt_pad,((BBString*)&_s19)));
		bbOnDebugLeaveScope();
	}
	struct BBDebugStm __stmt_15 = {0xcf91fea8dbe5382b, 250, 0};
	bbOnDebugEnterStm(&__stmt_15);
	if(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_format !=0){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 250, 0};
		bbOnDebugEnterStm(&__stmt_0);
		brl_blitz_DebugLog(bbStringConcat(bbStringConcat(bbt_pad,((BBString*)&_s20)),bbStringFromInt(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_format [0])));
		bbOnDebugLeaveScope();
	}else{
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 250, 0};
		bbOnDebugEnterStm(&__stmt_0);
		brl_blitz_DebugLog(bbStringConcat(bbt_pad,((BBString*)&_s21)));
		bbOnDebugLeaveScope();
	}
	struct BBDebugStm __stmt_16 = {0xcf91fea8dbe5382b, 251, 0};
	bbOnDebugEnterStm(&__stmt_16);
	if(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_components !=0){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 251, 0};
		bbOnDebugEnterStm(&__stmt_0);
		brl_blitz_DebugLog(bbStringConcat(bbStringConcat(bbt_pad,((BBString*)&_s22)),bbStringFromInt(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_components [0])));
		bbOnDebugLeaveScope();
	}else{
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 251, 0};
		bbOnDebugEnterStm(&__stmt_0);
		brl_blitz_DebugLog(bbStringConcat(bbt_pad,((BBString*)&_s23)));
		bbOnDebugLeaveScope();
	}
	struct BBDebugStm __stmt_17 = {0xcf91fea8dbe5382b, 252, 0};
	bbOnDebugEnterStm(&__stmt_17);
	if(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_target !=0){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 252, 0};
		bbOnDebugEnterStm(&__stmt_0);
		brl_blitz_DebugLog(bbStringConcat(bbStringConcat(bbt_pad,((BBString*)&_s24)),bbStringFromInt(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_target [0])));
		bbOnDebugLeaveScope();
	}else{
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 252, 0};
		bbOnDebugEnterStm(&__stmt_0);
		brl_blitz_DebugLog(bbStringConcat(bbt_pad,((BBString*)&_s25)));
		bbOnDebugLeaveScope();
	}
	struct BBDebugStm __stmt_18 = {0xcf91fea8dbe5382b, 254, 0};
	bbOnDebugEnterStm(&__stmt_18);
	brl_blitz_DebugLog((BBString*)&bbEmptyString);
	bbOnDebugLeaveScope();
}
void _openb3d_ddsloader_TDDS_FreeDDS(struct openb3d_ddsloader_TDDS_obj* o){
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o));
	struct BBDebugScope_1 __scope = {
		BBDEBUGSCOPE_FUNCTION,
		"FreeDDS",
		{
			{
				BBDEBUGDECL_LOCAL,
				"Self",
				":TDDS",
				.var_address=&o
			},
			{
				BBDEBUGDECL_END
			}
		}
	};
	bbOnDebugEnterScope((BBDebugScope *)&__scope);
	struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 262, 0};
	bbOnDebugEnterStm(&__stmt_0);
	if(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_exists !=0){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 263, 0};
		bbOnDebugEnterStm(&__stmt_0);
		((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_exists =0;
		struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 264, 0};
		bbOnDebugEnterStm(&__stmt_1);
		((BBINT*)BBARRAYDATAINDEX((brl_pixmap_pixel_GreenBitsPerPixel),(brl_pixmap_pixel_GreenBitsPerPixel)->dims,0U))[0U]=0;
		struct BBDebugStm __stmt_2 = {0xcf91fea8dbe5382b, 265, 0};
		bbOnDebugEnterStm(&__stmt_2);
		((BBINT*)BBARRAYDATAINDEX((brl_pixmap_pixel_BlueBitsPerPixel),(brl_pixmap_pixel_BlueBitsPerPixel)->dims,0U))[0U]=0;
		struct BBDebugStm __stmt_3 = {0xcf91fea8dbe5382b, 266, 0};
		bbOnDebugEnterStm(&__stmt_3);
		brl_linkedlist_ListRemove((struct brl_linkedlist_TList_obj*)openb3d_ddsloader_TDDS_dds_list,(BBOBJECT)o);
		struct BBDebugStm __stmt_4 = {0xcf91fea8dbe5382b, 267, 0};
		bbOnDebugEnterStm(&__stmt_4);
		DDSFreeDirectDrawSurface_(o->clas->f_GetInstance_pb_TTDDS((struct openb3d_ddsloader_TDDS_obj*)o),0);
		struct BBDebugStm __stmt_5 = {0xcf91fea8dbe5382b, 268, 0};
		bbOnDebugEnterStm(&__stmt_5);
		if(((((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_bmx_buffer !=0) && (((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_width [0]>0)) && (((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_height [0]>0)){
			struct BBDebugScope __scope = {
				BBDEBUGSCOPE_LOCALBLOCK,
				0,
				{
					{
						BBDEBUGDECL_END
					}
				}
			};
			bbOnDebugEnterScope((BBDebugScope *)&__scope);
			struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 269, 0};
			bbOnDebugEnterStm(&__stmt_0);
			bbMemFree((void*)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_bmx_buffer );
			bbOnDebugLeaveScope();
		}
		struct BBDebugStm __stmt_6 = {0xcf91fea8dbe5382b, 271, 0};
		bbOnDebugEnterStm(&__stmt_6);
		{
			BBINT bbt_id=0;
			BBINT bbt_=((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_mipmapcount [0];
			for(;(bbt_id<bbt_);bbt_id=(bbt_id+1)){
				struct BBDebugScope_1 __scope = {
					BBDEBUGSCOPE_LOCALBLOCK,
					0,
					{
						{
							BBDEBUGDECL_LOCAL,
							"id",
							"i",
							.var_address=&bbt_id
						},
						{
							BBDEBUGDECL_END
						}
					}
				};
				bbOnDebugEnterScope((BBDebugScope *)&__scope);
				struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 272, 0};
				bbOnDebugEnterStm(&__stmt_0);
				if(((BBOBJECT)((struct openb3d_ddsloader_TDDS_obj**)BBARRAYDATAINDEX((((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_mipmaps ),(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_mipmaps )->dims,((BBUINT)bbt_id)))[((BBUINT)bbt_id)])!=&bbNullObject){
					struct BBDebugScope __scope = {
						BBDEBUGSCOPE_LOCALBLOCK,
						0,
						{
							{
								BBDEBUGDECL_END
							}
						}
					};
					bbOnDebugEnterScope((BBDebugScope *)&__scope);
					struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 272, 0};
					bbOnDebugEnterStm(&__stmt_0);
					o->clas->f_FreeObject_v_pb(o->clas->f_GetInstance_pb_TTDDS((struct openb3d_ddsloader_TDDS_obj*)((struct openb3d_ddsloader_TDDS_obj**)BBARRAYDATAINDEX((((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_mipmaps ),(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_mipmaps )->dims,((BBUINT)bbt_id)))[((BBUINT)bbt_id)]));
					bbOnDebugLeaveScope();
				}
				bbOnDebugLeaveScope();
			}
		}
		struct BBDebugStm __stmt_7 = {0xcf91fea8dbe5382b, 274, 0};
		bbOnDebugEnterStm(&__stmt_7);
		o->clas->f_FreeObject_v_pb(o->clas->f_GetInstance_pb_TTDDS((struct openb3d_ddsloader_TDDS_obj*)o));
		bbOnDebugLeaveScope();
	}
	bbOnDebugLeaveScope();
}
BBINT _openb3d_ddsloader_TDDS_GetPitch_iii(struct openb3d_ddsloader_TDDS_obj* o,BBINT bbt_width,BBINT bbt_format,BBINT bbt_components){
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o));
	struct BBDebugScope_4 __scope = {
		BBDEBUGSCOPE_FUNCTION,
		"GetPitch",
		{
			{
				BBDEBUGDECL_LOCAL,
				"Self",
				":TDDS",
				.var_address=&o
			},
			{
				BBDEBUGDECL_LOCAL,
				"width",
				"i",
				.var_address=&bbt_width
			},
			{
				BBDEBUGDECL_LOCAL,
				"format",
				"i",
				.var_address=&bbt_format
			},
			{
				BBDEBUGDECL_LOCAL,
				"components",
				"i",
				.var_address=&bbt_components
			},
			{
				BBDEBUGDECL_END
			}
		}
	};
	bbOnDebugEnterScope((BBDebugScope *)&__scope);
	struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 281, 0};
	bbOnDebugEnterStm(&__stmt_0);
	if(((bbt_format==33776) || (bbt_format==33778)) || (bbt_format==33779)){
		BBINT bbt_bpp=0;
		struct BBDebugScope_1 __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_LOCAL,
					"bpp",
					"i",
					.var_address=&bbt_bpp
				},
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 282, 0};
		bbOnDebugEnterStm(&__stmt_0);
		bbt_bpp=0;
		struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 283, 0};
		bbOnDebugEnterStm(&__stmt_1);
		if(bbt_format==33776){
			struct BBDebugScope __scope = {
				BBDEBUGSCOPE_LOCALBLOCK,
				0,
				{
					{
						BBDEBUGDECL_END
					}
				}
			};
			bbOnDebugEnterScope((BBDebugScope *)&__scope);
			struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 283, 0};
			bbOnDebugEnterStm(&__stmt_0);
			bbt_bpp=8;
			bbOnDebugLeaveScope();
		}else{
			struct BBDebugScope __scope = {
				BBDEBUGSCOPE_LOCALBLOCK,
				0,
				{
					{
						BBDEBUGDECL_END
					}
				}
			};
			bbOnDebugEnterScope((BBDebugScope *)&__scope);
			struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 283, 0};
			bbOnDebugEnterStm(&__stmt_0);
			bbt_bpp=16;
			bbOnDebugLeaveScope();
		}
		struct BBDebugStm __stmt_2 = {0xcf91fea8dbe5382b, 284, 0};
		bbOnDebugEnterStm(&__stmt_2);
		bbOnDebugLeaveScope();
		bbOnDebugLeaveScope();
		return (((bbt_width+3)/4)*bbt_bpp);
	}
	struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 286, 0};
	bbOnDebugEnterStm(&__stmt_1);
	bbOnDebugLeaveScope();
	return (bbt_width*bbt_components);
}
BBINT _openb3d_ddsloader_TDDS_IsCompressed(struct openb3d_ddsloader_TDDS_obj* o){
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o));
	struct BBDebugScope_1 __scope = {
		BBDEBUGSCOPE_FUNCTION,
		"IsCompressed",
		{
			{
				BBDEBUGDECL_LOCAL,
				"Self",
				":TDDS",
				.var_address=&o
			},
			{
				BBDEBUGDECL_END
			}
		}
	};
	bbOnDebugEnterScope((BBDebugScope *)&__scope);
	struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 292, 0};
	bbOnDebugEnterStm(&__stmt_0);
	if(((((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_format [0]==33776) || (((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_format [0]==33778)) || (((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_format [0]==33779)){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 293, 0};
		bbOnDebugEnterStm(&__stmt_0);
		bbOnDebugLeaveScope();
		bbOnDebugLeaveScope();
		return 1;
	}
	struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 295, 0};
	bbOnDebugEnterStm(&__stmt_1);
	bbOnDebugLeaveScope();
	return 0;
}
void _openb3d_ddsloader_TDDS_ImageParameters_i(struct openb3d_ddsloader_TDDS_obj* o,BBINT bbt_flags){
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o));
	struct BBDebugScope_2 __scope = {
		BBDEBUGSCOPE_FUNCTION,
		"ImageParameters",
		{
			{
				BBDEBUGDECL_LOCAL,
				"Self",
				":TDDS",
				.var_address=&o
			},
			{
				BBDEBUGDECL_LOCAL,
				"flags",
				"i",
				.var_address=&bbt_flags
			},
			{
				BBDEBUGDECL_END
			}
		}
	};
	bbOnDebugEnterScope((BBDebugScope *)&__scope);
	struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 302, 0};
	bbOnDebugEnterStm(&__stmt_0);
	glTexParameteri((GLenum)3553,(GLenum)10242,(GLint)33071);
	struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 303, 0};
	bbOnDebugEnterStm(&__stmt_1);
	glTexParameteri((GLenum)3553,(GLenum)10243,(GLint)33071);
	struct BBDebugStm __stmt_2 = {0xcf91fea8dbe5382b, 305, 0};
	bbOnDebugEnterStm(&__stmt_2);
	if(((unsigned int)(bbt_flags)&(unsigned int)(2))!=0){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 306, 0};
		bbOnDebugEnterStm(&__stmt_0);
		glTexParameteri((GLenum)3553,(GLenum)10240,(GLint)9729);
		struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 307, 0};
		bbOnDebugEnterStm(&__stmt_1);
		if(((unsigned int)(bbt_flags)&(unsigned int)(4))!=0){
			struct BBDebugScope __scope = {
				BBDEBUGSCOPE_LOCALBLOCK,
				0,
				{
					{
						BBDEBUGDECL_END
					}
				}
			};
			bbOnDebugEnterScope((BBDebugScope *)&__scope);
			struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 308, 0};
			bbOnDebugEnterStm(&__stmt_0);
			glTexParameteri((GLenum)3553,(GLenum)10241,(GLint)9987);
			bbOnDebugLeaveScope();
		}else{
			struct BBDebugScope __scope = {
				BBDEBUGSCOPE_LOCALBLOCK,
				0,
				{
					{
						BBDEBUGDECL_END
					}
				}
			};
			bbOnDebugEnterScope((BBDebugScope *)&__scope);
			struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 310, 0};
			bbOnDebugEnterStm(&__stmt_0);
			glTexParameteri((GLenum)3553,(GLenum)10241,(GLint)9729);
			bbOnDebugLeaveScope();
		}
		bbOnDebugLeaveScope();
	}else{
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 313, 0};
		bbOnDebugEnterStm(&__stmt_0);
		glTexParameteri((GLenum)3553,(GLenum)10240,(GLint)9728);
		struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 314, 0};
		bbOnDebugEnterStm(&__stmt_1);
		if(((unsigned int)(bbt_flags)&(unsigned int)(4))!=0){
			struct BBDebugScope __scope = {
				BBDEBUGSCOPE_LOCALBLOCK,
				0,
				{
					{
						BBDEBUGDECL_END
					}
				}
			};
			bbOnDebugEnterScope((BBDebugScope *)&__scope);
			struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 315, 0};
			bbOnDebugEnterStm(&__stmt_0);
			glTexParameteri((GLenum)3553,(GLenum)10241,(GLint)9984);
			bbOnDebugLeaveScope();
		}else{
			struct BBDebugScope __scope = {
				BBDEBUGSCOPE_LOCALBLOCK,
				0,
				{
					{
						BBDEBUGDECL_END
					}
				}
			};
			bbOnDebugEnterScope((BBDebugScope *)&__scope);
			struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 317, 0};
			bbOnDebugEnterStm(&__stmt_0);
			glTexParameteri((GLenum)3553,(GLenum)10241,(GLint)9728);
			bbOnDebugLeaveScope();
		}
		bbOnDebugLeaveScope();
	}
	bbOnDebugLeaveScope();
}
void _openb3d_ddsloader_TDDS_TextureParameters_i(struct openb3d_ddsloader_TDDS_obj* o,BBINT bbt_tex_flags){
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o));
	struct BBDebugScope_2 __scope = {
		BBDEBUGSCOPE_FUNCTION,
		"TextureParameters",
		{
			{
				BBDEBUGDECL_LOCAL,
				"Self",
				":TDDS",
				.var_address=&o
			},
			{
				BBDEBUGDECL_LOCAL,
				"tex_flags",
				"i",
				.var_address=&bbt_tex_flags
			},
			{
				BBDEBUGDECL_END
			}
		}
	};
	bbOnDebugEnterScope((BBDebugScope *)&__scope);
	struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 326, 0};
	bbOnDebugEnterStm(&__stmt_0);
	if(((unsigned int)(bbt_tex_flags)&(unsigned int)(8))!=0){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 327, 0};
		bbOnDebugEnterStm(&__stmt_0);
		glTexParameteri((GLenum)3553,(GLenum)10240,(GLint)9729);
		struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 328, 0};
		bbOnDebugEnterStm(&__stmt_1);
		glTexParameteri((GLenum)3553,(GLenum)10241,(GLint)9987);
		bbOnDebugLeaveScope();
	}else{
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 330, 0};
		bbOnDebugEnterStm(&__stmt_0);
		glTexParameteri((GLenum)3553,(GLenum)10240,(GLint)9728);
		struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 331, 0};
		bbOnDebugEnterStm(&__stmt_1);
		glTexParameteri((GLenum)3553,(GLenum)10241,(GLint)9728);
		bbOnDebugLeaveScope();
	}
	struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 335, 0};
	bbOnDebugEnterStm(&__stmt_1);
	if(((unsigned int)(bbt_tex_flags)&(unsigned int)(16))!=0){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 336, 0};
		bbOnDebugEnterStm(&__stmt_0);
		glTexParameteri((GLenum)3553,(GLenum)10242,(GLint)33071);
		bbOnDebugLeaveScope();
	}else{
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 338, 0};
		bbOnDebugEnterStm(&__stmt_0);
		glTexParameteri((GLenum)3553,(GLenum)10242,(GLint)10497);
		bbOnDebugLeaveScope();
	}
	struct BBDebugStm __stmt_2 = {0xcf91fea8dbe5382b, 342, 0};
	bbOnDebugEnterStm(&__stmt_2);
	if(((unsigned int)(bbt_tex_flags)&(unsigned int)(32))!=0){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 343, 0};
		bbOnDebugEnterStm(&__stmt_0);
		glTexParameteri((GLenum)3553,(GLenum)10243,(GLint)33071);
		bbOnDebugLeaveScope();
	}else{
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 345, 0};
		bbOnDebugEnterStm(&__stmt_0);
		glTexParameteri((GLenum)3553,(GLenum)10243,(GLint)10497);
		bbOnDebugLeaveScope();
	}
	bbOnDebugLeaveScope();
}
void _openb3d_ddsloader_TDDS_UploadTexture2D_i(struct openb3d_ddsloader_TDDS_obj* o,BBINT bbt_mipmap_flag){
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o));
	BBINT bbt_row=0;
	BBINT bbt_mmc=0;
	struct BBDebugScope_4 __scope = {
		BBDEBUGSCOPE_FUNCTION,
		"UploadTexture2D",
		{
			{
				BBDEBUGDECL_LOCAL,
				"Self",
				":TDDS",
				.var_address=&o
			},
			{
				BBDEBUGDECL_LOCAL,
				"mipmap_flag",
				"i",
				.var_address=&bbt_mipmap_flag
			},
			{
				BBDEBUGDECL_LOCAL,
				"row",
				"i",
				.var_address=&bbt_row
			},
			{
				BBDEBUGDECL_LOCAL,
				"mmc",
				"i",
				.var_address=&bbt_mmc
			},
			{
				BBDEBUGDECL_END
			}
		}
	};
	bbOnDebugEnterScope((BBDebugScope *)&__scope);
	struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 352, 0};
	bbOnDebugEnterStm(&__stmt_0);
	bbt_row=0;
	struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 352, 0};
	bbOnDebugEnterStm(&__stmt_1);
	bbt_mmc=((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_mipmapcount [0];
	struct BBDebugStm __stmt_2 = {0xcf91fea8dbe5382b, 354, 0};
	bbOnDebugEnterStm(&__stmt_2);
	if(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_mipmapcount [0]>DDSCountMipmaps_(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_width [0],((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_height [0])){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 355, 0};
		bbOnDebugEnterStm(&__stmt_0);
		bbt_mmc=DDSCountMipmaps_(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_width [0],((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_height [0]);
		bbOnDebugLeaveScope();
	}
	struct BBDebugStm __stmt_3 = {0xcf91fea8dbe5382b, 358, 0};
	bbOnDebugEnterStm(&__stmt_3);
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o));
	if(((struct openb3d_ddsloader_TDDS_obj*)o)->clas->m_IsCompressed((struct openb3d_ddsloader_TDDS_obj*)o)!=0){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 359, 0};
		bbOnDebugEnterStm(&__stmt_0);
		((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o));
		bbt_row=((struct openb3d_ddsloader_TDDS_obj*)o)->clas->m_GetPitch_iii((struct openb3d_ddsloader_TDDS_obj*)o,((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_width [0],((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_format [0],0);
		struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 360, 0};
		bbOnDebugEnterStm(&__stmt_1);
		glPixelStorei((GLenum)3314,(GLint)bbt_row);
		struct BBDebugStm __stmt_2 = {0xcf91fea8dbe5382b, 361, 0};
		bbOnDebugEnterStm(&__stmt_2);
		__glewCompressedTexImage2D(3553,0,((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_format [0],((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_width [0],((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_height [0],0,((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_size [0],((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_dxt );
		struct BBDebugStm __stmt_3 = {0xcf91fea8dbe5382b, 363, 0};
		bbOnDebugEnterStm(&__stmt_3);
		{
			BBINT bbt_j=0;
			BBINT bbt_=bbt_mmc;
			for(;(bbt_j<bbt_);bbt_j=(bbt_j+1)){
				struct openb3d_ddsloader_TDDS_obj* bbt_mip=(struct openb3d_ddsloader_TDDS_obj*)((struct openb3d_ddsloader_TDDS_obj*)&bbNullObject);
				struct BBDebugScope_2 __scope = {
					BBDEBUGSCOPE_LOCALBLOCK,
					0,
					{
						{
							BBDEBUGDECL_LOCAL,
							"j",
							"i",
							.var_address=&bbt_j
						},
						{
							BBDEBUGDECL_LOCAL,
							"mip",
							":TDDS",
							.var_address=&bbt_mip
						},
						{
							BBDEBUGDECL_END
						}
					}
				};
				bbOnDebugEnterScope((BBDebugScope *)&__scope);
				struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 364, 0};
				bbOnDebugEnterStm(&__stmt_0);
				bbt_mip=(struct openb3d_ddsloader_TDDS_obj*)((struct openb3d_ddsloader_TDDS_obj**)BBARRAYDATAINDEX((((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_mipmaps ),(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_mipmaps )->dims,((BBUINT)bbt_j)))[((BBUINT)bbt_j)];
				struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 365, 0};
				bbOnDebugEnterStm(&__stmt_1);
				if(((((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_mip))->_openb3d_ddsloader_tdds_width [0]==0) || (((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_mip))->_openb3d_ddsloader_tdds_height [0]==0)) || (bbt_mipmap_flag==0)){
					struct BBDebugScope __scope = {
						BBDEBUGSCOPE_LOCALBLOCK,
						0,
						{
							{
								BBDEBUGDECL_END
							}
						}
					};
					bbOnDebugEnterScope((BBDebugScope *)&__scope);
					struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 365, 0};
					bbOnDebugEnterStm(&__stmt_0);
					bbOnDebugLeaveScope();
					bbOnDebugLeaveScope();
					break;
				}
				struct BBDebugStm __stmt_2 = {0xcf91fea8dbe5382b, 366, 0};
				bbOnDebugEnterStm(&__stmt_2);
				((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o));
				bbt_row=((struct openb3d_ddsloader_TDDS_obj*)o)->clas->m_GetPitch_iii((struct openb3d_ddsloader_TDDS_obj*)o,((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_mip))->_openb3d_ddsloader_tdds_width [0],((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_format [0],0);
				struct BBDebugStm __stmt_3 = {0xcf91fea8dbe5382b, 367, 0};
				bbOnDebugEnterStm(&__stmt_3);
				glPixelStorei((GLenum)3314,(GLint)bbt_row);
				struct BBDebugStm __stmt_4 = {0xcf91fea8dbe5382b, 368, 0};
				bbOnDebugEnterStm(&__stmt_4);
				__glewCompressedTexImage2D(3553,(bbt_j+1),((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_format [0],((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_mip))->_openb3d_ddsloader_tdds_width [0],((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_mip))->_openb3d_ddsloader_tdds_height [0],0,((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_mip))->_openb3d_ddsloader_tdds_size [0],((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_mip))->_openb3d_ddsloader_tdds_dxt );
				bbOnDebugLeaveScope();
			}
		}
		bbOnDebugLeaveScope();
	}else{
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 371, 0};
		bbOnDebugEnterStm(&__stmt_0);
		glPixelStorei((GLenum)3317,(GLint)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_components [0]);
		struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 372, 0};
		bbOnDebugEnterStm(&__stmt_1);
		((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o));
		bbt_row=((struct openb3d_ddsloader_TDDS_obj*)o)->clas->m_GetPitch_iii((struct openb3d_ddsloader_TDDS_obj*)o,((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_width [0],((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_format [0],((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_components [0]);
		struct BBDebugStm __stmt_2 = {0xcf91fea8dbe5382b, 373, 0};
		bbOnDebugEnterStm(&__stmt_2);
		glPixelStorei((GLenum)3314,(GLint)(bbt_row/((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_components [0]));
		struct BBDebugStm __stmt_3 = {0xcf91fea8dbe5382b, 374, 0};
		bbOnDebugEnterStm(&__stmt_3);
		glTexImage2D((GLenum)3553,(GLint)0,(GLint)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_components [0],(GLsizei)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_width [0],(GLsizei)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_height [0],(GLint)0,(GLenum)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_format [0],(GLenum)5121,(const GLvoid*)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_dxt );
		struct BBDebugStm __stmt_4 = {0xcf91fea8dbe5382b, 376, 0};
		bbOnDebugEnterStm(&__stmt_4);
		{
			BBINT bbt_j2=0;
			BBINT bbt_2=bbt_mmc;
			for(;(bbt_j2<bbt_2);bbt_j2=(bbt_j2+1)){
				struct openb3d_ddsloader_TDDS_obj* bbt_mip2=(struct openb3d_ddsloader_TDDS_obj*)((struct openb3d_ddsloader_TDDS_obj*)&bbNullObject);
				struct BBDebugScope_2 __scope = {
					BBDEBUGSCOPE_LOCALBLOCK,
					0,
					{
						{
							BBDEBUGDECL_LOCAL,
							"j",
							"i",
							.var_address=&bbt_j2
						},
						{
							BBDEBUGDECL_LOCAL,
							"mip",
							":TDDS",
							.var_address=&bbt_mip2
						},
						{
							BBDEBUGDECL_END
						}
					}
				};
				bbOnDebugEnterScope((BBDebugScope *)&__scope);
				struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 377, 0};
				bbOnDebugEnterStm(&__stmt_0);
				bbt_mip2=(struct openb3d_ddsloader_TDDS_obj*)((struct openb3d_ddsloader_TDDS_obj**)BBARRAYDATAINDEX((((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_mipmaps ),(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_mipmaps )->dims,((BBUINT)bbt_j2)))[((BBUINT)bbt_j2)];
				struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 378, 0};
				bbOnDebugEnterStm(&__stmt_1);
				if(((((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_mip2))->_openb3d_ddsloader_tdds_width [0]==0) || (((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_mip2))->_openb3d_ddsloader_tdds_height [0]==0)) || (bbt_mipmap_flag==0)){
					struct BBDebugScope __scope = {
						BBDEBUGSCOPE_LOCALBLOCK,
						0,
						{
							{
								BBDEBUGDECL_END
							}
						}
					};
					bbOnDebugEnterScope((BBDebugScope *)&__scope);
					struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 378, 0};
					bbOnDebugEnterStm(&__stmt_0);
					bbOnDebugLeaveScope();
					bbOnDebugLeaveScope();
					break;
				}
				struct BBDebugStm __stmt_2 = {0xcf91fea8dbe5382b, 379, 0};
				bbOnDebugEnterStm(&__stmt_2);
				((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o));
				bbt_row=((struct openb3d_ddsloader_TDDS_obj*)o)->clas->m_GetPitch_iii((struct openb3d_ddsloader_TDDS_obj*)o,((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_mip2))->_openb3d_ddsloader_tdds_width [0],((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_format [0],((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_components [0]);
				struct BBDebugStm __stmt_3 = {0xcf91fea8dbe5382b, 380, 0};
				bbOnDebugEnterStm(&__stmt_3);
				glPixelStorei((GLenum)3314,(GLint)(bbt_row/((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_components [0]));
				struct BBDebugStm __stmt_4 = {0xcf91fea8dbe5382b, 381, 0};
				bbOnDebugEnterStm(&__stmt_4);
				glTexImage2D((GLenum)3553,(GLint)(bbt_j2+1),(GLint)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_components [0],(GLsizei)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_mip2))->_openb3d_ddsloader_tdds_width [0],(GLsizei)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_mip2))->_openb3d_ddsloader_tdds_height [0],(GLint)0,(GLenum)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_format [0],(GLenum)5121,(const GLvoid*)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_mip2))->_openb3d_ddsloader_tdds_dxt );
				bbOnDebugLeaveScope();
			}
		}
		bbOnDebugLeaveScope();
	}
	struct BBDebugStm __stmt_4 = {0xcf91fea8dbe5382b, 385, 0};
	bbOnDebugEnterStm(&__stmt_4);
	glPixelStorei((GLenum)3314,(GLint)0);
	bbOnDebugLeaveScope();
}
void _openb3d_ddsloader_TDDS_UploadTextureSubImage2D_iiiipbiii(struct openb3d_ddsloader_TDDS_obj* o,BBINT bbt_ix,BBINT bbt_iy,BBINT bbt_iwidth,BBINT bbt_iheight,BBBYTE* bbt_pixels,BBINT bbt_mipmap_flag,BBINT bbt_target,BBINT bbt_inv){
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o));
	BBINT bbt_mwidth=0;
	BBINT bbt_mheight=0;
	BBINT bbt_row=0;
	BBINT bbt_height4=0;
	BBINT bbt_mmc=0;
	struct BBDebugScope_14 __scope = {
		BBDEBUGSCOPE_FUNCTION,
		"UploadTextureSubImage2D",
		{
			{
				BBDEBUGDECL_LOCAL,
				"Self",
				":TDDS",
				.var_address=&o
			},
			{
				BBDEBUGDECL_LOCAL,
				"ix",
				"i",
				.var_address=&bbt_ix
			},
			{
				BBDEBUGDECL_LOCAL,
				"iy",
				"i",
				.var_address=&bbt_iy
			},
			{
				BBDEBUGDECL_LOCAL,
				"iwidth",
				"i",
				.var_address=&bbt_iwidth
			},
			{
				BBDEBUGDECL_LOCAL,
				"iheight",
				"i",
				.var_address=&bbt_iheight
			},
			{
				BBDEBUGDECL_LOCAL,
				"pixels",
				"*b",
				.var_address=&bbt_pixels
			},
			{
				BBDEBUGDECL_LOCAL,
				"mipmap_flag",
				"i",
				.var_address=&bbt_mipmap_flag
			},
			{
				BBDEBUGDECL_LOCAL,
				"target",
				"i",
				.var_address=&bbt_target
			},
			{
				BBDEBUGDECL_LOCAL,
				"inv",
				"i",
				.var_address=&bbt_inv
			},
			{
				BBDEBUGDECL_LOCAL,
				"mwidth",
				"i",
				.var_address=&bbt_mwidth
			},
			{
				BBDEBUGDECL_LOCAL,
				"mheight",
				"i",
				.var_address=&bbt_mheight
			},
			{
				BBDEBUGDECL_LOCAL,
				"row",
				"i",
				.var_address=&bbt_row
			},
			{
				BBDEBUGDECL_LOCAL,
				"height4",
				"i",
				.var_address=&bbt_height4
			},
			{
				BBDEBUGDECL_LOCAL,
				"mmc",
				"i",
				.var_address=&bbt_mmc
			},
			{
				BBDEBUGDECL_END
			}
		}
	};
	bbOnDebugEnterScope((BBDebugScope *)&__scope);
	struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 391, 0};
	bbOnDebugEnterStm(&__stmt_0);
	bbt_mwidth=0;
	struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 391, 0};
	bbOnDebugEnterStm(&__stmt_1);
	bbt_mheight=0;
	struct BBDebugStm __stmt_2 = {0xcf91fea8dbe5382b, 391, 0};
	bbOnDebugEnterStm(&__stmt_2);
	bbt_row=0;
	struct BBDebugStm __stmt_3 = {0xcf91fea8dbe5382b, 391, 0};
	bbOnDebugEnterStm(&__stmt_3);
	bbt_height4=0;
	struct BBDebugStm __stmt_4 = {0xcf91fea8dbe5382b, 391, 0};
	bbOnDebugEnterStm(&__stmt_4);
	bbt_mmc=((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_mipmapcount [0];
	struct BBDebugStm __stmt_5 = {0xcf91fea8dbe5382b, 393, 0};
	bbOnDebugEnterStm(&__stmt_5);
	if(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_mipmapcount [0]>DDSCountMipmaps_(bbt_iwidth,bbt_iheight)){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 394, 0};
		bbOnDebugEnterStm(&__stmt_0);
		bbt_mmc=DDSCountMipmaps_(bbt_iwidth,bbt_iheight);
		bbOnDebugLeaveScope();
	}
	struct BBDebugStm __stmt_6 = {0xcf91fea8dbe5382b, 397, 0};
	bbOnDebugEnterStm(&__stmt_6);
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o));
	if(((struct openb3d_ddsloader_TDDS_obj*)o)->clas->m_IsCompressed((struct openb3d_ddsloader_TDDS_obj*)o)!=0){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 398, 0};
		bbOnDebugEnterStm(&__stmt_0);
		if(bbt_iheight>4){
			struct BBDebugScope __scope = {
				BBDEBUGSCOPE_LOCALBLOCK,
				0,
				{
					{
						BBDEBUGDECL_END
					}
				}
			};
			bbOnDebugEnterScope((BBDebugScope *)&__scope);
			struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 398, 0};
			bbOnDebugEnterStm(&__stmt_0);
			bbt_height4=(bbt_iheight/4);
			bbOnDebugLeaveScope();
		}else{
			struct BBDebugScope __scope = {
				BBDEBUGSCOPE_LOCALBLOCK,
				0,
				{
					{
						BBDEBUGDECL_END
					}
				}
			};
			bbOnDebugEnterScope((BBDebugScope *)&__scope);
			struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 398, 0};
			bbOnDebugEnterStm(&__stmt_0);
			bbt_height4=1;
			bbOnDebugLeaveScope();
		}
		struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 399, 0};
		bbOnDebugEnterStm(&__stmt_1);
		((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o));
		bbt_row=((struct openb3d_ddsloader_TDDS_obj*)o)->clas->m_GetPitch_iii((struct openb3d_ddsloader_TDDS_obj*)o,bbt_iwidth,((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_format [0],0);
		struct BBDebugStm __stmt_2 = {0xcf91fea8dbe5382b, 400, 0};
		bbOnDebugEnterStm(&__stmt_2);
		glPixelStorei((GLenum)3314,(GLint)bbt_row);
		struct BBDebugStm __stmt_3 = {0xcf91fea8dbe5382b, 401, 0};
		bbOnDebugEnterStm(&__stmt_3);
		DDSCopyRect_(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_dxt ,((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_width [0],((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_height [0],bbt_ix,bbt_iy,bbt_pixels,bbt_iwidth,bbt_iheight,0,bbt_inv,((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_format [0]);
		struct BBDebugStm __stmt_4 = {0xcf91fea8dbe5382b, 402, 0};
		bbOnDebugEnterStm(&__stmt_4);
		__glewCompressedTexImage2D(bbt_target,0,((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_format [0],bbt_iwidth,bbt_iheight,0,(bbt_row*bbt_height4),bbt_pixels);
		struct BBDebugStm __stmt_5 = {0xcf91fea8dbe5382b, 404, 0};
		bbOnDebugEnterStm(&__stmt_5);
		{
			BBINT bbt_j=0;
			BBINT bbt_=bbt_mmc;
			for(;(bbt_j<bbt_);bbt_j=(bbt_j+1)){
				struct openb3d_ddsloader_TDDS_obj* bbt_mip=(struct openb3d_ddsloader_TDDS_obj*)((struct openb3d_ddsloader_TDDS_obj*)&bbNullObject);
				BBINT bbt_pow2=0;
				struct BBDebugScope_3 __scope = {
					BBDEBUGSCOPE_LOCALBLOCK,
					0,
					{
						{
							BBDEBUGDECL_LOCAL,
							"j",
							"i",
							.var_address=&bbt_j
						},
						{
							BBDEBUGDECL_LOCAL,
							"mip",
							":TDDS",
							.var_address=&bbt_mip
						},
						{
							BBDEBUGDECL_LOCAL,
							"pow2",
							"i",
							.var_address=&bbt_pow2
						},
						{
							BBDEBUGDECL_END
						}
					}
				};
				bbOnDebugEnterScope((BBDebugScope *)&__scope);
				struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 405, 0};
				bbOnDebugEnterStm(&__stmt_0);
				bbt_mip=(struct openb3d_ddsloader_TDDS_obj*)((struct openb3d_ddsloader_TDDS_obj**)BBARRAYDATAINDEX((((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_mipmaps ),(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_mipmaps )->dims,((BBUINT)bbt_j)))[((BBUINT)bbt_j)];
				struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 406, 0};
				bbOnDebugEnterStm(&__stmt_1);
				bbt_pow2=((BBINT)bbLongPow(2LL, ((BBLONG)(bbt_j+1))));
				struct BBDebugStm __stmt_2 = {0xcf91fea8dbe5382b, 407, 0};
				bbOnDebugEnterStm(&__stmt_2);
				bbt_mwidth=(bbt_iwidth/bbt_pow2);
				struct BBDebugStm __stmt_3 = {0xcf91fea8dbe5382b, 407, 0};
				bbOnDebugEnterStm(&__stmt_3);
				bbt_mheight=(bbt_iheight/bbt_pow2);
				struct BBDebugStm __stmt_4 = {0xcf91fea8dbe5382b, 408, 0};
				bbOnDebugEnterStm(&__stmt_4);
				if(bbt_mheight>4){
					struct BBDebugScope __scope = {
						BBDEBUGSCOPE_LOCALBLOCK,
						0,
						{
							{
								BBDEBUGDECL_END
							}
						}
					};
					bbOnDebugEnterScope((BBDebugScope *)&__scope);
					struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 408, 0};
					bbOnDebugEnterStm(&__stmt_0);
					bbt_height4=(bbt_mheight/4);
					bbOnDebugLeaveScope();
				}else{
					struct BBDebugScope __scope = {
						BBDEBUGSCOPE_LOCALBLOCK,
						0,
						{
							{
								BBDEBUGDECL_END
							}
						}
					};
					bbOnDebugEnterScope((BBDebugScope *)&__scope);
					struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 408, 0};
					bbOnDebugEnterStm(&__stmt_0);
					bbt_height4=1;
					bbOnDebugLeaveScope();
				}
				struct BBDebugStm __stmt_5 = {0xcf91fea8dbe5382b, 409, 0};
				bbOnDebugEnterStm(&__stmt_5);
				if(((bbt_mwidth==0) || (bbt_mheight==0)) || (bbt_mipmap_flag==0)){
					struct BBDebugScope __scope = {
						BBDEBUGSCOPE_LOCALBLOCK,
						0,
						{
							{
								BBDEBUGDECL_END
							}
						}
					};
					bbOnDebugEnterScope((BBDebugScope *)&__scope);
					struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 409, 0};
					bbOnDebugEnterStm(&__stmt_0);
					bbOnDebugLeaveScope();
					bbOnDebugLeaveScope();
					break;
				}
				struct BBDebugStm __stmt_6 = {0xcf91fea8dbe5382b, 410, 0};
				bbOnDebugEnterStm(&__stmt_6);
				((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o));
				bbt_row=((struct openb3d_ddsloader_TDDS_obj*)o)->clas->m_GetPitch_iii((struct openb3d_ddsloader_TDDS_obj*)o,bbt_mwidth,((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_format [0],0);
				struct BBDebugStm __stmt_7 = {0xcf91fea8dbe5382b, 411, 0};
				bbOnDebugEnterStm(&__stmt_7);
				glPixelStorei((GLenum)3314,(GLint)bbt_row);
				struct BBDebugStm __stmt_8 = {0xcf91fea8dbe5382b, 412, 0};
				bbOnDebugEnterStm(&__stmt_8);
				DDSCopyRect_(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_mip))->_openb3d_ddsloader_tdds_dxt ,((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_mip))->_openb3d_ddsloader_tdds_width [0],((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_mip))->_openb3d_ddsloader_tdds_height [0],(bbt_ix/bbt_pow2),(bbt_iy/bbt_pow2),bbt_pixels,bbt_mwidth,bbt_mheight,0,bbt_inv,((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_format [0]);
				struct BBDebugStm __stmt_9 = {0xcf91fea8dbe5382b, 413, 0};
				bbOnDebugEnterStm(&__stmt_9);
				__glewCompressedTexImage2D(bbt_target,(bbt_j+1),((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_format [0],bbt_mwidth,bbt_mheight,0,(bbt_row*bbt_height4),bbt_pixels);
				bbOnDebugLeaveScope();
			}
		}
		bbOnDebugLeaveScope();
	}else{
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 416, 0};
		bbOnDebugEnterStm(&__stmt_0);
		glPixelStorei((GLenum)3317,(GLint)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_components [0]);
		struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 417, 0};
		bbOnDebugEnterStm(&__stmt_1);
		((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o));
		bbt_row=((struct openb3d_ddsloader_TDDS_obj*)o)->clas->m_GetPitch_iii((struct openb3d_ddsloader_TDDS_obj*)o,bbt_iwidth,((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_format [0],((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_components [0]);
		struct BBDebugStm __stmt_2 = {0xcf91fea8dbe5382b, 418, 0};
		bbOnDebugEnterStm(&__stmt_2);
		glPixelStorei((GLenum)3314,(GLint)(bbt_row/((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_components [0]));
		struct BBDebugStm __stmt_3 = {0xcf91fea8dbe5382b, 419, 0};
		bbOnDebugEnterStm(&__stmt_3);
		DDSCopyRect_(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_dxt ,((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_width [0],((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_height [0],bbt_ix,bbt_iy,bbt_pixels,bbt_iwidth,bbt_iheight,((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_components [0],bbt_inv,((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_format [0]);
		struct BBDebugStm __stmt_4 = {0xcf91fea8dbe5382b, 420, 0};
		bbOnDebugEnterStm(&__stmt_4);
		glTexImage2D((GLenum)bbt_target,(GLint)0,(GLint)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_components [0],(GLsizei)bbt_iwidth,(GLsizei)bbt_iheight,(GLint)0,(GLenum)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_format [0],(GLenum)5121,(const GLvoid*)bbt_pixels);
		struct BBDebugStm __stmt_5 = {0xcf91fea8dbe5382b, 422, 0};
		bbOnDebugEnterStm(&__stmt_5);
		{
			BBINT bbt_j2=0;
			BBINT bbt_2=bbt_mmc;
			for(;(bbt_j2<bbt_2);bbt_j2=(bbt_j2+1)){
				struct openb3d_ddsloader_TDDS_obj* bbt_mip2=(struct openb3d_ddsloader_TDDS_obj*)((struct openb3d_ddsloader_TDDS_obj*)&bbNullObject);
				BBINT bbt_pow22=0;
				struct BBDebugScope_3 __scope = {
					BBDEBUGSCOPE_LOCALBLOCK,
					0,
					{
						{
							BBDEBUGDECL_LOCAL,
							"j",
							"i",
							.var_address=&bbt_j2
						},
						{
							BBDEBUGDECL_LOCAL,
							"mip",
							":TDDS",
							.var_address=&bbt_mip2
						},
						{
							BBDEBUGDECL_LOCAL,
							"pow2",
							"i",
							.var_address=&bbt_pow22
						},
						{
							BBDEBUGDECL_END
						}
					}
				};
				bbOnDebugEnterScope((BBDebugScope *)&__scope);
				struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 423, 0};
				bbOnDebugEnterStm(&__stmt_0);
				bbt_mip2=(struct openb3d_ddsloader_TDDS_obj*)((struct openb3d_ddsloader_TDDS_obj**)BBARRAYDATAINDEX((((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_mipmaps ),(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_mipmaps )->dims,((BBUINT)bbt_j2)))[((BBUINT)bbt_j2)];
				struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 424, 0};
				bbOnDebugEnterStm(&__stmt_1);
				bbt_pow22=((BBINT)bbLongPow(2LL, ((BBLONG)(bbt_j2+1))));
				struct BBDebugStm __stmt_2 = {0xcf91fea8dbe5382b, 425, 0};
				bbOnDebugEnterStm(&__stmt_2);
				bbt_mwidth=(bbt_iwidth/bbt_pow22);
				struct BBDebugStm __stmt_3 = {0xcf91fea8dbe5382b, 425, 0};
				bbOnDebugEnterStm(&__stmt_3);
				bbt_mheight=(bbt_iheight/bbt_pow22);
				struct BBDebugStm __stmt_4 = {0xcf91fea8dbe5382b, 426, 0};
				bbOnDebugEnterStm(&__stmt_4);
				if(((bbt_mwidth==0) || (bbt_mheight==0)) || (bbt_mipmap_flag==0)){
					struct BBDebugScope __scope = {
						BBDEBUGSCOPE_LOCALBLOCK,
						0,
						{
							{
								BBDEBUGDECL_END
							}
						}
					};
					bbOnDebugEnterScope((BBDebugScope *)&__scope);
					struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 426, 0};
					bbOnDebugEnterStm(&__stmt_0);
					bbOnDebugLeaveScope();
					bbOnDebugLeaveScope();
					break;
				}
				struct BBDebugStm __stmt_5 = {0xcf91fea8dbe5382b, 427, 0};
				bbOnDebugEnterStm(&__stmt_5);
				((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o));
				bbt_row=((struct openb3d_ddsloader_TDDS_obj*)o)->clas->m_GetPitch_iii((struct openb3d_ddsloader_TDDS_obj*)o,bbt_mwidth,((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_format [0],((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_components [0]);
				struct BBDebugStm __stmt_6 = {0xcf91fea8dbe5382b, 428, 0};
				bbOnDebugEnterStm(&__stmt_6);
				glPixelStorei((GLenum)3314,(GLint)(bbt_row/((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_components [0]));
				struct BBDebugStm __stmt_7 = {0xcf91fea8dbe5382b, 429, 0};
				bbOnDebugEnterStm(&__stmt_7);
				DDSCopyRect_(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_mip2))->_openb3d_ddsloader_tdds_dxt ,((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_mip2))->_openb3d_ddsloader_tdds_width [0],((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_mip2))->_openb3d_ddsloader_tdds_height [0],(bbt_ix/bbt_pow22),(bbt_iy/bbt_pow22),bbt_pixels,bbt_mwidth,bbt_mheight,((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_components [0],bbt_inv,((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_format [0]);
				struct BBDebugStm __stmt_8 = {0xcf91fea8dbe5382b, 430, 0};
				bbOnDebugEnterStm(&__stmt_8);
				glTexImage2D((GLenum)bbt_target,(GLint)(bbt_j2+1),(GLint)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_components [0],(GLsizei)bbt_mwidth,(GLsizei)bbt_mheight,(GLint)0,(GLenum)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_format [0],(GLenum)5121,(const GLvoid*)bbt_pixels);
				bbOnDebugLeaveScope();
			}
		}
		bbOnDebugLeaveScope();
	}
	struct BBDebugStm __stmt_7 = {0xcf91fea8dbe5382b, 434, 0};
	bbOnDebugEnterStm(&__stmt_7);
	glPixelStorei((GLenum)3314,(GLint)0);
	bbOnDebugLeaveScope();
}
void _openb3d_ddsloader_TDDS_UploadTextureCubeMap(struct openb3d_ddsloader_TDDS_obj* o){
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o));
	struct BBDebugScope_1 __scope = {
		BBDEBUGSCOPE_FUNCTION,
		"UploadTextureCubeMap",
		{
			{
				BBDEBUGDECL_LOCAL,
				"Self",
				":TDDS",
				.var_address=&o
			},
			{
				BBDEBUGDECL_END
			}
		}
	};
	bbOnDebugEnterScope((BBDebugScope *)&__scope);
	struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 440, 0};
	bbOnDebugEnterStm(&__stmt_0);
	{
		BBINT bbt_i=0;
		for(;(bbt_i<=5);bbt_i=(bbt_i+1)){
			BBINT bbt_face=0;
			struct openb3d_ddsloader_TDDS_obj* bbt_surf=(struct openb3d_ddsloader_TDDS_obj*)((struct openb3d_ddsloader_TDDS_obj*)&bbNullObject);
			struct BBDebugScope_3 __scope = {
				BBDEBUGSCOPE_LOCALBLOCK,
				0,
				{
					{
						BBDEBUGDECL_LOCAL,
						"i",
						"i",
						.var_address=&bbt_i
					},
					{
						BBDEBUGDECL_LOCAL,
						"face",
						"i",
						.var_address=&bbt_face
					},
					{
						BBDEBUGDECL_LOCAL,
						"surf",
						":TDDS",
						.var_address=&bbt_surf
					},
					{
						BBDEBUGDECL_END
					}
				}
			};
			bbOnDebugEnterScope((BBDebugScope *)&__scope);
			struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 441, 0};
			bbOnDebugEnterStm(&__stmt_0);
			bbt_face=(34069+bbt_i);
			struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 442, 0};
			bbOnDebugEnterStm(&__stmt_1);
			bbt_surf=(struct openb3d_ddsloader_TDDS_obj*)((struct openb3d_ddsloader_TDDS_obj**)BBARRAYDATAINDEX((((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_mipmaps ),(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_mipmaps )->dims,((BBUINT)bbt_i)))[((BBUINT)bbt_i)];
			struct BBDebugStm __stmt_2 = {0xcf91fea8dbe5382b, 444, 0};
			bbOnDebugEnterStm(&__stmt_2);
			((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o));
			if(((struct openb3d_ddsloader_TDDS_obj*)o)->clas->m_IsCompressed((struct openb3d_ddsloader_TDDS_obj*)o)!=0){
				struct BBDebugScope __scope = {
					BBDEBUGSCOPE_LOCALBLOCK,
					0,
					{
						{
							BBDEBUGDECL_END
						}
					}
				};
				bbOnDebugEnterScope((BBDebugScope *)&__scope);
				struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 445, 0};
				bbOnDebugEnterStm(&__stmt_0);
				__glewCompressedTexImage2D(bbt_face,0,((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_format [0],((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_surf))->_openb3d_ddsloader_tdds_width [0],((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_surf))->_openb3d_ddsloader_tdds_height [0],0,((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_surf))->_openb3d_ddsloader_tdds_size [0],((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_surf))->_openb3d_ddsloader_tdds_dxt );
				struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 446, 0};
				bbOnDebugEnterStm(&__stmt_1);
				{
					BBINT bbt_j=0;
					BBINT bbt_=((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_surf))->_openb3d_ddsloader_tdds_mipmapcount [0];
					for(;(bbt_j<bbt_);bbt_j=(bbt_j+1)){
						struct openb3d_ddsloader_TDDS_obj* bbt_mip=(struct openb3d_ddsloader_TDDS_obj*)((struct openb3d_ddsloader_TDDS_obj*)&bbNullObject);
						struct BBDebugScope_2 __scope = {
							BBDEBUGSCOPE_LOCALBLOCK,
							0,
							{
								{
									BBDEBUGDECL_LOCAL,
									"j",
									"i",
									.var_address=&bbt_j
								},
								{
									BBDEBUGDECL_LOCAL,
									"mip",
									":TDDS",
									.var_address=&bbt_mip
								},
								{
									BBDEBUGDECL_END
								}
							}
						};
						bbOnDebugEnterScope((BBDebugScope *)&__scope);
						struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 447, 0};
						bbOnDebugEnterStm(&__stmt_0);
						bbt_mip=(struct openb3d_ddsloader_TDDS_obj*)((struct openb3d_ddsloader_TDDS_obj**)BBARRAYDATAINDEX((((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_surf))->_openb3d_ddsloader_tdds_mipmaps ),(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_surf))->_openb3d_ddsloader_tdds_mipmaps )->dims,((BBUINT)bbt_j)))[((BBUINT)bbt_j)];
						struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 448, 0};
						bbOnDebugEnterStm(&__stmt_1);
						__glewCompressedTexImage2D(bbt_face,(bbt_j+1),((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_format [0],((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_mip))->_openb3d_ddsloader_tdds_width [0],((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_mip))->_openb3d_ddsloader_tdds_height [0],0,((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_mip))->_openb3d_ddsloader_tdds_size [0],((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_mip))->_openb3d_ddsloader_tdds_dxt );
						bbOnDebugLeaveScope();
					}
				}
				bbOnDebugLeaveScope();
			}else{
				struct BBDebugScope __scope = {
					BBDEBUGSCOPE_LOCALBLOCK,
					0,
					{
						{
							BBDEBUGDECL_END
						}
					}
				};
				bbOnDebugEnterScope((BBDebugScope *)&__scope);
				struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 451, 0};
				bbOnDebugEnterStm(&__stmt_0);
				glTexImage2D((GLenum)bbt_face,(GLint)0,(GLint)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_components [0],(GLsizei)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_surf))->_openb3d_ddsloader_tdds_width [0],(GLsizei)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_surf))->_openb3d_ddsloader_tdds_height [0],(GLint)0,(GLenum)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_format [0],(GLenum)5121,(const GLvoid*)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_surf))->_openb3d_ddsloader_tdds_dxt );
				struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 452, 0};
				bbOnDebugEnterStm(&__stmt_1);
				{
					BBINT bbt_j2=0;
					BBINT bbt_2=((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_surf))->_openb3d_ddsloader_tdds_mipmapcount [0];
					for(;(bbt_j2<bbt_2);bbt_j2=(bbt_j2+1)){
						struct openb3d_ddsloader_TDDS_obj* bbt_mip2=(struct openb3d_ddsloader_TDDS_obj*)((struct openb3d_ddsloader_TDDS_obj*)&bbNullObject);
						struct BBDebugScope_2 __scope = {
							BBDEBUGSCOPE_LOCALBLOCK,
							0,
							{
								{
									BBDEBUGDECL_LOCAL,
									"j",
									"i",
									.var_address=&bbt_j2
								},
								{
									BBDEBUGDECL_LOCAL,
									"mip",
									":TDDS",
									.var_address=&bbt_mip2
								},
								{
									BBDEBUGDECL_END
								}
							}
						};
						bbOnDebugEnterScope((BBDebugScope *)&__scope);
						struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 453, 0};
						bbOnDebugEnterStm(&__stmt_0);
						bbt_mip2=(struct openb3d_ddsloader_TDDS_obj*)((struct openb3d_ddsloader_TDDS_obj**)BBARRAYDATAINDEX((((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_surf))->_openb3d_ddsloader_tdds_mipmaps ),(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_surf))->_openb3d_ddsloader_tdds_mipmaps )->dims,((BBUINT)bbt_j2)))[((BBUINT)bbt_j2)];
						struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 454, 0};
						bbOnDebugEnterStm(&__stmt_1);
						glTexImage2D((GLenum)bbt_face,(GLint)(bbt_j2+1),(GLint)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_components [0],(GLsizei)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_mip2))->_openb3d_ddsloader_tdds_width [0],(GLsizei)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_mip2))->_openb3d_ddsloader_tdds_height [0],(GLint)0,(GLenum)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)o))->_openb3d_ddsloader_tdds_format [0],(GLenum)5121,(const GLvoid*)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_mip2))->_openb3d_ddsloader_tdds_dxt );
						bbOnDebugLeaveScope();
					}
				}
				bbOnDebugLeaveScope();
			}
			bbOnDebugLeaveScope();
		}
	}
	bbOnDebugLeaveScope();
}
struct brl_linkedlist_TList_obj* openb3d_ddsloader_TDDS_dds_list;
struct brl_map_ptrmap_TPtrMap_obj* openb3d_ddsloader_TDDS_dds_map;
struct BBDebugScope_34 openb3d_ddsloader_TDDS_scope ={
	BBDEBUGSCOPE_USERTYPE,
	"TDDS",
	{
		{
			BBDEBUGDECL_FIELD,
			"buffer",
			"*b",
			.field_offset=offsetof(struct openb3d_ddsloader_TDDS_obj,_openb3d_ddsloader_tdds_buffer)
		},
		{
			BBDEBUGDECL_FIELD,
			"mipmaps",
			"[]:TDDS",
			.field_offset=offsetof(struct openb3d_ddsloader_TDDS_obj,_openb3d_ddsloader_tdds_mipmaps)
		},
		{
			BBDEBUGDECL_FIELD,
			"width",
			"*i",
			.field_offset=offsetof(struct openb3d_ddsloader_TDDS_obj,_openb3d_ddsloader_tdds_width)
		},
		{
			BBDEBUGDECL_FIELD,
			"height",
			"*i",
			.field_offset=offsetof(struct openb3d_ddsloader_TDDS_obj,_openb3d_ddsloader_tdds_height)
		},
		{
			BBDEBUGDECL_FIELD,
			"depth",
			"*i",
			.field_offset=offsetof(struct openb3d_ddsloader_TDDS_obj,_openb3d_ddsloader_tdds_depth)
		},
		{
			BBDEBUGDECL_FIELD,
			"mipmapcount",
			"*i",
			.field_offset=offsetof(struct openb3d_ddsloader_TDDS_obj,_openb3d_ddsloader_tdds_mipmapcount)
		},
		{
			BBDEBUGDECL_FIELD,
			"pitch",
			"*i",
			.field_offset=offsetof(struct openb3d_ddsloader_TDDS_obj,_openb3d_ddsloader_tdds_pitch)
		},
		{
			BBDEBUGDECL_FIELD,
			"size",
			"*i",
			.field_offset=offsetof(struct openb3d_ddsloader_TDDS_obj,_openb3d_ddsloader_tdds_size)
		},
		{
			BBDEBUGDECL_FIELD,
			"dxt",
			"*b",
			.field_offset=offsetof(struct openb3d_ddsloader_TDDS_obj,_openb3d_ddsloader_tdds_dxt)
		},
		{
			BBDEBUGDECL_FIELD,
			"format",
			"*i",
			.field_offset=offsetof(struct openb3d_ddsloader_TDDS_obj,_openb3d_ddsloader_tdds_format)
		},
		{
			BBDEBUGDECL_FIELD,
			"components",
			"*i",
			.field_offset=offsetof(struct openb3d_ddsloader_TDDS_obj,_openb3d_ddsloader_tdds_components)
		},
		{
			BBDEBUGDECL_FIELD,
			"target",
			"*i",
			.field_offset=offsetof(struct openb3d_ddsloader_TDDS_obj,_openb3d_ddsloader_tdds_target)
		},
		{
			BBDEBUGDECL_FIELD,
			"pixmap",
			":TPixmap",
			.field_offset=offsetof(struct openb3d_ddsloader_TDDS_obj,_openb3d_ddsloader_tdds_pixmap)
		},
		{
			BBDEBUGDECL_FIELD,
			"bmx_buffer",
			"*b",
			.field_offset=offsetof(struct openb3d_ddsloader_TDDS_obj,_openb3d_ddsloader_tdds_bmx_buffer)
		},
		{
			BBDEBUGDECL_FIELD,
			"instance",
			"*b",
			.field_offset=offsetof(struct openb3d_ddsloader_TDDS_obj,_openb3d_ddsloader_tdds_instance)
		},
		{
			BBDEBUGDECL_FIELD,
			"exists",
			"i",
			.field_offset=offsetof(struct openb3d_ddsloader_TDDS_obj,_openb3d_ddsloader_tdds_exists)
		},
		{
			BBDEBUGDECL_GLOBAL,
			"dds_list",
			":TList",
			.var_address=(void*)&openb3d_ddsloader_TDDS_dds_list
		},
		{
			BBDEBUGDECL_GLOBAL,
			"dds_map",
			":TPtrMap",
			.var_address=(void*)&openb3d_ddsloader_TDDS_dds_map
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"New",
			"()",
			.func_ptr=(BBFuncPtr)&_openb3d_ddsloader_TDDS_New
		},
		{
			BBDEBUGDECL_TYPEFUNCTION,
			"CreateObject",
			"(*b):TDDS",
			.func_ptr=(BBFuncPtr)&openb3d_ddsloader_TDDS_CreateObject_TTDDS_pb
		},
		{
			BBDEBUGDECL_TYPEFUNCTION,
			"FreeObject",
			"(*b)",
			.func_ptr=(BBFuncPtr)&openb3d_ddsloader_TDDS_FreeObject_v_pb
		},
		{
			BBDEBUGDECL_TYPEFUNCTION,
			"GetObject",
			"(*b):TDDS",
			.func_ptr=(BBFuncPtr)&openb3d_ddsloader_TDDS_GetObject_TTDDS_pb
		},
		{
			BBDEBUGDECL_TYPEFUNCTION,
			"GetInstance",
			"(:TDDS)*b",
			.func_ptr=(BBFuncPtr)&openb3d_ddsloader_TDDS_GetInstance_pb_TTDDS
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"InitFields",
			"()",
			.func_ptr=(BBFuncPtr)&_openb3d_ddsloader_TDDS_InitFields
		},
		{
			BBDEBUGDECL_TYPEFUNCTION,
			"StringPtr",
			"(*b)$",
			.func_ptr=(BBFuncPtr)&openb3d_ddsloader_TDDS_StringPtr_S_pb
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"DebugFields",
			"(i,i)",
			.func_ptr=(BBFuncPtr)&_openb3d_ddsloader_TDDS_DebugFields_ii
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"FreeDDS",
			"()",
			.func_ptr=(BBFuncPtr)&_openb3d_ddsloader_TDDS_FreeDDS
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"GetPitch",
			"(i,i,i)i",
			.func_ptr=(BBFuncPtr)&_openb3d_ddsloader_TDDS_GetPitch_iii
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"IsCompressed",
			"()i",
			.func_ptr=(BBFuncPtr)&_openb3d_ddsloader_TDDS_IsCompressed
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"ImageParameters",
			"(i)",
			.func_ptr=(BBFuncPtr)&_openb3d_ddsloader_TDDS_ImageParameters_i
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"TextureParameters",
			"(i)",
			.func_ptr=(BBFuncPtr)&_openb3d_ddsloader_TDDS_TextureParameters_i
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"UploadTexture2D",
			"(i)",
			.func_ptr=(BBFuncPtr)&_openb3d_ddsloader_TDDS_UploadTexture2D_i
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"UploadTextureSubImage2D",
			"(i,i,i,i,*b,i,i,i)",
			.func_ptr=(BBFuncPtr)&_openb3d_ddsloader_TDDS_UploadTextureSubImage2D_iiiipbiii
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"UploadTextureCubeMap",
			"()",
			.func_ptr=(BBFuncPtr)&_openb3d_ddsloader_TDDS_UploadTextureCubeMap
		},
		{
			BBDEBUGDECL_END
		}
	}
};
struct BBClass_openb3d_ddsloader_TDDS openb3d_ddsloader_TDDS={
	&bbObjectClass,
	bbObjectFree,
	(BBDebugScope*)&openb3d_ddsloader_TDDS_scope,
	sizeof(struct openb3d_ddsloader_TDDS_obj),
	(void (*)(BBOBJECT))_openb3d_ddsloader_TDDS_New,
	bbObjectDtor,
	bbObjectToString,
	bbObjectCompare,
	bbObjectSendMessage,
	0,
	0,
	offsetof(struct openb3d_ddsloader_TDDS_obj,_openb3d_ddsloader_tdds_exists) - offsetof(struct openb3d_ddsloader_TDDS_obj,_openb3d_ddsloader_tdds_buffer) + sizeof(BBINT)
	,0
	,offsetof(struct openb3d_ddsloader_TDDS_obj,_openb3d_ddsloader_tdds_buffer)
	,openb3d_ddsloader_TDDS_CreateObject_TTDDS_pb
	,openb3d_ddsloader_TDDS_FreeObject_v_pb
	,openb3d_ddsloader_TDDS_GetObject_TTDDS_pb
	,openb3d_ddsloader_TDDS_GetInstance_pb_TTDDS
	,_openb3d_ddsloader_TDDS_InitFields
	,openb3d_ddsloader_TDDS_StringPtr_S_pb
	,_openb3d_ddsloader_TDDS_DebugFields_ii
	,_openb3d_ddsloader_TDDS_FreeDDS
	,_openb3d_ddsloader_TDDS_GetPitch_iii
	,_openb3d_ddsloader_TDDS_IsCompressed
	,_openb3d_ddsloader_TDDS_ImageParameters_i
	,_openb3d_ddsloader_TDDS_TextureParameters_i
	,_openb3d_ddsloader_TDDS_UploadTexture2D_i
	,_openb3d_ddsloader_TDDS_UploadTextureSubImage2D_iiiipbiii
	,_openb3d_ddsloader_TDDS_UploadTextureCubeMap
};

struct brl_max2d_image_TImage_obj* openb3d_ddsloader_LoadImageDDS(BBOBJECT bbt_url,BBINT bbt_flags,BBINT bbt_mr,BBINT bbt_mg,BBINT bbt_mb){
	struct brl_pixmap_TPixmap_obj* bbt_pixmap=(struct brl_pixmap_TPixmap_obj*)((struct brl_pixmap_TPixmap_obj*)&bbNullObject);
	struct openb3d_ddsloader_TDDS_obj* bbt_dds=(struct openb3d_ddsloader_TDDS_obj*)((struct openb3d_ddsloader_TDDS_obj*)&bbNullObject);
	struct brl_max2d_image_TImage_obj* bbt_img=(struct brl_max2d_image_TImage_obj*)((struct brl_max2d_image_TImage_obj*)&bbNullObject);
	BBINT bbt_pix_format=0;
	BBINT bbt_name=0;
	struct BBDebugScope_10 __scope = {
		BBDEBUGSCOPE_FUNCTION,
		"LoadImageDDS",
		{
			{
				BBDEBUGDECL_LOCAL,
				"url",
				":Object",
				.var_address=&bbt_url
			},
			{
				BBDEBUGDECL_LOCAL,
				"flags",
				"i",
				.var_address=&bbt_flags
			},
			{
				BBDEBUGDECL_LOCAL,
				"mr",
				"i",
				.var_address=&bbt_mr
			},
			{
				BBDEBUGDECL_LOCAL,
				"mg",
				"i",
				.var_address=&bbt_mg
			},
			{
				BBDEBUGDECL_LOCAL,
				"mb",
				"i",
				.var_address=&bbt_mb
			},
			{
				BBDEBUGDECL_LOCAL,
				"pixmap",
				":TPixmap",
				.var_address=&bbt_pixmap
			},
			{
				BBDEBUGDECL_LOCAL,
				"dds",
				":TDDS",
				.var_address=&bbt_dds
			},
			{
				BBDEBUGDECL_LOCAL,
				"img",
				":TImage",
				.var_address=&bbt_img
			},
			{
				BBDEBUGDECL_LOCAL,
				"pix_format",
				"i",
				.var_address=&bbt_pix_format
			},
			{
				BBDEBUGDECL_LOCAL,
				"name",
				"i",
				.var_address=&bbt_name
			},
			{
				BBDEBUGDECL_END
			}
		}
	};
	bbOnDebugEnterScope((BBDebugScope *)&__scope);
	struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 8, 0};
	bbOnDebugEnterStm(&__stmt_0);
	bbt_pixmap=(struct brl_pixmap_TPixmap_obj*)brl_pixmap_LoadPixmap((BBOBJECT)bbt_url);
	struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 9, 0};
	bbOnDebugEnterStm(&__stmt_1);
	bbt_dds=(struct openb3d_ddsloader_TDDS_obj*)((struct openb3d_ddsloader_TDDS_obj*)bbObjectDowncast((BBOBJECT)((struct brl_linkedlist_TList_obj*)bbNullObjectTest((BBObject*)openb3d_ddsloader_TDDS_dds_list))->clas->m_Last((struct brl_linkedlist_TList_obj*)openb3d_ddsloader_TDDS_dds_list),(BBClass*)&openb3d_ddsloader_TDDS));
	struct BBDebugStm __stmt_2 = {0xcf91fea8dbe5382b, 10, 0};
	bbOnDebugEnterStm(&__stmt_2);
	if(((BBOBJECT)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_pixmap )==&bbNullObject){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 11, 0};
		bbOnDebugEnterStm(&__stmt_0);
		brl_blitz_DebugLog(bbStringConcat(((BBString*)&_s0),((BBString *)bbObjectStringcast((BBOBJECT)bbt_url))));
		struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 12, 0};
		bbOnDebugEnterStm(&__stmt_1);
		bbOnDebugLeaveScope();
		bbOnDebugLeaveScope();
		return (struct brl_max2d_image_TImage_obj*)&bbNullObject;
	}
	struct BBDebugStm __stmt_3 = {0xcf91fea8dbe5382b, 15, 0};
	bbOnDebugEnterStm(&__stmt_3);
	if(((BBINT*)BBARRAYDATAINDEX((brl_pixmap_pixel_RedBitsPerPixel),(brl_pixmap_pixel_RedBitsPerPixel)->dims,0U))[0U]==0){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 16, 0};
		bbOnDebugEnterStm(&__stmt_0);
		brl_blitz_DebugLog((BBString*)&_s1);
		bbOnDebugLeaveScope();
	}
	struct BBDebugStm __stmt_4 = {0xcf91fea8dbe5382b, 19, 0};
	bbOnDebugEnterStm(&__stmt_4);
	bbt_img=(struct brl_max2d_image_TImage_obj*)brl_max2d_image_TImage_Create_TTImage_iiiiiii(((struct brl_pixmap_TPixmap_obj*)bbNullObjectTest((BBObject*)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_pixmap ))->_brl_pixmap_tpixmap_width ,((struct brl_pixmap_TPixmap_obj*)bbNullObjectTest((BBObject*)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_pixmap ))->_brl_pixmap_tpixmap_height ,1,bbt_flags,bbt_mr,bbt_mg,bbt_mb);
	struct BBDebugStm __stmt_5 = {0xcf91fea8dbe5382b, 21, 0};
	bbOnDebugEnterStm(&__stmt_5);
	bbt_pix_format=((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_format [0];
	struct BBDebugStm __stmt_6 = {0xcf91fea8dbe5382b, 22, 0};
	bbOnDebugEnterStm(&__stmt_6);
	if(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_format [0]==33776){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 22, 0};
		bbOnDebugEnterStm(&__stmt_0);
		bbt_pix_format=6407;
		bbOnDebugLeaveScope();
	}
	struct BBDebugStm __stmt_7 = {0xcf91fea8dbe5382b, 23, 0};
	bbOnDebugEnterStm(&__stmt_7);
	if(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_format [0]==33778){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 23, 0};
		bbOnDebugEnterStm(&__stmt_0);
		bbt_pix_format=6408;
		bbOnDebugLeaveScope();
	}
	struct BBDebugStm __stmt_8 = {0xcf91fea8dbe5382b, 24, 0};
	bbOnDebugEnterStm(&__stmt_8);
	if(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_format [0]==33779){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 24, 0};
		bbOnDebugEnterStm(&__stmt_0);
		bbt_pix_format=6408;
		bbOnDebugLeaveScope();
	}
	struct BBDebugStm __stmt_9 = {0xcf91fea8dbe5382b, 26, 0};
	bbOnDebugEnterStm(&__stmt_9);
	bbt_name=0;
	struct BBDebugStm __stmt_10 = {0xcf91fea8dbe5382b, 27, 0};
	bbOnDebugEnterStm(&__stmt_10);
	glGenTextures((GLsizei)1,(GLuint*)(&bbt_name));
	struct BBDebugStm __stmt_11 = {0xcf91fea8dbe5382b, 28, 0};
	bbOnDebugEnterStm(&__stmt_11);
	glBindTexture((GLenum)3553,(GLuint)bbt_name);
	struct BBDebugStm __stmt_12 = {0xcf91fea8dbe5382b, 30, 0};
	bbOnDebugEnterStm(&__stmt_12);
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->clas->m_ImageParameters_i((struct openb3d_ddsloader_TDDS_obj*)bbt_dds,bbt_flags);
	struct BBDebugStm __stmt_13 = {0xcf91fea8dbe5382b, 31, 0};
	bbOnDebugEnterStm(&__stmt_13);
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->clas->m_UploadTexture2D_i((struct openb3d_ddsloader_TDDS_obj*)bbt_dds,((unsigned int)(bbt_flags)&(unsigned int)(4)));
	struct BBDebugStm __stmt_14 = {0xcf91fea8dbe5382b, 33, 0};
	bbOnDebugEnterStm(&__stmt_14);
	if(((BBINT*)BBARRAYDATAINDEX((brl_pixmap_pixel_RedBitsPerPixel),(brl_pixmap_pixel_RedBitsPerPixel)->dims,0U))[0U]==0){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 34, 0};
		bbOnDebugEnterStm(&__stmt_0);
		glGetTexImage((GLenum)3553,(GLint)0,(GLenum)bbt_pix_format,(GLenum)5121,(GLvoid*)((struct brl_pixmap_TPixmap_obj*)bbNullObjectTest((BBObject*)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_pixmap ))->_brl_pixmap_tpixmap_pixels );
		struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 35, 0};
		bbOnDebugEnterStm(&__stmt_1);
		glDeleteTextures((GLsizei)1,(const GLuint*)(&bbt_name));
		bbOnDebugLeaveScope();
	}else{
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 37, 0};
		bbOnDebugEnterStm(&__stmt_0);
		((BBINT*)BBARRAYDATAINDEX((brl_pixmap_pixel_GreenBitsPerPixel),(brl_pixmap_pixel_GreenBitsPerPixel)->dims,0U))[0U]=((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_format [0];
		struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 38, 0};
		bbOnDebugEnterStm(&__stmt_1);
		((BBINT*)BBARRAYDATAINDEX((brl_pixmap_pixel_BlueBitsPerPixel),(brl_pixmap_pixel_BlueBitsPerPixel)->dims,0U))[0U]=bbt_name;
		bbOnDebugLeaveScope();
	}
	struct BBDebugStm __stmt_15 = {0xcf91fea8dbe5382b, 41, 0};
	bbOnDebugEnterStm(&__stmt_15);
	((struct brl_max2d_image_TImage_obj*)bbNullObjectTest((BBObject*)bbt_img))->clas->m_SetPixmap_iTTPixmapi((struct brl_max2d_image_TImage_obj*)bbt_img,0,(struct brl_pixmap_TPixmap_obj*)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_pixmap ,0);
	struct BBDebugStm __stmt_16 = {0xcf91fea8dbe5382b, 43, 0};
	bbOnDebugEnterStm(&__stmt_16);
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->clas->m_FreeDDS((struct openb3d_ddsloader_TDDS_obj*)bbt_dds);
	struct BBDebugStm __stmt_17 = {0xcf91fea8dbe5382b, 44, 0};
	bbOnDebugEnterStm(&__stmt_17);
	bbOnDebugLeaveScope();
	return (struct brl_max2d_image_TImage_obj*)bbt_img;
}
struct brl_max2d_image_TImage_obj* openb3d_ddsloader_LoadAnimImageDDS(BBOBJECT bbt_url,BBINT bbt_cell_width,BBINT bbt_cell_height,BBINT bbt_first_cell,BBINT bbt_cell_count,BBINT bbt_flags,BBINT bbt_mr,BBINT bbt_mg,BBINT bbt_mb){
	struct brl_pixmap_TPixmap_obj* bbt_pixmap=(struct brl_pixmap_TPixmap_obj*)((struct brl_pixmap_TPixmap_obj*)&bbNullObject);
	struct openb3d_ddsloader_TDDS_obj* bbt_dds=(struct openb3d_ddsloader_TDDS_obj*)((struct openb3d_ddsloader_TDDS_obj*)&bbNullObject);
	BBINT bbt_x_cells=0;
	BBINT bbt_y_cells=0;
	struct brl_max2d_image_TImage_obj* bbt_img=(struct brl_max2d_image_TImage_obj*)((struct brl_max2d_image_TImage_obj*)&bbNullObject);
	BBINT bbt_pix_format=0;
	BBINT bbt_name=0;
	struct BBDebugScope_16 __scope = {
		BBDEBUGSCOPE_FUNCTION,
		"LoadAnimImageDDS",
		{
			{
				BBDEBUGDECL_LOCAL,
				"url",
				":Object",
				.var_address=&bbt_url
			},
			{
				BBDEBUGDECL_LOCAL,
				"cell_width",
				"i",
				.var_address=&bbt_cell_width
			},
			{
				BBDEBUGDECL_LOCAL,
				"cell_height",
				"i",
				.var_address=&bbt_cell_height
			},
			{
				BBDEBUGDECL_LOCAL,
				"first_cell",
				"i",
				.var_address=&bbt_first_cell
			},
			{
				BBDEBUGDECL_LOCAL,
				"cell_count",
				"i",
				.var_address=&bbt_cell_count
			},
			{
				BBDEBUGDECL_LOCAL,
				"flags",
				"i",
				.var_address=&bbt_flags
			},
			{
				BBDEBUGDECL_LOCAL,
				"mr",
				"i",
				.var_address=&bbt_mr
			},
			{
				BBDEBUGDECL_LOCAL,
				"mg",
				"i",
				.var_address=&bbt_mg
			},
			{
				BBDEBUGDECL_LOCAL,
				"mb",
				"i",
				.var_address=&bbt_mb
			},
			{
				BBDEBUGDECL_LOCAL,
				"pixmap",
				":TPixmap",
				.var_address=&bbt_pixmap
			},
			{
				BBDEBUGDECL_LOCAL,
				"dds",
				":TDDS",
				.var_address=&bbt_dds
			},
			{
				BBDEBUGDECL_LOCAL,
				"x_cells",
				"i",
				.var_address=&bbt_x_cells
			},
			{
				BBDEBUGDECL_LOCAL,
				"y_cells",
				"i",
				.var_address=&bbt_y_cells
			},
			{
				BBDEBUGDECL_LOCAL,
				"img",
				":TImage",
				.var_address=&bbt_img
			},
			{
				BBDEBUGDECL_LOCAL,
				"pix_format",
				"i",
				.var_address=&bbt_pix_format
			},
			{
				BBDEBUGDECL_LOCAL,
				"name",
				"i",
				.var_address=&bbt_name
			},
			{
				BBDEBUGDECL_END
			}
		}
	};
	bbOnDebugEnterScope((BBDebugScope *)&__scope);
	struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 54, 0};
	bbOnDebugEnterStm(&__stmt_0);
	bbt_pixmap=(struct brl_pixmap_TPixmap_obj*)brl_pixmap_LoadPixmap((BBOBJECT)bbt_url);
	struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 55, 0};
	bbOnDebugEnterStm(&__stmt_1);
	bbt_dds=(struct openb3d_ddsloader_TDDS_obj*)((struct openb3d_ddsloader_TDDS_obj*)bbObjectDowncast((BBOBJECT)((struct brl_linkedlist_TList_obj*)bbNullObjectTest((BBObject*)openb3d_ddsloader_TDDS_dds_list))->clas->m_Last((struct brl_linkedlist_TList_obj*)openb3d_ddsloader_TDDS_dds_list),(BBClass*)&openb3d_ddsloader_TDDS));
	struct BBDebugStm __stmt_2 = {0xcf91fea8dbe5382b, 56, 0};
	bbOnDebugEnterStm(&__stmt_2);
	if(((BBOBJECT)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_pixmap )==&bbNullObject){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 57, 0};
		bbOnDebugEnterStm(&__stmt_0);
		brl_blitz_DebugLog(bbStringConcat(((BBString*)&_s0),((BBString *)bbObjectStringcast((BBOBJECT)bbt_url))));
		struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 58, 0};
		bbOnDebugEnterStm(&__stmt_1);
		bbOnDebugLeaveScope();
		bbOnDebugLeaveScope();
		return (struct brl_max2d_image_TImage_obj*)&bbNullObject;
	}
	struct BBDebugStm __stmt_3 = {0xcf91fea8dbe5382b, 61, 0};
	bbOnDebugEnterStm(&__stmt_3);
	if(((BBINT*)BBARRAYDATAINDEX((brl_pixmap_pixel_RedBitsPerPixel),(brl_pixmap_pixel_RedBitsPerPixel)->dims,0U))[0U]==0){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 62, 0};
		bbOnDebugEnterStm(&__stmt_0);
		brl_blitz_DebugLog((BBString*)&_s1);
		bbOnDebugLeaveScope();
	}
	struct BBDebugStm __stmt_4 = {0xcf91fea8dbe5382b, 65, 0};
	bbOnDebugEnterStm(&__stmt_4);
	bbt_x_cells=(((struct brl_pixmap_TPixmap_obj*)bbNullObjectTest((BBObject*)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_pixmap ))->_brl_pixmap_tpixmap_width /bbt_cell_width);
	struct BBDebugStm __stmt_5 = {0xcf91fea8dbe5382b, 66, 0};
	bbOnDebugEnterStm(&__stmt_5);
	bbt_y_cells=(((struct brl_pixmap_TPixmap_obj*)bbNullObjectTest((BBObject*)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_pixmap ))->_brl_pixmap_tpixmap_height /bbt_cell_height);
	struct BBDebugStm __stmt_6 = {0xcf91fea8dbe5382b, 67, 0};
	bbOnDebugEnterStm(&__stmt_6);
	if((bbt_first_cell+bbt_cell_count)>(bbt_x_cells*bbt_y_cells)){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 67, 0};
		bbOnDebugEnterStm(&__stmt_0);
		bbOnDebugLeaveScope();
		bbOnDebugLeaveScope();
		return (struct brl_max2d_image_TImage_obj*)&bbNullObject;
	}
	struct BBDebugStm __stmt_7 = {0xcf91fea8dbe5382b, 69, 0};
	bbOnDebugEnterStm(&__stmt_7);
	bbt_img=(struct brl_max2d_image_TImage_obj*)brl_max2d_image_TImage_Create_TTImage_iiiiiii(bbt_cell_width,bbt_cell_height,bbt_cell_count,bbt_flags,bbt_mr,bbt_mg,bbt_mb);
	struct BBDebugStm __stmt_8 = {0xcf91fea8dbe5382b, 71, 0};
	bbOnDebugEnterStm(&__stmt_8);
	bbt_pix_format=((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_format [0];
	struct BBDebugStm __stmt_9 = {0xcf91fea8dbe5382b, 72, 0};
	bbOnDebugEnterStm(&__stmt_9);
	if(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_format [0]==33776){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 72, 0};
		bbOnDebugEnterStm(&__stmt_0);
		bbt_pix_format=6407;
		bbOnDebugLeaveScope();
	}
	struct BBDebugStm __stmt_10 = {0xcf91fea8dbe5382b, 73, 0};
	bbOnDebugEnterStm(&__stmt_10);
	if(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_format [0]==33778){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 73, 0};
		bbOnDebugEnterStm(&__stmt_0);
		bbt_pix_format=6408;
		bbOnDebugLeaveScope();
	}
	struct BBDebugStm __stmt_11 = {0xcf91fea8dbe5382b, 74, 0};
	bbOnDebugEnterStm(&__stmt_11);
	if(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_format [0]==33779){
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_LOCALBLOCK,
			0,
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 74, 0};
		bbOnDebugEnterStm(&__stmt_0);
		bbt_pix_format=6408;
		bbOnDebugLeaveScope();
	}
	struct BBDebugStm __stmt_12 = {0xcf91fea8dbe5382b, 76, 0};
	bbOnDebugEnterStm(&__stmt_12);
	bbt_name=0;
	struct BBDebugStm __stmt_13 = {0xcf91fea8dbe5382b, 77, 0};
	bbOnDebugEnterStm(&__stmt_13);
	{
		BBINT bbt_cell=bbt_first_cell;
		BBINT bbt_=((bbt_first_cell+bbt_cell_count)-1);
		for(;(bbt_cell<=bbt_);bbt_cell=(bbt_cell+1)){
			BBINT bbt_x=0;
			BBINT bbt_y=0;
			struct brl_pixmap_TPixmap_obj* bbt_animmap=(struct brl_pixmap_TPixmap_obj*)((struct brl_pixmap_TPixmap_obj*)&bbNullObject);
			struct BBDebugScope_4 __scope = {
				BBDEBUGSCOPE_LOCALBLOCK,
				0,
				{
					{
						BBDEBUGDECL_LOCAL,
						"cell",
						"i",
						.var_address=&bbt_cell
					},
					{
						BBDEBUGDECL_LOCAL,
						"x",
						"i",
						.var_address=&bbt_x
					},
					{
						BBDEBUGDECL_LOCAL,
						"y",
						"i",
						.var_address=&bbt_y
					},
					{
						BBDEBUGDECL_LOCAL,
						"animmap",
						":TPixmap",
						.var_address=&bbt_animmap
					},
					{
						BBDEBUGDECL_END
					}
				}
			};
			bbOnDebugEnterScope((BBDebugScope *)&__scope);
			struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 78, 0};
			bbOnDebugEnterStm(&__stmt_0);
			bbt_x=((bbt_cell % bbt_x_cells)*bbt_cell_width);
			struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 79, 0};
			bbOnDebugEnterStm(&__stmt_1);
			bbt_y=((bbt_cell/bbt_x_cells)*bbt_cell_height);
			struct BBDebugStm __stmt_2 = {0xcf91fea8dbe5382b, 81, 0};
			bbOnDebugEnterStm(&__stmt_2);
			bbt_animmap=(struct brl_pixmap_TPixmap_obj*)brl_pixmap_CreatePixmap(bbt_cell_width,bbt_cell_height,((struct brl_pixmap_TPixmap_obj*)bbNullObjectTest((BBObject*)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_pixmap ))->_brl_pixmap_tpixmap_format ,((BBINT*)BBARRAYDATAINDEX((brl_pixmap_pixel_BytesPerPixel),(brl_pixmap_pixel_BytesPerPixel)->dims,((BBUINT)((struct brl_pixmap_TPixmap_obj*)bbNullObjectTest((BBObject*)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_pixmap ))->_brl_pixmap_tpixmap_format )))[((BBUINT)((struct brl_pixmap_TPixmap_obj*)bbNullObjectTest((BBObject*)((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_pixmap ))->_brl_pixmap_tpixmap_format )]);
			struct BBDebugStm __stmt_3 = {0xcf91fea8dbe5382b, 83, 0};
			bbOnDebugEnterStm(&__stmt_3);
			glGenTextures((GLsizei)1,(GLuint*)(&bbt_name));
			struct BBDebugStm __stmt_4 = {0xcf91fea8dbe5382b, 84, 0};
			bbOnDebugEnterStm(&__stmt_4);
			glBindTexture((GLenum)3553,(GLuint)bbt_name);
			struct BBDebugStm __stmt_5 = {0xcf91fea8dbe5382b, 86, 0};
			bbOnDebugEnterStm(&__stmt_5);
			((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->clas->m_ImageParameters_i((struct openb3d_ddsloader_TDDS_obj*)bbt_dds,bbt_flags);
			struct BBDebugStm __stmt_6 = {0xcf91fea8dbe5382b, 87, 0};
			bbOnDebugEnterStm(&__stmt_6);
			((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->clas->m_UploadTextureSubImage2D_iiiipbiii((struct openb3d_ddsloader_TDDS_obj*)bbt_dds,bbt_x,bbt_y,bbt_cell_width,bbt_cell_height,((struct brl_pixmap_TPixmap_obj*)bbNullObjectTest((BBObject*)bbt_animmap))->_brl_pixmap_tpixmap_pixels ,((unsigned int)(bbt_flags)&(unsigned int)(4)),3553,0);
			struct BBDebugStm __stmt_7 = {0xcf91fea8dbe5382b, 89, 0};
			bbOnDebugEnterStm(&__stmt_7);
			if(((BBINT*)BBARRAYDATAINDEX((brl_pixmap_pixel_RedBitsPerPixel),(brl_pixmap_pixel_RedBitsPerPixel)->dims,0U))[0U]==0){
				struct BBDebugScope __scope = {
					BBDEBUGSCOPE_LOCALBLOCK,
					0,
					{
						{
							BBDEBUGDECL_END
						}
					}
				};
				bbOnDebugEnterScope((BBDebugScope *)&__scope);
				struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 90, 0};
				bbOnDebugEnterStm(&__stmt_0);
				glGetTexImage((GLenum)3553,(GLint)0,(GLenum)bbt_pix_format,(GLenum)5121,(GLvoid*)((struct brl_pixmap_TPixmap_obj*)bbNullObjectTest((BBObject*)bbt_animmap))->_brl_pixmap_tpixmap_pixels );
				struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 91, 0};
				bbOnDebugEnterStm(&__stmt_1);
				glDeleteTextures((GLsizei)1,(const GLuint*)(&bbt_name));
				bbOnDebugLeaveScope();
			}else{
				struct BBDebugScope __scope = {
					BBDEBUGSCOPE_LOCALBLOCK,
					0,
					{
						{
							BBDEBUGDECL_END
						}
					}
				};
				bbOnDebugEnterScope((BBDebugScope *)&__scope);
				struct BBDebugStm __stmt_0 = {0xcf91fea8dbe5382b, 93, 0};
				bbOnDebugEnterStm(&__stmt_0);
				DDSCopyRect_(((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_dxt ,((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_width [0],((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_height [0],bbt_x,bbt_y,((struct brl_pixmap_TPixmap_obj*)bbNullObjectTest((BBObject*)bbt_animmap))->_brl_pixmap_tpixmap_pixels ,bbt_cell_width,bbt_cell_height,((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_components [0],0,((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_format [0]);
				struct BBDebugStm __stmt_1 = {0xcf91fea8dbe5382b, 94, 0};
				bbOnDebugEnterStm(&__stmt_1);
				((BBINT*)BBARRAYDATAINDEX((brl_pixmap_pixel_GreenBitsPerPixel),(brl_pixmap_pixel_GreenBitsPerPixel)->dims,0U))[0U]=((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->_openb3d_ddsloader_tdds_format [0];
				struct BBDebugStm __stmt_2 = {0xcf91fea8dbe5382b, 95, 0};
				bbOnDebugEnterStm(&__stmt_2);
				((BBINT*)BBARRAYDATAINDEX((brl_pixmap_pixel_BlueBitsPerPixel),(brl_pixmap_pixel_BlueBitsPerPixel)->dims,0U))[0U]=bbt_name;
				bbOnDebugLeaveScope();
			}
			struct BBDebugStm __stmt_8 = {0xcf91fea8dbe5382b, 98, 0};
			bbOnDebugEnterStm(&__stmt_8);
			((struct brl_max2d_image_TImage_obj*)bbNullObjectTest((BBObject*)bbt_img))->clas->m_SetPixmap_iTTPixmapi((struct brl_max2d_image_TImage_obj*)bbt_img,(bbt_cell-bbt_first_cell),(struct brl_pixmap_TPixmap_obj*)bbt_animmap,0);
			bbOnDebugLeaveScope();
		}
	}
	struct BBDebugStm __stmt_14 = {0xcf91fea8dbe5382b, 101, 0};
	bbOnDebugEnterStm(&__stmt_14);
	((struct openb3d_ddsloader_TDDS_obj*)bbNullObjectTest((BBObject*)bbt_dds))->clas->m_FreeDDS((struct openb3d_ddsloader_TDDS_obj*)bbt_dds);
	struct BBDebugStm __stmt_15 = {0xcf91fea8dbe5382b, 102, 0};
	bbOnDebugEnterStm(&__stmt_15);
	bbOnDebugLeaveScope();
	return (struct brl_max2d_image_TImage_obj*)bbt_img;
}
static int __bb_openb3d_ddsloader_ddsloader_inited = 0;
int __bb_openb3d_ddsloader_ddsloader(){
	if (!__bb_openb3d_ddsloader_ddsloader_inited) {
		__bb_openb3d_ddsloader_ddsloader_inited = 1;
		GC_add_roots(&openb3d_ddsloader_TDDS_dds_list, &openb3d_ddsloader_TDDS_dds_map + 1);
		__bb_brl_blitz_blitz();
		__bb_pub_glew_glew();
		__bb_pub_opengl_opengl();
		__bb_brl_glmax2d_glmax2d();
		__bb_brl_ramstream_ramstream();
		__bb_brl_retro_retro();
		__bb_brl_map_map();
		_bb_openb3d_ddsloader_source();
		bbObjectRegisterType((BBCLASS)&openb3d_ddsloader_TPixmapLoaderDDS);
		bbObjectRegisterType((BBCLASS)&openb3d_ddsloader_TDDS);
		bbRegisterSource(0xad75d41c69058a6, "c:/BlitzmaxNG/mod/openb3d.mod/ddsloader.mod/ddsloader.bmx");
		bbRegisterSource(0xcf91fea8dbe5382b, "c:/BlitzmaxNG/mod/openb3d.mod/ddsloader.mod/TDDS.bmx");
		openb3d_ddsloader_TDDS_dds_list=((struct brl_linkedlist_TList_obj*)&bbNullObject);
		openb3d_ddsloader_TDDS_dds_map=((struct brl_map_ptrmap_TPtrMap_obj*)&bbNullObject);
		openb3d_ddsloader_TDDS_dds_list=(struct brl_linkedlist_TList_obj*)brl_linkedlist_CreateList();
		openb3d_ddsloader_TDDS_dds_map=(struct brl_map_ptrmap_TPtrMap_obj*)(struct brl_map_ptrmap_TPtrMap_obj*)bbObjectAtomicNew((BBClass *)&brl_map_ptrmap_TPtrMap);
		struct BBDebugScope __scope = {
			BBDEBUGSCOPE_FUNCTION,
			"ddsloader",
			{
				{
					BBDEBUGDECL_END
				}
			}
		};
		bbOnDebugEnterScope((BBDebugScope *)&__scope);
		struct BBDebugStm __stmt_0 = {0xad75d41c69058a6, 128, 0};
		bbOnDebugEnterStm(&__stmt_0);
		(struct openb3d_ddsloader_TPixmapLoaderDDS_obj*)bbObjectNew((BBClass *)&openb3d_ddsloader_TPixmapLoaderDDS);
		bbOnDebugLeaveScope();
		return 0;
	}
	return 0;
}