Last change
on this file since 124 was
124,
checked in by Sam Hocevar, 15 years ago
|
- Get rid of ugly tabs and trailing spaces everywhere.
|
File size:
1.3 KB
|
Line | |
---|
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 | */ |
---|
9 | |
---|
10 | #ifndef __EMM_H_ |
---|
11 | #define __EMM_H_ |
---|
12 | #include "system.h" |
---|
13 | #ifdef __DOS // this stuff is DOS specific, don't include |
---|
14 | // on other systems |
---|
15 | #include "linked.hpp" |
---|
16 | |
---|
17 | class emblock : public linked_node |
---|
18 | { |
---|
19 | public : |
---|
20 | unsigned beg,end; |
---|
21 | int emhandle; |
---|
22 | emblock *nextblk; |
---|
23 | } ; |
---|
24 | |
---|
25 | |
---|
26 | class expandedmm |
---|
27 | { |
---|
28 | public : |
---|
29 | unsigned frame_ad; |
---|
30 | long frmsz; |
---|
31 | linked_list allocblks,freeblks; |
---|
32 | expandedmm(); |
---|
33 | |
---|
34 | emblock *alloc(unsigned size); |
---|
35 | void free(emblock *block); |
---|
36 | void free_all(); |
---|
37 | long avail() { return frmsz; } |
---|
38 | void set(emblock *block, char *dat); |
---|
39 | void get(emblock *block, char *dat); |
---|
40 | ~expandedmm() { free_all(); } |
---|
41 | } ; |
---|
42 | |
---|
43 | extern expandedmm epmem; |
---|
44 | extern int emm_avail; |
---|
45 | int EMM_detect(); |
---|
46 | int EMM_num_free_pages(); |
---|
47 | int EMM_version(); |
---|
48 | int EMM_num_active_handles(); |
---|
49 | long EMM_free_memory(); |
---|
50 | int EMM_alloc(int pages); // remeber pages are 16K, 16384 bytes |
---|
51 | // returns handle or -1 |
---|
52 | int EMM_free(int handle); // returns true for success |
---|
53 | unsigned EMM_frame_address(); |
---|
54 | void EMM_map_page(int handle); |
---|
55 | |
---|
56 | #endif |
---|
57 | #endif |
---|
58 | |
---|
Note: See
TracBrowser
for help on using the repository browser.