mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-11 16:45:48 -04:00
Fix console builds and integrate N64 backend files into the main .sln file
This commit is contained in:
parent
8a20397b6e
commit
a645f407bc
@ -471,6 +471,7 @@
|
|||||||
<ClCompile Include="Formats.c" />
|
<ClCompile Include="Formats.c" />
|
||||||
<ClCompile Include="Game.c" />
|
<ClCompile Include="Game.c" />
|
||||||
<ClCompile Include="Graphics_GL2.c" />
|
<ClCompile Include="Graphics_GL2.c" />
|
||||||
|
<ClCompile Include="Graphics_N64.c" />
|
||||||
<ClCompile Include="Graphics_PS3.c" />
|
<ClCompile Include="Graphics_PS3.c" />
|
||||||
<ClCompile Include="Graphics_PSP.c" />
|
<ClCompile Include="Graphics_PSP.c" />
|
||||||
<ClCompile Include="Graphics_PSVita.c" />
|
<ClCompile Include="Graphics_PSVita.c" />
|
||||||
@ -493,6 +494,7 @@
|
|||||||
<ClCompile Include="Platform_Android.c" />
|
<ClCompile Include="Platform_Android.c" />
|
||||||
<ClCompile Include="Platform_Dreamcast.c" />
|
<ClCompile Include="Platform_Dreamcast.c" />
|
||||||
<ClCompile Include="Platform_GCWii.c" />
|
<ClCompile Include="Platform_GCWii.c" />
|
||||||
|
<ClCompile Include="Platform_N64.c" />
|
||||||
<ClCompile Include="Platform_Posix.c" />
|
<ClCompile Include="Platform_Posix.c" />
|
||||||
<ClCompile Include="Platform_PS3.c" />
|
<ClCompile Include="Platform_PS3.c" />
|
||||||
<ClCompile Include="Platform_PSP.c" />
|
<ClCompile Include="Platform_PSP.c" />
|
||||||
@ -533,6 +535,7 @@
|
|||||||
<ClCompile Include="Window_Carbon.c" />
|
<ClCompile Include="Window_Carbon.c" />
|
||||||
<ClCompile Include="Window_Dreamcast.c" />
|
<ClCompile Include="Window_Dreamcast.c" />
|
||||||
<ClCompile Include="Window_GCWii.c" />
|
<ClCompile Include="Window_GCWii.c" />
|
||||||
|
<ClCompile Include="Window_N64.c" />
|
||||||
<ClCompile Include="Window_PS3.c" />
|
<ClCompile Include="Window_PS3.c" />
|
||||||
<ClCompile Include="Window_PSP.c" />
|
<ClCompile Include="Window_PSP.c" />
|
||||||
<ClCompile Include="Window_PSVita.c" />
|
<ClCompile Include="Window_PSVita.c" />
|
||||||
|
@ -677,6 +677,15 @@
|
|||||||
<ClCompile Include="EntityRenderers.c">
|
<ClCompile Include="EntityRenderers.c">
|
||||||
<Filter>Source Files\Entities</Filter>
|
<Filter>Source Files\Entities</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="Graphics_N64.c">
|
||||||
|
<Filter>Source Files\Graphics</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Platform_N64.c">
|
||||||
|
<Filter>Source Files\Platform</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Window_N64.c">
|
||||||
|
<Filter>Source Files\Window</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="..\misc\windows\CCicon.rc">
|
<ResourceCompile Include="..\misc\windows\CCicon.rc">
|
||||||
|
@ -447,6 +447,8 @@ void Gfx_SetDynamicVbData(GfxResourceID vb, void* vertices, int vCount) {
|
|||||||
Mem_Copy(vb, vertices, vCount * gfx_stride);
|
Mem_Copy(vb, vertices, vCount * gfx_stride);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Gfx_DeleteDynamicVb(GfxResourceID* vb) { Gfx_DeleteVb(vb); }
|
||||||
|
|
||||||
|
|
||||||
/*########################################################################################################################*
|
/*########################################################################################################################*
|
||||||
*-----------------------------------------------------State management----------------------------------------------------*
|
*-----------------------------------------------------State management----------------------------------------------------*
|
||||||
|
@ -117,7 +117,7 @@ static void* gfx_vertices;
|
|||||||
static int vb_size;
|
static int vb_size;
|
||||||
|
|
||||||
GfxResourceID Gfx_CreateIb2(int count, Gfx_FillIBFunc fillFunc, void* obj) {
|
GfxResourceID Gfx_CreateIb2(int count, Gfx_FillIBFunc fillFunc, void* obj) {
|
||||||
return 1;
|
return (void*)1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Gfx_BindIb(GfxResourceID ib) { }
|
void Gfx_BindIb(GfxResourceID ib) { }
|
||||||
@ -172,6 +172,8 @@ void Gfx_SetDynamicVbData(GfxResourceID vb, void* vertices, int vCount) {
|
|||||||
//dcache_flush_range(vertices, vCount * gfx_stride);
|
//dcache_flush_range(vertices, vCount * gfx_stride);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Gfx_DeleteDynamicVb(GfxResourceID* vb) { Gfx_DeleteVb(vb); }
|
||||||
|
|
||||||
|
|
||||||
/*########################################################################################################################*
|
/*########################################################################################################################*
|
||||||
*---------------------------------------------------------Textures--------------------------------------------------------*
|
*---------------------------------------------------------Textures--------------------------------------------------------*
|
||||||
|
@ -340,6 +340,8 @@ void Gfx_SetDynamicVbData(GfxResourceID vb, void* vertices, int vCount) {
|
|||||||
DCFlushRange(vertices, vCount * gfx_stride);
|
DCFlushRange(vertices, vCount * gfx_stride);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Gfx_DeleteDynamicVb(GfxResourceID* vb) { Gfx_DeleteVb(vb); }
|
||||||
|
|
||||||
|
|
||||||
/*########################################################################################################################*
|
/*########################################################################################################################*
|
||||||
*-----------------------------------------------------State management----------------------------------------------------*
|
*-----------------------------------------------------State management----------------------------------------------------*
|
||||||
|
@ -114,13 +114,12 @@ Platform_LogConst("GFX END");
|
|||||||
/*########################################################################################################################*
|
/*########################################################################################################################*
|
||||||
*---------------------------------------------------------Textures--------------------------------------------------------*
|
*---------------------------------------------------------Textures--------------------------------------------------------*
|
||||||
*#########################################################################################################################*/
|
*#########################################################################################################################*/
|
||||||
|
|
||||||
typedef struct CCTexture {
|
typedef struct CCTexture {
|
||||||
surface_t surface;
|
surface_t surface;
|
||||||
GLuint textureID;
|
GLuint textureID;
|
||||||
} CCTexture;
|
} CCTexture;
|
||||||
|
|
||||||
GfxResourceID Gfx_CreateTexture(struct Bitmap* bmp, cc_uint8 flags, cc_bool mipmaps) {
|
static GfxResourceID Gfx_AllocTexture(struct Bitmap* bmp, cc_uint8 flags, cc_bool mipmaps) {
|
||||||
Platform_Log2("make texture %i x %i", &bmp->width, &bmp->height);
|
Platform_Log2("make texture %i x %i", &bmp->width, &bmp->height);
|
||||||
if (bmp->width > 32 || bmp->height > 32) return NULL;
|
if (bmp->width > 32 || bmp->height > 32) return NULL;
|
||||||
|
|
||||||
@ -266,8 +265,8 @@ void Gfx_BindIb(GfxResourceID ib) { }
|
|||||||
void Gfx_DeleteIb(GfxResourceID* ib) { }
|
void Gfx_DeleteIb(GfxResourceID* ib) { }
|
||||||
|
|
||||||
|
|
||||||
GfxResourceID Gfx_CreateVb(VertexFormat fmt, int count) {
|
static GfxResourceID Gfx_AllocStaticVb(VertexFormat fmt, int count) {
|
||||||
return Mem_Alloc(count, strideSizes[fmt], "GFX VB");
|
return Mem_TryAlloc(count, strideSizes[fmt]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Gfx_BindVb(GfxResourceID vb) { gfx_vertices = vb; }
|
void Gfx_BindVb(GfxResourceID vb) { gfx_vertices = vb; }
|
||||||
@ -288,10 +287,12 @@ void Gfx_UnlockVb(GfxResourceID vb) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
GfxResourceID Gfx_CreateDynamicVb(VertexFormat fmt, int maxVertices) {
|
static GfxResourceID Gfx_AllocDynamicVb(VertexFormat fmt, int maxVertices) {
|
||||||
return Mem_Alloc(maxVertices, strideSizes[fmt], "GFX VB");
|
return Mem_TryAlloc(maxVertices, strideSizes[fmt]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Gfx_BindDynamicVb(GfxResourceID vb) { Gfx_BindVb(vb); }
|
||||||
|
|
||||||
void* Gfx_LockDynamicVb(GfxResourceID vb, VertexFormat fmt, int count) {
|
void* Gfx_LockDynamicVb(GfxResourceID vb, VertexFormat fmt, int count) {
|
||||||
vb_size = count * strideSizes[fmt];
|
vb_size = count * strideSizes[fmt];
|
||||||
return vb;
|
return vb;
|
||||||
@ -306,6 +307,8 @@ void Gfx_SetDynamicVbData(GfxResourceID vb, void* vertices, int vCount) {
|
|||||||
Mem_Copy(vb, vertices, vCount * gfx_stride);
|
Mem_Copy(vb, vertices, vCount * gfx_stride);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Gfx_DeleteDynamicVb(GfxResourceID* vb) { Gfx_DeleteVb(vb); }
|
||||||
|
|
||||||
|
|
||||||
/*########################################################################################################################*
|
/*########################################################################################################################*
|
||||||
*-----------------------------------------------------State management----------------------------------------------------*
|
*-----------------------------------------------------State management----------------------------------------------------*
|
||||||
|
@ -556,6 +556,8 @@ void Gfx_SetDynamicVbData(GfxResourceID vb, void* vertices, int vCount) {
|
|||||||
rsxInvalidateVertexCache(context); // TODO needed?
|
rsxInvalidateVertexCache(context); // TODO needed?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Gfx_DeleteDynamicVb(GfxResourceID* vb) { Gfx_DeleteVb(vb); }
|
||||||
|
|
||||||
|
|
||||||
/*########################################################################################################################*
|
/*########################################################################################################################*
|
||||||
*---------------------------------------------------------Textures--------------------------------------------------------*
|
*---------------------------------------------------------Textures--------------------------------------------------------*
|
||||||
|
@ -329,6 +329,8 @@ void Gfx_SetDynamicVbData(GfxResourceID vb, void* vertices, int vCount) {
|
|||||||
sceKernelDcacheWritebackInvalidateRange(vertices, vCount * gfx_stride);
|
sceKernelDcacheWritebackInvalidateRange(vertices, vCount * gfx_stride);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Gfx_DeleteDynamicVb(GfxResourceID* vb) { Gfx_DeleteVb(vb); }
|
||||||
|
|
||||||
|
|
||||||
/*########################################################################################################################*
|
/*########################################################################################################################*
|
||||||
*-----------------------------------------------------State management----------------------------------------------------*
|
*-----------------------------------------------------State management----------------------------------------------------*
|
||||||
|
@ -930,6 +930,8 @@ void Gfx_SetDynamicVbData(GfxResourceID vb, void* vertices, int vCount) {
|
|||||||
Gfx_BindVb(vb);
|
Gfx_BindVb(vb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Gfx_DeleteDynamicVb(GfxResourceID* vb) { Gfx_DeleteVb(vb); }
|
||||||
|
|
||||||
|
|
||||||
/*########################################################################################################################*
|
/*########################################################################################################################*
|
||||||
*-----------------------------------------------------State management----------------------------------------------------*
|
*-----------------------------------------------------State management----------------------------------------------------*
|
||||||
|
@ -466,6 +466,8 @@ void Gfx_SetDynamicVbData(GfxResourceID vb, void* vertices, int vCount) {
|
|||||||
Gfx_BindVb(vb);
|
Gfx_BindVb(vb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Gfx_DeleteDynamicVb(GfxResourceID* vb) { Gfx_DeleteVb(vb); }
|
||||||
|
|
||||||
|
|
||||||
/*########################################################################################################################*
|
/*########################################################################################################################*
|
||||||
*-----------------------------------------------------State management----------------------------------------------------*
|
*-----------------------------------------------------State management----------------------------------------------------*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user