gba_compression.inc 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. (*
  2. $Id$
  3. ------------------------------------------------------------------------------
  4. Header file for libgba bios compression functions
  5. Copyright 2003-2004 by Dave Murphy.
  6. This library is free software; you can redistribute it and/or
  7. modify it under the terms of the GNU Library General Public
  8. License as published by the Free Software Foundation; either
  9. version 2 of the License, or (at your option) any later version.
  10. This library 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 GNU
  13. Library General Public License for more details.
  14. You should have received a copy of the GNU Library General Public
  15. along with this program; if not, write to the Free Software
  16. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  17. MA 02110-1301, USA.
  18. Please report all bugs and problems through the bug tracker at
  19. "http://sourceforge.net/tracker/?group_id=114505&atid=668551".
  20. ------------------------------------------------------------------------------
  21. Conversion by Legolas (http://itaprogaming.free.fr) for freepascal compiler
  22. (http://www.freepascal.org)
  23. Copyright (C) 2006 Francesco Lombardi
  24. Check http://sourceforge.net/projects/libndsfpc for updates
  25. ------------------------------------------------------------------------------
  26. $Log$
  27. *)
  28. {$ifdef GBA_INTERFACE}
  29. type
  30. BUP = record
  31. SrcNum: u16; // Source Data Byte Size
  32. SrcBitNum: u8; // 1 Source Data Bit Number
  33. DestBitNum: u8; // 1 Destination Data Bit Number
  34. {u32 }DestOffset: 0..31; // Number added to Source Data
  35. {u32 }DestOffset0_On: 0..1; // Flag to add/not add Offset to 0 Data
  36. end;
  37. PBUP = ^BUP;
  38. //---------------------------------------------------------------------------------
  39. // Decompression functions
  40. //---------------------------------------------------------------------------------
  41. procedure BitUnPack(source: pointer; dest: pointer; _bup: PBUP); cdecl; external;
  42. procedure LZ77UnCompWram(source, dest: pointer); cdecl; external;
  43. procedure LZ77UnCompVram(source, dest: pointer); cdecl; external;
  44. procedure HuffUnComp(source, dest: pointer); cdecl; external;
  45. procedure RLUnCompWram(source, dest: pointer); cdecl; external;
  46. procedure RLUnCompVram(source, dest: pointer); cdecl; external;
  47. procedure Diff8bitUnFilterWram(source, dest: pointer); cdecl; external;
  48. procedure Diff8bitUnFilterVram(source, dest: pointer); cdecl; external;
  49. procedure Diff16bitUnFilter(source, dest: pointer); cdecl; external;
  50. {$endif GBA_INTERFACE}