[Scummvm-cvs-logs] CVS: scummvm/simon simon.cpp,1.8,1.9 simon.h,1.5,1.6
Ludvig Strigeus
strigeus at users.sourceforge.net
Sat Apr 13 14:34:57 CEST 2002
Update of /cvsroot/scummvm/scummvm/simon
In directory usw-pr-cvs1:/tmp/cvs-serv10855/simon
Modified Files:
simon.cpp simon.h
Log Message:
added null graphics driver (USE_NULL_DRIVER)
will make it nicer later.
Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** simon.cpp 13 Apr 2002 20:08:58 -0000 1.8
--- simon.cpp 13 Apr 2002 21:06:48 -0000 1.9
***************
*** 132,136 ****
byte *SimonState::allocateItem(uint size) {
byte *org = _itemheap_ptr;
! size = (size + 1) & ~1;
_itemheap_ptr += size;
--- 132,136 ----
byte *SimonState::allocateItem(uint size) {
byte *org = _itemheap_ptr;
! size = (size + 3) & ~3;
_itemheap_ptr += size;
***************
*** 143,148 ****
--- 143,156 ----
}
+ void SimonState::alignTableMem() {
+ if ((uint32)_tablesheap_ptr & 3) {
+ _tablesheap_ptr += 2;
+ _tablesheap_curpos += 2;
+ }
+ }
+
byte *SimonState::allocateTable(uint size) {
byte *org = _tablesheap_ptr;
+
size = (size + 1) & ~1;
***************
*** 528,532 ****
Subroutine *SimonState::createSubroutine(uint id) {
! Subroutine *sub = (Subroutine*)allocateTable(sizeof(Subroutine));
sub->id = id;
sub->first = 0;
--- 536,544 ----
Subroutine *SimonState::createSubroutine(uint id) {
! Subroutine *sub;
!
! alignTableMem();
!
! sub = (Subroutine*)allocateTable(sizeof(Subroutine));
sub->id = id;
sub->first = 0;
Index: simon.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** simon.h 13 Apr 2002 20:08:58 -0000 1.5
--- simon.h 13 Apr 2002 21:06:48 -0000 1.6
***************
*** 593,596 ****
--- 593,597 ----
byte *allocateItem(uint size);
byte *allocateTable(uint size);
+ void alignTableMem();
Child *findChildOfType(Item *i, uint child);
More information about the Scummvm-git-logs
mailing list