[Scummvm-cvs-logs] CVS: scummvm/saga actor.cpp,1.111,1.112 isomap.cpp,1.41,1.42 scene.cpp,1.94,1.95 scene.h,1.48,1.49
Andrew Kurushin
h00ligan at users.sourceforge.net
Sat Apr 2 12:05:02 CEST 2005
Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11841
Modified Files:
actor.cpp isomap.cpp scene.cpp scene.h
Log Message:
some world map fix:
-only riff shows as small point
-change scene from world map
todo: in original talk_to not shows for riff on world map
Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/actor.cpp,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -d -r1.111 -r1.112
--- actor.cpp 18 Mar 2005 17:11:34 -0000 1.111
+++ actor.cpp 2 Apr 2005 20:04:38 -0000 1.112
@@ -568,11 +568,17 @@
for (i = 0; i < _actorsCount; i++) {
actor = _actors[i];
if (actor->flags & (kProtagonist | kFollower)) {
- actor->sceneNumber = _vm->_scene->currentSceneNumber();
+
if (actor->flags & kProtagonist) {
actor->finalTarget = actor->location;
_centerActor = _protagonist = actor;
+ } else {
+ if (_vm->_scene->currentSceneResourceId() == RID_ITE_OVERMAP_SCENE) {
+ continue;
+ }
}
+
+ actor->sceneNumber = _vm->_scene->currentSceneNumber();
}
if (actor->sceneNumber == _vm->_scene->currentSceneNumber()) {
actor->actionCycle = (_vm->_rnd.getRandomNumber(7) & 0x7) * 4; // 1/8th chance
@@ -879,7 +885,7 @@
}
}
- if (_vm->_scene->currentSceneNumber() == RID_ITE_OVERMAP_SCENE) {
+ if (_vm->_scene->currentSceneResourceId() == RID_ITE_OVERMAP_SCENE) {
speed = 2;
}
@@ -1219,7 +1225,7 @@
}
bool Actor::getSpriteParams(CommonObjectData *commonObjectData, int &frameNumber, SpriteList *&spriteList) {
- if (_vm->_scene->currentSceneNumber() == RID_ITE_OVERMAP_SCENE) {
+ if (_vm->_scene->currentSceneResourceId() == RID_ITE_OVERMAP_SCENE) {
if (!(commonObjectData->flags & kProtagonist)){
warning("not protagonist");
return false;
@@ -1437,6 +1443,7 @@
ActorData *actor;
const HitZone *hitZone;
int hitZoneIndex;
+ Point testPoint;
actor = getActor(actorId);
actor->actorFlags &= ~kActorBackwards;
@@ -1459,7 +1466,8 @@
if (actor == _protagonist) {
_vm->_script->wakeUpActorThread(kWaitTypeWalk, actor);
if (_vm->_script->_pendingVerb == kVerbWalkTo) {
- hitZoneIndex = _vm->_scene->_actionMap->hitTest(actor->screenPosition);
+ actor->location.toScreenPointUV(testPoint);
+ hitZoneIndex = _vm->_scene->_actionMap->hitTest(testPoint);
if (hitZoneIndex != -1) {
hitZone = _vm->_scene->_actionMap->getHitZone(hitZoneIndex);
stepZoneAction(actor, hitZone, false, true);
Index: isomap.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/isomap.cpp,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- isomap.cpp 29 Mar 2005 21:18:39 -0000 1.41
+++ isomap.cpp 2 Apr 2005 20:04:38 -0000 1.42
@@ -285,7 +285,7 @@
tileCoordsToScreenPoint(_vm->_actor->_centerActor->location, playerPoint);
- if (_vm->_scene->currentSceneNumber() == RID_ITE_OVERMAP_SCENE) {
+ if (_vm->_scene->currentSceneResourceId() == RID_ITE_OVERMAP_SCENE) {
_mapPosition.x = (playerPoint.x + _viewScroll.x) * 30 / 100 - (381);
_mapPosition.y = (playerPoint.y + _viewScroll.y) * 30 / 100 - (342);
}
@@ -322,7 +322,7 @@
_viewScroll.x = smoothSlide( _viewScroll.x, minScrollPos.x, maxScrollPos.x );
}
- if (_vm->_scene->currentSceneNumber() == RID_ITE_OVERMAP_SCENE) {
+ if (_vm->_scene->currentSceneResourceId() == RID_ITE_OVERMAP_SCENE) {
ObjectData *obj;
uint16 objectId;
objectId = _vm->_actor->objIndexToId(ITE_OBJ_MAP);
@@ -1247,7 +1247,7 @@
memset( &_searchArray, 0, sizeof(_searchArray));
if (!(actor->actorFlags & kActorNoCollide) &&
- (_vm->_scene->currentSceneNumber() != RID_ITE_OVERMAP_SCENE)) {
+ (_vm->_scene->currentSceneResourceId() != RID_ITE_OVERMAP_SCENE)) {
for (i = 0; i < _vm->_actor->_actorsCount; i++) {
other = _vm->_actor->_actors[i];
if (other->disabled) continue;
@@ -1392,7 +1392,7 @@
Point mPos(position);
int x,y;
- if (_vm->_scene->currentSceneNumber() == RID_ITE_OVERMAP_SCENE){
+ if (_vm->_scene->currentSceneResourceId() == RID_ITE_OVERMAP_SCENE){
if (mPos.y < 16) {
mPos.y = 16;
}
Index: scene.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/scene.cpp,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -d -r1.94 -r1.95
--- scene.cpp 29 Mar 2005 22:14:20 -0000 1.94
+++ scene.cpp 2 Apr 2005 20:04:38 -0000 1.95
@@ -106,7 +106,7 @@
_sceneLoaded = false;
_sceneNumber = 0;
- _sceneResNum = 0;
+ _sceneResourceId = 0;
_inGame = false;
_loadDesc = false;
memset(&_desc, 0, sizeof(_desc));
@@ -505,7 +505,7 @@
int Scene::loadScene(int scene_num, int load_flag, SCENE_PROC scene_proc, SceneDescription *scene_desc_param, int fadeType, int actorsEntrance) {
SCENE_INFO scene_info;
- uint32 res_number = 0;
+ uint32 resourceId = 0;
int result;
int i;
EVENT event;
@@ -524,11 +524,11 @@
switch (load_flag) {
case BY_RESOURCE:
- res_number = scene_num;
+ resourceId = scene_num;
break;
case BY_SCENE:
assert((scene_num > 0) && (scene_num < _sceneMax));
- res_number = _sceneLUT[scene_num];
+ resourceId = _sceneLUT[scene_num];
_sceneNumber = scene_num;
break;
case BY_DESC:
@@ -548,11 +548,11 @@
// Load scene descriptor and resource list resources
if (_loadDesc) {
- _sceneResNum = res_number;
- assert(_sceneResNum != 0);
- debug(0, "Loading scene resource %u:", res_number);
+ _sceneResourceId = resourceId;
+ assert(_sceneResourceId != 0);
+ debug(0, "Loading scene resource %u:", resourceId);
- if (loadSceneDescriptor(res_number) != SUCCESS) {
+ if (loadSceneDescriptor(resourceId) != SUCCESS) {
warning("Scene::loadScene(): Error reading scene descriptor");
return FAILURE;
}
@@ -581,14 +581,6 @@
return FAILURE;
}
-/* // Load scene script data
- if (_desc.scriptModuleNumber > 0) {
- if (_vm->_script->loadScript(_desc.scriptModuleNumber) != SUCCESS) {
- warning("Scene::loadScene(): Error loading scene script");
- return FAILURE;
- }
- }
-*/
_sceneLoaded = true;
q_event = NULL;
@@ -1078,7 +1070,7 @@
const char *fmt = "%-20s %d\n";
_vm->_console->DebugPrintf(fmt, "Scene number:", _sceneNumber);
- _vm->_console->DebugPrintf(fmt, "Descriptor R#:", _sceneResNum);
+ _vm->_console->DebugPrintf(fmt, "Descriptor ResourceId:", _sceneResourceId);
_vm->_console->DebugPrintf("-------------------------\n");
_vm->_console->DebugPrintf(fmt, "Flags:", _desc.flags);
_vm->_console->DebugPrintf(fmt, "Resource list R#:", _desc.resListRN);
Index: scene.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/scene.h,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- scene.h 29 Mar 2005 22:14:20 -0000 1.48
+++ scene.h 2 Apr 2005 20:04:39 -0000 1.49
@@ -260,7 +260,8 @@
int getSceneLUT(int num);
- int currentSceneNumber() { return _sceneNumber; }
+ int currentSceneNumber() const { return _sceneNumber; }
+ int currentSceneResourceId() const { return _sceneResourceId; }
private:
int loadScene(int scene, int load_flag, SCENE_PROC scene_proc, SceneDescription *, int fadeIn, int actorsEntrance);
@@ -281,7 +282,7 @@
int _firstScene;
bool _sceneLoaded;
int _sceneNumber;
- int _sceneResNum;
+ int _sceneResourceId;
bool _inGame;
bool _loadDesc;
SceneDescription _desc;
More information about the Scummvm-git-logs
mailing list