~ubuntu-branches/ubuntu/quantal/warzone2100/quantal

« back to all changes in this revision

Viewing changes to lib/framework/frameresource.h

  • Committer: Bazaar Package Importer
  • Author(s): Paul Wise
  • Date: 2011-05-21 16:31:49 UTC
  • mfrom: (1.1.18 upstream) (2.1.17 sid)
  • Revision ID: james.westby@ubuntu.com-20110521163149-oj2qkd97z0b14lqz
Tags: 2.3.8-1
* New upstream release
  - Refresh miniupnpc removal patch
  - Build and install new upstream docs
* Complies with latest policy, bump Standards-Version

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
        This file is part of Warzone 2100.
3
3
        Copyright (C) 1999-2004  Eidos Interactive
4
 
        Copyright (C) 2005-2010  Warzone 2100 Project
 
4
        Copyright (C) 2005-2011  Warzone 2100 Project
5
5
 
6
6
        Warzone 2100 is free software; you can redistribute it and/or modify
7
7
        it under the terms of the GNU General Public License as published by
24
24
#ifndef _frameresource_h
25
25
#define _frameresource_h
26
26
 
27
 
#include "lib/framework/frame.h"
28
 
 
29
27
#if defined(__cplusplus)
30
28
extern "C"
31
29
{
34
32
/** Maximum number of characters in a resource type. */
35
33
#define RESTYPE_MAXCHAR         20
36
34
 
37
 
/** Maximum number of characters in a resource ID. */
38
 
#define RESID_MAXCHAR           40
39
 
 
40
35
/** Function pointer for a function that loads from a memory buffer. */
41
36
typedef bool (*RES_BUFFERLOAD)(const char *pBuffer, UDWORD size, void **pData);
42
37
 
91
86
/** Shutdown the resource module. */
92
87
extern void resShutDown(void);
93
88
 
94
 
/** Set the base resource directory. */
95
 
extern void resSetBaseDir(const char* pResDir);
96
 
 
97
89
/** Parse the res file. */
98
90
bool resLoad(const char *pResFile, SDWORD blockID);
99
91
 
117
109
/** Call the load function for a file. */
118
110
extern bool resLoadFile(const char *pType, const char *pFile);
119
111
 
120
 
/** Add data to the resource system. */
121
 
extern bool resAddData(char *pType, char *pID, void *pData);
122
 
 
123
112
/** Return the resource for a type and ID */
124
113
extern void *resGetDataFromHash(const char *pType, UDWORD HashedID);
125
114
extern void *resGetData(const char *pType, const char *pID);