Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Score::Score(Common::SeekableReadStream &stream) {
- uint32 size = stream.readUint32BE();
- size -= 4;
- uint16 channelSize;
- uint16 channelOffset;
- uint16 frameId = 0;
- Frame* initial = new Frame();
- frames.push_back(initial);
- while (size != 0) {
- uint16 frameSize = stream.readUint16BE();
- size -= frameSize;
- frameSize -= 2;
- Frame frame = *frames.back();
- while(frameSize != 0) {
- channelSize = stream.readByte() * 2;
- channelOffset = stream.readByte() * 2;
- frame.readChannel(stream, channelOffset, channelSize);
- frameSize -= channelSize + 2;
- }
- frames.push_back(&frame);
- debug("*******************************");
- for (uint16 i = 0; i < frame.sprites.size(); i++) {
- debug("Channel %d, Enabled %d, CastId %d, X %d, Y %d, Width %d, Height %d", i, frame.sprites[i]->enabled,
- frame.sprites[i]->castId, frame.sprites[i]->startPoint.x, frame.sprites[i]->startPoint.y, frame.sprites[i]->width, frame.sprites[i]->height);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement