Skip to content

Instantly share code, notes, and snippets.

@Geokureli
Created June 22, 2024 17:54
Show Gist options
  • Save Geokureli/b949aaef6a5628c3a0fa5e9271ed2928 to your computer and use it in GitHub Desktop.
Save Geokureli/b949aaef6a5628c3a0fa5e9271ed2928 to your computer and use it in GitHub Desktop.
void FlxBitmapText_obj::batchDrawData( ::flixel::graphics::tile::FlxDrawQuadsItem drawItem, ::openfl::_Vector::FloatVector list,int color){
HX_STACKFRAME(&_hx_pos_9e790623cbe1e5f4_417_batchDrawData)
HX_STACK_THIS(this)
HX_STACK_ARG(drawItem,"drawItem")
HX_STACK_ARG(list,"list")
HX_STACK_ARG(color,"color")
HXLINE( 417)
HXLINE( 418) ::flixel::util::FlxColorTransformUtil_obj::setMultipliers(this->_colorParams,(( (Float)(((color >> 16) & 255)) ) / ( (Float)(255) )),(( (Float)(((color >> 8) & 255)) ) / ( (Float)(255) )),(( (Float)((color & 255)) ) / ( (Float)(255) )),(( (Float)(((color >> 24) & 255)) ) / ( (Float)(255) )));
HXLINE( 420) HX_VARI( Float,scaleX) = (this->scale->x * ( (Float)(this->_facingHorizontalMult) ));
HXLINE( 421) HX_VARI( Float,scaleY) = (this->scale->y * ( (Float)(this->_facingVerticalMult) ));
HXLINE( 423) HX_VAR( Float,offsetX);
HXDLIN( 423) if ((this->_facingHorizontalMult != 1)) {
HXLINE( 423) offsetX = (( (Float)(this->frameWidth) ) - this->origin->x);
}
else {
HXLINE( 423) offsetX = this->origin->x;
}
HXLINE( 424) HX_VAR( Float,offsetY);
HXDLIN( 424) if ((this->_facingVerticalMult != 1)) {
HXLINE( 424) offsetY = (( (Float)(this->frameHeight) ) - this->origin->y);
}
else {
HXLINE( 424) offsetY = this->origin->y;
}
HXLINE( 426) {
HXLINE( 426) ::openfl::_Vector::FloatVector list1 = list;
HXDLIN( 426) ::openfl::_Vector::FloatVector _g_list = list1;
HXDLIN( 426) int _g_length = ::Std_obj::_hx_int((( (Float)(list1->get_length()) ) / ( (Float)(3) )));
HXDLIN( 426) int _g_i = 0;
HXDLIN( 426) while((_g_i < _g_length)){
HXLINE( 426) ::openfl::_Vector::FloatVector this1 = _g_list;
HXDLIN( 426) _g_i = (_g_i + 1);
HXDLIN( 426) int iReal = ((_g_i - 1) * 3);
HXDLIN( 426) Float item_charCodeRaw = this1->get(iReal);
HXDLIN( 426) Float item_x = this1->get((iReal + 1));
HXDLIN( 426) Float item_y = this1->get((iReal + 2));
HXLINE( 428) ::flixel::graphics::frames::FlxBitmapFont _this = this->font;
HXDLIN( 428) int charCode = ::Std_obj::_hx_int(item_charCodeRaw);
HXDLIN( 428) ::flixel::graphics::frames::FlxFrame currFrame = ( ( ::flixel::graphics::frames::FlxFrame)(_this->charMap->get(charCode)) );
HXDLIN( 428) HX_VAR_NAME( ::flixel::graphics::frames::FlxFrame,currFrame1,"currFrame");
HXDLIN( 428) if (::hx::IsNull( this->clipRect )) {
HXLINE( 428) currFrame1 = currFrame;
}
else {
HXLINE( 428) ::flixel::math::FlxRect _this1 = ::flixel::math::FlxRect_obj::_pool->get().StaticCast< ::flixel::math::FlxRect >();
HXDLIN( 428) _this1->x = ( (Float)(0) );
HXDLIN( 428) _this1->y = ( (Float)(0) );
HXDLIN( 428) _this1->width = ( (Float)(0) );
HXDLIN( 428) _this1->height = ( (Float)(0) );
HXDLIN( 428) ::flixel::math::FlxRect rect = _this1;
HXDLIN( 428) rect->_inPool = false;
HXDLIN( 428) ::flixel::math::FlxRect _this2 = rect;
HXDLIN( 428) ::flixel::math::FlxRect Rect = this->clipRect;
HXDLIN( 428) _this2->x = Rect->x;
HXDLIN( 428) _this2->y = Rect->y;
HXDLIN( 428) _this2->width = Rect->width;
HXDLIN( 428) _this2->height = Rect->height;
HXDLIN( 428) if (Rect->_weak) {
HXLINE( 428) if (!(Rect->_inPool)) {
HXLINE( 428) Rect->_inPool = true;
HXDLIN( 428) Rect->_weak = false;
HXDLIN( 428) ::flixel::math::FlxRect_obj::_pool->putUnsafe(Rect);
}
}
HXDLIN( 428) ::flixel::math::FlxRect clippedFrameRect = _this2;
HXDLIN( 428) {
HXLINE( 428) ::flixel::math::FlxRect clippedFrameRect1 = clippedFrameRect;
HXDLIN( 428) clippedFrameRect1->x = (clippedFrameRect1->x + -(item_x));
HXDLIN( 428) ::flixel::math::FlxRect clippedFrameRect2 = clippedFrameRect;
HXDLIN( 428) clippedFrameRect2->y = (clippedFrameRect2->y + -(item_y));
}
HXDLIN( 428) ::flixel::graphics::frames::FlxFrame result = currFrame->clipTo(clippedFrameRect,null());
HXDLIN( 428) if (!(clippedFrameRect->_inPool)) {
HXLINE( 428) clippedFrameRect->_inPool = true;
HXDLIN( 428) clippedFrameRect->_weak = false;
HXDLIN( 428) ::flixel::math::FlxRect_obj::_pool->putUnsafe(clippedFrameRect);
}
HXDLIN( 428) currFrame1 = result;
}
HXLINE( 429) currFrame1->prepareMatrix(this->_matrix,null(),null(),null());
HXLINE( 430) this->_matrix->translate((item_x - offsetX),(item_y - offsetY));
HXLINE( 431) this->_matrix->scale(scaleX,scaleY);
HXLINE( 432) if ((this->angle != 0)) {
HXLINE( 434) ::flixel::math::FlxMatrix _this3 = this->_matrix;
HXDLIN( 434) Float cos = this->_cosAngle;
HXDLIN( 434) Float sin = this->_sinAngle;
HXDLIN( 434) Float a1 = ((_this3->a * cos) - (_this3->b * sin));
HXDLIN( 434) _this3->b = ((_this3->a * sin) + (_this3->b * cos));
HXDLIN( 434) _this3->a = a1;
HXDLIN( 434) Float c1 = ((_this3->c * cos) - (_this3->d * sin));
HXDLIN( 434) _this3->d = ((_this3->c * sin) + (_this3->d * cos));
HXDLIN( 434) _this3->c = c1;
HXDLIN( 434) Float tx1 = ((_this3->tx * cos) - (_this3->ty * sin));
HXDLIN( 434) _this3->ty = ((_this3->tx * sin) + (_this3->ty * cos));
HXDLIN( 434) _this3->tx = tx1;
}
HXLINE( 437) this->_matrix->translate((this->_point->x + offsetX),(this->_point->y + offsetY));
HXLINE( 439) drawItem->addQuad(currFrame1,this->_matrix,this->_colorParams);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment