home *** CD-ROM | disk | FTP | other *** search
/ MegaDoom Adventures / PMWMEGADOOM.iso / doom / creators / deu52gcc / src / deu-go32.h next >
Text File  |  1994-05-21  |  3KB  |  119 lines

  1. /*
  2.    Doom Editor Utility, by Brendon Wyber and Raphaël Quinet.
  3.  
  4.    You are allowed to use any parts of this code in another program, as
  5.    long as you give credits to the authors in the documentation and in
  6.    the program itself.  Read the file README.1ST for more information.
  7.  
  8.    This program comes with absolutely no warranty.
  9.  
  10.    DEU-GO32.H - Some DJGPP/GO32 specific things.
  11.  
  12.    Originally written by Per Allansson (c91peral@und.ida.liu.se)
  13.  
  14.    Changes:
  15.  
  16.            940505: (from Per Kofod)
  17.  
  18.                    - farcoreleft() now returns the size of the free
  19.                      memory (not virtual, but 'real' memory...)
  20.                    - changed handling of gfx-modes to match that of
  21.                      deu/16. (and removed -x switch)
  22.                    - also changed handling of colors to remove
  23.                      the annoying white spots.
  24.  
  25.  
  26.            940508: (from Per Kofod)
  27.  
  28.                    - changed BCINT ---> int in SelectLevel(...)
  29.  
  30.                  Have looked for bug with flags f. linedef. Couldn't
  31.                  find any... Try harder...
  32.  
  33.  
  34.            940509: (several people (Tom Neff, Barry ...) have reported
  35.                    that there were problems when editing LineDefs.)
  36.  
  37.                    - editobj.c , when edit. linedefs, use of uninitialized
  38.                      ptr 'cur'  (line 86x)
  39.  
  40.                     (the funny thing was that the error ONLY occured if
  41.                      the source was compiled with '-O2' ... )
  42.  
  43.  
  44.            940511: (Per Allansson)
  45.  
  46.                    - removed swapmem.c completely and defined some
  47.                      nice macros instead.
  48.  
  49.            940512: - updated to BETA 2
  50.  
  51.            940513: - fixed 'drag'-bug
  52.                    - fixed 'sector'-bug
  53.                    - moved memory.c to deu-go32.h (sort of)
  54.                    - removed ';' in objects.  (oops!)
  55.  
  56.            940516: - updated to BETA 3 (did NOT include Cirrus patches!!!)
  57.  
  58.            940518: - updated to final DEU 5.2 release (by Per Kofod)
  59.  
  60.            940520: - updated to final final DEU 5.2 release (by Per Allansson)
  61.  
  62.                      - fixed "crash-when-no-doom.wad-file" bug
  63.                      - fixed "you-have-always-unclosed-sectors" bug
  64.  
  65.                        (learn: be careful with copy/paste ....)
  66.  
  67. */
  68.  
  69.  
  70.  
  71.  
  72. #ifndef DEU_GO32_H
  73. #define DEU_GO32_H
  74. #if defined(__GNUC__)
  75.  
  76. #include <pc.h>       /* For sound,nosound */
  77. #include <libbcc.h>   /* For all borl**d-gfx */
  78. #include <dpmi.h>     /* for _go32....memory() */
  79.  
  80. #define huge          /* No huge things in gcc */
  81.                       /* Should be done in another way, but ... */
  82.  
  83.  
  84. #ifdef __cplusplus
  85. extern "C" {
  86. #endif
  87. extern int getch(void);
  88. extern int bioskey(int);
  89. extern void delay(unsigned);
  90. #ifdef __cplusplus
  91. }
  92. #endif
  93.  
  94.  
  95. #ifndef max
  96. #define max(x,y)   (((x)>(y))?(x):(y))
  97. #define min(x,y)   (((x)<(y))?(x):(y))
  98. #endif
  99.  
  100. #define farcoreleft() ((long)_go32_dpmi_remaining_physical_memory())
  101.  
  102.  
  103. #define FreeSomeMemory()
  104. #define ObjectsNeeded(x,y...)   /* GNU CPP ONLY !!! :-) */
  105. #define InitSwap()
  106.  
  107. #define GetMemory(x)         malloc(x)
  108. #define FreeMemory(x)        free(x)
  109. #define ResizeMemory(x,y)    realloc(x,y)
  110. #define GetFarMemory(x)      malloc(x)
  111. #define FreeFarMemory(x)     free(x)
  112. #define ResizeFarMemory(x,y) realloc(x,y)
  113.  
  114. #endif  /* __GNUC__   */
  115. #endif  /* DEU_GO32_H */
  116.  
  117.  
  118.  
  119.