[Scummvm-git-logs] scummvm master -> 7a2987559da2103046045cbff5901f9097a44b49
sev-
sev at scummvm.org
Fri Jul 9 22:56:35 UTC 2021
This automated email contains information about 7 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
ce716826a4 SAGA2: Remove unused variable. CID 1457999
1eb0b617f2 SAGA2: Fix frameSmoother initialization. CID 1458020
f1768aad72 SAGA2: Fix gPort instantiation. CID 1458031
98da4283c7 SAGA2: Initialize GrabInfo on instantiation. CID 1457996
6c7bc55138 SAGA2: Init text blinking on creation. CID 1457865
a28b7a0826 SAGA2: Properly handle case when resource is not available. CID 1457979
7a2987559d SAGA2: Fix hResContext instantiation. CID 1457981
Commit: ce716826a4ae887d3c64adc87f38565174243691
https://github.com/scummvm/scummvm/commit/ce716826a4ae887d3c64adc87f38565174243691
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-07-10T00:56:07+02:00
Commit Message:
SAGA2: Remove unused variable. CID 1457999
Changed paths:
engines/saga2/floating.h
diff --git a/engines/saga2/floating.h b/engines/saga2/floating.h
index 3b511be6f6..697a8f47e9 100644
--- a/engines/saga2/floating.h
+++ b/engines/saga2/floating.h
@@ -191,9 +191,6 @@ private:
* ===================================================================== */
class LabeledButton : public gImageButton {
-protected:
- char *label;
-
public:
LabeledButton(gPanelList &list,
const Rect16 &box,
Commit: 1eb0b617f2ef9cbe20eb8baa030ad09157c7d554
https://github.com/scummvm/scummvm/commit/1eb0b617f2ef9cbe20eb8baa030ad09157c7d554
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-07-10T00:56:14+02:00
Commit Message:
SAGA2: Fix frameSmoother initialization. CID 1458020
Changed paths:
engines/saga2/gamerate.h
engines/saga2/main.cpp
diff --git a/engines/saga2/gamerate.h b/engines/saga2/gamerate.h
index a8a033fd00..21b8fb1fa7 100644
--- a/engines/saga2/gamerate.h
+++ b/engines/saga2/gamerate.h
@@ -106,7 +106,9 @@ class frameSmoother: public frameCounter {
void calculateAverages(void) {
// clear averages
- memset(avg1Sec, 0, 20);
+ for (int i = 0; i < 5; i++)
+ avg1Sec[i] = 0;
+
avg5Sec = 0;
// get totals
@@ -126,7 +128,9 @@ class frameSmoother: public frameCounter {
void calculateVariance(void) {
// clear variances
- memset(dif1Sec, 0, 20);
+ for (int i = 0; i < 5; i++)
+ dif1Sec[i] = 0;
+
dif5Sec = 0;
// get variance totals
@@ -151,7 +155,9 @@ public:
virtual ~frameSmoother() {
- if (frameHistory) delete[] frameHistory;
+ if (frameHistory)
+ delete[] frameHistory;
+
frameHistory = nullptr;
}
@@ -221,7 +227,15 @@ frameSmoother::frameSmoother(int32 fps, uint32 perSec, uint32 now)
desiredFPS = fps;
historySize = fps * 5;
frameHistory = new float[historySize];
- memset(frameHistory, 0, historySize * sizeof(int32));
+
+ for (int i = 0; i < historySize; i++)
+ frameHistory[i] = 0;
+
+ for (int i = 0; i < 5; i++)
+ dif1Sec[i] = avg1Sec[i] = 0;
+
+ dif5Sec = 0;
+ avg5Sec = 0;
}
} // end of namespace Saga2
diff --git a/engines/saga2/main.cpp b/engines/saga2/main.cpp
index 8130d2e4d2..d9e1bf69f8 100644
--- a/engines/saga2/main.cpp
+++ b/engines/saga2/main.cpp
@@ -137,16 +137,9 @@ static pMessager Status2[10];
pMessager ratemess[3];
-#if 1
frameSmoother frate(frameRate, TICKSPERSECOND, gameTime);
-//frameSmoother lrate(frameRate,TICKSPERSECOND,gameTime);
frameCounter lrate(TICKSPERSECOND, gameTime);
frameCounter irate(TICKSPERSECOND, gameTime);
-#else
-frameCounter frate(TICKSPERSECOND, gameTime);
-frameCounter lrate(TICKSPERSECOND, gameTime);
-frameCounter irate(TICKSPERSECOND, gameTime);
-#endif
/* ===================================================================== *
Prototypes
Commit: f1768aad726d3058bb169e11bfde415128824deb
https://github.com/scummvm/scummvm/commit/f1768aad726d3058bb169e11bfde415128824deb
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-07-10T00:56:14+02:00
Commit Message:
SAGA2: Fix gPort instantiation. CID 1458031
Changed paths:
engines/saga2/gdraw.h
diff --git a/engines/saga2/gdraw.h b/engines/saga2/gdraw.h
index 60ea66933f..c2a3102cf1 100644
--- a/engines/saga2/gdraw.h
+++ b/engines/saga2/gdraw.h
@@ -197,6 +197,7 @@ public:
font = nullptr;
textSpacing = 0;
textStyles = 0;
+ fgPen = bgPen = olPen = shPen = 0;
}
virtual ~gPort() {}
Commit: 98da4283c79abc3a89bd287192bb156964fc3cfa
https://github.com/scummvm/scummvm/commit/98da4283c79abc3a89bd287192bb156964fc3cfa
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-07-10T00:56:14+02:00
Commit Message:
SAGA2: Initialize GrabInfo on instantiation. CID 1457996
Changed paths:
engines/saga2/grabinfo.cpp
diff --git a/engines/saga2/grabinfo.cpp b/engines/saga2/grabinfo.cpp
index af11c6d38b..51270da366 100644
--- a/engines/saga2/grabinfo.cpp
+++ b/engines/saga2/grabinfo.cpp
@@ -51,6 +51,9 @@ GrabInfo::GrabInfo() {
textBuf[0] = '\0';
displayGauge = false;
+
+ gaugeNumerator = gaugeDenominator = 0;
+ moveCount = 1;
}
GrabInfo::~GrabInfo() {
Commit: 6c7bc55138f473a3d3be63d49596819b6ef8e487
https://github.com/scummvm/scummvm/commit/6c7bc55138f473a3d3be63d49596819b6ef8e487
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-07-10T00:56:14+02:00
Commit Message:
SAGA2: Init text blinking on creation. CID 1457865
Changed paths:
engines/saga2/gtextbox.cpp
diff --git a/engines/saga2/gtextbox.cpp b/engines/saga2/gtextbox.cpp
index 75d578bd0a..503db7afbe 100644
--- a/engines/saga2/gtextbox.cpp
+++ b/engines/saga2/gtextbox.cpp
@@ -183,6 +183,7 @@ gTextBox::gTextBox(
cursorPos = anchorPos = scrollPixels = 0;
undoBuffer = new char[maxLen + 1]();
textFont = font;
+ oldFont = nullptr;
fontHeight = height;
fontOffset = fontHeight + 2;
@@ -206,6 +207,10 @@ gTextBox::gTextBox(
selected = 0;
parent = &list;
+ blinkStart = 0;
+ blinkX = 0;
+ blinkState = 0;
+
// set the filedStrings pointer
fieldStrings = stringBufs;
Commit: a28b7a08269802e87a467fc9effa31b14957901f
https://github.com/scummvm/scummvm/commit/a28b7a08269802e87a467fc9effa31b14957901f
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-07-10T00:56:14+02:00
Commit Message:
SAGA2: Properly handle case when resource is not available. CID 1457979
Changed paths:
engines/saga2/hresmgr.cpp
diff --git a/engines/saga2/hresmgr.cpp b/engines/saga2/hresmgr.cpp
index cb0bd73973..cefde94e6a 100644
--- a/engines/saga2/hresmgr.cpp
+++ b/engines/saga2/hresmgr.cpp
@@ -54,6 +54,7 @@ hResContext::hResContext(hResContext *sire, hResID id, const char desc[]) {
_bytecount = 0;
_bytepos = 0;
_handle = &_file;
+ _base = nullptr;
if (!_res->_valid)
return;
Commit: 7a2987559da2103046045cbff5901f9097a44b49
https://github.com/scummvm/scummvm/commit/7a2987559da2103046045cbff5901f9097a44b49
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-07-10T00:56:14+02:00
Commit Message:
SAGA2: Fix hResContext instantiation. CID 1457981
Changed paths:
engines/saga2/hresmgr.cpp
diff --git a/engines/saga2/hresmgr.cpp b/engines/saga2/hresmgr.cpp
index cefde94e6a..68d08b6579 100644
--- a/engines/saga2/hresmgr.cpp
+++ b/engines/saga2/hresmgr.cpp
@@ -42,6 +42,8 @@ hResContext::hResContext() {
_parent = nullptr;
_numEntries = 0;
_handle = &_file;
+ _res = nullptr;
+ _bytecount = _bytepos = 0;
}
hResContext::hResContext(hResContext *sire, hResID id, const char desc[]) {
More information about the Scummvm-git-logs
mailing list