[Scummvm-cvs-logs] SF.net SVN: scummvm:[34752] scummvm/branches/gsoc2008-gui
tanoku at users.sourceforge.net
tanoku at users.sourceforge.net
Sun Oct 5 22:31:18 CEST 2008
Revision: 34752
http://scummvm.svn.sourceforge.net/scummvm/?rev=34752&view=rev
Author: tanoku
Date: 2008-10-05 20:31:18 +0000 (Sun, 05 Oct 2008)
Log Message:
-----------
Merged revisions 34748,34750 via svnmerge from
https://tanoku@scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk
........
r34748 | dreammaster | 2008-10-05 12:25:35 +0200 (Sun, 05 Oct 2008) | 1 line
Changed NPC schedules to be loaded when an NPC is activated - this avoids an issue with the Castle Skorl's pre-activation room number being invalid room #99
........
r34750 | fingolfin | 2008-10-05 14:18:16 +0200 (Sun, 05 Oct 2008) | 1 line
Fixed ambiguous 'else'
........
Modified Paths:
--------------
scummvm/branches/gsoc2008-gui/common/unarj.cpp
scummvm/branches/gsoc2008-gui/engines/lure/res.cpp
scummvm/branches/gsoc2008-gui/engines/lure/res_struct.cpp
scummvm/branches/gsoc2008-gui/engines/lure/res_struct.h
Property Changed:
----------------
scummvm/branches/gsoc2008-gui/
Property changes on: scummvm/branches/gsoc2008-gui
___________________________________________________________________
Modified: svnmerge-integrated
- /scummvm/trunk:1-34747
+ /scummvm/trunk:1-34751
Modified: scummvm/branches/gsoc2008-gui/common/unarj.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/common/unarj.cpp 2008-10-05 19:58:20 UTC (rev 34751)
+++ scummvm/branches/gsoc2008-gui/common/unarj.cpp 2008-10-05 20:31:18 UTC (rev 34752)
@@ -146,10 +146,10 @@
_currArchive.seek(tmp_pos, SEEK_SET);
id = _currArchive.readByte();
while (tmp_pos < end_pos) {
- if (id == HEADER_ID_LO)
+ if (id == HEADER_ID_LO) {
if ((id = _currArchive.readByte()) == HEADER_ID_HI)
break;
- else
+ } else
id = _currArchive.readByte();
tmp_pos++;
}
Modified: scummvm/branches/gsoc2008-gui/engines/lure/res.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/engines/lure/res.cpp 2008-10-05 19:58:20 UTC (rev 34751)
+++ scummvm/branches/gsoc2008-gui/engines/lure/res.cpp 2008-10-05 20:31:18 UTC (rev 34752)
@@ -558,6 +558,13 @@
if (h != NULL)
return h;
+ // If it's NPC with a schedule, then activate the schedule
+ if ((res->npcScheduleId != 0) && (res->npcSchedule.isEmpty())) {
+ Resources &resources = Resources::getReference();
+ CharacterScheduleEntry *entry = resources.charSchedules().getEntry(res->npcScheduleId);
+ res->npcSchedule.addFront(DISPATCH_ACTION, entry, res->roomNumber);
+ }
+
// Check the script load flag
if (res->scriptLoadFlag) {
// Execute a script rather than doing a standard load
Modified: scummvm/branches/gsoc2008-gui/engines/lure/res_struct.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/engines/lure/res_struct.cpp 2008-10-05 19:58:20 UTC (rev 34751)
+++ scummvm/branches/gsoc2008-gui/engines/lure/res_struct.cpp 2008-10-05 20:31:18 UTC (rev 34752)
@@ -434,13 +434,8 @@
talkGate = 0;
scriptHotspotId = 0;
- // Set up NPC schedule if any
- uint16 npcScheduleId = READ_LE_UINT16(&rec->npcSchedule);
- if (npcScheduleId != 0) {
- Resources &res = Resources::getReference();
- CharacterScheduleEntry *entry = res.charSchedules().getEntry(npcScheduleId);
- npcSchedule.addFront(DISPATCH_ACTION, entry, roomNumber);
- }
+ // Get the NPC schedule, if any
+ npcScheduleId = READ_LE_UINT16(&rec->npcSchedule);
}
void HotspotData::saveToStream(WriteStream *stream) {
Modified: scummvm/branches/gsoc2008-gui/engines/lure/res_struct.h
===================================================================
--- scummvm/branches/gsoc2008-gui/engines/lure/res_struct.h 2008-10-05 19:58:20 UTC (rev 34751)
+++ scummvm/branches/gsoc2008-gui/engines/lure/res_struct.h 2008-10-05 20:31:18 UTC (rev 34752)
@@ -543,6 +543,7 @@
uint16 delayCtr;
uint8 flags2;
uint8 headerFlags;
+ uint16 npcScheduleId;
// Runtime fields
uint16 actionCtr;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list