Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
base repository: scummvm/scummvm
Choose a Base Repository
scummvm/scummvm
0xf1sh/scummvm
AlbanBedel/scummvm
Alphard-o/scummvm
AndywinXp/scummvm
BLooperZ/scummvm
BenCastricum/scummvm
CatalystG/scummvm
CeRiAl/scummvm
Coworker/scummvm
Cpasjuste/scummvm
Cruel/scummvm
Deledrius/scummvm
DrItanium/scummvm
DrMcCoy/scummvm
Drenn1/scummvm
Fyre91/scummvm
GNUtoo/scummvm
Henne/scummvm
Joefish/scummvm
JoshTheAggie/scummvm
LubomirR/scummvm
Lybr4/scummvm
MaddTheSane/scummvm
Marisa-Chan/scummvm
MestreLion/scummvm
MrHuu/scummvm-3ds
Nitrus/scummvm
OmerMor/scummvm
Prilkop/scummvm-pink
PyrokinesisStudio/scummvm
RichieSams/scummvm
Risca/scummvm
ShaunOfTheLive/scummvm
SimSaw/scummvm
St0rmcrow/scummvm
Strangerke/scummvm
SupSuper/scummvm
Tea23/scummvm
Templier/scummvm
Termimad/scummvm
Tkachov/scummvm
TomFrost/scummvm
VonBluebaugh/scummvm
WayneRSH/scummvm
YakBizzarro/scummvm
ZsKokos/scummvm
adventuregamestudio/scummvm
ajax16384/scummvm
albrechtf/scummvm
alcherk/scummvm
alexbevi/scummvm
angjerden/scummvm-opensky
anguslees/scummvm
antoniou79/scummvm
athrxx/scummvm
bSr43/scummvm
beholdnec/scummvm-funhouse
berenm/scummvm
bgK/scummvm
bluddy/scummvm
bluegr/scummvm
byunsangho/scummvm
chkr-private/scummvm
chrilith/scummvm
chrisws/scummvm
clone2727/scummvm
craigsc/scummvm-rg350
crazyp/scummvm
criezy/scummvm
danzat/scummvm
dhewg/scummvm
digitall/scummvm
dividedmind/scummvm
djwillis/scummvm
dmgamm/scummvm
dreammaster/scummvm
dyllad/scummvm
edheldil/scummvm
enginmanap/scummvm
eriktorbjorn/scummvm
fivearrows/scummvm
fuzzie/scummvm
gbraad/scummvm
geunyul/scummvm
gitter-badger/scummvm
giucam/scummvm
goldmojo/scummvm-rg350
goops17/scummvm
grayfoxier/scummvm
hchen1014/scummvm
heather162/scummvm
hooby3dfx/scummvm
hoteacristi/scummvm
idimiter/scummvm
infernuslord/scummvm
inisider/scummvm
jakimushka/scummvm
jammm/scummvm
jasonschroeder/scummvm
javisar/scummvm
jbanes/scummvm
jcwilk/scummvm
jenshnielsen/scummvm
jhhoward/scummvm
jiskattema/scummvm
jmglogow/scummvm
jnourry/scummvm
johndoe123/scummvm
johndrinkwater/scummvm-steamlink
juj/emscripten-scummvm
jvprat/scummvm
jweinberg/scummvm
kelmer44/scummvm
khbecker/scummvm
kintera/scummvm
klusark/scummvm
kpeatt/emscripten-scummvm
krawler602/scummvm
libretro/scummvm
lordhoto/scummvm
lukecharman/scummvm
madmoose/scummvm
mauimauer/scummvm
mborjesson/scummvm
mcb30/scummvm
mcgamez88/scummvm
mcnicholls/scummvm
megaboy/scummvm
michailBs/scummvm
midstream/scummvm
miguelgonz/scummvm
mikeconley/emscripten-scummvm
mikicompany/scummvm
mokerjoke/scummvm
monnerat/scummvm
monocodus-demonstrations/scummvm
murgo/scummvm
mynameisfashanu/scummvm
nakioman/scummvm
nexapps/scummvm
nikitin23/scummvm
norbertbajko/scummvm
nukeykt/scummvm
onlyjob/scummvm
peres/scummvm
phoenixtail26/scummvm
qwzybug/scummvm
rasky/scummvm
rayzer86/scummvm
remmythical/emscripten-scummvm
ress/scummvm
rkmarvin/scummvm
robertmegone/scummvm
rofl0r/scummvm
rolph-recto/scummvm
roman5566/scummvm
rsn8887/scummvm
rundfunk47/scummvm
sact/scummvm
salty-horse/scummvm
sathieu/scummvm
saucjedi/scummvm
scott-t/scummvm
scummvm-director/scummvm
seriesParallel/scummvm
sev-/scummvm
singron/scummvm
sirlemonhead/scummvm
skristiansson/scummvm
somaen/scummvm
ssilverm/scummvm
stevenhoefel/scummvm
superg/scummvm
swkim01/scummvm-kor
tafuri/scummvm
tcarey/scummvm-1
timofonic/scummvm
tiqpit/scummvm
tobiatesan/scummvm
tobigun/scummvm
tommimi/scummvm
tsoliman/scummvm
ttcremers/scummvm
upthorn/scummvm
vanfanel/scummvm
vcosta/scummvm
vinterstum/scummvm
vladborovtsov/scummvm
vyadh/scummvm
weakdancer/scummvm
whiterandrek/scummvm
widar/scummvm
wjp/scummvm
xesf/scummvm-asylum
yaz0r/scummvm
yinsimei/scummvm
zach-morris/scummvm
zekizeki2010/scummvm
zeldin/scummvm
Nothing to show
base: e0cb8f52f73b
head repository: scummvm/scummvm
Choose a Head Repository
scummvm/scummvm
0xf1sh/scummvm
AlbanBedel/scummvm
Alphard-o/scummvm
AndywinXp/scummvm
BLooperZ/scummvm
BenCastricum/scummvm
CatalystG/scummvm
CeRiAl/scummvm
Coworker/scummvm
Cpasjuste/scummvm
Cruel/scummvm
Deledrius/scummvm
DrItanium/scummvm
DrMcCoy/scummvm
Drenn1/scummvm
Fyre91/scummvm
GNUtoo/scummvm
Henne/scummvm
Joefish/scummvm
JoshTheAggie/scummvm
LubomirR/scummvm
Lybr4/scummvm
MaddTheSane/scummvm
Marisa-Chan/scummvm
MestreLion/scummvm
MrHuu/scummvm-3ds
Nitrus/scummvm
OmerMor/scummvm
Prilkop/scummvm-pink
PyrokinesisStudio/scummvm
RichieSams/scummvm
Risca/scummvm
ShaunOfTheLive/scummvm
SimSaw/scummvm
St0rmcrow/scummvm
Strangerke/scummvm
SupSuper/scummvm
Tea23/scummvm
Templier/scummvm
Termimad/scummvm
Tkachov/scummvm
TomFrost/scummvm
VonBluebaugh/scummvm
WayneRSH/scummvm
YakBizzarro/scummvm
ZsKokos/scummvm
adventuregamestudio/scummvm
ajax16384/scummvm
albrechtf/scummvm
alcherk/scummvm
alexbevi/scummvm
angjerden/scummvm-opensky
anguslees/scummvm
antoniou79/scummvm
athrxx/scummvm
bSr43/scummvm
beholdnec/scummvm-funhouse
berenm/scummvm
bgK/scummvm
bluddy/scummvm
bluegr/scummvm
byunsangho/scummvm
chkr-private/scummvm
chrilith/scummvm
chrisws/scummvm
clone2727/scummvm
craigsc/scummvm-rg350
crazyp/scummvm
criezy/scummvm
danzat/scummvm
dhewg/scummvm
digitall/scummvm
dividedmind/scummvm
djwillis/scummvm
dmgamm/scummvm
dreammaster/scummvm
dyllad/scummvm
edheldil/scummvm
enginmanap/scummvm
eriktorbjorn/scummvm
fivearrows/scummvm
fuzzie/scummvm
gbraad/scummvm
geunyul/scummvm
gitter-badger/scummvm
giucam/scummvm
goldmojo/scummvm-rg350
goops17/scummvm
grayfoxier/scummvm
hchen1014/scummvm
heather162/scummvm
hooby3dfx/scummvm
hoteacristi/scummvm
idimiter/scummvm
infernuslord/scummvm
inisider/scummvm
jakimushka/scummvm
jammm/scummvm
jasonschroeder/scummvm
javisar/scummvm
jbanes/scummvm
jcwilk/scummvm
jenshnielsen/scummvm
jhhoward/scummvm
jiskattema/scummvm
jmglogow/scummvm
jnourry/scummvm
johndoe123/scummvm
johndrinkwater/scummvm-steamlink
juj/emscripten-scummvm
jvprat/scummvm
jweinberg/scummvm
kelmer44/scummvm
khbecker/scummvm
kintera/scummvm
klusark/scummvm
kpeatt/emscripten-scummvm
krawler602/scummvm
libretro/scummvm
lordhoto/scummvm
lukecharman/scummvm
madmoose/scummvm
mauimauer/scummvm
mborjesson/scummvm
mcb30/scummvm
mcgamez88/scummvm
mcnicholls/scummvm
megaboy/scummvm
michailBs/scummvm
midstream/scummvm
miguelgonz/scummvm
mikeconley/emscripten-scummvm
mikicompany/scummvm
mokerjoke/scummvm
monnerat/scummvm
monocodus-demonstrations/scummvm
murgo/scummvm
mynameisfashanu/scummvm
nakioman/scummvm
nexapps/scummvm
nikitin23/scummvm
norbertbajko/scummvm
nukeykt/scummvm
onlyjob/scummvm
peres/scummvm
phoenixtail26/scummvm
qwzybug/scummvm
rasky/scummvm
rayzer86/scummvm
remmythical/emscripten-scummvm
ress/scummvm
rkmarvin/scummvm
robertmegone/scummvm
rofl0r/scummvm
rolph-recto/scummvm
roman5566/scummvm
rsn8887/scummvm
rundfunk47/scummvm
sact/scummvm
salty-horse/scummvm
sathieu/scummvm
saucjedi/scummvm
scott-t/scummvm
scummvm-director/scummvm
seriesParallel/scummvm
sev-/scummvm
singron/scummvm
sirlemonhead/scummvm
skristiansson/scummvm
somaen/scummvm
ssilverm/scummvm
stevenhoefel/scummvm
superg/scummvm
swkim01/scummvm-kor
tafuri/scummvm
tcarey/scummvm-1
timofonic/scummvm
tiqpit/scummvm
tobiatesan/scummvm
tobigun/scummvm
tommimi/scummvm
tsoliman/scummvm
ttcremers/scummvm
upthorn/scummvm
vanfanel/scummvm
vcosta/scummvm
vinterstum/scummvm
vladborovtsov/scummvm
vyadh/scummvm
weakdancer/scummvm
whiterandrek/scummvm
widar/scummvm
wjp/scummvm
xesf/scummvm-asylum
yaz0r/scummvm
yinsimei/scummvm
zach-morris/scummvm
zekizeki2010/scummvm
zeldin/scummvm
Nothing to show
compare: a4c5e140e20a
Commits on Dec 19, 2014
@@ -58,6 +58,8 @@ MenuZGI::MenuZGI(ZVision *engine) :
scrollPos[1] = 0.0;
scrollPos[2] = 0.0;
mouseOnItem = -1;
redraw = false;
clean = false;

