Example #1
0
void FlxReplay_obj::load(::String FileContents){
            	HX_STACK_FRAME("flixel.system.replay.FlxReplay","load",0x9870e395,"flixel.system.replay.FlxReplay.load","flixel/system/replay/FlxReplay.hx",96,0xb378fa20)
            	HX_STACK_THIS(this)
            	HX_STACK_ARG(FileContents,"FileContents")
HXLINE(  97)		this->init();
HXLINE(  99)		HX_VARI( ::Array< ::String >,lines) = FileContents.split(HX_("\n",0a,00,00,00));
HXLINE( 101)		::String _hx_tmp = lines->__get((int)0);
HXDLIN( 101)		this->seed = ::Std_obj::parseInt(_hx_tmp);
HXLINE( 103)		HX_VAR( ::String,line);
HXLINE( 104)		HX_VARI( Int,i) = (int)1;
HXLINE( 105)		HX_VARI( Int,l) = lines->length;
HXLINE( 106)		while((i < l)){
HXLINE( 108)			Int _hx_tmp1 = i++;
HXDLIN( 108)			line = lines->__get(_hx_tmp1);
HXLINE( 109)			Bool _hx_tmp2 = (line.length > (int)3);
HXDLIN( 109)			if (_hx_tmp2) {
HXLINE( 111)				Int _hx_tmp3 = this->frameCount++;
HXDLIN( 111)				 ::flixel::_hx_system::replay::FrameRecord _hx_tmp4 =  ::flixel::_hx_system::replay::FrameRecord_obj::__new()->load(line);
HXDLIN( 111)				this->_frames[_hx_tmp3] = _hx_tmp4;
HXLINE( 112)				Bool _hx_tmp5 = (this->frameCount >= this->_capacity);
HXDLIN( 112)				if (_hx_tmp5) {
HXLINE( 114)					hx::MultEq(this->_capacity,(int)2);
HXLINE( 115)					::flixel::util::FlxArrayUtil_obj::setLength_flixel_system_replay_FrameRecord(this->_frames,this->_capacity);
            				}
            			}
            		}
HXLINE( 120)		this->rewind();
            	}
