Update of /cvsroot/gemrb/gemrb/gemrb/plugins/Core
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10947/Core
Modified Files:
ActorBlock.cpp ActorBlock.h GameControl.cpp
Log Message:
Some compatibility changes + don't load scripts when it is pointless
Index: ActorBlock.h
===================================================================
RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/ActorBlock.h,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** ActorBlock.h 25 Jul 2004 18:19:41 -0000 1.38
--- ActorBlock.h 26 Jul 2004 22:06:08 -0000 1.39
***************
*** 257,261 ****
unsigned short TrapDetectionDifficulty;
unsigned short TrapRemovalDifficulty;
! unsigned short Trapped;
unsigned short TrapDetected;
unsigned short TrapLaunchX, TrapLaunchY;
--- 257,261 ----
unsigned short TrapDetectionDifficulty;
unsigned short TrapRemovalDifficulty;
! // unsigned short Trapped;
unsigned short TrapDetected;
unsigned short TrapLaunchX, TrapLaunchY;
Index: ActorBlock.cpp
===================================================================
RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/ActorBlock.cpp,v
retrieving revision 1.50
retrieving revision 1.51
diff -C2 -d -r1.50 -r1.51
*** ActorBlock.cpp 25 Jul 2004 18:19:41 -0000 1.50
--- ActorBlock.cpp 26 Jul 2004 22:06:08 -0000 1.51
***************
*** 640,644 ****
TrapDetectionDifficulty = 0;
TrapRemovalDifficulty = 0;
! Trapped = 0;
TrapDetected = 0;
TrapLaunchX = 0;
--- 640,644 ----
TrapDetectionDifficulty = 0;
TrapRemovalDifficulty = 0;
! // Trapped = 0;
TrapDetected = 0;
TrapLaunchX = 0;
***************
*** 658,662 ****
{
if(Type!=ST_TRIGGER) return;
! if(!Trapped) return;
if(Flags&(TRAP_DEACTIVATED|TRAP_INVISIBLE) ) return;
if((skill>=100) && (skill!=256) ) skill=100;
--- 658,662 ----
{
if(Type!=ST_TRIGGER) return;
! if(!Scripts[0]) return;
if(Flags&(TRAP_DEACTIVATED|TRAP_INVISIBLE) ) return;
if((skill>=100) && (skill!=256) ) skill=100;
***************
*** 672,676 ****
{
if(Type!=ST_TRIGGER) return false;
! if(!Trapped) return false;
if(Flags&(TRAP_DEACTIVATED|TRAP_INVISIBLE) ) return false;
if(see_all) return true;
--- 672,676 ----
{
if(Type!=ST_TRIGGER) return false;
! if(!Scripts[0]) return false;
if(Flags&(TRAP_DEACTIVATED|TRAP_INVISIBLE) ) return false;
if(see_all) return true;
***************
*** 684,688 ****
if(Type!=ST_TRIGGER) return false;
//actually this could be script name[0]
! if(!Trapped) return false;
if(Flags&TRAP_DEACTIVATED) return false;
TrapDetected=1; //probably too late :)
--- 684,688 ----
if(Type!=ST_TRIGGER) return false;
//actually this could be script name[0]
! if(!Scripts[0]) return false;
if(Flags&TRAP_DEACTIVATED) return false;
TrapDetected=1; //probably too late :)
***************
*** 713,717 ****
break;
}
! printf( "TrapDetected: %d Trapped: %d\n", TrapDetected, Trapped );
printf( "Trap detection: %d Trap removal: %d\n", TrapDetectionDifficulty,
TrapRemovalDifficulty );
--- 713,717 ----
break;
}
! printf( "TrapDetected: %d Trapped: %s\n", TrapDetected, Scripts[0]?"Yes":"No" );
printf( "Trap detection: %d Trap removal: %d\n", TrapDetectionDifficulty,
TrapRemovalDifficulty );
Index: GameControl.cpp
===================================================================
RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/GameControl.cpp,v
retrieving revision 1.150
retrieving revision 1.151
diff -C2 -d -r1.150 -r1.151
*** GameControl.cpp 25 Jul 2004 18:19:41 -0000 1.150
--- GameControl.cpp 26 Jul 2004 22:06:08 -0000 1.151
***************
*** 228,232 ****
}
} else if (overInfoPoint) {
! if (overInfoPoint->TrapDetected && overInfoPoint->Trapped) {
video->DrawPolyline( overInfoPoint->outline, red, true );
}
--- 228,232 ----
}
} else if (overInfoPoint) {
! if (overInfoPoint->VisibleTrap(0) ) {
video->DrawPolyline( overInfoPoint->outline, red, true );
}
***************
*** 291,301 ****
// Draw actor's palettes
if ((DebugFlags & DEBUG_SHOW_PALETTES) && lastActor) {
Color *Pal1 = lastActor->anims->OrigPalette;
! for (int i = 0; i < 256; i++) {
Region rgn( 10 * (i % 64), 30 + 10 * (i / 64), 10, 10 );
video->DrawRect( rgn, Pal1[i], true, false);
}
Color *Pal2 = lastActor->anims->Palette;
! for (int i = 0; i < 256; i++) {
Region rgn( 10 * (i % 64), 90 + 10 * (i / 64), 10, 10 );
video->DrawRect( rgn, Pal2[i], true, false);
--- 291,303 ----
// Draw actor's palettes
if ((DebugFlags & DEBUG_SHOW_PALETTES) && lastActor) {
+ int i;
+
Color *Pal1 = lastActor->anims->OrigPalette;
! for (i = 0; i < 256; i++) {
Region rgn( 10 * (i % 64), 30 + 10 * (i / 64), 10, 10 );
video->DrawRect( rgn, Pal1[i], true, false);
}
Color *Pal2 = lastActor->anims->Palette;
! for (i = 0; i < 256; i++) {
Region rgn( 10 * (i % 64), 90 + 10 * (i / 64), 10, 10 );
video->DrawRect( rgn, Pal2[i], true, false);
***************
*** 393,402 ****
{
if (overInfoPoint) {
! if (overInfoPoint->Trapped &&
! !( overInfoPoint->TrapDetected )) {
! overInfoPoint->TrapDetected = 1;
! core->GetVideoDriver()->FreeSprite( overInfoPoint->outline->fill );
! overInfoPoint->outline->fill = NULL;
! }
}
if (overContainer) {
--- 395,401 ----
{
if (overInfoPoint) {
! overInfoPoint->DetectTrap(256);
! core->GetVideoDriver()->FreeSprite( overInfoPoint->outline->fill );
! overInfoPoint->outline->fill = NULL;
}
if (overContainer) {
***************
*** 513,524 ****
case 'z':
if (lastActor) {
printf( "Appearance flags: 0x%04x : 0x%04x\n", lastActor->AppearanceFlags1, lastActor->AppearanceFlags2 );
printf( "Unknowns: %04x %02x %02x", lastActor->unknown2F2, lastActor->unknown2F4, lastActor->unknown310 );
! for (int i=0; i < 5; i++) {
printf(" %04x", lastActor->unknown2FC[i]);
}
printf("\n");
printf( "Num of colors: %d\n", lastActor->ColorsCount );
! for (int i=0; i < lastActor->ColorsCount; i++) {
printf( " Color: %3d Place: %3d\n", lastActor->Colors[i], lastActor->ColorPlacements[i] );
}
--- 512,525 ----
case 'z':
if (lastActor) {
+ int i;
+
printf( "Appearance flags: 0x%04x : 0x%04x\n", lastActor->AppearanceFlags1, lastActor->AppearanceFlags2 );
printf( "Unknowns: %04x %02x %02x", lastActor->unknown2F2, lastActor->unknown2F4, lastActor->unknown310 );
! for (i=0; i < 5; i++) {
printf(" %04x", lastActor->unknown2FC[i]);
}
printf("\n");
printf( "Num of colors: %d\n", lastActor->ColorsCount );
! for (i=0; i < lastActor->ColorsCount; i++) {
printf( " Color: %3d Place: %3d\n", lastActor->Colors[i], lastActor->ColorPlacements[i] );
}
|