[Scummvm-cvs-logs] CVS: scummvm/simon simon.cpp,1.490,1.491 simon.h,1.133,1.134 vga.cpp,1.123,1.124
kirben
kirben at users.sourceforge.net
Fri May 6 01:47:05 CEST 2005
Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5725/simon
Modified Files:
simon.cpp simon.h vga.cpp
Log Message:
Rename sprite field.
Cleanup
Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.490
retrieving revision 1.491
diff -u -d -r1.490 -r1.491
--- simon.cpp 6 May 2005 03:09:51 -0000 1.490
+++ simon.cpp 6 May 2005 08:46:43 -0000 1.491
@@ -2738,12 +2738,12 @@
vsp = _vga_sprites;
while (vsp->id != 0) {
- vsp->unk6 &= 0x7FFF;
+ vsp->paletteMode &= 0x7FFF;
vpe = &_vga_buffer_pointers[vsp->unk7];
_cur_vga_file_1 = vpe->vgaFile1;
_cur_vga_file_2 = vpe->vgaFile2;
- _video_palette_mode = vsp->unk6;
+ _video_palette_mode = vsp->paletteMode;
_vga_cur_sprite_id = vsp->id;
params[0] = READ_BE_UINT16(&vsp->image);
@@ -2816,12 +2816,12 @@
vsp = _vga_sprites;
while (vsp->id != 0) {
- vsp->unk6 &= 0x7FFF;
+ vsp->paletteMode &= 0x7FFF;
vpe = &_vga_buffer_pointers[vsp->unk7];
_cur_vga_file_1 = vpe->vgaFile1;
_cur_vga_file_2 = vpe->vgaFile2;
- _video_palette_mode = vsp->unk6;
+ _video_palette_mode = vsp->paletteMode;
_vga_cur_sprite_id = vsp->id;
if (vsp->image)
@@ -3365,7 +3365,7 @@
while (vsp->id != 0)
vsp++;
- vsp->unk6 = b;
+ vsp->paletteMode = b;
vsp->priority = 0;
vsp->unk4 = 0;
Index: simon.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.h,v
retrieving revision 1.133
retrieving revision 1.134
diff -u -d -r1.133 -r1.134
--- simon.h 22 Jan 2005 02:01:22 -0000 1.133
+++ simon.h 6 May 2005 08:46:44 -0000 1.134
@@ -81,7 +81,7 @@
uint16 x, y; /* actually signed numbers */
uint16 unk4;
uint16 priority;
- uint16 unk6, unk7;
+ uint16 paletteMode, unk7;
VgaSprite() { memset(this, 0, sizeof(*this)); }
};
@@ -643,8 +643,6 @@
void vc_25_halt_sprite();
void vc_26_set_window();
void vc_27_reset();
- void vc_27_reset_simon1();
- void vc_27_reset_simon2();
void vc_28_dummy_op();
void vc_29_stop_all_sounds();
void vc_30_set_base_delay();
Index: vga.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/vga.cpp,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -d -r1.123 -r1.124
--- vga.cpp 6 May 2005 03:09:53 -0000 1.123
+++ vga.cpp 6 May 2005 08:46:45 -0000 1.124
@@ -299,7 +299,7 @@
vsp++;
vsp->base_color = base_color;
- vsp->unk6 = a;
+ vsp->paletteMode = a;
vsp->priority = 0;
vsp->unk4 = 0;
vsp->image = 0;
@@ -1160,7 +1160,7 @@
memcpy(&bak, vsp, sizeof(bak));
bak.priority = pri;
- bak.unk6 |= 0x8000;
+ bak.paletteMode |= 0x8000;
vus2 = vsp;
@@ -1219,7 +1219,7 @@
as[3] = vc_read_next_word();
}
-void SimonEngine::vc_27_reset_simon1() {
+void SimonEngine::vc_27_reset() {
VgaSprite bak, *vsp;
VgaSleepStruct *vfs;
VgaTimerEntry *vte, *vte2;
@@ -1230,7 +1230,7 @@
vsp = _vga_sprites;
while (vsp->id) {
- if (vsp->id == 0x80) {
+ if ((_game & GF_SIMON1) && vsp->id == 0x80) {
memcpy(&bak, vsp, sizeof(VgaSprite));
}
vsp->id = 0;
@@ -1248,45 +1248,10 @@
vte = _vga_timer_list;
while (vte->delay) {
- if (vte->sprite_id != 0x80) {
- vte2 = vte;
- while (vte2->delay) {
- memcpy(vte2, vte2 + 1, sizeof(VgaTimerEntry));
- vte2++;
- }
- } else {
+ if ((_game & GF_SIMON1) && vsp->id == 0x80) {
vte++;
- }
- }
-
- vc_write_var(0xFE, 0);
-
- _lock_word &= ~8;
-}
-
-void SimonEngine::vc_27_reset_simon2() {
- _lock_word |= 8;
-
- {
- VgaSprite *vsp = _vga_sprites;
- while (vsp->id) {
- vsp->id = 0;
- vsp++;
- }
- }
-
- {
- VgaSleepStruct *vfs = _vga_sleep_structs;
- while (vfs->ident) {
- vfs->ident = 0;
- vfs++;
- }
- }
-
- {
- VgaTimerEntry *vte = _vga_timer_list;
- while (vte->delay) {
- VgaTimerEntry *vte2 = vte;
+ } else {
+ vte2 = vte;
while (vte2->delay) {
memcpy(vte2, vte2 + 1, sizeof(VgaTimerEntry));
vte2++;
@@ -1299,13 +1264,6 @@
_lock_word &= ~8;
}
-void SimonEngine::vc_27_reset() {
- if (!(_game & GF_SIMON2))
- vc_27_reset_simon1();
- else
- vc_27_reset_simon2();
-}
-
void SimonEngine::vc_28_dummy_op() {
/* unused */
_vc_ptr += 8;
@@ -1729,7 +1687,7 @@
delay(5);
}
- if (!(_game & GF_SIMON2)) {
+ if (_game & GF_SIMON1) {
uint16 params[5]; /* parameters to vc_10_draw */
VgaSprite *vsp;
VgaPointersEntry *vpe;
@@ -1745,7 +1703,7 @@
vpe = &_vga_buffer_pointers[vsp->unk7];
_cur_vga_file_1 = vpe->vgaFile1;
_cur_vga_file_2 = vpe->vgaFile2;
- _video_palette_mode = vsp->unk6;
+ _video_palette_mode = vsp->paletteMode;
params[0] = READ_BE_UINT16(&vsp->image);
params[1] = READ_BE_UINT16(&vsp->base_color);
@@ -1767,7 +1725,7 @@
// Allow one section of Simon the Sorcerer 1 introduction to be displayed
// in lower half of screen
- if (!(_game & GF_SIMON2) && (_subroutine == 2923 || _subroutine == 2926))
+ if ((_game & GF_SIMON1) && (_subroutine == 2923 || _subroutine == 2926))
dx_clear_surfaces(200);
else
dx_clear_surfaces(_video_palette_mode == 4 ? 134 : 200);
More information about the Scummvm-git-logs
mailing list