From d06083aa9625c285454da562bb7397b7cbae8987 Mon Sep 17 00:00:00 2001 From: richiesams Date: Tue, 30 Jul 2013 14:33:53 -0500 Subject: ZVISION: Convert sscanf formats to follow new int lengths --- engines/zvision/actions.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/engines/zvision/actions.cpp b/engines/zvision/actions.cpp index fda6e1b112..689d5408bf 100644 --- a/engines/zvision/actions.cpp +++ b/engines/zvision/actions.cpp @@ -33,8 +33,8 @@ namespace ZVision { // ActionAdd ////////////////////////////////////////////////////////////////////////////// - sscanf(line->c_str(), ":add(%u,%hhu)", &_key, &_value); ActionAdd::ActionAdd(const Common::String &line) { + sscanf(line.c_str(), ":add(%u,%u)", &_key, &_value); } ResultAction *ActionAdd::clone() const { @@ -51,8 +51,8 @@ bool ActionAdd::execute(ZVision *engine) { // ActionAssign ////////////////////////////////////////////////////////////////////////////// - sscanf(line->c_str(), ":assign(%u, %hhu)", &_key, &_value); ActionAssign::ActionAssign(const Common::String &line) { + sscanf(line.c_str(), ":assign(%u, %u)", &_key, &_value); } ResultAction *ActionAssign::clone() const { @@ -69,8 +69,8 @@ bool ActionAssign::execute(ZVision *engine) { // ActionAttenuate ////////////////////////////////////////////////////////////////////////////// - sscanf(line->c_str(), ":assign(%u, %hd)", &_key, &_attenuation); ActionAttenuate::ActionAttenuate(const Common::String &line) { + sscanf(line.c_str(), ":assign(%u, %d)", &_key, &_attenuation); } ResultAction *ActionAttenuate::clone() const { @@ -87,8 +87,8 @@ bool ActionAttenuate::execute(ZVision *engine) { // ActionChangeLocation ////////////////////////////////////////////////////////////////////////////// - sscanf(line->c_str(), ":change_location(%c,%c,%c%c,%hu)", &_world, &_room, &_node, &_view, &_x); ActionChangeLocation::ActionChangeLocation(const Common::String &line) { + sscanf(line.c_str(), ":change_location(%c,%c,%c%c,%u)", &_world, &_room, &_node, &_view, &_x); } ResultAction *ActionChangeLocation::clone() const { @@ -105,9 +105,9 @@ bool ActionChangeLocation::execute(ZVision *engine) { // ActionCrossfade ////////////////////////////////////////////////////////////////////////////// - sscanf(line->c_str(), - ":crossfade(%u %u %hhu %hhu %hhu %hhu %hu)", ActionCrossfade::ActionCrossfade(const Common::String &line) { + sscanf(line.c_str(), + ":crossfade(%u %u %u %u %u %u %u)", &_keyOne, &_keyTwo, &_oneStartVolume, &_twoStartVolume, &_oneEndVolume, &_twoEndVolume, &_timeInMillis); } @@ -125,9 +125,9 @@ bool ActionCrossfade::execute(ZVision *engine) { // ActionPreloadAnimation ////////////////////////////////////////////////////////////////////////////// - // The two %*hhu are always 0 and dont seem to have a use - sscanf(line->c_str(), ":animpreload:%u(%s %*hhu %*hhu %u %hhu)", &_key, &_fileName, &_mask, &_framerate); ActionPreloadAnimation::ActionPreloadAnimation(const Common::String &line) { + // The two %*u are always 0 and dont seem to have a use + sscanf(line.c_str(), ":animpreload:%u(%s %*u %*u %u %u)", &_key, &_fileName, &_mask, &_framerate); } ResultAction *ActionPreloadAnimation::clone() const { @@ -144,10 +144,10 @@ bool ActionPreloadAnimation::execute(ZVision *engine) { // ActionPlayAnimation ////////////////////////////////////////////////////////////////////////////// - // The two %*hhu are always 0 and dont seem to have a use - sscanf(line->c_str(), - ":animplay:%u(%s %u %u %u %u %u %u %hhu %*hhu %*hhu %u %hhu)", ActionPlayAnimation::ActionPlayAnimation(const Common::String &line) { + // The two %*u are always 0 and dont seem to have a use + sscanf(line.c_str(), + ":animplay:%u(%s %u %u %u %u %u %u %u %*u %*u %u %u)", &_key, &_x, &_y, &_width, &_height, &_start, &_end, &_loop, &_mask, &_framerate); } @@ -165,8 +165,8 @@ bool ActionPlayAnimation::execute(ZVision *engine) { // ActionRandom ////////////////////////////////////////////////////////////////////////////// - sscanf(line->c_str(), ":random:%u, %u)", &_key, &_max); ActionRandom::ActionRandom(const Common::String &line) { + sscanf(line.c_str(), ":random:%u, %u)", &_key, &_max); } ResultAction *ActionRandom::clone() const { @@ -184,8 +184,8 @@ bool ActionRandom::execute(ZVision *engine) { // ActionTimer ////////////////////////////////////////////////////////////////////////////// - sscanf(line->c_str(), ":timer:%u(%hu)", &_key, &_time); ActionTimer::ActionTimer(const Common::String &line) { + sscanf(line.c_str(), ":timer:%u(%u)", &_key, &_time); } ResultAction *ActionTimer::clone() const { -- cgit v1.2.3