aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph-Eugene Winzer2017-06-18 17:44:33 +0200
committerThierry Crozat2018-01-22 23:29:44 +0000
commit8a45d56630cf6dc2199f6d9621e715ea67b33635 (patch)
tree85aa6c3b3acd899cab95d104de1c8cb2adda1966
parent4f3f231afd98d63a2ebdbec94671549d0d68f46f (diff)
downloadscummvm-rg350-8a45d56630cf6dc2199f6d9621e715ea67b33635.tar.gz
scummvm-rg350-8a45d56630cf6dc2199f6d9621e715ea67b33635.tar.bz2
scummvm-rg350-8a45d56630cf6dc2199f6d9621e715ea67b33635.zip
SUPERNOVA: Adds getDOSTicks()
-rw-r--r--engines/supernova/supernova.cpp10
-rw-r--r--engines/supernova/supernova.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/engines/supernova/supernova.cpp b/engines/supernova/supernova.cpp
index bcc2347c30..b3c0adb8a0 100644
--- a/engines/supernova/supernova.cpp
+++ b/engines/supernova/supernova.cpp
@@ -119,6 +119,16 @@ Common::Error SupernovaEngine::run() {
return Common::kNoError;
}
+// Emulates DOS int 1A/00
+uint SupernovaEngine::getDOSTicks() {
+ TimeDate systemTime;
+ _system->getTimeAndDate(systemTime);
+
+ return static_cast<uint>((systemTime.tm_hour * 24 +
+ systemTime.tm_min * 60 +
+ systemTime.tm_sec) * 18.2065);
+}
+
void SupernovaEngine::updateEvents() {
Common::Event event;
diff --git a/engines/supernova/supernova.h b/engines/supernova/supernova.h
index f97cd401e9..9370e900b4 100644
--- a/engines/supernova/supernova.h
+++ b/engines/supernova/supernova.h
@@ -85,6 +85,7 @@ private:
byte _brightness;
uint _delay;
+ uint getDOSTicks();
void initData();
void initPalette();
void paletteFadeIn();