Update of /cvsroot/vba/VisualBoyAdvance/src/gb
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6744/src/gb
Modified Files:
GB.cpp gbMemory.cpp
Log Message:
vs2005 compatibility
Index: GB.cpp
===================================================================
RCS file: /cvsroot/vba/VisualBoyAdvance/src/gb/GB.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** GB.cpp 30 Apr 2006 14:40:02 -0000 1.24
--- GB.cpp 13 May 2006 16:32:15 -0000 1.25
***************
*** 2059,2063 ****
{
if(strlen(file) > 4) {
! char * p = strrchr(file,'.');
if(p != NULL) {
--- 2059,2063 ----
{
if(strlen(file) > 4) {
! const char * p = strrchr(file,'.');
if(p != NULL) {
***************
*** 2270,2274 ****
gbMemory[0xff03] = 0xff;
! for (int i = 0x8; i<0xf; i++)
gbMemory[0xff00+i] = 0xff;
--- 2270,2275 ----
gbMemory[0xff03] = 0xff;
! int i;
! for (i = 0x8; i<0xf; i++)
gbMemory[0xff00+i] = 0xff;
Index: gbMemory.cpp
===================================================================
RCS file: /cvsroot/vba/VisualBoyAdvance/src/gb/gbMemory.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** gbMemory.cpp 30 Apr 2006 14:44:16 -0000 1.5
--- gbMemory.cpp 13 May 2006 16:32:15 -0000 1.6
***************
*** 345,349 ****
if(diff > 0) {
// update the clock according to the last update time
! gbDataMBC3.mapperSeconds += diff % 60;
if(gbDataMBC3.mapperSeconds > 59) {
gbDataMBC3.mapperSeconds -= 60;
--- 345,349 ----
if(diff > 0) {
// update the clock according to the last update time
! gbDataMBC3.mapperSeconds += (int)(diff % 60);
if(gbDataMBC3.mapperSeconds > 59) {
gbDataMBC3.mapperSeconds -= 60;
***************
*** 353,357 ****
diff /= 60;
! gbDataMBC3.mapperMinutes += diff % 60;
if(gbDataMBC3.mapperMinutes > 59) {
gbDataMBC3.mapperMinutes -= 60;
--- 353,357 ----
diff /= 60;
! gbDataMBC3.mapperMinutes += (int)(diff % 60);
if(gbDataMBC3.mapperMinutes > 59) {
gbDataMBC3.mapperMinutes -= 60;
***************
*** 361,365 ****
diff /= 60;
! gbDataMBC3.mapperHours += diff % 24;
if(gbDataMBC3.mapperHours > 23) {
gbDataMBC3.mapperHours -= 24;
--- 361,365 ----
diff /= 60;
! gbDataMBC3.mapperHours += (int)(diff % 24);
if(gbDataMBC3.mapperHours > 23) {
gbDataMBC3.mapperHours -= 24;
***************
*** 368,372 ****
diff /= 24;
! gbDataMBC3.mapperDays += diff;
if(gbDataMBC3.mapperDays > 255) {
if(gbDataMBC3.mapperDays > 511) {
--- 368,372 ----
diff /= 24;
! gbDataMBC3.mapperDays += (int)(diff & 0xffffffff);
if(gbDataMBC3.mapperDays > 255) {
if(gbDataMBC3.mapperDays > 511) {
***************
*** 1238,1242 ****
if(diff > 0) {
// update the clock according to the last update time
! gbDataTAMA5.mapperSeconds += diff % 60;
if(gbDataTAMA5.mapperSeconds > 59) {
gbDataTAMA5.mapperSeconds -= 60;
--- 1238,1242 ----
if(diff > 0) {
// update the clock according to the last update time
! gbDataTAMA5.mapperSeconds += (int)(diff % 60);
if(gbDataTAMA5.mapperSeconds > 59) {
gbDataTAMA5.mapperSeconds -= 60;
***************
*** 1246,1250 ****
diff /= 60;
! gbDataTAMA5.mapperMinutes += diff % 60;
if(gbDataTAMA5.mapperMinutes > 59) {
gbDataTAMA5.mapperMinutes -= 60;
--- 1246,1250 ----
diff /= 60;
! gbDataTAMA5.mapperMinutes += (int)(diff % 60);
if(gbDataTAMA5.mapperMinutes > 59) {
gbDataTAMA5.mapperMinutes -= 60;
***************
*** 1254,1258 ****
diff /= 60;
! gbDataTAMA5.mapperHours += diff % 24;
diff /= 24;
if(gbDataTAMA5.mapperHours > 23) {
--- 1254,1258 ----
diff /= 60;
! gbDataTAMA5.mapperHours += (int)(diff % 24);
diff /= 24;
if(gbDataTAMA5.mapperHours > 23) {
***************
*** 1262,1266 ****
}
! int days = diff;
while (days)
{
--- 1262,1266 ----
}
! time_t days = diff;
while (days)
{
|