home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / mnth0109.zip / Timur / terrain.h < prev    next >
Text File  |  1993-06-07  |  2KB  |  64 lines

  1. /* TERRAIN.H
  2.  
  3. Copyright (c) 1992-1993 Timur Tabi
  4. Copyright (c) 1992-1993 Fasa Corporation
  5.  
  6. The following trademarks are the property of Fasa Corporation:
  7. BattleTech, CityTech, AeroTech, MechWarrior, BattleMech, and 'Mech.
  8. The use of these trademarks should not be construed as a challenge to these marks.
  9.  
  10. */
  11.  
  12. typedef struct {
  13.   int iMenuID;                  // The menu ID
  14.   HBITMAP hbm;                  // If there's a bitmap, then this is non-zero
  15.   BYTE bColor;                  // The color, if hbm==0
  16.   BYTE bPattern;                // The pattern, if hbm==0
  17.   int iVisibility;              // A measure of the terrains transparency
  18. } TERRAIN;
  19.  
  20. typedef struct {
  21.   int iTerrain;                 // Terrain ID
  22.   int iHeight;                  // The height, where ground level is zero
  23. } MAP;
  24.  
  25. #define NUM_TERRAINS  11        // We'll make this configurable in the future, somehow
  26.  
  27. // The next two values must be odd
  28. #define NUM_COLUMNS 21           // The number of columns on the map
  29. #define NUM_ROWS 29              // The number of rows.
  30.  
  31.  
  32. #ifdef TERRAIN_C
  33. #define EXTERN
  34. #else
  35. #define EXTERN extern
  36. #endif
  37.  
  38. EXTERN MAP amap[NUM_COLUMNS][NUM_ROWS];        // Data for each hex on the map.
  39. EXTERN TERRAIN ater[NUM_TERRAINS];             // One for each terrain;
  40. EXTERN int iCurTer;                            // The current terrain ID (NOT THE MENU ID!!!!)
  41.  
  42. #undef EXTERN
  43.  
  44. ERROR TerrainInit(void);
  45. // Initializes all of the terrain- and map-related data.
  46.  
  47. void TerrainDrawMap(HWND);
  48. // Draws the playing field
  49.  
  50. int TerrainIdFromMenu(int iMenuID);
  51. // Given a Menu ID, this function determines the terrain ID.  It returns -1 if it can't find one
  52.  
  53. void TerrainNewMap(void);
  54. // Erases the current map.
  55.  
  56. void TerrainOpenMap(void);
  57. // Loads a new map
  58.  
  59. void TerrainSaveMap(void);
  60. // Saves the current map under the same filename
  61.  
  62. void TerrainSaveMapAs(void);
  63. // Prompts the user for a new map name, and then saves the map under that name.
  64.