aboutsummaryrefslogtreecommitdiff
path: root/mp/src/game/shared/SceneCache.h
blob: 72dff6671d71ae2e797ea3d8013d8f8b091d2495 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
//=============================================================================

#ifndef SCENECACHE_H
#define SCENECACHE_H
#ifdef _WIN32
#pragma once
#endif

#include "UtlCachedFileData.h"
#include "SoundEmitterSystem/isoundemittersystembase.h"

class CChoreoEvent;

#define SCENECACHE_VERSION		7

#pragma pack(1)
class CSceneCache : public IBaseCacheInfo
{
public:
	unsigned int		msecs;
	CUtlVector< unsigned short > sounds;

	CSceneCache();
	CSceneCache( const CSceneCache& src );

	int	GetSoundCount() const;
	char const *GetSoundName( int index );

	virtual void Save( CUtlBuffer& buf  );
	virtual void Restore( CUtlBuffer& buf  );
	virtual void Rebuild( char const *filename );

	static unsigned int ComputeSoundScriptFileTimestampChecksum();
	static void PrecacheSceneEvent( CChoreoEvent *event, CUtlVector< unsigned short >& soundlist );
};
#pragma pack()

#endif // SCENECACHE_H