================ idDemoFile::WriteHashString ================ */
| 250 | ================ |
| 251 | */ |
| 252 | void idDemoFile::WriteHashString( const char *str ) { |
| 253 | if ( log && fLog ) { |
| 254 | const char *text = va( "%s > Writing hash string\n", logStr.c_str() ); |
| 255 | fLog->Write( text, strlen( text ) ); |
| 256 | } |
| 257 | // see if it is already in the has table |
| 258 | for ( int i = 0 ; i < demoStrings.Num() ; i++ ) { |
| 259 | if ( !strcmp( demoStrings[i]->c_str(), str ) ) { |
| 260 | WriteInt( i ); |
| 261 | return; |
| 262 | } |
| 263 | } |
| 264 | |
| 265 | // add it to our table and the demo table |
| 266 | idStr *copy = new idStr( str ); |
| 267 | //common->Printf( "hash:%i = %s\n", demoStrings.Num(), str ); |
| 268 | demoStrings.Append( copy ); |
| 269 | int cmd = -1; |
| 270 | WriteInt( cmd ); |
| 271 | WriteString( str ); |
| 272 | } |
| 273 | |
| 274 | /* |
| 275 | ================ |
no test coverage detected