home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD2.bin / bbs / misc / aspringies-1.0.lha / ASpringies / src / main.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-24  |  4.3 KB  |  145 lines

  1. /* main.h -- Amiga specific includes, defines, types and prototypes
  2.  * Copyright (C) 1994  Torsten Klein
  3.  *
  4.  * This file is part of ASpringies, a mass and spring simulation system for the Amiga
  5.  *
  6.  * ASpringies is free software; you can redistribute it and/or modify
  7.  * it under the terms of the GNU General Public License as published by
  8.  * the Free Software Foundation; either version 1, or (at your option)
  9.  * any later version.
  10.  *
  11.  * ASpringies is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  * GNU General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU General Public License
  17.  * along with ASpringies; see the file COPYING.  If not, write to
  18.  * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  *
  20.  * $Id: main.h,v 2.9 1994/08/19 11:51:25 Torsten_Klein Exp $
  21.  */
  22.  
  23. #include "defs.h"
  24.  
  25. /* MUI */
  26. #include <libraries/mui.h>
  27.  
  28. /* System */
  29. #define ASL_V38_NAMES_ONLY
  30.  
  31. #include <dos.h>
  32. #include <dos/dos.h>
  33. #include <graphics/gfxmacros.h>
  34. #include <workbench/workbench.h>
  35.  
  36. /* Prototypes */
  37. #include <clib/alib_protos.h>
  38. #include <clib/exec_protos.h>
  39. #include <clib/dos_protos.h>
  40. #include <clib/icon_protos.h>
  41. #include <clib/graphics_protos.h>
  42. #include <clib/layers_protos.h>
  43. #include <clib/intuition_protos.h>
  44. #include <clib/gadtools_protos.h>
  45. #include <clib/muimaster_protos.h>
  46. #include <clib/asl_protos.h>
  47.  
  48. /* ANSI C */
  49. #include <stdlib.h>
  50. #include <string.h>
  51. #include <stdio.h>
  52.  
  53. #include <pragmas/exec_pragmas.h>
  54. #include <pragmas/dos_pragmas.h>
  55. #include <pragmas/icon_pragmas.h>
  56. #include <pragmas/graphics_pragmas.h>
  57. #include <pragmas/layers_pragmas.h>
  58. #include <pragmas/intuition_pragmas.h>
  59. #include <pragmas/gadtools_pragmas.h>
  60. #include <pragmas/muimaster_pragmas.h>
  61. #include <pragmas/asl_pragmas.h>
  62.  
  63. #define REG(x) register __ ## x
  64. #define ASM    __asm
  65. #define SAVEDS __saveds
  66.  
  67. #ifndef MAKE_ID
  68. #define MAKE_ID(a,b,c,d) ((ULONG) (a)<<24 | (ULONG) (b)<<16 | (ULONG) (c)<<8 \
  69.               | (ULONG) (d))
  70. #endif
  71.  
  72. #define FAILOPEN(what, command) \
  73.   if (!(command)) main_fail(what, __FILE__, __LINE__);
  74.  
  75. #define HELP_FILE "PROGDIR:ASpringies.guide"
  76. #define ANIM_BUFS 2
  77.  
  78. extern void main_fail(char *what, char *where, int whatline);
  79. extern void FileIO(int command);
  80. extern void DoInfo(void);
  81. extern void ShowView(int n);
  82. extern void OpenAnimDisplay(boolean request);
  83. extern void CloseAnimDisplay(void);
  84.  
  85. extern struct Library       *IconBase, *UtilityBase, *TimerBase, *MUIMasterBase;
  86. extern struct IntuitionBase *IntuitionBase; 
  87. extern struct GfxBase       *GfxBase;
  88. extern struct LayersBase    *LayersBase;
  89. extern struct DosLibrary    *DOSBase;
  90.  
  91. extern struct RastPort      *anim_rport[ANIM_BUFS];
  92. extern struct Window        *anim_wnd;
  93. extern struct Screen        *anim_scr;
  94.  
  95. /* from SetUpMui.c 
  96.  */
  97. void SetUpMui(void);
  98.  
  99. enum ids { 
  100.   ID_RA_Mode = 1,
  101.  
  102.   ID_CK_DrawSpr,    ID_CK_Action,       ID_CK_FixedMass,    ID_CK_AdaptTStep,
  103.   ID_CK_GravActive, ID_CK_CenterActive, ID_CK_PtAttrActive, ID_CK_WallFActive,
  104.   ID_CK_WallTop,    ID_CK_WallLeft,     ID_CK_WallRight,    ID_CK_WallBottom,
  105.  
  106.   ID_BT_SelAll,     ID_BT_SetRLen,      ID_BT_SetCenter,
  107.  
  108.   ID_SL_Grid,
  109.  
  110.   ID_ST_Mass,       ID_ST_Elas,         ID_ST_Kspr,         ID_ST_Kdmp,  
  111.   ID_ST_Visc,       ID_ST_Stic,         ID_ST_Step,         ID_ST_Prec,
  112.   ID_ST_GravGrav,   ID_ST_GravDir,      ID_ST_CenterMagn,   ID_ST_CenterDamp,
  113.   ID_ST_PtAttrMagn, ID_ST_PtAttrExpo,   ID_ST_WallFMagn,    ID_ST_WallFExpo,
  114.  
  115.   ID_TX_Fps,
  116.  
  117.   ID_ME_About,      ID_ME_Load,  ID_ME_Insert, ID_ME_Save,      ID_ME_SaveAs,
  118.   ID_ME_ScreenMode, ID_ME_Quit,  ID_ME_DupSel, ID_ME_DeleteSel, ID_ME_Restore,
  119.   ID_ME_Snapshot,   ID_ME_Reset, ID_ME_Help,
  120.  
  121.   ID_KY_AnimToFront
  122.   };
  123.  
  124. extern APTR 
  125.   AP_ASpringies,
  126.   WI_ASpringies,
  127.   RA_Mode,
  128.   CY_Force,
  129.   PG_Force,
  130.  
  131.   CK_DrawSpr,    CK_Action,       CK_FixedMass,    CK_AdaptTStep,
  132.   CK_GravActive, CK_CenterActive, CK_PtAttrActive, CK_WallFActive,
  133.   CK_WallTop,    CK_WallLeft,     CK_WallRight,    CK_WallBottom,
  134.  
  135.   BT_SelAll,     BT_SetRLen,      BT_SetCenter,
  136.  
  137.   SL_Grid,
  138.  
  139.   ST_Mass,       ST_Elas,         ST_Kspr,         ST_Kdmp,
  140.   ST_Visc,       ST_Stic,         ST_Step,         ST_Prec, 
  141.   ST_GravGrav,   ST_GravDir,      ST_CenterMagn,   ST_CenterDamp, 
  142.   ST_PtAttrMagn, ST_PtAttrExpo,   ST_WallFMagn,    ST_WallFExpo,
  143.  
  144.   TX_Fps;
  145.