// Generated by Haxe 4.3.3
#include <hxcpp.h>

#ifndef INCLUDED_ee4eb0f39650a1c2
#define INCLUDED_ee4eb0f39650a1c2
#include "vendor/include/Headers.h"
#endif
#ifndef INCLUDED_Test
#include <Test.h>
#endif

HX_LOCAL_STACK_FRAME(_hx_pos_df13cafffbed243f_8_main,"Test","main",0x9c6c95b5,"Test.main","Test.hx",8,0x8afb218c)

void Test_obj::__construct() { }

Dynamic Test_obj::__CreateEmpty() { return new Test_obj; }

void *Test_obj::_hx_vtable = 0;

Dynamic Test_obj::__Create(::hx::DynamicArray inArgs)
{
	::hx::ObjectPtr< Test_obj > _hx_result = new Test_obj();
	_hx_result->__construct();
	return _hx_result;
}

bool Test_obj::_hx_isInstanceOf(int inClassId) {
	return inClassId==(int)0x00000001 || inClassId==(int)0x0c25ea96;
}

void Test_obj::main(){
            	HX_STACKFRAME(&_hx_pos_df13cafffbed243f_8_main)
HXLINE(   9)		SDL_Init(( (unsigned int)((( (int)(( (unsigned int)(32) )) ) | ( (int)(( (unsigned int)(16384) )) ))) ));
HXLINE(  11)		::cpp::Pointer<  SDL_Window > window = SDL_CreateWindow(HX_("SDL Test",17,7c,d3,9e).utf8_str(),( (int)(( (unsigned int)(805240832) )) ),( (int)(( (unsigned int)(805240832) )) ),1280,720,( (unsigned int)((( (int)(( (unsigned int)(32) )) ) | ( (int)(( (unsigned int)(8192) )) ))) ));
HXLINE(  17)		::cpp::Pointer<  SDL_Renderer > renderer = SDL_CreateRenderer(window,-1,( (unsigned int)(2) ));
HXLINE(  19)		bool running = true;
HXLINE(  20)		::cpp::Pointer<  SDL_Event > event = null();
HXDLIN(  20)		SDL_Event __sdl_ev__; event = &__sdl_ev__;
HXDLIN(  20)		::cpp::Pointer<  SDL_Event > event1 = event;
HXLINE(  22)		IMG_Init(( (unsigned int)(63) ));
HXLINE(  24)		::cpp::Pointer<  SDL_Texture > tex = IMG_LoadTexture(renderer,HX_("assets/suffering.jpg",1a,56,49,6b).utf8_str());
HXLINE(  25)		int w = 0;
HXDLIN(  25)		int h = 0;
HXDLIN(  25)		SDL_QueryTexture(tex, NULL, NULL, &(w), &(h));
HXDLIN(  25)		 SDL_Point texSize = ( ( SDL_Point)(SDL_Point{ (int)w, (int)h }) );
HXLINE(  27)		while(running){
HXLINE(  28)			SDL_PollEvent(event1);
HXLINE(  30)			SDL_SetRenderDrawColor(renderer,( (unsigned char)(0) ),( (unsigned char)(0) ),( (unsigned char)(0) ),( (unsigned char)(0) ));
HXLINE(  31)			SDL_RenderClear(renderer);
HXLINE(  33)			{
HXLINE(  34)				int w1 = texSize.x;
HXDLIN(  34)				int h1 = texSize.y;
HXLINE(  33)				 SDL_Rect src = ( ( SDL_Rect)(SDL_Rect{ (int)0, (int)0, (int)w1, (int)h1 }) );
HXLINE(  35)				int w2 = texSize.x;
HXDLIN(  35)				int h2 = texSize.y;
HXLINE(  33)				 SDL_Rect dst = ( ( SDL_Rect)(SDL_Rect{ (int)30, (int)30, (int)w2, (int)h2 }) );
HXDLIN(  33)				SDL_RenderCopy(renderer, tex, &(src), &(dst));
            			}
HXLINE(  38)			SDL_RenderPresent(renderer);
HXLINE(  40)			if ((event1->get_ref().type == 256)) {
HXLINE(  42)				running = false;
            			}
            		}
HXLINE(  48)		SDL_DestroyRenderer(renderer);
HXLINE(  49)		SDL_DestroyWindow(window);
HXLINE(  50)		SDL_Quit();
HXLINE(  51)		IMG_Quit();
            	}


STATIC_HX_DEFINE_DYNAMIC_FUNC0(Test_obj,main,(void))


Test_obj::Test_obj()
{
}

bool Test_obj::__GetStatic(const ::String &inName, Dynamic &outValue, ::hx::PropertyAccess inCallProp)
{
	switch(inName.length) {
	case 4:
		if (HX_FIELD_EQ(inName,"main") ) { outValue = main_dyn(); return true; }
	}
	return false;
}

#ifdef HXCPP_SCRIPTABLE
static ::hx::StorageInfo *Test_obj_sMemberStorageInfo = 0;
static ::hx::StaticInfo *Test_obj_sStaticStorageInfo = 0;
#endif

::hx::Class Test_obj::__mClass;

static ::String Test_obj_sStaticFields[] = {
	HX_("main",39,38,56,48),
	::String(null())
};

void Test_obj::__register()
{
	Test_obj _hx_dummy;
	Test_obj::_hx_vtable = *(void **)&_hx_dummy;
	::hx::Static(__mClass) = new ::hx::Class_obj();
	__mClass->mName = HX_("Test",72,f4,d2,37);
	__mClass->mSuper = &super::__SGetClass();
	__mClass->mConstructEmpty = &__CreateEmpty;
	__mClass->mConstructArgs = &__Create;
	__mClass->mGetStaticField = &Test_obj::__GetStatic;
	__mClass->mSetStaticField = &::hx::Class_obj::SetNoStaticField;
	__mClass->mStatics = ::hx::Class_obj::dupFunctions(Test_obj_sStaticFields);
	__mClass->mMembers = ::hx::Class_obj::dupFunctions(0 /* sMemberFields */);
	__mClass->mCanCast = ::hx::TCanCast< Test_obj >;
#ifdef HXCPP_SCRIPTABLE
	__mClass->mMemberStorageInfo = Test_obj_sMemberStorageInfo;
#endif
#ifdef HXCPP_SCRIPTABLE
	__mClass->mStaticStorageInfo = Test_obj_sStaticStorageInfo;
#endif
	::hx::_hx_RegisterClass(__mClass->mName, __mClass);
}

