Main Page   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Globals   Related Pages  

o_shared.cpp File Reference

shared misc. stuff More...

#include "omicron/internal.h"

Go to the source code of this file.

Functions

void _convert_file_path (char *path)
void _convert_pak_path (char *path)
char * _strtrm (char *string, char *trimchrs)
float _interpolate_float_linear (float a, float b, float frac)
 Interpolate two floats linearly.

schar _sgn (float f)
void _swap_long (ulong &l)


Detailed Description

Definition in file o_shared.cpp.


Function Documentation

void _convert_file_path char *    path
 

Convert a path for a file on disk Converts all '/' in a string into an '\' when running under windows. And '\' into '/' under *nixen.

Parameters:
path  path name to convert

Definition at line 73 of file o_shared.cpp.

Referenced by file_manager_c::load_pak().

void _convert_pak_path char *    path
 

Convert a path for a file in a pak Converts '\' into '/' as used in pak files.

Parameters:
path  path name to convert

Definition at line 88 of file o_shared.cpp.

float _interpolate_float_linear float    a,
float    b,
float    frac
 

Parameters:
a  First float
b  Second float
frac  Fraction of difference between floats

Definition at line 209 of file o_shared.cpp.

Referenced by vec4_c::linear(), vec2_c::linear(), and vec3_c::linear().

schar _sgn float    f
 

Get the sign of a float Returns -1 if negative, 0 if zero and 1 if positive

Definition at line 224 of file o_shared.cpp.

Referenced by brushface_c::cut(), and plane_pointside().

char* _strtrm char *    string,
char *    trimchrs
 

Trim a string Removes any char from beginning and end of a string that is given in trimchrs. Returns a pointer to the first char that was not trimmed.

Parameters:
string  string to trim
trimchrs  chars to remove from either side

Definition at line 143 of file o_shared.cpp.

Referenced by gui_c::load().

void _swap_long ulong &    l
 

Swap a long Swaps the hi and lo word of a long.

Definition at line 236 of file o_shared.cpp.


Generated on Wed Dec 18 15:48:48 2002 for omicron engine by doxygen1.2.18