mirror of
https://github.com/dborth/vbagx.git
synced 2024-11-27 04:54:15 +01:00
57 lines
1.9 KiB
C++
57 lines
1.9 KiB
C++
// -*- C++ -*-
|
|
// VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator.
|
|
// Copyright (C) 1999-2003 Forgotten
|
|
// Copyright (C) 2004 Forgotten and the VBA development team
|
|
|
|
// This program is free software; you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation; either version 2, or(at your option)
|
|
// any later version.
|
|
//
|
|
// This program is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with this program; if not, write to the Free Software Foundation,
|
|
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
#ifndef VBA_UTIL_H
|
|
#define VBA_UTIL_H
|
|
|
|
#include "System.h"
|
|
|
|
enum IMAGE_TYPE {
|
|
IMAGE_UNKNOWN = -1,
|
|
IMAGE_GBA = 0,
|
|
IMAGE_GB = 1
|
|
};
|
|
|
|
// save game
|
|
|
|
typedef struct {
|
|
void *address;
|
|
int size;
|
|
} variable_desc;
|
|
|
|
extern bool utilIsGBAImage(const char *);
|
|
extern bool utilIsGBImage(const char *);
|
|
extern bool utilIsZipFile(const char *);
|
|
|
|
extern void utilPutDword(u8 *, u32);
|
|
extern void utilPutWord(u8 *, u16);
|
|
extern void utilWriteData(gzFile, variable_desc *);
|
|
extern void utilReadData(gzFile, variable_desc *);
|
|
extern void utilReadDataSkip(gzFile, variable_desc *);
|
|
extern int utilReadInt(gzFile);
|
|
extern void utilWriteInt(gzFile, int);
|
|
extern gzFile utilGzOpen(const char *file, const char *mode);
|
|
extern gzFile utilMemGzOpen(char *memory, int available, const char *mode);
|
|
extern int utilGzWrite(gzFile file, const voidp buffer, unsigned int len);
|
|
extern int utilGzRead(gzFile file, voidp buffer, unsigned int len);
|
|
extern int utilGzClose(gzFile file);
|
|
extern z_off_t utilGzSeek(gzFile file, z_off_t offset, int whence);
|
|
extern long utilGzMemTell(gzFile file);
|
|
#endif
|