[Scummvm-cvs-logs] CVS: scummvm/saga cvar.cpp,1.12,1.13 sdebug.cpp,1.18,1.19 sthread.cpp,1.35,1.36
Pawel Kolodziejski
aquadran at users.sourceforge.net
Wed Oct 27 23:57:58 CEST 2004
Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20198/saga
Modified Files:
cvar.cpp sdebug.cpp sthread.cpp
Log Message:
replaced printf usage in saga
Index: cvar.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/cvar.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- cvar.cpp 27 Oct 2004 21:32:27 -0000 1.12
+++ cvar.cpp 28 Oct 2004 06:55:49 -0000 1.13
@@ -226,7 +226,7 @@
*(cvar->t.i.var_p) = (cv_int_t) int_param;
#ifdef CVAR_TRACE
- printf("Set cvar to value %ld.\n", int_param);
+ debug(2, "Set cvar to value %ld.\n", int_param);
#endif
break;
@@ -274,7 +274,7 @@
*(cvar->t.ui.var_p) = (cv_uint16_t) uint16_param;
#ifdef CVAR_TRACE
- printf("Set cvar to value %lu.\n", uint16_param);
+ debug(2, "Set cvar to value %lu.\n", uint16_param);
#endif
break;
case CVAR_FLOAT:
@@ -291,7 +291,7 @@
cvar->t.s.var_str[cvar->t.s.ubound] = 0;
}
#ifdef CVAR_TRACE
- printf("Set cvar to value \"%s\".\n", cvar->t.s.var_str);
+ debug(2, "Set cvar to value \"%s\".\n", cvar->t.s.var_str);
#endif
break;
default:
@@ -311,7 +311,7 @@
hash = CVAR_HashString(var_str);
#ifdef CVAR_TRACE
- printf("Performing lookup on hash bucket %d.\n", hash);
+ debug(2, "Performing lookup on hash bucket %d.\n", hash);
#endif
walk_ptr = CVHashTbl[hash];
while (walk_ptr != NULL) {
@@ -350,7 +350,7 @@
hash = CVAR_HashString(func_name);
#ifdef CVAR_TRACE
- printf("Added FUNC cvar to hash bucket %d.\n", hash);
+ debug(2, "Added FUNC cvar to hash bucket %d.\n", hash);
#endif
return CVAR_Add(hash, &new_cvar);
@@ -373,7 +373,7 @@
hash = CVAR_HashString(var_name);
#ifdef CVAR_TRACE
- printf("Added INT cvar to hash bucket %d.\n", hash);
+ debug(2, "Added INT cvar to hash bucket %d.\n", hash);
#endif
return CVAR_Add(hash, &new_cvar);
@@ -395,7 +395,7 @@
hash = CVAR_HashString(var_name);
#ifdef CVAR_TRACE
- printf("Added UNSIGNED INT ccvar to hash bucket %d.\n", hash);
+ debug(2, "Added UNSIGNED INT ccvar to hash bucket %d.\n", hash);
#endif
return CVAR_Add(hash, &new_cvar);
@@ -417,7 +417,7 @@
hash = CVAR_HashString(var_name);
#ifdef CVAR_TRACE
- printf("Added FLOAT cvar to hash bucket %d.\n", hash);
+ debug(2, "Added FLOAT cvar to hash bucket %d.\n", hash);
#endif
return CVAR_Add(hash, &new_cvar);
@@ -438,7 +438,7 @@
hash = CVAR_HashString(var_name);
#ifdef CVAR_TRACE
- printf("Added UNSIGNED INT var to hash bucket %d.\n", hash);
+ debug(2, "Added UNSIGNED INT var to hash bucket %d.\n", hash);
#endif
return CVAR_Add(hash, &new_cvar);
Index: sdebug.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sdebug.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- sdebug.cpp 27 Oct 2004 21:32:28 -0000 1.18
+++ sdebug.cpp 28 Oct 2004 06:55:50 -0000 1.19
@@ -104,10 +104,10 @@
SD_ADDTXT(tmp_buf);
/*
if(( param >= 0 ) && ( param < diag_list->n_dialogue )) {
- printf(" ; \"%.*s\"", SCRIPT_STRINGLIMIT, diag_list->str[param] );
+ debug(2, " ; \"%.*s\"", SCRIPT_STRINGLIMIT, diag_list->str[param] );
}
else {
- printf(" ; Invalid dialogue string.\n" );
+ debug(2, " ; Invalid dialogue string.\n" );
}
*/
}
@@ -245,7 +245,7 @@
/*
for( i = 0 ; i < script_list->n_scripts ; i++ ) {
if( op_offset == script_list->scripts[i].offset ) {
- printf("; Entrypoint \"%s\".", script_list->scriptl_p + script_list->scripts[i].name_offset );
+ debug(2, "; Entrypoint \"%s\".", script_list->scriptl_p + script_list->scripts[i].name_offset );
break;
}
}
@@ -348,10 +348,9 @@
sprintf(tmp_buf, "%04X", n_switch2);
SD_ADDTXT(tmp_buf);
for (i = 0; i < n_switch2; i++) {
- //printf("\n");
switch_num = readS.readUint16LE();
switch_jmp = readS.readUint16LE();
- //printf( TAB "WEIGHT %04X, %04X", switch_num, switch_jmp);
+ //debug(2, "WEIGHT %04X, %04X", switch_num, switch_jmp);
}
}
break;
Index: sthread.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sthread.cpp,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- sthread.cpp 27 Oct 2004 22:17:10 -0000 1.35
+++ sthread.cpp 28 Oct 2004 06:55:50 -0000 1.36
@@ -556,25 +556,25 @@
break;
case 0x28: // inc_v increment, don't push
unhandled = 1;
- printf("??? ");
+ //debug(2, "??? ");
scriptS.readByte();
scriptS.readUint16LE();
break;
case 0x29: // dec_v decrement, don't push
unhandled = 1;
- printf("??? ");
+ //debug(2, "??? ");
scriptS.readByte();
scriptS.readUint16LE();
break;
case 0x2A: // postinc
unhandled = 1;
- printf("??? ");
+ //debug(2, "??? ");
scriptS.readByte();
scriptS.readUint16LE();
break;
case 0x2B: // postdec
unhandled = 1;
- printf("??? ");
+ //debug(2, "??? ");
scriptS.readByte();
scriptS.readUint16LE();
break;
@@ -793,15 +793,13 @@
// (DLGO): Add a dialogue option to interface
case 0x56:
{
- printf("DLGO | ");
+ SDataWord_T param3 = 0;
param1 = scriptS.readByte();
param2 = scriptS.readByte();
- printf("%02X %02X ", param1, param2);
-
if (param2 > 0) {
- SDataWord_T param3 = scriptS.readUint16LE();
- printf("%04X", param3);
+ param3 = scriptS.readUint16LE();
}
+ debug(2, "DLGO | %02X %02X %04X", param1, param2, param3);
}
break;
case 0x57: // animate
More information about the Scummvm-git-logs
mailing list