#include <fileio.h>
Public Types | |
| enum | SAVESTATE { SAVE_FAILED = 0, SAVE_OK = 1, SAVE_NO = 2 } |
Public Member Functions | |
| SceneSave (const char *filename) | |
| ~SceneSave () | |
| Destructor. | |
| void | BeginChunk (unsigned chunk_id) |
| void | EndChunk () |
| bool | Write (const void *buf, unsigned short num_bytes, unsigned short &num_write_bytes) |
| void | WriteString (std::string &the_string) |
Please add comments here
Enum SaveState Enums the possibles states for the Save operation
| SAVE_FAILED | There was an error loading and SceneEngine should be aborted! |
| SAVE_OK | Load OK |
| SAVE_NO | No more chunks to load in this level |
| ScEng::SceneSave::SceneSave | ( | const char * | filename | ) |
Contructor Initializes the stream, opening a file with the given nam. Also allocates memory for the list_chunks_position.
| filename | the name for the file |
| void ScEng::SceneSave::BeginChunk | ( | unsigned | chunk_id | ) |
Begins a chunk
| chunk_id | the ID for the chunk to be writed |
| void ScEng::SceneSave::EndChunk | ( | ) |
Ends a chunk Please add comments here
| bool ScEng::SceneSave::Write | ( | const void * | buf, | |
| unsigned short | num_bytes, | |||
| unsigned short & | num_write_bytes | |||
| ) |
Writes the data into the file
| buf | the buffer with the data to be writed | |
| num_bytes | the number of bytes of the data | |
| num_write_bytes | Please add commments here |
| void ScEng::SceneSave::WriteString | ( | std::string & | the_string | ) |
Writes a string into the file
| the_string | the string to be writed |
1.5.1-p1