<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://www.simswiki.info/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://simswiki.info/index.php?action=history&amp;feed=atom&amp;title=Spore%3AHashVal</id>
		<title>Spore:HashVal - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://simswiki.info/index.php?action=history&amp;feed=atom&amp;title=Spore%3AHashVal"/>
		<link rel="alternate" type="text/html" href="http://simswiki.info/index.php?title=Spore:HashVal&amp;action=history"/>
		<updated>2026-06-11T19:01:07Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.20.2</generator>

	<entry>
		<id>http://simswiki.info/index.php?title=Spore:HashVal&amp;diff=29407&amp;oldid=prev</id>
		<title>WesHowe at 22:52, 19 January 2009</title>
		<link rel="alternate" type="text/html" href="http://simswiki.info/index.php?title=Spore:HashVal&amp;diff=29407&amp;oldid=prev"/>
				<updated>2009-01-19T22:52:32Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;copied from: http://www.customsims3.com/forum1/YaBB.pl?num=1214408105&lt;br /&gt;
&lt;br /&gt;
The following was originally written by Jongware.&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;C&amp;quot; routine will calculate the hash for a Spore item. In my version, the strcpy() and temporary buffer exist to avoid modifying the original string when converting to lower case with _strlwr(). If the original need not be saved, this could be further optimized.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
unsigned long TheHash(char *strptr) {&lt;br /&gt;
	char oname[STRMAX];&lt;br /&gt;
	unsigned int hash;&lt;br /&gt;
	char *p;&lt;br /&gt;
&lt;br /&gt;
	strcpy(&amp;amp;oname[0], strptr);&lt;br /&gt;
	_strlwr(&amp;amp;oname[0]);&lt;br /&gt;
	hash = 0x811C9DC5;&lt;br /&gt;
	p=&amp;amp;oname[0];&lt;br /&gt;
	while(*p) {&lt;br /&gt;
		hash *= 0x1000193;&lt;br /&gt;
		hash ^= (*p);&lt;br /&gt;
		p++;&lt;br /&gt;
		}&lt;br /&gt;
	return(hash);&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>WesHowe</name></author>	</entry>

	</feed>