mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-01 16:35:20 +00:00
ADL: Rename rightAngles to lineArt
This commit is contained in:
parent
34cb2f4c53
commit
1abaf60cf0
@ -416,8 +416,8 @@ void AdlEngine::drawItems() {
|
||||
if (item->state == IDI_ITEM_MOVED) {
|
||||
if (_rooms[_room].picture == _rooms[_room].curPicture) {
|
||||
const Common::Point &p = _itemOffsets[dropped];
|
||||
if (item->isDrawing)
|
||||
_display->drawRightAngles(_drawings[item->picture - 1], p, 0, 1, 0x7f);
|
||||
if (item->isLineArt)
|
||||
_display->drawLineArt(_lineArt[item->picture - 1], p);
|
||||
else
|
||||
drawPic(item->picture, p);
|
||||
++dropped;
|
||||
@ -429,8 +429,8 @@ void AdlEngine::drawItems() {
|
||||
|
||||
for (pic = item->roomPictures.begin(); pic != item->roomPictures.end(); ++pic) {
|
||||
if (*pic == _rooms[_room].curPicture) {
|
||||
if (item->isDrawing)
|
||||
_display->drawRightAngles(_drawings[item->picture - 1], item->position, 0, 1, 0x7f);
|
||||
if (item->isLineArt)
|
||||
_display->drawLineArt(_lineArt[item->picture - 1], item->position);
|
||||
else
|
||||
drawPic(item->picture, item->position);
|
||||
continue;
|
||||
|
@ -138,7 +138,7 @@ struct Item {
|
||||
byte noun;
|
||||
byte room;
|
||||
byte picture;
|
||||
bool isDrawing;
|
||||
bool isLineArt;
|
||||
Common::Point position;
|
||||
int state;
|
||||
byte description;
|
||||
@ -188,7 +188,7 @@ protected:
|
||||
Common::Array<Picture> _pictures;
|
||||
Common::Array<Item> _inventory;
|
||||
Common::Array<Common::Point> _itemOffsets;
|
||||
Common::Array<Common::Array<byte> > _drawings;
|
||||
Common::Array<Common::Array<byte> > _lineArt;
|
||||
Commands _roomCommands;
|
||||
Commands _globalCommands;
|
||||
|
||||
|
@ -304,7 +304,7 @@ void Display::drawNextPixel(Display::PixelPos &p, byte &color, byte bits, byte q
|
||||
moveY(p, bits & 2);
|
||||
}
|
||||
|
||||
void Display::drawRightAngles(Common::Array<byte> &rightAngles, Common::Point p, byte rotation, byte scaling, byte color) {
|
||||
void Display::drawLineArt(const Common::Array<byte> &lineArt, Common::Point p, byte rotation, byte scaling, byte color) {
|
||||
const byte stepping[] = {
|
||||
0xff, 0xfe, 0xfa, 0xf4, 0xec, 0xe1, 0xd4, 0xc5,
|
||||
0xb4, 0xa1, 0x8d, 0x78, 0x61, 0x49, 0x31, 0x18,
|
||||
@ -319,8 +319,8 @@ void Display::drawRightAngles(Common::Array<byte> &rightAngles, Common::Point p,
|
||||
byte xStep = stepping[rotation];
|
||||
byte yStep = stepping[(rotation ^ 0xf) + 1] + 1;
|
||||
|
||||
for (uint i = 0; i < rightAngles.size(); ++i) {
|
||||
byte b = rightAngles[i];
|
||||
for (uint i = 0; i < lineArt.size(); ++i) {
|
||||
byte b = lineArt[i];
|
||||
|
||||
do {
|
||||
byte xFrac = 0x80;
|
||||
|
@ -63,7 +63,7 @@ public:
|
||||
void drawPixel(byte x, byte y, byte color);
|
||||
void drawLine(Common::Point p1, Common::Point p2, byte color);
|
||||
void clear(byte color);
|
||||
void drawRightAngles(Common::Array<byte> &rightAngles, Common::Point p, byte rotation, byte scaling, byte color);
|
||||
void drawLineArt(const Common::Array<byte> &lineArt, Common::Point p, byte rotation = 0, byte scaling = 1, byte color = 0x7f);
|
||||
|
||||
private:
|
||||
enum {
|
||||
|
@ -261,7 +261,7 @@ void HiRes1Engine::runGame() {
|
||||
item.noun = f.readByte();
|
||||
item.room = f.readByte();
|
||||
item.picture = f.readByte();
|
||||
item.isDrawing = f.readByte();
|
||||
item.isLineArt = f.readByte();
|
||||
item.position.x = f.readByte();
|
||||
item.position.y = f.readByte();
|
||||
item.state = f.readByte();
|
||||
@ -302,21 +302,21 @@ void HiRes1Engine::runGame() {
|
||||
_itemOffsets.push_back(p);
|
||||
}
|
||||
|
||||
// Load right-angle drawings
|
||||
// Load right-angle line art
|
||||
f.seek(0x4f00);
|
||||
uint16 drawingsTotal = f.readUint16LE();
|
||||
for (uint i = 0; i < drawingsTotal; ++i) {
|
||||
uint16 lineArtTotal = f.readUint16LE();
|
||||
for (uint i = 0; i < lineArtTotal; ++i) {
|
||||
f.seek(0x4f00 + 2 + i * 2);
|
||||
uint16 offset = f.readUint16LE();
|
||||
f.seek(0x4f00 + offset);
|
||||
|
||||
Common::Array<byte> drawing;
|
||||
Common::Array<byte> lineArt;
|
||||
byte b = f.readByte();
|
||||
while (b != 0) {
|
||||
drawing.push_back(b);
|
||||
lineArt.push_back(b);
|
||||
b = f.readByte();
|
||||
}
|
||||
_drawings.push_back(drawing);
|
||||
_lineArt.push_back(lineArt);
|
||||
}
|
||||
|
||||
// Title screen shown during loading
|
||||
|
Loading…
x
Reference in New Issue
Block a user