Ticket #8497: kyra_debuger_fix.diff
File kyra_debuger_fix.diff, 1.2 KB (added by , 18 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 { … … 72 78 direction = 2; 73 79 } 74 80 81 /* for some reason rooms 53 and 54 in Kyrandia 1 will not display Brandon if no direction is given */ 82 if (((room==53) || (room==54)) && argc == 2) direction = 2; 83 75 84 // Dirty way of hiding the debug console while the room entry scripts are running, 76 85 // otherwise the graphics didn't update. 77 86 _vm->_system->hideOverlay(); … … 180 189 bool Debugger::cmd_giveItem(int argc, const char **argv) { 181 190 if (argc) { 182 191 int item = atoi(argv[1]); 192 193 /* Kyrandia 1 has only 107 rooms (0-106), otherwise it'll crash */ 194 if ((item<0) || (item>106)) { 195 DebugPrintf("itemid must be any value between (including) 0 and 106\n"); 196 return true; 197 } 198 183 199 _vm->setMouseItem(item); 184 200 _vm->_itemInHand = item; 185 201 } else