home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 113 / EnigmaAmiga113CD.iso / software / sviluppo / quake_src / in_amiga.c < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-17  |  1.6 KB  |  72 lines

  1. /* 
  2. Copyright (C) 1996-1997 Id Software, Inc. 
  3.  
  4. This program is free software; you can redistribute it and/or 
  5. modify it under the terms of the GNU General Public License 
  6. as published by the Free Software Foundation; either version 2 
  7. of the License, or (at your option) any later version. 
  8.  
  9. This program is distributed in the hope that it will be useful, 
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of 
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.   
  12.  
  13. See the GNU General Public License for more details. 
  14.  
  15. You should have received a copy of the GNU General Public License 
  16. along with this program; if not, write to the Free Software 
  17. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. 
  18.  
  19. */ 
  20.  
  21. // Main Module for Input Code for Amiga Version, can be easily expanded
  22. // to support other Init-Devices
  23.  
  24. /*
  25.             Portability
  26.             ===========
  27.  
  28.             This file should compile fine under all Amiga-Based Kernels,
  29.             including WarpUP, 68k and PowerUP.
  30.  
  31.             Steffen Haeuser (MagicSN@Birdland.es.bawue.de)
  32. */
  33.  
  34. #include "quakedef.h"
  35. #include "in_amiga.h"
  36.  
  37. int psxused;
  38.  
  39. void IN_Init (void)
  40. {
  41.   FILE *fil=fopen("devs:psxport.device","r");
  42.   IN_InitMouse();
  43.   psxused=0;
  44.   if (fil)
  45.   {
  46.     fclose(fil);
  47.     psxused=1;
  48.     IN_InitPsx();
  49.   }  
  50.   IN_InitJoy();
  51. }
  52.  
  53.  
  54. void IN_Shutdown (void)
  55. {
  56.   if (psxused) IN_ShutdownPsx();
  57.   IN_ShutdownJoystick();
  58.   IN_ShutdownMouse();
  59. }
  60.  
  61. void IN_Commands (void)
  62. {
  63.   IN_MouseCommands();
  64. }
  65.  
  66. void IN_Move (usercmd_t *cmd)
  67. {
  68.   IN_MouseMove(cmd);
  69.   if (psxused) IN_PsxMove(cmd);
  70.   IN_JoyMove(cmd);
  71. }
  72.