aboutsummaryrefslogtreecommitdiff
path: root/queen
diff options
context:
space:
mode:
Diffstat (limited to 'queen')
-rw-r--r--queen/credits.cpp4
-rw-r--r--queen/graphics.cpp7
-rw-r--r--queen/resource.cpp2
-rw-r--r--queen/talk.cpp4
4 files changed, 10 insertions, 7 deletions
diff --git a/queen/credits.cpp b/queen/credits.cpp
index 2ccc4055a7..95b6cccd4f 100644
--- a/queen/credits.cpp
+++ b/queen/credits.cpp
@@ -93,7 +93,7 @@ void Credits::update() {
break;
case 'p' :
- sscanf(&line[3], "%d\n", &_pause);
+ _pause = atoi(&line[3]);
_pause *= 10;
/* wait until next room */
@@ -111,7 +111,7 @@ void Credits::update() {
return;
case 'i' :
- sscanf(&line[3], "%d\n", &_color);
+ _color = atoi(&line[3]);
break;
case '1' :
diff --git a/queen/graphics.cpp b/queen/graphics.cpp
index 80de743969..24a0cf571e 100644
--- a/queen/graphics.cpp
+++ b/queen/graphics.cpp
@@ -586,10 +586,13 @@ void Graphics::setupNewRoom(const char *room, uint16 roomNum, int16 *furniture,
void Graphics::fillAnimBuffer(const char *anim, AnimFrame *af) {
for (;;) {
- sscanf(anim, "%3hu,%3hu", &af->frame, &af->speed);
+ // anim frame format is "%3hu,%3hu," (frame number, frame speed)
+ af->frame = atoi(anim);
+ anim += 4;
+ af->speed = atoi(anim);
+ anim += 4;
if (af->frame == 0)
break;
- anim += 8;
++af;
}
}
diff --git a/queen/resource.cpp b/queen/resource.cpp
index 156d21eda0..aba7015487 100644
--- a/queen/resource.cpp
+++ b/queen/resource.cpp
@@ -80,7 +80,7 @@ int32 Resource::resourceIndex(const char *filename) const {
//Use simple binary search to locate file
- for(;;) {
+ for (;;) {
uint32 cur = (low + high) / 2;
int32 diff = strcmp(entryName, _resourceTable[cur].filename);
diff --git a/queen/talk.cpp b/queen/talk.cpp
index 099b5b9b5f..99ee86d27d 100644
--- a/queen/talk.cpp
+++ b/queen/talk.cpp
@@ -725,7 +725,7 @@ void Talk::headStringAnimation(const SpeechParameters *parameters, int bobNum, i
for (;;) {
uint16 frame;
- sscanf(parameters->animation + offset, "%3hu", &frame);
+ frame = atoi(parameters->animation + offset);
if (!frame)
break;
@@ -772,7 +772,7 @@ void Talk::stringAnimation(const SpeechParameters *parameters, int startFrame, i
for (;;) {
uint16 frame;
- sscanf(parameters->animation + offset, "%3hu", &frame);
+ frame = atoi(parameters->animation + offset);
if (!frame)
break;