Move 3ds.h to root, add C++ guard, use #pragma once
This commit is contained in:
parent
9e89151f22
commit
589c59fab7
@ -2,7 +2,7 @@
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
#include <3ds/3ds.h>
|
||||
#include <3ds.h>
|
||||
#include "math.h"
|
||||
#include "test_vsh_shbin.h"
|
||||
#include "test_png_bin.h"
|
||||
|
@ -1,16 +1,30 @@
|
||||
#ifndef __3DS_H
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
//might be missing some
|
||||
#include <3ds/types.h>
|
||||
#include <3ds/svc.h>
|
||||
#include <3ds/srv.h>
|
||||
#include <3ds/os.h>
|
||||
#include <3ds/AC.h>
|
||||
#include <3ds/APT.h>
|
||||
#include <3ds/CFGNOR.h>
|
||||
#include <3ds/CSND.h>
|
||||
#include <3ds/FS.h>
|
||||
#include <3ds/gfx.h>
|
||||
#include <3ds/GSP.h>
|
||||
#include <3ds/GX.h>
|
||||
#include <3ds/GPU.h>
|
||||
#include <3ds/HID.h>
|
||||
#include <3ds/HTTPC.h>
|
||||
#include <3ds/IR.h>
|
||||
#include <3ds/PTM.h>
|
||||
#include <3ds/SHDR.h>
|
||||
#include <3ds/svc.h>
|
||||
#include <3ds/os.h>
|
||||
#include <3ds/gfx.h>
|
||||
#include <3ds/SOC.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
@ -1,11 +1,7 @@
|
||||
#ifndef AC_H
|
||||
#define AC_H
|
||||
#pragma once
|
||||
|
||||
Result acInit();
|
||||
Result acExit();
|
||||
|
||||
Result ACU_GetWifiStatus(Handle* servhandle, u32 *out);
|
||||
Result ACU_WaitInternetConnection();
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef APT_H
|
||||
#define APT_H
|
||||
#pragma once
|
||||
|
||||
// TODO : find a better place to put this
|
||||
#define RUNFLAG_APTWORKAROUND (BIT(0))
|
||||
@ -68,5 +67,3 @@ Result APT_ReplySleepQuery(Handle* handle, NS_APPID appID, u32 a);
|
||||
Result APT_ReplySleepNotificationComplete(Handle* handle, NS_APPID appID);
|
||||
Result APT_PrepareToCloseApplication(Handle* handle, u8 a);
|
||||
Result APT_CloseApplication(Handle* handle, u32 a, u32 b, u32 c);
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef CFGNOR_H
|
||||
#define CFGNOR_H
|
||||
#pragma once
|
||||
|
||||
Result CFGNOR_Initialize(u8 value);
|
||||
Result CFGNOR_Shutdown();
|
||||
@ -7,6 +6,3 @@ Result CFGNOR_ReadData(u32 offset, u32 *buf, u32 size);
|
||||
Result CFGNOR_WriteData(u32 offset, u32 *buf, u32 size);
|
||||
Result CFGNOR_DumpFlash(u32 *buf, u32 size);
|
||||
Result CFGNOR_WriteFlash(u32 *buf, u32 size);
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef CSND_H
|
||||
#define CSND_H
|
||||
#pragma once
|
||||
|
||||
#define CSND_SHAREDMEM_DEFAULT 0x10004000
|
||||
|
||||
@ -29,6 +28,3 @@ Result CSND_sharedmemtype0_cmdupdatestate(int waitdone);
|
||||
|
||||
Result CSND_getchannelstate(u32 entryindex, u32 *out);
|
||||
Result CSND_getchannelstate_isplaying(u32 entryindex, u8 *status);
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -1,20 +1,12 @@
|
||||
#pragma once
|
||||
#ifndef FS_H
|
||||
#define FS_H
|
||||
#include <string.h>
|
||||
#include <3ds/types.h>
|
||||
|
||||
/*! @file FS.h
|
||||
*
|
||||
* Filesystem Services
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <3ds/types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*! @defgroup fs_open_flags FS Open Flags
|
||||
*
|
||||
* @sa FSUSER_OpenFile
|
||||
@ -159,9 +151,3 @@ Result FSFILE_Flush(Handle handle);
|
||||
|
||||
Result FSDIR_Read(Handle handle, u32 *entriesRead, u32 entrycount, FS_dirent *buffer);
|
||||
Result FSDIR_Close(Handle handle);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef GPU_H
|
||||
#define GPU_H
|
||||
#pragma once
|
||||
|
||||
void GPU_Init(Handle *gsphandle);
|
||||
void GPU_Reset(u32* gxbuf, u32* gpuBuf, u32 gpuBufSize);
|
||||
@ -96,5 +95,3 @@ void GPU_SetTexEnv(u8 id, u16 rgbSources, u16 alphaSources, u16 rgbOperands, u16
|
||||
|
||||
void GPU_DrawArray(GPU_Primitive_t primitive, u32 n);
|
||||
void GPU_DrawElements(GPU_Primitive_t primitive, u32* indexArray, u32 n);
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef GSP_H
|
||||
#define GSP_H
|
||||
#pragma once
|
||||
|
||||
#define GSP_REBASE_REG(r) ((r)-0x1EB00000)
|
||||
|
||||
@ -80,5 +79,3 @@ Result GSPGPU_RegisterInterruptRelayQueue(Handle *handle, Handle eventHandle, u3
|
||||
Result GSPGPU_UnregisterInterruptRelayQueue(Handle* handle);
|
||||
Result GSPGPU_TriggerCmdReqQueue(Handle *handle);
|
||||
Result GSPGPU_SubmitGxCommand(u32* sharedGspCmdBuf, u32 gxCommand[0x8], Handle* handle);
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef GX_H
|
||||
#define GX_H
|
||||
#pragma once
|
||||
|
||||
#define GX_BUFFER_DIM(w, h) (((h)<<16)|((w)&0xFFFF))
|
||||
|
||||
@ -9,5 +8,3 @@ Result GX_SetMemoryFill(u32* gxbuf, u32* buf0a, u32 buf0v, u32* buf0e, u16 width
|
||||
Result GX_SetDisplayTransfer(u32* gxbuf, u32* inadr, u32 indim, u32* outadr, u32 outdim, u32 flags);
|
||||
Result GX_SetTextureCopy(u32* gxbuf, u32* inadr, u32 indim, u32* outadr, u32 outdim, u32 size, u32 flags);
|
||||
Result GX_SetCommandList_First(u32* gxbuf, u32* buf0a, u32 buf0s, u32* buf1a, u32 buf1s, u32* buf2a, u32 buf2s);
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef HID_H
|
||||
#define HID_H
|
||||
#pragma once
|
||||
|
||||
#define HID_SHAREDMEM_DEFAULT (0x10000000)
|
||||
|
||||
@ -66,5 +65,3 @@ Result HIDUSER_EnableAccelerometer();
|
||||
Result HIDUSER_DisableAccelerometer();
|
||||
Result HIDUSER_EnableGyroscope();
|
||||
Result HIDUSER_DisableGyroscope();
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef HTTPC_H
|
||||
#define HTTPC_H
|
||||
#pragma once
|
||||
|
||||
Result HTTPC_Initialize(Handle handle);
|
||||
Result HTTPC_InitializeConnectionSession(Handle handle, Handle contextHandle);
|
||||
@ -9,5 +8,3 @@ Result HTTPC_SetProxyDefault(Handle handle, Handle contextHandle);
|
||||
Result HTTPC_AddRequestHeaderField(Handle handle, Handle contextHandle, char* name, char* value);
|
||||
Result HTTPC_BeginRequest(Handle handle, Handle contextHandle);
|
||||
Result HTTPC_ReceiveData(Handle handle, Handle contextHandle, u8* buffer, u32 size);
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef IR_H
|
||||
#define IR_H
|
||||
#pragma once
|
||||
|
||||
Result IRU_Initialize(u32 *sharedmem_addr, u32 sharedmem_size);//The permissions for the specified memory is set to RO. This memory must be already mapped.
|
||||
Result IRU_Shutdown();
|
||||
@ -10,6 +9,3 @@ Result IRU_SetBitRate(u8 value);
|
||||
Result IRU_GetBitRate(u8 *out);
|
||||
Result IRU_SetIRLEDState(u32 value);
|
||||
Result IRU_GetIRLEDRecvState(u32 *out);
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -1,10 +1,7 @@
|
||||
#ifndef PTM_H
|
||||
#define PTM_H
|
||||
#pragma once
|
||||
|
||||
Result ptmInit();
|
||||
Result ptmExit();
|
||||
|
||||
Result PTMU_GetBatteryLevel(Handle* servhandle, u8 *out);
|
||||
Result PTMU_GetBatteryChargeState(Handle* servhandle, u8 *out);
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef SHDR_H
|
||||
#define SHDR_H
|
||||
#pragma once
|
||||
|
||||
typedef enum{
|
||||
VERTEX_SHDR=0x0,
|
||||
@ -67,5 +66,3 @@ void DVLP_SendOpDesc(DVLP_s* dvlp);
|
||||
|
||||
void DVLE_SendOutmap(DVLE_s* dvle);
|
||||
void DVLE_SendConstants(DVLE_s* dvle);
|
||||
|
||||
#endif
|
||||
|
@ -1,8 +1,5 @@
|
||||
#ifndef SOC_H
|
||||
#define SOC_H
|
||||
#pragma once
|
||||
|
||||
Result SOC_Initialize(u32 *context_addr, u32 context_size);//Example context_size: 0x48000. The specified context buffer can no longer be accessed by the process which called this function, since the userland permissions for this block are set to no-access.
|
||||
Result SOC_Shutdown();
|
||||
int SOC_GetErrno();
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,4 @@
|
||||
#ifndef GFX_H
|
||||
#define GFX_H
|
||||
|
||||
#pragma once
|
||||
#include <3ds/types.h>
|
||||
|
||||
typedef enum
|
||||
@ -34,5 +32,3 @@ void* gfxAllocLinear(size_t size);
|
||||
extern u8* gfxTopLeftFramebuffers[2];
|
||||
extern u8* gfxSubFramebuffers[2];
|
||||
extern u8* gfxBottomFramebuffers[2];
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef OS_H
|
||||
#define OS_H
|
||||
#pragma once
|
||||
|
||||
#define SYSTEM_VERSION(major, minor, revision) \
|
||||
(((major)<<24)|((minor)<<16)|((revision)<<8))
|
||||
@ -8,5 +7,3 @@ u32 osConvertVirtToPhys(u32 vaddr);
|
||||
const char* osStrError(u32 error);
|
||||
u32 osGetFirmVersion();
|
||||
u32 osGetKernelVersion();
|
||||
|
||||
#endif
|
||||
|
@ -1,9 +1,6 @@
|
||||
#ifndef SRV_H
|
||||
#define SRV_H
|
||||
#pragma once
|
||||
|
||||
Result srvInit();
|
||||
Result srvExit();
|
||||
Result srvRegisterClient();
|
||||
Result srvGetServiceHandle(Handle* out, char* name);
|
||||
|
||||
#endif
|
||||
|
@ -2,10 +2,7 @@
|
||||
types.h _ Various system types.
|
||||
*/
|
||||
|
||||
#ifndef TYPES_H
|
||||
#define TYPES_H
|
||||
|
||||
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
@ -36,5 +33,3 @@ typedef s32 Result;
|
||||
typedef void (*ThreadFunc)(u32);
|
||||
|
||||
#define BIT(n) (1U<<(n))
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user