예제 #1
0
파일: Packet.cpp 프로젝트: songjundev/b
void Packet::_setHeader(uint16 wType)
{
	_setType(wType);
	_setSize(_wpos);

	uint32_t crc = make_crc32(_dataBuffer(), _dataSize());
	_setCRC(crc);
}
예제 #2
0
FileInfo::FileInfo(const std::string& path)
  : _path(path), _type(OTHER)
{
#ifdef WIN32
  std::replace(_path.begin(), _path.end(), '/', '\\');

  if (_path[_path.size() - 1] == '\\')
    _path += '*';
#endif
  _setGood();
  _setType();
  _setSize();
  _setLastTimeAccess();
  _setListDir();
}
예제 #3
0
    void Sprite::changeAnimFrame(const AnimationFrame& frame)
    {
        if (_flags & flag_manageResAnim)
        {
            ResAnim* rs = _frame.getResAnim();
            if (rs)
                rs->getAtlas()->unload();

            rs = frame.getResAnim();
            if (rs)
                rs->getAtlas()->load();
        }

        bool flipX = (_flags & flag_flipX) != 0;
        bool flipY = (_flags & flag_flipY) != 0;
        if (flipX || flipY)
            _frame = frame.getFlipped(flipY, flipX);
        else
            _frame = frame;
        _setSize(_frame.getSize().mult(_localScale));


        animFrameChanged(_frame);
    }
예제 #4
0
 void SimpleScreen::_setGeom(const QRect & geom)
 {
     _setPosition(geom.topLeft());
     _setSize(geom.size());
 }