char buf[24];
for (int i = 1; i < 4; i++) {
@@ -557,6 +559,8 @@ MenuNemesis::MenuNemesis(ZVision *engine) :
scrolled = false;
scrollPos = 0.0;
mouseOnItem = -1;
redraw = false;
delay = 0;

char buf[24];
for (int i = 0; i < 4; i++)
@@ -265,13 +265,14 @@ void SearchManager::addDir(const Common::String &name) {

void SearchManager::listDirRecursive(Common::List<Common::String> &_list, const Common::FSNode &fsNode, int depth) {
Common::FSList fsList;
fsNode.getChildren(fsList);
if ( fsNode.getChildren(fsList) ) {

_list.push_back(fsNode.getPath());
_list.push_back(fsNode.getPath());

if (depth > 1)
for (Common::FSList::const_iterator it = fsList.begin(); it != fsList.end(); ++it)
listDirRecursive(_list, *it, depth - 1);
if (depth > 1)
for (Common::FSList::const_iterator it = fsList.begin(); it != fsList.end(); ++it)
listDirRecursive(_list, *it, depth - 1);
}
}

} // End of namespace ZVision
@@ -31,6 +31,7 @@ namespace ZVision {

ZfsArchive::ZfsArchive(const Common::String &fileName) : _fileName(fileName) {
Common::File zfsFile;
memset(&_header, 0, sizeof(_header));

if (!zfsFile.open(_fileName)) {
warning("ZFSArchive::ZFSArchive(): Could not find the archive file");
@@ -140,7 +141,7 @@ Common::SeekableReadStream *ZfsArchive::createReadStreamForMember(const Common::
byte *buffer = (byte *)malloc(entryHeader->size);
zfsArchive.read(buffer, entryHeader->size);
// Decrypt the data in place
if (_header.xorKey != 0)
if (_header.xorKey[0] + _header.xorKey[1] + _header.xorKey[2] + _header.xorKey[3] != 0)
unXor(buffer, entryHeader->size, _header.xorKey);

return new Common::MemoryReadStream(buffer, entryHeader->size, DisposeAfterUse::YES);
@@ -39,7 +39,7 @@ struct ZfsHeader {
uint32 maxNameLength;
uint32 filesPerBlock;
uint32 fileCount;
byte xorKey[4];
uint8 xorKey[4];
uint32 fileSectionOffset;
};

@@ -50,7 +50,8 @@ CursorManager::CursorManager(ZVision *engine, const Graphics::PixelFormat *pixel
_pixelFormat(pixelFormat),
_cursorIsPushed(false),
_item(0),
_lastitem(0) {
_lastitem(0),
_currentCursor(CursorIndex_Idle) {
for (int i = 0; i < NUM_CURSORS; i++) {
if (_engine->getGameId() == GID_NEMESIS) {
Common::String name;
@@ -61,7 +62,8 @@ CursorManager::CursorManager(ZVision *engine, const Graphics::PixelFormat *pixel
} else if (_engine->getGameId() == GID_GRANDINQUISITOR) {
_cursors[i][0] = ZorkCursor(_engine, _zgiCursorFileNames[i]); // Up cursor
char buffer[25];
strcpy(buffer, _zgiCursorFileNames[i]);
memset(buffer, 0, 25);
strncpy(buffer, _zgiCursorFileNames[i], 24);
buffer[3] += 2;
_cursors[i][1] = ZorkCursor(_engine, buffer); // Down cursor
}
@@ -34,6 +34,9 @@ RenderTable::RenderTable(uint numColumns, uint numRows)
assert(numRows != 0 && numColumns != 0);

_internalBuffer = new Common::Point[numRows * numColumns];

memset(&_panoramaOptions, 0, sizeof(_panoramaOptions));
memset(&_tiltOptions, 0, sizeof(_tiltOptions));
}

RenderTable::~RenderTable() {
@@ -36,82 +36,6 @@

namespace ZVision {

TruetypeFont::TruetypeFont(ZVision *engine, int32 fontHeight)
: _engine(engine),
_fontHeight(fontHeight),
_font(0),
_lineHeight(0),
_maxCharWidth(0),
_maxCharHeight(0) {
}

TruetypeFont::~TruetypeFont(void) {
delete _font;
}

bool TruetypeFont::loadFile(const Common::String &filename) {
Common::File file;

bool fileOpened = false;
if (!Common::File::exists(filename)) {
debug("TTF font file %s was not found. Reverting to arial.ttf", filename.c_str());
fileOpened = file.open("arial.ttf");
} else {
fileOpened = file.open(filename);
}

if (!fileOpened) {
debug("TTF file could not be opened");
return false;
}

_font = Graphics::loadTTFFont(file, _fontHeight);
_lineHeight = _font->getFontHeight();

return true;
}

Graphics::Surface *TruetypeFont::drawTextToSurface(const Common::String &text, uint16 textColor, int maxWidth, int maxHeight, Graphics::TextAlign align, bool wrap) {
if (text.equals("")) {
return nullptr;
}

Graphics::Surface *surface = new Graphics::Surface();

if (!wrap) {
int width = MIN(_font->getStringWidth(text), maxWidth);
surface->create(width, _lineHeight, Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0));
// TODO: Add better alpha support by getting the pixels from the backbuffer.
// However doing that requires some kind of caching system so future text doesn't try to use this text as it's alpha background.
surface->fillRect(Common::Rect(0, 0, surface->w, surface->h), 0);

_font->drawString(surface, text, 0, 0, maxWidth, textColor, align);
return surface;
}

Common::Array<Common::String> lines;
_font->wordWrapText(text, maxWidth, lines);

while (maxHeight > 0 && (int)lines.size() * _lineHeight > maxHeight) {
lines.pop_back();
}
if (lines.size() == 0) {
delete surface;
return nullptr;
}

surface->create(maxWidth, lines.size() * _lineHeight, Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0));
surface->fillRect(Common::Rect(0, 0, surface->w, surface->h), 0);

int heightOffset = 0;
for (Common::Array<Common::String>::iterator it = lines.begin(); it != lines.end(); it++) {
_font->drawString(surface, *it, 0, 0 + heightOffset, maxWidth, textColor, align);
heightOffset += _lineHeight;
}

return surface;
}

StyledTTFont::StyledTTFont(ZVision *engine) {
_engine = engine;
_style = 0;
@@ -36,45 +36,6 @@ namespace ZVision {

class ZVision;

class TruetypeFont {
public:
TruetypeFont(ZVision *engine, int32 fontHeight);
~TruetypeFont();

private:
ZVision *_engine;
Graphics::Font *_font;
int _lineHeight;

size_t _maxCharWidth;
size_t _maxCharHeight;

public:
int32 _fontHeight;

public:
/**
* Loads a .ttf file into memory. This must be called
* before any calls to drawTextToSurface
*
* @param filename The file name of the .ttf file to load
*/
bool loadFile(const Common::String &filename);
/**
* Renders the supplied text to a Surface using 0x0 as the
* background color.
*
* @param text The to render
* @param textColor The color to render the text with
* @param maxWidth The max width the text should take up.
* @param maxHeight The max height the text should take up.
* @param align The alignment of the text within the bounds of maxWidth
* @param wrap If true, any words extending past maxWidth will wrap to a new line. If false, ellipses will be rendered to show that the text didn't fit
* @return A Surface containing the rendered text
*/
Graphics::Surface *drawTextToSurface(const Common::String &text, uint16 textColor, int maxWidth, int maxHeight, Graphics::TextAlign align, bool wrap);
};

// Styled TTF
class StyledTTFont {
public:

No commit comments for this range

You can’t perform that action at this time.