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 <stdio.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <3ds/3ds.h>
|
#include <3ds.h>
|
||||||
#include "math.h"
|
#include "math.h"
|
||||||
#include "test_vsh_shbin.h"
|
#include "test_vsh_shbin.h"
|
||||||
#include "test_png_bin.h"
|
#include "test_png_bin.h"
|
||||||
|
@ -1,16 +1,30 @@
|
|||||||
#ifndef __3DS_H
|
#pragma once
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
//might be missing some
|
//might be missing some
|
||||||
#include <3ds/types.h>
|
#include <3ds/types.h>
|
||||||
|
#include <3ds/svc.h>
|
||||||
#include <3ds/srv.h>
|
#include <3ds/srv.h>
|
||||||
|
#include <3ds/os.h>
|
||||||
|
#include <3ds/AC.h>
|
||||||
#include <3ds/APT.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/GSP.h>
|
||||||
#include <3ds/GX.h>
|
#include <3ds/GX.h>
|
||||||
#include <3ds/GPU.h>
|
#include <3ds/GPU.h>
|
||||||
#include <3ds/HID.h>
|
#include <3ds/HID.h>
|
||||||
|
#include <3ds/HTTPC.h>
|
||||||
|
#include <3ds/IR.h>
|
||||||
|
#include <3ds/PTM.h>
|
||||||
#include <3ds/SHDR.h>
|
#include <3ds/SHDR.h>
|
||||||
#include <3ds/svc.h>
|
#include <3ds/SOC.h>
|
||||||
#include <3ds/os.h>
|
|
||||||
#include <3ds/gfx.h>
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
#endif
|
#endif
|
@ -1,11 +1,7 @@
|
|||||||
#ifndef AC_H
|
#pragma once
|
||||||
#define AC_H
|
|
||||||
|
|
||||||
Result acInit();
|
Result acInit();
|
||||||
Result acExit();
|
Result acExit();
|
||||||
|
|
||||||
Result ACU_GetWifiStatus(Handle* servhandle, u32 *out);
|
Result ACU_GetWifiStatus(Handle* servhandle, u32 *out);
|
||||||
Result ACU_WaitInternetConnection();
|
Result ACU_WaitInternetConnection();
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#ifndef APT_H
|
#pragma once
|
||||||
#define APT_H
|
|
||||||
|
|
||||||
// TODO : find a better place to put this
|
// TODO : find a better place to put this
|
||||||
#define RUNFLAG_APTWORKAROUND (BIT(0))
|
#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_ReplySleepNotificationComplete(Handle* handle, NS_APPID appID);
|
||||||
Result APT_PrepareToCloseApplication(Handle* handle, u8 a);
|
Result APT_PrepareToCloseApplication(Handle* handle, u8 a);
|
||||||
Result APT_CloseApplication(Handle* handle, u32 a, u32 b, u32 c);
|
Result APT_CloseApplication(Handle* handle, u32 a, u32 b, u32 c);
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#ifndef CFGNOR_H
|
#pragma once
|
||||||
#define CFGNOR_H
|
|
||||||
|
|
||||||
Result CFGNOR_Initialize(u8 value);
|
Result CFGNOR_Initialize(u8 value);
|
||||||
Result CFGNOR_Shutdown();
|
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_WriteData(u32 offset, u32 *buf, u32 size);
|
||||||
Result CFGNOR_DumpFlash(u32 *buf, u32 size);
|
Result CFGNOR_DumpFlash(u32 *buf, u32 size);
|
||||||
Result CFGNOR_WriteFlash(u32 *buf, u32 size);
|
Result CFGNOR_WriteFlash(u32 *buf, u32 size);
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#ifndef CSND_H
|
#pragma once
|
||||||
#define CSND_H
|
|
||||||
|
|
||||||
#define CSND_SHAREDMEM_DEFAULT 0x10004000
|
#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(u32 entryindex, u32 *out);
|
||||||
Result CSND_getchannelstate_isplaying(u32 entryindex, u8 *status);
|
Result CSND_getchannelstate_isplaying(u32 entryindex, u8 *status);
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
@ -1,20 +1,12 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#ifndef FS_H
|
#include <string.h>
|
||||||
#define FS_H
|
#include <3ds/types.h>
|
||||||
|
|
||||||
/*! @file FS.h
|
/*! @file FS.h
|
||||||
*
|
*
|
||||||
* Filesystem Services
|
* Filesystem Services
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
#include <3ds/types.h>
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C"
|
|
||||||
{
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*! @defgroup fs_open_flags FS Open Flags
|
/*! @defgroup fs_open_flags FS Open Flags
|
||||||
*
|
*
|
||||||
* @sa FSUSER_OpenFile
|
* @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_Read(Handle handle, u32 *entriesRead, u32 entrycount, FS_dirent *buffer);
|
||||||
Result FSDIR_Close(Handle handle);
|
Result FSDIR_Close(Handle handle);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#ifndef GPU_H
|
#pragma once
|
||||||
#define GPU_H
|
|
||||||
|
|
||||||
void GPU_Init(Handle *gsphandle);
|
void GPU_Init(Handle *gsphandle);
|
||||||
void GPU_Reset(u32* gxbuf, u32* gpuBuf, u32 gpuBufSize);
|
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_DrawArray(GPU_Primitive_t primitive, u32 n);
|
||||||
void GPU_DrawElements(GPU_Primitive_t primitive, u32* indexArray, u32 n);
|
void GPU_DrawElements(GPU_Primitive_t primitive, u32* indexArray, u32 n);
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#ifndef GSP_H
|
#pragma once
|
||||||
#define GSP_H
|
|
||||||
|
|
||||||
#define GSP_REBASE_REG(r) ((r)-0x1EB00000)
|
#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_UnregisterInterruptRelayQueue(Handle* handle);
|
||||||
Result GSPGPU_TriggerCmdReqQueue(Handle *handle);
|
Result GSPGPU_TriggerCmdReqQueue(Handle *handle);
|
||||||
Result GSPGPU_SubmitGxCommand(u32* sharedGspCmdBuf, u32 gxCommand[0x8], Handle* handle);
|
Result GSPGPU_SubmitGxCommand(u32* sharedGspCmdBuf, u32 gxCommand[0x8], Handle* handle);
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#ifndef GX_H
|
#pragma once
|
||||||
#define GX_H
|
|
||||||
|
|
||||||
#define GX_BUFFER_DIM(w, h) (((h)<<16)|((w)&0xFFFF))
|
#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_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_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);
|
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
|
#pragma once
|
||||||
#define HID_H
|
|
||||||
|
|
||||||
#define HID_SHAREDMEM_DEFAULT (0x10000000)
|
#define HID_SHAREDMEM_DEFAULT (0x10000000)
|
||||||
|
|
||||||
@ -66,5 +65,3 @@ Result HIDUSER_EnableAccelerometer();
|
|||||||
Result HIDUSER_DisableAccelerometer();
|
Result HIDUSER_DisableAccelerometer();
|
||||||
Result HIDUSER_EnableGyroscope();
|
Result HIDUSER_EnableGyroscope();
|
||||||
Result HIDUSER_DisableGyroscope();
|
Result HIDUSER_DisableGyroscope();
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#ifndef HTTPC_H
|
#pragma once
|
||||||
#define HTTPC_H
|
|
||||||
|
|
||||||
Result HTTPC_Initialize(Handle handle);
|
Result HTTPC_Initialize(Handle handle);
|
||||||
Result HTTPC_InitializeConnectionSession(Handle handle, Handle contextHandle);
|
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_AddRequestHeaderField(Handle handle, Handle contextHandle, char* name, char* value);
|
||||||
Result HTTPC_BeginRequest(Handle handle, Handle contextHandle);
|
Result HTTPC_BeginRequest(Handle handle, Handle contextHandle);
|
||||||
Result HTTPC_ReceiveData(Handle handle, Handle contextHandle, u8* buffer, u32 size);
|
Result HTTPC_ReceiveData(Handle handle, Handle contextHandle, u8* buffer, u32 size);
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#ifndef IR_H
|
#pragma once
|
||||||
#define IR_H
|
|
||||||
|
|
||||||
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_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();
|
Result IRU_Shutdown();
|
||||||
@ -10,6 +9,3 @@ Result IRU_SetBitRate(u8 value);
|
|||||||
Result IRU_GetBitRate(u8 *out);
|
Result IRU_GetBitRate(u8 *out);
|
||||||
Result IRU_SetIRLEDState(u32 value);
|
Result IRU_SetIRLEDState(u32 value);
|
||||||
Result IRU_GetIRLEDRecvState(u32 *out);
|
Result IRU_GetIRLEDRecvState(u32 *out);
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
#ifndef PTM_H
|
#pragma once
|
||||||
#define PTM_H
|
|
||||||
|
|
||||||
Result ptmInit();
|
Result ptmInit();
|
||||||
Result ptmExit();
|
Result ptmExit();
|
||||||
|
|
||||||
Result PTMU_GetBatteryLevel(Handle* servhandle, u8 *out);
|
Result PTMU_GetBatteryLevel(Handle* servhandle, u8 *out);
|
||||||
Result PTMU_GetBatteryChargeState(Handle* servhandle, u8 *out);
|
Result PTMU_GetBatteryChargeState(Handle* servhandle, u8 *out);
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#ifndef SHDR_H
|
#pragma once
|
||||||
#define SHDR_H
|
|
||||||
|
|
||||||
typedef enum{
|
typedef enum{
|
||||||
VERTEX_SHDR=0x0,
|
VERTEX_SHDR=0x0,
|
||||||
@ -67,5 +66,3 @@ void DVLP_SendOpDesc(DVLP_s* dvlp);
|
|||||||
|
|
||||||
void DVLE_SendOutmap(DVLE_s* dvle);
|
void DVLE_SendOutmap(DVLE_s* dvle);
|
||||||
void DVLE_SendConstants(DVLE_s* dvle);
|
void DVLE_SendConstants(DVLE_s* dvle);
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
#ifndef SOC_H
|
#pragma once
|
||||||
#define SOC_H
|
|
||||||
|
|
||||||
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_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();
|
Result SOC_Shutdown();
|
||||||
int SOC_GetErrno();
|
int SOC_GetErrno();
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
#ifndef GFX_H
|
#pragma once
|
||||||
#define GFX_H
|
|
||||||
|
|
||||||
#include <3ds/types.h>
|
#include <3ds/types.h>
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
@ -34,5 +32,3 @@ void* gfxAllocLinear(size_t size);
|
|||||||
extern u8* gfxTopLeftFramebuffers[2];
|
extern u8* gfxTopLeftFramebuffers[2];
|
||||||
extern u8* gfxSubFramebuffers[2];
|
extern u8* gfxSubFramebuffers[2];
|
||||||
extern u8* gfxBottomFramebuffers[2];
|
extern u8* gfxBottomFramebuffers[2];
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#ifndef OS_H
|
#pragma once
|
||||||
#define OS_H
|
|
||||||
|
|
||||||
#define SYSTEM_VERSION(major, minor, revision) \
|
#define SYSTEM_VERSION(major, minor, revision) \
|
||||||
(((major)<<24)|((minor)<<16)|((revision)<<8))
|
(((major)<<24)|((minor)<<16)|((revision)<<8))
|
||||||
@ -8,5 +7,3 @@ u32 osConvertVirtToPhys(u32 vaddr);
|
|||||||
const char* osStrError(u32 error);
|
const char* osStrError(u32 error);
|
||||||
u32 osGetFirmVersion();
|
u32 osGetFirmVersion();
|
||||||
u32 osGetKernelVersion();
|
u32 osGetKernelVersion();
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
#ifndef SRV_H
|
#pragma once
|
||||||
#define SRV_H
|
|
||||||
|
|
||||||
Result srvInit();
|
Result srvInit();
|
||||||
Result srvExit();
|
Result srvExit();
|
||||||
Result srvRegisterClient();
|
Result srvRegisterClient();
|
||||||
Result srvGetServiceHandle(Handle* out, char* name);
|
Result srvGetServiceHandle(Handle* out, char* name);
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -2,10 +2,7 @@
|
|||||||
types.h _ Various system types.
|
types.h _ Various system types.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TYPES_H
|
#pragma once
|
||||||
#define TYPES_H
|
|
||||||
|
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
@ -36,5 +33,3 @@ typedef s32 Result;
|
|||||||
typedef void (*ThreadFunc)(u32);
|
typedef void (*ThreadFunc)(u32);
|
||||||
|
|
||||||
#define BIT(n) (1U<<(n))
|
#define BIT(n) (1U<<(n))
|
||||||
|
|
||||||
#endif
|
|
||||||
|
Loading…
Reference in New Issue
Block a user