Ticket #8497: kyra_debuger_fix_v3.diff
File kyra_debuger_fix_v3.diff, 869 bytes (added by , 19 years ago) |
---|
-
debugger.
old new 59 59 if (argc > 1) { 60 60 uint room = atoi(argv[1]); 61 61 62 /* Kyrandia 1 has only 246 rooms (0-245), otherwise it'll crash */ 63 if ((room<0) || (room>245)) { 64 DebugPrintf("room number must be any value between (including) 0 and 245\n"); 65 return true; 66 } 67 62 68 if (argc > 2) 63 69 direction = atoi(argv[2]); 64 70 else { … … 178 184 } 179 185 180 186 bool Debugger::cmd_giveItem(int argc, const char **argv) { 181 if (argc ) {187 if (argc == 2) { 182 188 int item = atoi(argv[1]); 189 190 /* Kyrandia 1 has only 108 items (-1 to 106), otherwise it'll crash */ 191 if ((item<-1) || (item>106)) { 192 DebugPrintf("itemid must be any value between (including) -1 and 106\n"); 193 return true; 194 } 195 183 196 _vm->setMouseItem(item); 184 197 _vm->_itemInHand = item; 185 198 } else