home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 28 / amigaformatcd28.iso / -screenplay- / otherstuff / adoomppc_src / r_sky.c < prev    next >
C/C++ Source or Header  |  1998-04-23  |  2KB  |  70 lines

  1. // Emacs style mode select   -*- C++ -*- 
  2. //-----------------------------------------------------------------------------
  3. //
  4. // $Id:$
  5. //
  6. // Copyright (C) 1993-1996 by id Software, Inc.
  7. //
  8. // This source is available for distribution and/or modification
  9. // only under the terms of the DOOM Source Code License as
  10. // published by id Software. All rights reserved.
  11. //
  12. // The source is distributed in the hope that it will be useful,
  13. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. // FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
  15. // for more details.
  16. //
  17. // $Log:$
  18. //
  19. // DESCRIPTION:
  20. //  Sky rendering. The DOOM sky is a texture map like any
  21. //  wall, wrapping around. A 1024 columns equal 360 degrees.
  22. //  The default sky map is 256 columns and repeats 4 times
  23. //  on a 320 screen?
  24. //  
  25. //
  26. //-----------------------------------------------------------------------------
  27.  
  28. static const char
  29. rcsid[] = "$Id: m_bbox.c,v 1.1 1997/02/03 22:45:10 b1 Exp $";
  30.  
  31.  
  32. // Needed for FRACUNIT.
  33. #include "m_fixed.h"
  34.  
  35. // Needed for Flat retrieval.
  36. #include "r_data.h"
  37.  
  38. #include "doomstat.h"
  39.  
  40.  
  41. #ifdef __GNUG__
  42. #pragma implementation "r_sky.h"
  43. #endif
  44. #include "r_sky.h"
  45.  
  46. //
  47. // sky mapping
  48. //
  49. int            skyflatnum;
  50. int            skytexture;
  51. int            skytexturemid;
  52.  
  53.  
  54.  
  55. //
  56. // R_InitSkyMap
  57. // Called whenever the view size changes.
  58. //
  59. void R_InitSkyMap (void)
  60. {
  61. //  skyflatnum = R_FlatNumForName ( SKYFLATNAME );
  62. //    skytexturemid = 100*FRACUNIT;
  63.   if ((SCREENWIDTH==320)&&(SCREENHEIGHT==200))
  64.     skytexturemid = (SCREENHEIGHT/2)*FRACUNIT;
  65.   else
  66. //    skytexturemid = (SCREENHEIGHT/2)*FRACUNIT;
  67.     skytexturemid = (SCREENWIDTH*3)*FRACUNIT/8;
  68. }
  69.  
  70.