[Scummvm-git-logs] scummvm master -> d21ba317e4f6fed002b927f9db2bc699864ce7bd
mgerhardy
martin.gerhardy at gmail.com
Thu Aug 12 19:53:19 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
d21ba317e4 TWINE: removed unused brick parser
Commit: d21ba317e4f6fed002b927f9db2bc699864ce7bd
https://github.com/scummvm/scummvm/commit/d21ba317e4f6fed002b927f9db2bc699864ce7bd
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-08-12T21:50:04+02:00
Commit Message:
TWINE: removed unused brick parser
the plan is to use the sprite parser
Changed paths:
R engines/twine/parser/brick.cpp
R engines/twine/parser/brick.h
engines/twine/module.mk
diff --git a/engines/twine/module.mk b/engines/twine/module.mk
index 80c1bff917..380d4053cd 100644
--- a/engines/twine/module.mk
+++ b/engines/twine/module.mk
@@ -16,7 +16,6 @@ MODULE_OBJS := \
parser/anim.o \
parser/blocklibrary.o \
parser/body.o \
- parser/brick.o \
parser/entity.o \
parser/holomap.o \
parser/parser.o \
diff --git a/engines/twine/parser/brick.cpp b/engines/twine/parser/brick.cpp
deleted file mode 100644
index a8de64376b..0000000000
--- a/engines/twine/parser/brick.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "twine/parser/brick.h"
-#include "common/debug.h"
-#include "common/memstream.h"
-
-namespace TwinE {
-
-bool BrickData::loadFromStream(Common::SeekableReadStream &stream, bool lba1) {
- int width = stream.readByte();
- int height = stream.readByte();
- _offsetX = stream.readByte();
- _offsetY = stream.readByte();
- const int maxY = _offsetY + height;
- const Graphics::PixelFormat format = Graphics::PixelFormat::createFormatCLUT8();
- _surface.create(width, height, format);
- for (int y = _offsetY; y < maxY; ++y) {
- const uint8 numRuns = stream.readByte();
- int x = _offsetX;
- for (uint8 run = 0; run < numRuns; ++run) {
- const uint8 runSpec = stream.readByte();
- const uint8 runLength = bits(runSpec, 0, 6) + 1;
- const uint8 type = bits(runSpec, 6, 2);
- if (type == 2) {
- uint8 *start = (uint8 *)_surface.getBasePtr(x, y);
- uint8 *end = (uint8 *)_surface.getBasePtr(x + runLength, y);
- Common::fill(start, end, stream.readByte());
- } else if (type == 1 || type == 3) {
- uint8 *start = (uint8 *)_surface.getBasePtr(x, y);
- for (uint8 i = 0; i < runLength; ++i) {
- *start++ = stream.readByte();
- }
- }
- x += runLength;
- }
- }
- return !stream.err();
-}
-
-} // namespace TwinE
diff --git a/engines/twine/parser/brick.h b/engines/twine/parser/brick.h
deleted file mode 100644
index 3cbaf553a7..0000000000
--- a/engines/twine/parser/brick.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef TWINE_PARSER_BRICK_H
-#define TWINE_PARSER_BRICK_H
-
-#include "common/memstream.h"
-#include "common/stream.h"
-#include "graphics/managed_surface.h"
-#include "twine/parser/parser.h"
-#include "twine/shared.h"
-
-namespace TwinE {
-
-class BrickData : public Parser {
-private:
- Graphics::ManagedSurface _surface;
- int _offsetX = 0;
- int _offsetY = 0;
-
-public:
- bool loadFromStream(Common::SeekableReadStream &stream, bool lba1) override;
-
- inline const Graphics::ManagedSurface &surface() const {
- return _surface;
- }
-
- inline int offsetX() const {
- return _offsetX;
- }
-
- inline int offsetY() const {
- return _offsetY;
- }
-};
-
-} // End of namespace TwinE
-
-#endif
More information about the Scummvm-git-logs
mailing list