Last change
on this file since 56 was
56,
checked in by Sam Hocevar, 14 years ago
|
- Add licensing terms to most C / C++ files (Ref #5).
|
File size:
943 bytes
|
Rev | Line | |
---|
[56] | 1 | /* |
---|
| 2 | * Abuse - dark 2D side-scrolling platform game |
---|
| 3 | * Copyright (c) 1995 Crack dot Com |
---|
| 4 | * |
---|
| 5 | * This software was released into the Public Domain. As with most public |
---|
| 6 | * domain software, no warranty is made or implied by Crack dot Com or |
---|
| 7 | * Jonathan Clark. |
---|
| 8 | */ |
---|
[2] | 9 | |
---|
| 10 | #ifndef __RAM_FILE_HPP_ |
---|
| 11 | #define __RAM_FILE_HPP_ |
---|
| 12 | |
---|
| 13 | #include "specs.hpp" |
---|
| 14 | |
---|
| 15 | class ram_file : public bFILE |
---|
| 16 | { |
---|
| 17 | uchar *buf; |
---|
| 18 | int buf_size; |
---|
| 19 | int buf_end; |
---|
| 20 | |
---|
| 21 | virtual int allow_read_buffering(); |
---|
| 22 | virtual int allow_write_buffering(); |
---|
| 23 | public : |
---|
| 24 | ram_file(); |
---|
| 25 | virtual int open_failure(); |
---|
| 26 | virtual int unbuffered_read(void *buf, size_t count); // returns number of bytes read |
---|
| 27 | virtual int unbuffered_write(void *buf, size_t count); // returns number of bytes written |
---|
| 28 | virtual int unbuffered_seek(long offset, int whence); // whence=SEEK_SET, SEEK_CUR, SEEK_END, ret=0=success |
---|
| 29 | virtual int unbuffered_tell(); |
---|
| 30 | virtual int file_size(); |
---|
| 31 | virtual ~ram_file(); |
---|
| 32 | } ; |
---|
| 33 | |
---|
| 34 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.