MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / WriteHashString

Method WriteHashString

neo/framework/DemoFile.cpp:252–272  ·  view source on GitHub ↗

================ idDemoFile::WriteHashString ================ */

Source from the content-addressed store, hash-verified

250================
251*/
252void 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================

Callers 8

WriteRenderLightMethod · 0.80
WriteRenderEntityMethod · 0.80
WriteToDemoMethod · 0.80
CaptureRenderToImageMethod · 0.80
WriteToDemoFileMethod · 0.80
StartSoundMethod · 0.80
WriteToDemoFileMethod · 0.80
WriteToDemoFileMethod · 0.80

Calls 6

vaFunction · 0.85
WriteStringFunction · 0.85
c_strMethod · 0.45
WriteMethod · 0.45
NumMethod · 0.45
AppendMethod · 0.45

Tested by

no test coverage detected