Commits

mcc committed 248cf8b

Switch patterns with number keys

Comments (0)

Files changed (1)

 			last_inventory->active = (last_inventory->active + bdir + last_inventory->bars.size()) 
 				% last_inventory->bars.size();
 		}
+		
+
+		if (!board_obscured && !xml_updating && key >= '1' && key <= '8') { // TODO: (SDL_GetModState() & (KMOD_LCTRL | KMOD_RCTRL))
+			int which = key-'1';
+			char filename[FILENAMESIZE];
+			userPath(filename, "save%d.xml", which);
+			TiXmlDocument xml(filename);
+			if (xml.LoadFile()) {
+				destroy_all_chips();
+				loadDocument(xml);		
+			}
+		}
 	}
 }