mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-01-22 09:01:57 -05:00
Expand supported systems in readme, and also change dreamcast joystick camera movement to scale depending on elapsed time
This commit is contained in:
parent
fc82185bc6
commit
8217c46634
4 changed files with 71 additions and 42 deletions
40
readme.md
40
readme.md
|
@ -1,8 +1,36 @@
|
|||
ClassiCube is a custom Minecraft Classic compatible client written in C that works on Windows, macOS, Linux, iOS, Android, FreeBSD, NetBSD, OpenBSD, Solaris, Haiku, IRIX, SerenityOS, BeOS, 3DS (unfinished), PSP (unfinished), GameCube (unfinished), Wii (unfinished), PS Vita (unfinished), Xbox (unfinished), Dreamcast (unfinished), and in a web browser.<br>
|
||||
ClassiCube is a custom Minecraft Classic compatible client written in C from scratch.<br>
|
||||
**It is not affiliated with (or supported by) Mojang AB, Minecraft, or Microsoft in any way.**
|
||||
|
||||
![screenshot_n](http://i.imgur.com/FCiwl27.png)
|
||||
|
||||
### Supported systems
|
||||
|
||||
ClassiCube runs on:
|
||||
* Windows - 95 and later
|
||||
* macOS - 10.5 or later (but can be compiled to work with 10.3/10.4 though)
|
||||
* Linux - needs `libcurl` and `libopenal`
|
||||
* Android - 2.3 or later
|
||||
* iOS - 10.3 or later
|
||||
* Most web browsers (even runs on IE11)
|
||||
|
||||
And also runs on:
|
||||
* Raspberry Pi - needs `libcurl` and `libopenal`
|
||||
* FreeBSD - needs `libexecinfo`, `curl` and `openal-soft` packagea
|
||||
* NetBSD - needs `libexecinfo`, `curl` and `openal-soft` packages
|
||||
* OpenBSD - needs `libexecinfo`, `curl` and `openal` packages
|
||||
* Solaris - needs `curl` and `openal` packages
|
||||
* Haiku - needs `openal` package
|
||||
* BeOS - untested on actual hardware
|
||||
* IRIX - needs `curl` and `openal` packages
|
||||
* SerenityOS - needs SDL2
|
||||
* 3DS - unfinished, but [usable](https://github.com/UnknownShadow200/ClassiCube/actions/workflows/build_3ds.yml)
|
||||
* Wii - unfinished, but [usable](https://github.com/UnknownShadow200/ClassiCube/actions/workflows/build_wiigc.yml)
|
||||
* GameCube - unfinished, but [usable](https://github.com/UnknownShadow200/ClassiCube/actions/workflows/build_wiigc.yml)
|
||||
* PSP - unfinished, rendering issues
|
||||
* Dreamcast - unfinished, but renders
|
||||
* PS Vita - majorly unfinished
|
||||
* Xbox - majorly unfinished
|
||||
|
||||
You can download ClassiCube [from here](https://www.classicube.net/download/) and the very latest builds [from here](https://www.classicube.net/nightlies/).
|
||||
|
||||
### We need your help
|
||||
|
@ -25,12 +53,6 @@ If you're interested in documenting or verifying the behaviour of the original M
|
|||
* It does not have a survival mode (nor will such a mode be added)
|
||||
* It does not support logging in with Mojang/Minecraft accounts
|
||||
|
||||
#### System requirements
|
||||
* Windows: 95 or later
|
||||
* macOS: 10.5 or later (can be compiled to work with 10.3/10.4 though)
|
||||
* Linux: libcurl and libopenal
|
||||
* Android: 2.3 or later
|
||||
|
||||
**Note:** When running from within VirtualBox, disable Mouse Integration, otherwise the camera will not work properly
|
||||
|
||||
#### Instructions
|
||||
|
@ -285,7 +307,9 @@ Further information (e.g. style) for ClassiCube's source code can be found in th
|
|||
* [citro3D](https://github.com/devkitPro/citro3d) - Rendering backend for 3DS
|
||||
* [Citra](https://github.com/citra-emu/citra) - Emulator used to test 3DS port
|
||||
* [pspsdk](https://github.com/pspdev/pspsdk) - Backend for PSP
|
||||
* [PPSSPP](https://github.com/hrydgard/ppsspp) - Emulator used to test 3DS port
|
||||
* [PPSSPP](https://github.com/hrydgard/ppsspp) - Emulator used to test PSP port
|
||||
* [vitasdk](https://github.com/vitasdk) - Backend for PS Vita
|
||||
* [Vita3K](https://github.com/Vita3K/Vita3K) - Emulator used to test Vita port
|
||||
* [libogc](https://github.com/devkitPro/libogc) - Backend for Wii and GameCube
|
||||
* [libfat](https://github.com/devkitPro/libfat) - Filesystem backend for Wii/GC
|
||||
* [Dolphin](https://github.com/dolphin-emu/dolphin) - Emulator used to test Wii/GC port
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#include "GL/glext.h"
|
||||
#include <malloc.h>
|
||||
|
||||
#define TRANSFER_FORMAT GL_UNSIGNED_BYTE
|
||||
/* Current format and size of vertices */
|
||||
static int gfx_stride, gfx_format = -1;
|
||||
static cc_bool renderingDisabled;
|
||||
|
@ -45,14 +44,14 @@ void Gfx_SetFaceCulling(cc_bool enabled) { gl_Toggle(GL_CULL_FACE); }
|
|||
void Gfx_SetAlphaBlending(cc_bool enabled) { gl_Toggle(GL_BLEND); }
|
||||
void Gfx_SetAlphaArgBlend(cc_bool enabled) { }
|
||||
|
||||
static void GL_ClearColor(PackedCol color) {
|
||||
glClearColor(PackedCol_R(color) / 255.0f, PackedCol_G(color) / 255.0f,
|
||||
PackedCol_B(color) / 255.0f, PackedCol_A(color) / 255.0f);
|
||||
}
|
||||
void Gfx_ClearCol(PackedCol color) {
|
||||
if (color == gfx_clearColor) return;
|
||||
GL_ClearColor(color);
|
||||
gfx_clearColor = color;
|
||||
|
||||
float r = PackedCol_R(color) / 255.0f;
|
||||
float g = PackedCol_G(color) / 255.0f;
|
||||
float b = PackedCol_B(color) / 255.0f;
|
||||
pvr_set_bg_color(r, g, b);
|
||||
}
|
||||
|
||||
void Gfx_SetColWriteMask(cc_bool r, cc_bool g, cc_bool b, cc_bool a) {
|
||||
|
@ -67,10 +66,8 @@ void Gfx_SetTexturing(cc_bool enabled) { }
|
|||
void Gfx_SetAlphaTest(cc_bool enabled) { gl_Toggle(GL_ALPHA_TEST); }
|
||||
|
||||
void Gfx_DepthOnlyRendering(cc_bool depthOnly) {
|
||||
// don't need a fake second pass in this case
|
||||
renderingDisabled = depthOnly;
|
||||
|
||||
cc_bool enabled = !depthOnly;
|
||||
gl_Toggle(GL_TEXTURE_2D);
|
||||
}
|
||||
|
||||
|
||||
|
@ -134,8 +131,8 @@ void Gfx_SetFpsLimit(cc_bool vsync, float minFrameMs) {
|
|||
}
|
||||
|
||||
void Gfx_BeginFrame(void) { }
|
||||
void Gfx_Clear(void) {
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
void Gfx_Clear(void) {
|
||||
// no need to use glClear
|
||||
}
|
||||
|
||||
void Gfx_EndFrame(void) {
|
||||
|
@ -159,6 +156,7 @@ static int vb_size;
|
|||
|
||||
GfxResourceID Gfx_CreateIb2(int count, Gfx_FillIBFunc fillFunc, void* obj) {
|
||||
fillFunc(gfx_indices, count, obj);
|
||||
return 1;
|
||||
}
|
||||
|
||||
void Gfx_BindIb(GfxResourceID ib) { }
|
||||
|
@ -276,7 +274,7 @@ void Gfx_DeleteTexture(GfxResourceID* texId) {
|
|||
*texId = 0;
|
||||
}
|
||||
|
||||
void Gfx_EnableMipmaps(void) { }
|
||||
void Gfx_EnableMipmaps(void) { }
|
||||
void Gfx_DisableMipmaps(void) { }
|
||||
|
||||
|
||||
|
@ -284,8 +282,8 @@ void Gfx_DisableMipmaps(void) { }
|
|||
*-----------------------------------------------------State management----------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
static PackedCol gfx_fogColor;
|
||||
static float gfx_fogEnd = -1.0f, gfx_fogDensity = -1.0f;
|
||||
static int gfx_fogMode = -1;
|
||||
static float gfx_fogEnd = 16.0f, gfx_fogDensity = 1.0f;
|
||||
static FogFunc gfx_fogMode = -1;
|
||||
|
||||
void Gfx_SetFog(cc_bool enabled) {
|
||||
gfx_fogEnabled = enabled;
|
||||
|
@ -293,36 +291,42 @@ void Gfx_SetFog(cc_bool enabled) {
|
|||
}
|
||||
|
||||
void Gfx_SetFogCol(PackedCol color) {
|
||||
float rgba[4];
|
||||
if (color == gfx_fogColor) return;
|
||||
|
||||
rgba[0] = PackedCol_R(color) / 255.0f;
|
||||
rgba[1] = PackedCol_G(color) / 255.0f;
|
||||
rgba[2] = PackedCol_B(color) / 255.0f;
|
||||
rgba[3] = PackedCol_A(color) / 255.0f;
|
||||
|
||||
glFogfv(GL_FOG_COLOR, rgba);
|
||||
gfx_fogColor = color;
|
||||
|
||||
float r = PackedCol_R(color) / 255.0f;
|
||||
float g = PackedCol_G(color) / 255.0f;
|
||||
float b = PackedCol_B(color) / 255.0f;
|
||||
float a = PackedCol_A(color) / 255.0f;
|
||||
|
||||
pvr_fog_table_color(a, r, g, b);
|
||||
}
|
||||
static void UpdateFog(void) {
|
||||
if (gfx_fogMode == FOG_LINEAR) {
|
||||
pvr_fog_table_linear(0.0f, gfx_fogEnd);
|
||||
} else if (gfx_fogMode == FOG_EXP) {
|
||||
pvr_fog_table_exp(gfx_fogDensity);
|
||||
} else if (gfx_fogMode == FOG_EXP2) {
|
||||
pvr_fog_table_exp2(gfx_fogDensity);
|
||||
}
|
||||
}
|
||||
|
||||
void Gfx_SetFogDensity(float value) {
|
||||
if (value == gfx_fogDensity) return;
|
||||
glFogf(GL_FOG_DENSITY, value);
|
||||
gfx_fogDensity = value;
|
||||
UpdateFog();
|
||||
}
|
||||
|
||||
void Gfx_SetFogEnd(float value) {
|
||||
if (value == gfx_fogEnd) return;
|
||||
glFogf(GL_FOG_END, value);
|
||||
gfx_fogEnd = value;
|
||||
UpdateFog();
|
||||
}
|
||||
|
||||
void Gfx_SetFogMode(FogFunc func) {
|
||||
static GLint modes[] = { GL_LINEAR, GL_EXP, GL_EXP2 };
|
||||
if (func == gfx_fogMode) return;
|
||||
|
||||
glFogi(GL_FOG_MODE, modes[func]);
|
||||
gfx_fogMode = func;
|
||||
UpdateFog();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -76,22 +76,23 @@ static void HandleButtons(int mods) {
|
|||
Input_SetNonRepeatable(CCPAD_DOWN, mods & CONT_DPAD_DOWN);
|
||||
}
|
||||
|
||||
static void HandleController(cont_state_t* state) {
|
||||
static void HandleController(cont_state_t* state, double delta) {
|
||||
Input_SetNonRepeatable(CCPAD_L, state->ltrig > 10);
|
||||
Input_SetNonRepeatable(CCPAD_R, state->rtrig > 10);
|
||||
// TODO CONT_Z, joysticks
|
||||
// TODO: verify values are right
|
||||
|
||||
if (Input.RawMode) {
|
||||
float scale = (delta * 60.0) / 8.0f;
|
||||
int dx = state->joyx, dy = state->joyy;
|
||||
if (Math_AbsI(dx) <= 8) dx = 0;
|
||||
if (Math_AbsI(dy) <= 8) dy = 0;
|
||||
|
||||
Event_RaiseRawMove(&PointerEvents.RawMoved, dx / 8.0f, dy / 8.0f);
|
||||
Event_RaiseRawMove(&PointerEvents.RawMoved, dx * scale, dy * scale);
|
||||
}
|
||||
}
|
||||
|
||||
static void ProcessControllerInput(void) {
|
||||
static void ProcessControllerInput(double delta) {
|
||||
maple_device_t* cont;
|
||||
cont_state_t* state;
|
||||
|
||||
|
@ -101,11 +102,11 @@ static void ProcessControllerInput(void) {
|
|||
if (!state) return;
|
||||
|
||||
HandleButtons(state->buttons);
|
||||
HandleController(state);
|
||||
HandleController(state, delta);
|
||||
}
|
||||
|
||||
void Window_ProcessEvents(double delta) {
|
||||
ProcessControllerInput();
|
||||
ProcessControllerInput(delta);
|
||||
}
|
||||
|
||||
void Cursor_SetPosition(int x, int y) { } /* TODO: Dreamcast mouse support */
|
||||
|
|
|
@ -164,7 +164,7 @@ static cc_result GetMachineID(cc_uint32* key);
|
|||
|
||||
cc_result Platform_Encrypt(const void* data, int len, cc_string* dst) {
|
||||
const cc_uint8* src = (const cc_uint8*)data;
|
||||
cc_uint32 header[4], key[4];
|
||||
cc_uint32 header[4], key[4] = { 0 };
|
||||
cc_result res;
|
||||
if ((res = GetMachineID(key))) return res;
|
||||
|
||||
|
@ -183,7 +183,7 @@ cc_result Platform_Encrypt(const void* data, int len, cc_string* dst) {
|
|||
|
||||
cc_result Platform_Decrypt(const void* data, int len, cc_string* dst) {
|
||||
const cc_uint8* src = (const cc_uint8*)data;
|
||||
cc_uint32 header[4], key[4];
|
||||
cc_uint32 header[4], key[4] = { 0 };
|
||||
cc_result res;
|
||||
int dataLen;
|
||||
|
||||
|
|
Loading…
Reference in a new issue