{ EbMap.loadSpriteData(rom); EbMap.loadDoorData(rom);
{
    public void writeToRom()    {    	if (rom.length() == AbstractRom.EB_ROM_SIZE_REGULAR)    	{    		int sure = JOptionPane.showConfirmDialog(    			    mainWindow,    			    "You need to expand your ROM to save in the Map Editor.\n"					+ "Do you want to?",    			    "This ROM is not expanded",    			    JOptionPane.YES_NO_OPTION);    		if (sure == JOptionPane.YES_OPTION)    		{    			this.askExpandType();    			writeToRom();    		}    		else    			JOptionPane.showMessageDialog(mainWindow,    	    			"Changes were not saved.");    	}    	else    	{        	EbMap.loadSpriteData(rom);        	EbMap.loadDoorData(rom);        	        	EbMap.writeMapChanges(rom);        	EbMap.writeLocalTilesetChanges(rom);        	EbMap.writeSectorData(rom);        	HotspotEditor.writeToRom(this);        	boolean doorWrite = EbMap.writeDoors(this, oldCompatability);        	boolean spWrite = EbMap.writeSprites(this);        	if (! doorWrite)        		JOptionPane.showMessageDialog(mainWindow,            			"This is so embarassing!\n"            			+ "For some reason, I could not save "    					+ "the door data?\nThis shouldn't happen...");        	if (! spWrite)        		JOptionPane.showMessageDialog(mainWindow,            			"This is so embarassing!\n"            			+ "For some reason, I could not save "    					+ "the sprite data?\nThis shouldn't happen...");        	if (doorWrite && spWrite)        		JOptionPane.showMessageDialog(mainWindow,        			"Saved successfully!");        	EbMap.reset();        	readFromRom();    	}    }    