mirror of
https://github.com/parasyte/alt64
synced 2025-02-28 09:21:46 -05:00
added ifndefs to header files
This commit is contained in:
parent
0c34a482e9
commit
7586104ffc
@ -3,6 +3,9 @@
|
|||||||
// See LICENSE file in the project root for full license information.
|
// See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#ifndef _DEBUG_H
|
||||||
|
#define _DEBUG_H
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
#define TRACEF(disp, text, ...) dbg_printf(disp, text, __VA_ARGS__);
|
#define TRACEF(disp, text, ...) dbg_printf(disp, text, __VA_ARGS__);
|
||||||
#define TRACE(disp, text) printText(text, 3, -1, disp);
|
#define TRACE(disp, text) printText(text, 3, -1, disp);
|
||||||
@ -27,4 +30,7 @@ void dbg_printf(display_context_t disp, const char *fmt, ...)
|
|||||||
u8 tmp[32];
|
u8 tmp[32];
|
||||||
sprintf(tmp, "%s", buf);
|
sprintf(tmp, "%s", buf);
|
||||||
printText(tmp, 3, -1, disp);
|
printText(tmp, 3, -1, disp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -23,6 +23,4 @@ void diskSetInterface(u32 interface);
|
|||||||
#define DISK_IFACE_SD 1
|
#define DISK_IFACE_SD 1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* _DISK_H */
|
#endif /* _DISK_H */
|
||||||
|
|
||||||
|
@ -65,5 +65,5 @@
|
|||||||
|
|
||||||
#define SD_INIT_ERROR 80
|
#define SD_INIT_ERROR 80
|
||||||
|
|
||||||
#endif /* _ERRORS_H */
|
|
||||||
|
|
||||||
|
#endif /* _ERRORS_H */
|
||||||
|
@ -121,5 +121,6 @@ u8 evd_mmcOpenRead(u32 addr);
|
|||||||
u8 evd_mmcReadNextBlock(void *dat);
|
u8 evd_mmcReadNextBlock(void *dat);
|
||||||
void evd_mmcCloseRW();
|
void evd_mmcCloseRW();
|
||||||
*/
|
*/
|
||||||
#endif /* _EVERDRIVE_H */
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* _EVERDRIVE_H */
|
||||||
|
@ -119,5 +119,6 @@ u8 fatGetFullName(u8 *name, u32 dir_entry, u32 rec_entry);
|
|||||||
u8 fatOpenDirByName(u8 *name);
|
u8 fatOpenDirByName(u8 *name);
|
||||||
void fatInitRam();
|
void fatInitRam();
|
||||||
void fatSortRecords();
|
void fatSortRecords();
|
||||||
#endif /* _FAT_H */
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* _FAT_H */
|
||||||
|
@ -4,6 +4,9 @@
|
|||||||
// See LICENSE file in the project root for full license information.
|
// See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#ifndef _HASHTABLE_H
|
||||||
|
#define _HASHTABLE_H
|
||||||
|
|
||||||
typedef struct hashtable hashtable;
|
typedef struct hashtable hashtable;
|
||||||
void hashtable_destroy(hashtable *t);
|
void hashtable_destroy(hashtable *t);
|
||||||
typedef struct hashtable_entry hashtable_entry;
|
typedef struct hashtable_entry hashtable_entry;
|
||||||
@ -23,4 +26,6 @@ struct hashtable {
|
|||||||
struct hashtable_entry {
|
struct hashtable_entry {
|
||||||
char* key;
|
char* key;
|
||||||
void* value;
|
void* value;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
// Portions (c) 2013 saturnu (Alt64) based on libdragon, Neo64Menu, ED64IO, libn64-hkz, libmikmod
|
// Portions (c) 2013 saturnu (Alt64) based on libdragon, Neo64Menu, ED64IO, libn64-hkz, libmikmod
|
||||||
// See LICENSE file in the project root for full license information.
|
// See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
#ifndef MAIN_H
|
||||||
|
#define MAIN_H
|
||||||
|
|
||||||
//TODO: some of these should probably be includes not protos in main
|
//TODO: some of these should probably be includes not protos in main
|
||||||
void bootRom(display_context_t disp, int silent);
|
void bootRom(display_context_t disp, int silent);
|
||||||
@ -39,3 +41,5 @@ void drawTextInput(display_context_t disp,char *msg);
|
|||||||
* @return An aligned address guaranteed to be >= the unaligned address
|
* @return An aligned address guaranteed to be >= the unaligned address
|
||||||
*/
|
*/
|
||||||
//#define ALIGN_16BYTE(x) ((void *)(((uint32_t)(x)+15) & 0xFFFFFFF0))
|
//#define ALIGN_16BYTE(x) ((void *)(((uint32_t)(x)+15) & 0xFFFFFFF0))
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#ifndef _MEM_H
|
#ifndef _MEM_H
|
||||||
#define _MEM_H
|
#define _MEM_H
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
#define SPI_SPEED_INIT 2
|
#define SPI_SPEED_INIT 2
|
||||||
|
@ -4,6 +4,9 @@
|
|||||||
// See LICENSE file in the project root for full license information.
|
// See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#ifndef _ROM_H
|
||||||
|
#define _ROM_H
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
0000h (1 byte): initial PI_BSB_DOM1_LAT_REG value (0x80)
|
0000h (1 byte): initial PI_BSB_DOM1_LAT_REG value (0x80)
|
||||||
@ -159,4 +162,6 @@ int is_valid_rom(unsigned char *buffer);
|
|||||||
void swap_header(unsigned char* header, int loadlength);
|
void swap_header(unsigned char* header, int loadlength);
|
||||||
|
|
||||||
u8 getCicType(u8 bios_cic);
|
u8 getCicType(u8 bios_cic);
|
||||||
int get_cic(unsigned char *buffer);
|
int get_cic(unsigned char *buffer);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -2,9 +2,13 @@
|
|||||||
// Copyright (c) 2017 The Altra64 project contributors
|
// Copyright (c) 2017 The Altra64 project contributors
|
||||||
// See LICENSE file in the project root for full license information.
|
// See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
#ifndef _SOUND_H
|
||||||
|
#define _SOUND_H
|
||||||
|
|
||||||
void sndInit(void);
|
void sndInit(void);
|
||||||
void sndPlayBGM(char* filename);
|
void sndPlayBGM(char* filename);
|
||||||
void sndStopAll(void);
|
void sndStopAll(void);
|
||||||
void sndPlaySFX(char* filename);
|
void sndPlaySFX(char* filename);
|
||||||
void sndUpdate(void);
|
void sndUpdate(void);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -4,6 +4,9 @@
|
|||||||
// See LICENSE file in the project root for full license information.
|
// See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#ifndef _SRAM_H
|
||||||
|
#define _SRAM_H
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
@ -35,3 +38,5 @@ void *safe_malloc(size_t size);
|
|||||||
void safe_free(void *ptr);
|
void safe_free(void *ptr);
|
||||||
void *safe_memset(void *s, int c, size_t n);
|
void *safe_memset(void *s, int c, size_t n);
|
||||||
void *safe_memcpy(void *dest, const void *src, size_t n);
|
void *safe_memcpy(void *dest, const void *src, size_t n);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -4,7 +4,8 @@
|
|||||||
// See LICENSE file in the project root for full license information.
|
// See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
#ifndef STRLIB_H_
|
#ifndef _STRLIB_H
|
||||||
|
#define _STRLIB_H
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
@ -40,4 +41,5 @@ u8 streq(u8 *str1, u8 *str2);
|
|||||||
u8 streql(u8 *str1, u8 *str2, u8 len);
|
u8 streql(u8 *str1, u8 *str2, u8 len);
|
||||||
|
|
||||||
u16 strContain(u8 *target, u8 *str);
|
u16 strContain(u8 *target, u8 *str);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#ifndef _SYS_H
|
#ifndef _SYS_H
|
||||||
#define _SYS_H
|
#define _SYS_H
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include <libdragon.h>
|
#include <libdragon.h>
|
||||||
@ -51,5 +52,5 @@ typedef struct {
|
|||||||
|
|
||||||
extern Options_st options;
|
extern Options_st options;
|
||||||
extern u32 asm_date;
|
extern u32 asm_date;
|
||||||
#endif /* _TOOLS_H */
|
|
||||||
|
|
||||||
|
#endif /* _SYS_H */
|
||||||
|
@ -32,4 +32,3 @@ typedef uint64_t sim_u64;
|
|||||||
|
|
||||||
|
|
||||||
#endif /* _TYPES_H */
|
#endif /* _TYPES_H */
|
||||||
|
|
||||||
|
@ -4,12 +4,11 @@
|
|||||||
// See LICENSE file in the project root for full license information.
|
// See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
#ifndef _FIFO_H
|
#ifndef _USB_H
|
||||||
#define _FIFO_H
|
#define _USB_H
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
u8 usbListener();
|
u8 usbListener();
|
||||||
|
|
||||||
|
|
||||||
#endif /* _FIFO_H */
|
#endif /* _USB_H */
|
||||||
|
|
||||||
|
@ -4,6 +4,9 @@
|
|||||||
// See LICENSE file in the project root for full license information.
|
// See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef _UTILS_H
|
||||||
|
#define _UTILS_H
|
||||||
// rom.h
|
// rom.h
|
||||||
// rom tools - header inspect
|
// rom tools - header inspect
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@ -67,3 +70,5 @@ int setSRAM128( uint8_t *buffer);
|
|||||||
int setEeprom4k( uint8_t *buffer);
|
int setEeprom4k( uint8_t *buffer);
|
||||||
int setEeprom16k( uint8_t *buffer);
|
int setEeprom16k( uint8_t *buffer);
|
||||||
int setFlashRAM( uint8_t *buffer);
|
int setFlashRAM( uint8_t *buffer);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user