mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-18 12:05:14 -04:00
Transfer repository to ClassiCube organization
Dreamcast: Also fix loading messages being trimmed
This commit is contained in:
parent
c74151e289
commit
89725e4676
@ -2,7 +2,7 @@ This document details how to compile a basic plugin in Visual Studio, MinGW, or
|
|||||||
|
|
||||||
To find the functions and variables available for use in plugins, look for `CC_API`/`CC_VAR` in the .h files.
|
To find the functions and variables available for use in plugins, look for `CC_API`/`CC_VAR` in the .h files.
|
||||||
|
|
||||||
[Source code of some actual plugins](https://github.com/UnknownShadow200/ClassiCube-Plugins/)
|
[Source code of some actual plugins](https://github.com/ClassiCube/ClassiCube-Plugins/)
|
||||||
|
|
||||||
### Setup
|
### Setup
|
||||||
|
|
||||||
@ -253,7 +253,7 @@ To avoid this problem, you must
|
|||||||
1) Stop linking to `ClassiCube` (e.g. for `MinGW`, remove the ` -L . -lClassiCube`)
|
1) Stop linking to `ClassiCube` (e.g. for `MinGW`, remove the ` -L . -lClassiCube`)
|
||||||
2) Load all functions and variables exported from ClassiCube via `GetProcAddress` instead
|
2) Load all functions and variables exported from ClassiCube via `GetProcAddress` instead
|
||||||
|
|
||||||
This is somewhat tedious to do - see [here](https://github.com/UnknownShadow200/ClassiCube-Plugins/) for some examples of plugins which do this
|
This is somewhat tedious to do - see [here](https://github.com/ClassiCube/ClassiCube-Plugins/) for some examples of plugins which do this
|
||||||
|
|
||||||
#### Compiling ultra small plugin DLLs - MinGW
|
#### Compiling ultra small plugin DLLs - MinGW
|
||||||
If you **ONLY** use code from the game (no external libraries and no C standard library functions):
|
If you **ONLY** use code from the game (no external libraries and no C standard library functions):
|
||||||
|
@ -238,7 +238,7 @@ build_ios() {
|
|||||||
# ----------------------------- driver
|
# ----------------------------- driver
|
||||||
cd $ROOT_DIR/src/
|
cd $ROOT_DIR/src/
|
||||||
echo $PWD
|
echo $PWD
|
||||||
git pull https://github.com/UnknownShadow200/ClassiCube.git
|
git pull https://github.com/ClassiCube/ClassiCube.git
|
||||||
git fetch --all
|
git fetch --all
|
||||||
git reset --hard origin/master
|
git reset --hard origin/master
|
||||||
LATEST=$(git rev-parse --short HEAD)
|
LATEST=$(git rev-parse --short HEAD)
|
||||||
|
@ -10,7 +10,7 @@ then
|
|||||||
echo "CCicon.png exists already. Skipping download."
|
echo "CCicon.png exists already. Skipping download."
|
||||||
else
|
else
|
||||||
echo "CCicon.png doesn't exist. Attempting to download it.."
|
echo "CCicon.png doesn't exist. Attempting to download it.."
|
||||||
wget "https://raw.githubusercontent.com/UnknownShadow200/classicube/master/misc/CCicon.png"
|
wget "https://raw.githubusercontent.com/ClassiCube/classicube/master/misc/CCicon.png"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# create ClassiCube desktop entry
|
# create ClassiCube desktop entry
|
||||||
|
10
readme.md
10
readme.md
@ -64,11 +64,11 @@ ClassiCube runs on:
|
|||||||
|
|
||||||
And also runs on:
|
And also runs on:
|
||||||
* Raspberry Pi - needs <code>libcurl</code> and <code>libopenal</code>
|
* Raspberry Pi - needs <code>libcurl</code> and <code>libopenal</code>
|
||||||
* FreeBSD - needs <code>libexecinfo</code>, <code>curl</code> and <code>openal-soft</code> packages (if you have a GitHub account, can [download from here](https://github.com/UnknownShadow200/ClassiCube/actions/workflows/build_freebsd.yml))
|
* FreeBSD - needs <code>libexecinfo</code>, <code>curl</code> and <code>openal-soft</code> packages (if you have a GitHub account, can [download from here](https://github.com/ClassiCube/ClassiCube/actions/workflows/build_freebsd.yml))
|
||||||
* NetBSD - needs <code>libexecinfo</code>, <code>curl</code> and <code>openal-soft</code> packages (if you have a GitHub account, can [download from here](https://github.com/UnknownShadow200/ClassiCube/actions/workflows/build_netbsd.yml))
|
* NetBSD - needs <code>libexecinfo</code>, <code>curl</code> and <code>openal-soft</code> packages (if you have a GitHub account, can [download from here](https://github.com/ClassiCube/ClassiCube/actions/workflows/build_netbsd.yml))
|
||||||
* OpenBSD - needs <code>libexecinfo</code>, <code>curl</code> and <code>openal</code> packages
|
* OpenBSD - needs <code>libexecinfo</code>, <code>curl</code> and <code>openal</code> packages
|
||||||
* Solaris - needs <code>curl</code> and <code>openal</code> packages
|
* Solaris - needs <code>curl</code> and <code>openal</code> packages
|
||||||
* Haiku - needs <code>openal</code> package (if you have a GitHub account, can [download from here](https://github.com/UnknownShadow200/ClassiCube/actions/workflows/build_haiku.yml))
|
* Haiku - needs <code>openal</code> package (if you have a GitHub account, can [download from here](https://github.com/ClassiCube/ClassiCube/actions/workflows/build_haiku.yml))
|
||||||
* BeOS - untested on actual hardware
|
* BeOS - untested on actual hardware
|
||||||
* IRIX - needs <code>curl</code> and <code>openal</code> packages
|
* IRIX - needs <code>curl</code> and <code>openal</code> packages
|
||||||
* SerenityOS - needs <code>SDL2</code>
|
* SerenityOS - needs <code>SDL2</code>
|
||||||
@ -80,8 +80,8 @@ And also runs on:
|
|||||||
* PS Vita - unfinished, rendering issues (can [download from here](https://www.classicube.net/download/vita))
|
* PS Vita - unfinished, rendering issues (can [download from here](https://www.classicube.net/download/vita))
|
||||||
* Xbox - unfinished, major rendering issues (can [download from here](https://www.classicube.net/download/xbox), **untested on real hardware**)
|
* Xbox - unfinished, major rendering issues (can [download from here](https://www.classicube.net/download/xbox), **untested on real hardware**)
|
||||||
* PS3 - unfinished, rendering issues (can [download from here](https://www.classicube.net/download/ps3), **usually outdated**)
|
* PS3 - unfinished, rendering issues (can [download from here](https://www.classicube.net/download/ps3), **usually outdated**)
|
||||||
* Nintendo 64 - unfinished, moderate rendering issues (if you have a GitHub account, can [download from here](https://github.com/UnknownShadow200/ClassiCube/actions/workflows/build_n64.yml))
|
* Nintendo 64 - unfinished, moderate rendering issues (if you have a GitHub account, can [download from here](https://github.com/ClassiCube/ClassiCube/actions/workflows/build_n64.yml))
|
||||||
* PS2 - unfinished, major rendering and **stability issues** (if you have a GitHub account, can [download from here](https://github.com/UnknownShadow200/ClassiCube/actions/workflows/build_ps2.yml))
|
* PS2 - unfinished, major rendering and **stability issues** (if you have a GitHub account, can [download from here](https://github.com/ClassiCube/ClassiCube/actions/workflows/build_ps2.yml))
|
||||||
|
|
||||||
# Compiling
|
# Compiling
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include "ExtMath.h"
|
#include "ExtMath.h"
|
||||||
#include "Vectors.h"
|
#include "Vectors.h"
|
||||||
/* Implements flatgrass map generator, and original classic vanilla map generation (with perlin noise)
|
/* Implements flatgrass map generator, and original classic vanilla map generation (with perlin noise)
|
||||||
Based on: https://github.com/UnknownShadow200/ClassiCube/wiki/Minecraft-Classic-map-generation-algorithm
|
Based on: https://github.com/ClassiCube/ClassiCube/wiki/Minecraft-Classic-map-generation-algorithm
|
||||||
Thanks to Jerralish for originally reverse engineering classic's algorithm, then preparing a high level overview of the algorithm.
|
Thanks to Jerralish for originally reverse engineering classic's algorithm, then preparing a high level overview of the algorithm.
|
||||||
Copyright 2014-2023 ClassiCube | Licensed under BSD-3
|
Copyright 2014-2023 ClassiCube | Licensed under BSD-3
|
||||||
*/
|
*/
|
||||||
|
@ -46,20 +46,22 @@ cc_uint64 Stopwatch_Measure(void) {
|
|||||||
|
|
||||||
static uint32 str_offset;
|
static uint32 str_offset;
|
||||||
extern cc_bool window_inited;
|
extern cc_bool window_inited;
|
||||||
|
#define MAX_ONSCREEN_LINES 20
|
||||||
|
|
||||||
static void LogOnscreen(const char* msg, int len) {
|
static void LogOnscreen(const char* msg, int len) {
|
||||||
char buffer[40];
|
char buffer[50];
|
||||||
cc_string str;
|
cc_string str;
|
||||||
uint32 secs, ms;
|
uint32 secs, ms;
|
||||||
timer_ms_gettime(&secs, &ms);
|
timer_ms_gettime(&secs, &ms);
|
||||||
|
|
||||||
String_InitArray_NT(str, buffer);
|
String_InitArray_NT(str, buffer);
|
||||||
String_Format2(&str,"[%i.%i] ", &secs, &ms);
|
String_Format2(&str, "[%p2.%p3] ", &secs, &ms);
|
||||||
String_AppendAll(&str, msg, len);
|
String_AppendAll(&str, msg, len);
|
||||||
buffer[str.length] = '\0';
|
buffer[str.length] = '\0';
|
||||||
|
|
||||||
uint32 line_offset = (10 + (str_offset * BFONT_HEIGHT)) * vid_mode->width;
|
uint32 line_offset = (10 + (str_offset * BFONT_HEIGHT)) * vid_mode->width;
|
||||||
bfont_draw_str(vram_s + line_offset, vid_mode->width, 1, buffer);
|
bfont_draw_str(vram_s + line_offset, vid_mode->width, 1, buffer);
|
||||||
str_offset = (str_offset + 1) % 20;
|
str_offset = (str_offset + 1) % MAX_ONSCREEN_LINES;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Platform_Log(const char* msg, int len) {
|
void Platform_Log(const char* msg, int len) {
|
||||||
@ -475,7 +477,7 @@ static void InitModem(void) {
|
|||||||
}
|
}
|
||||||
ppp_init();
|
ppp_init();
|
||||||
|
|
||||||
Platform_LogConst("Dialling modem.. (can take around 20 seconds)");
|
Platform_LogConst("Dialling modem.. (can take ~20 seconds)");
|
||||||
err = ppp_modem_init("111111111111", 0, NULL);
|
err = ppp_modem_init("111111111111", 0, NULL);
|
||||||
if (err) {
|
if (err) {
|
||||||
Platform_Log1("Establishing link failed (%i)", &err); return;
|
Platform_Log1("Establishing link failed (%i)", &err); return;
|
||||||
@ -483,7 +485,7 @@ static void InitModem(void) {
|
|||||||
|
|
||||||
ppp_set_login("dream", "dreamcast");
|
ppp_set_login("dream", "dreamcast");
|
||||||
|
|
||||||
Platform_LogConst("Connecting link.. (can take around 20 seconds)");
|
Platform_LogConst("Connecting link.. (can take ~20 seconds)");
|
||||||
err = ppp_connect();
|
err = ppp_connect();
|
||||||
if (err) {
|
if (err) {
|
||||||
Platform_Log1("Connecting link failed (%i)", &err); return;
|
Platform_Log1("Connecting link failed (%i)", &err); return;
|
||||||
|
@ -320,6 +320,6 @@ void Gfx_OnWindowResize(void) {
|
|||||||
/* Normally this doesn't matter, but it does when game is compiled against recent */
|
/* Normally this doesn't matter, but it does when game is compiled against recent */
|
||||||
/* macOS SDK *and* the display is a high DPI display - where glViewport(width, height) */
|
/* macOS SDK *and* the display is a high DPI display - where glViewport(width, height) */
|
||||||
/* above would otherwise result in game rendering to only 1/4 of the screen */
|
/* above would otherwise result in game rendering to only 1/4 of the screen */
|
||||||
/* https://github.com/UnknownShadow200/ClassiCube/issues/888 */
|
/* https://github.com/ClassiCube/ClassiCube/issues/888 */
|
||||||
GLContext_Update();
|
GLContext_Update();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user