Code Search for Developers
 
 
  

showChangedOptions.pl from Scorched 3D at Krugle


Show showChangedOptions.pl syntax highlighted

#!/bin/perl

use strict;

if (!defined $ARGV[0])
{
	print "Usaged : $0 <settingsfile>\n";
	exit 0;
}

my ($buffer, $default, $changed) = ("", "", 0);
open (IN, $ARGV[0]) || die "ERROR: Cannot open ".$ARGV[0];
while (<IN>)
{
	if (/default value : "([^"]+)/)
	{
		print $buffer if ($changed);

		$changed = 0;
		$default = $1;
		$buffer = "";
	}
	elsif (/<value>([^<]+)<\/value>/)
	{
		if ($1 ne $default)
		{
			$changed = 1;
		}
	}
	$buffer .= $_;
}
close (IN);
print $buffer if ($changed);





See more files for this project here

Scorched 3D

Scorched3D is a 3D remake of the popular 2D artillery game Scorched Earth.\r\nScorched3D can be played against the computer, other players and remotely across the internet or LAN.

Project homepage: http://sourceforge.net/projects/scorched3d
Programming language(s): C,C++,XML
License: gpl2

  addGPLLines.pl
  checkIncludeCase.pl
  checkMakeRefs.pl
  convertAccessories38-381.pl
  copyall.bat
  copyallnodata.bat
  copyjustsrc.bat
  createAMMakefile.pl
  dos2unixall
  exclude.txt
  exclude2.txt
  generateDiff.pl
  hmm.txt
  make_todo.pl
  moveGroups.pl
  ms3d_ascii_export.py
  openal-config
  removeMSPragma.pl
  removeSlash.pl
  resource.h
  resource.rc
  showChangedOptions.pl
  splitlandscapefile.pl
  updateAmbientSounds.pl
  vcfiles.pl
  weaponDocs.pl
  wxWinFromRC.pl