Changed some SCIkdebug() calls to debugC()

svn-id: r38634
This commit is contained in:
Filippos Karapetis 2009-02-20 22:21:33 +00:00
parent 1a9253bc5e
commit 701279fb40
4 changed files with 16 additions and 13 deletions

View File

@ -29,6 +29,7 @@
# undef ARRAYSIZE
#endif
#include "sci/sci.h"
#include "sci/engine/gc.h"
#include "sci/include/sciresource.h"
#include "sci/include/engine.h"
@ -473,7 +474,8 @@ reg_t k_Unknown(state_t *s, int funct_nr, int argc, reg_t *argv) {
reg_t kFlushResources(state_t *s, int funct_nr, int argc, reg_t *argv) {
run_gc(s);
SCIkdebug(SCIkROOM, "Entering room number %d\n", UKPV(0));
// FIXME: remove the Sci:: bit once this belongs to the Sci namespace
debugC(2, Sci::kDebugLevelRoom, "Entering room number %d\n", UKPV(0));
return s->r_acc;
}
@ -520,12 +522,14 @@ reg_t kGetTime(state_t *s, int funct_nr, int argc, reg_t *argv) {
if (s->version < SCI_VERSION_FTU_NEW_GETTIME) { // Use old semantics
if (argc) { // Get seconds since last am/pm switch
retval = loc_time->tm_sec + loc_time->tm_min * 60 + (loc_time->tm_hour % 12) * 3600;
SCIkdebug(SCIkTIME, "GetTime(timeofday) returns %d\n", retval);
// FIXME: remove the Sci:: bit once this belongs to the Sci namespace
debugC(2, Sci::kDebugLevelTime, "GetTime(timeofday) returns %d\n", retval);
} else { // Get time since game started
sci_get_current_time(&time_prec);
retval = ((time_prec.tv_usec - s->game_start_time.tv_usec) * 60 / 1000000) +
(time_prec.tv_sec - s->game_start_time.tv_sec) * 60;
SCIkdebug(SCIkTIME, "GetTime(elapsed) returns %d\n", retval);
// FIXME: remove the Sci:: bit once this belongs to the Sci namespace
debugC(2, Sci::kDebugLevelTime, "GetTime(elapsed) returns %d\n", retval);
}
} else {
int mode = UKPV_OR_ALT(0, 0);
@ -537,23 +541,27 @@ reg_t kGetTime(state_t *s, int funct_nr, int argc, reg_t *argv) {
sci_get_current_time(&time_prec);
retval = ((time_prec.tv_usec - s->game_start_time.tv_usec) * 60 / 1000000) +
(time_prec.tv_sec - s->game_start_time.tv_sec) * 60;
SCIkdebug(SCIkTIME, "GetTime(elapsed) returns %d\n", retval);
// FIXME: remove the Sci:: bit once this belongs to the Sci namespace
debugC(2, Sci::kDebugLevelTime, "GetTime(elapsed) returns %d\n", retval);
break;
}
case _K_NEW_GETTIME_TIME_12HOUR : {
loc_time->tm_hour %= 12;
retval = (loc_time->tm_min << 6) | (loc_time->tm_hour << 12) | (loc_time->tm_sec);
SCIkdebug(SCIkTIME, "GetTime(12h) returns %d\n", retval);
// FIXME: remove the Sci:: bit once this belongs to the Sci namespace
debugC(2, Sci::kDebugLevelTime, "GetTime(12h) returns %d\n", retval);
break;
}
case _K_NEW_GETTIME_TIME_24HOUR : {
retval = (loc_time->tm_min << 5) | (loc_time->tm_sec >> 1) | (loc_time->tm_hour << 11);
SCIkdebug(SCIkTIME, "GetTime(24h) returns %d\n", retval);
// FIXME: remove the Sci:: bit once this belongs to the Sci namespace
debugC(2, Sci::kDebugLevelTime, "GetTime(24h) returns %d\n", retval);
break;
}
case _K_NEW_GETTIME_DATE : {
retval = (loc_time->tm_mon << 5) | loc_time->tm_mday | (loc_time->tm_year << 9);
SCIkdebug(SCIkTIME, "GetTime(date) returns %d\n", retval);
// FIXME: remove the Sci:: bit once this belongs to the Sci namespace
debugC(2, Sci::kDebugLevelTime, "GetTime(date) returns %d\n", retval);
break;
}
default: {

View File

@ -53,9 +53,6 @@ struct _state;
#define SCIkMENU s, __FILE__, __LINE__, 11
#define SCIkSAID s, __FILE__, __LINE__, 12
#define SCIkFILE s, __FILE__, __LINE__, 13
#define SCIkTIME s, __FILE__, __LINE__, 14
#define SCIkROOM s, __FILE__, __LINE__, 15
#define SCIkEMU s, __FILE__, __LINE__, 16
#define SCIkAVOIDPATH s, __FILE__, __LINE__, SCIkAVOIDPATH_NR
#define SCI_KERNEL_DEBUG

View File

@ -158,7 +158,6 @@ SciEngine::SciEngine(OSystem *syst, const SciGameDescription *desc)
Common::addDebugChannel(kDebugLevelFile, "File", "File I/O debugging");
Common::addDebugChannel(kDebugLevelTime, "Time", "Time debugging");
Common::addDebugChannel(kDebugLevelRoom, "Room", "Room number debugging");
Common::addDebugChannel(kDebugLevelEmu, "Emu", "Alternate emulation debugging");
Common::addDebugChannel(kDebugLevelAvoidPath, "Pathfinding", "Pathfinding debugging");
printf("SciEngine::SciEngine\n");

View File

@ -49,8 +49,7 @@ enum kDebugLevels {
kDebugLevelFile = 1 << 13,
kDebugLevelTime = 1 << 14,
kDebugLevelRoom = 1 << 15,
kDebugLevelEmu = 1 << 16,
kDebugLevelAvoidPath = 1 << 17
kDebugLevelAvoidPath = 1 << 16
};
struct GameFlags {