SCROLL.H 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. ** Command & Conquer(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** 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, see <http://www.gnu.org/licenses/>.
  17. */
  18. /* $Header: F:\projects\c&c\vcs\code\scroll.h_v 2.16 16 Oct 1995 16:46:12 JOE_BOSTIC $ */
  19. /***********************************************************************************************
  20. *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
  21. ***********************************************************************************************
  22. * *
  23. * Project Name : Command & Conquer *
  24. * *
  25. * File Name : SCROLL.H *
  26. * *
  27. * Programmer : Joe L. Bostic *
  28. * *
  29. * Start Date : 11/18/94 *
  30. * *
  31. * Last Update : November 18, 1994 [JLB] *
  32. * *
  33. *---------------------------------------------------------------------------------------------*
  34. * Functions: *
  35. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  36. #ifndef SCROLL_H
  37. #define SCROLL_H
  38. #include "help.h"
  39. class ScrollClass: public HelpClass
  40. {
  41. /*
  42. ** If map scrolling is automatic, then this flag is true. Automatic scrolling will
  43. ** cause the map to scroll if the mouse is in the scroll region, regardless of
  44. ** whether or not the mouse button is held down.
  45. */
  46. unsigned IsAutoScroll:1;
  47. /*
  48. ** Scroll speed is regulated by this count down timer. When this value reaches zero,
  49. ** scroll the map in the direction required and reset this timer.
  50. */
  51. static CountDownTimerClass Counter;
  52. /*
  53. ** These are the delays used (as countdown timers) to regulate the scroll rate
  54. ** of the map. These times are based on game ticks.
  55. */
  56. // enum ScrollClassEnums {
  57. // INITIAL_DELAY=8, // Delay before scrolling can start at all.
  58. // SEQUENCE_DELAY=4 // Delay between scroll steps.
  59. // };
  60. int Inertia;
  61. public:
  62. ScrollClass(void);
  63. bool Set_Autoscroll(int control);
  64. virtual void AI(KeyNumType &input, int x, int y);
  65. virtual void Init_IO(void) {Counter.Set(0);HelpClass::Init_IO();};
  66. /*
  67. ** File I/O.
  68. */
  69. virtual void Code_Pointers(void);
  70. virtual void Decode_Pointers(void);
  71. };
  72. #endif