misc.h

Sat, 16 Mar 2013 17:50:13 +0200

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Sat, 16 Mar 2013 17:50:13 +0200
changeset 22
335e430a6b4f
parent 18
a6732098fed8
child 25
c74bb88f537d
permissions
-rw-r--r--

So much for that pointer class, caused more problems than it solved. For instance splitting a second quad after a first one had been split would trigger a peculiar crash...

#ifndef __MISC_H__
#define __MISC_H__

#include "common.h"
#include "str.h"

inline str GetWord (str& zString, ulong ulIndex) {
	return (zString / " ")[ulIndex];
}

double GetWordFloat (str& s, const ushort n);
long GetWordInt (str& s, const ushort n);
vertex ParseVertex (str& s, const ushort n);
void StripWhitespace (str& s);

// Float to string
str ftoa (double fCoord);

#endif // __MISC_H__

mercurial