egacode.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /* $Id$
  2. * MegaZeux
  3. *
  4. * Copyright (C) 1996 Greg Janson
  5. * Copyright (C) 1998 Matthew D. Williams - dbwilli@scsn.net
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; either version 2 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20. */
  21. //Prototypes for EGACODE.CPP
  22. #ifndef __EGACODE_H
  23. #define __EGACODE_H
  24. //Mode selection (also resets char sets)
  25. void ega_14p_mode(void);
  26. void vga_16p_mode(void);
  27. //Initialization- run AFTER ega_14p_mode, error=out of memory
  28. char ec_init(void);
  29. //Exit- run when all done, simply deallocates memory
  30. void ec_exit(void);
  31. //Auto update functions
  32. void ec_change_byte(int chr,int byte,int new_value);
  33. void ec_change_char(int chr,unsigned char far *matrix);
  34. int ec_read_byte(int chr,int byte);
  35. void ec_read_char(int chr,unsigned char far *matrix);
  36. void ec_mem_load_set(unsigned char far *chars);
  37. void ec_load_ascii(void);
  38. void ec_load_mzx(void);
  39. char ec_save_set(char far *filename);
  40. char ec_load_set(char far *filename);
  41. //Functions that DON'T auto update
  42. void ec_change_byte_nou(int chr,int byte,int new_value);
  43. void ec_change_char_nou(int chr,unsigned char far *matrix);
  44. char ec_load_set_nou(char far *filename);
  45. void ec_update_set_if_needed(void);
  46. void ec_update_set(void);
  47. //The current set (14*256 bytes)
  48. extern unsigned char far *curr_set;
  49. #endif