Example #2
0
Int Stdout_obj::readBytes( ::haxe::io::Bytes str,Int pos,Int len) {
    HX_STACK_FRAME("sys.io._Process.Stdout","readBytes",0x9eebd4c9,"sys.io._Process.Stdout.readBytes","C:\\HaxeToolkit\\haxe\\std/cpp/_std/sys/io/Process.hx",75,0x19dec630)
    HX_STACK_THIS(this)
    HX_STACK_ARG(str,"str")
    HX_STACK_ARG(pos,"pos")
    HX_STACK_ARG(len,"len")
    HXLINE(  76)		HX_VAR( Int,result);
    HXLINE(  77)		try {
        HX_STACK_CATCHABLE( ::Dynamic, 0);
        HXLINE(  78)			Bool _hx_tmp = this->out;
        HXDLIN(  78)			if (_hx_tmp) {
            HXLINE(  78)				result = _hx_std_process_stdout_read(this->p,str->b,pos,len);
        }
        else {
            HXLINE(  79)				result = _hx_std_process_stderr_read(this->p,str->b,pos,len);
        }
    }
    catch( ::Dynamic _hx_e) {
        if (_hx_e.IsClass<  ::Dynamic >() ) {
            HX_STACK_BEGIN_CATCH
            ::Dynamic e = _hx_e;
            HXLINE(  81)				HX_STACK_DO_THROW( ::haxe::io::Eof_obj::__new());
        }
        else {
            HX_STACK_DO_THROW(_hx_e);
        }
    }
    HXLINE(  83)		if ((result == (int)0)) {
        HXLINE(  83)			HX_STACK_DO_THROW( ::haxe::io::Eof_obj::__new());
    }
    HXLINE(  84)		return result;
}
Example #3
0
 ::flixel::tile::FlxTileblock FlxTileblock_obj::loadFrames( ::flixel::graphics::frames::FlxTileFrames tileFrames,hx::Null< Int >  __o_empties){
Int empties = __o_empties.Default(0);
            	HX_STACK_FRAME("flixel.tile.FlxTileblock","loadFrames",0xaeb6fc9f,"flixel.tile.FlxTileblock.loadFrames","flixel/tile/FlxTileblock.hx",52,0xecdf1de3)
            	HX_STACK_THIS(this)
            	HX_STACK_ARG(tileFrames,"tileFrames")
            	HX_STACK_ARG(empties,"empties")
HXLINE(  53)		Bool _hx_tmp = hx::IsNull( tileFrames );
HXDLIN(  53)		if (_hx_tmp) {
HXLINE(  55)			return hx::ObjectPtr<OBJ_>(this);
            		}
HXLINE(  59)		 ::flixel::FlxSprite _hx_tmp1;
HXDLIN(  59)		Bool _hx_tmp2 = hx::IsNull( this->tileSprite );
HXDLIN(  59)		if (_hx_tmp2) {
HXLINE(  59)			_hx_tmp1 =  ::flixel::FlxSprite_obj::__new(null(),null(),null());
            		}
            		else {
HXLINE(  59)			_hx_tmp1 = this->tileSprite;
            		}
HXDLIN(  59)		this->tileSprite = _hx_tmp1;
HXLINE(  60)		this->tileSprite->set_frames(tileFrames);
HXLINE(  61)		Float _hx_tmp3 = this->tileSprite->get_width();
HXDLIN(  61)		HX_VARI( Int,spriteWidth) = ::Std_obj::_hx_int(_hx_tmp3);
HXLINE(  62)		Float _hx_tmp4 = this->tileSprite->get_height();
HXDLIN(  62)		HX_VARI( Int,spriteHeight) = ::Std_obj::_hx_int(_hx_tmp4);
HXLINE(  63)		HX_VARI( Int,total) = (this->tileSprite->numFrames + empties);
HXLINE(  66)		HX_VARI( Bool,regen) = false;
HXLINE(  68)		Float _hx_tmp5 = this->get_width();
HXDLIN(  68)		Float _hx_tmp6 = this->tileSprite->get_width();
HXDLIN(  68)		if ((hx::Mod(_hx_tmp5,_hx_tmp6) != (int)0)) {
HXLINE(  70)			Float _hx_tmp7 = this->get_width();
HXDLIN(  70)			Int _hx_tmp8 = ::Std_obj::_hx_int((((Float)_hx_tmp7 / (Float)spriteWidth) + (int)1));
HXDLIN(  70)			this->set_width((_hx_tmp8 * spriteWidth));
HXLINE(  71)			regen = true;
            		}
HXLINE(  74)		Float _hx_tmp9 = this->get_height();
HXDLIN(  74)		Float _hx_tmp10 = this->tileSprite->get_height();
HXDLIN(  74)		if ((hx::Mod(_hx_tmp9,_hx_tmp10) != (int)0)) {
HXLINE(  76)			Float _hx_tmp11 = this->get_height();
HXDLIN(  76)			Int _hx_tmp12 = ::Std_obj::_hx_int((((Float)_hx_tmp11 / (Float)spriteHeight) + (int)1));
HXDLIN(  76)			this->set_height((_hx_tmp12 * spriteHeight));
HXLINE(  77)			regen = true;
            		}
HXLINE(  80)		if (regen) {
HXLINE(  82)			Float _hx_tmp13 = this->get_width();
HXDLIN(  82)			Int _hx_tmp14 = ::Std_obj::_hx_int(_hx_tmp13);
HXDLIN(  82)			Float _hx_tmp15 = this->get_height();
HXDLIN(  82)			Int _hx_tmp16 = ::Std_obj::_hx_int(_hx_tmp15);
HXDLIN(  82)			this->makeGraphic(_hx_tmp14,_hx_tmp16,(int)0,true,null());
            		}
            		else {
HXLINE(  86)			::flixel::util::FlxSpriteUtil_obj::fill(hx::ObjectPtr<OBJ_>(this),(int)0);
            		}
HXLINE(  90)		HX_VARI( Int,row) = (int)0;
HXLINE(  91)		HX_VAR( Int,column);
HXLINE(  92)		HX_VAR( Int,destinationX);
HXLINE(  93)		HX_VARI( Int,destinationY) = (int)0;
HXLINE(  94)		Float _hx_tmp17 = this->get_width();
HXDLIN(  94)		HX_VARI( Int,widthInTiles) = ::Std_obj::_hx_int(((Float)_hx_tmp17 / (Float)spriteWidth));
HXLINE(  95)		Float _hx_tmp18 = this->get_height();
HXDLIN(  95)		HX_VARI( Int,heightInTiles) = ::Std_obj::_hx_int(((Float)_hx_tmp18 / (Float)spriteHeight));
HXLINE(  97)		while((row < heightInTiles)){
HXLINE(  99)			destinationX = (int)0;
HXLINE( 100)			column = (int)0;
HXLINE( 102)			while((column < widthInTiles)){
HXLINE( 104)				Float _hx_tmp19 = ::flixel::FlxG_obj::random->_hx_float(null(),null(),null());
HXDLIN( 104)				if (((_hx_tmp19 * total) > empties)) {
HXLINE( 106)					this->tileSprite->animation->randomFrame();
HXLINE( 107)					this->tileSprite->drawFrame(null());
HXLINE( 108)					this->stamp(this->tileSprite,destinationX,destinationY);
            				}
HXLINE( 111)				hx::AddEq(destinationX,spriteWidth);
HXLINE( 112)				++column;
            			}
HXLINE( 115)			hx::AddEq(destinationY,spriteHeight);
HXLINE( 116)			++row;
            		}
HXLINE( 119)		this->dirty = true;
HXLINE( 120)		return hx::ObjectPtr<OBJ_>(this);
            	}