boardmem.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. /* Declarations for BOARDMEM.CPP */
  22. #ifndef __BOARDMEM_H
  23. #define __BOARDMEM_H
  24. #include <stdio.h>
  25. char allocate_board_space(long size,unsigned char id,char conv_mem_ok=0);
  26. void deallocate_board_space(unsigned char id);
  27. unsigned int RLE2_size(unsigned char far *plane);
  28. unsigned int RLE2_store(unsigned char far *where,unsigned char far *plane);
  29. void RLE2_save(FILE *fp,unsigned char far *plane);
  30. unsigned int RLE2_read(unsigned char far *where,unsigned char far *plane,
  31. char change_xysizes=1);
  32. void RLE2_load(FILE *fp,unsigned char far *plane,char change_xysizes=1);
  33. long size_of_current_board(void);
  34. char store_current(unsigned char id);
  35. char grab_current(unsigned char id);
  36. //loading=0 to save to fp, non-0 to load from fp
  37. char disk_board(unsigned char id,FILE *fp,char loading,
  38. unsigned char xor_with);
  39. //Frees up memory. Also call end_sam if needed.
  40. void free_up_board_memory(void);
  41. //Converts max_bsiz_mode into max_bxsiz and max_bysiz
  42. void convert_max_bsiz_mode(void);
  43. #endif