Change console links in readme to classicube.net pages

This commit is contained in:
UnknownShadow200 2023-11-30 07:20:30 +11:00
parent bc11c84206
commit 677edba22e
4 changed files with 19 additions and 10 deletions

View file

@ -3,7 +3,7 @@
ClassiCube uses a custom string type rather than the standard C `char*` string in most places
ClassiCube strings (`cc_string`) are a struct with the following fields:
- `buffer` -> Pointer to 8 bit characters (unsigned code page 437 indices)
- `buffer` -> Pointer to 8 bit characters (unsigned [code page 437 indices](https://en.wikipedia.org/wiki/Code_page_437#Character_set))
- `length` -> Number of characters currently used
- `capacity` -> Maximum number of characters (i.e buffer size)

View file

@ -75,14 +75,14 @@ And also runs on:
* BeOS - untested on actual hardware
* IRIX - needs <code>curl</code> and <code>openal</code> packages
* SerenityOS - needs <code>SDL2</code>
* 3DS - unfinished, but usable (if you have a GitHub account, can [download from here](https://github.com/UnknownShadow200/ClassiCube/actions/workflows/build_3ds.yml))
* Wii - unfinished, but usable (if you have a GitHub account, can [download from here](https://github.com/UnknownShadow200/ClassiCube/actions/workflows/build_wiigc.yml))
* GameCube - unfinished, but usable (if you have a GitHub account, can [download from here](https://github.com/UnknownShadow200/ClassiCube/actions/workflows/build_wiigc.yml))
* Dreamcast - unfinished, but renders (if you have a GitHub account, can [download from here](https://github.com/UnknownShadow200/ClassiCube/actions/workflows/build_dreamcast.yml))
* PSP - unfinished, rendering issues (if you have a GitHub account, can [download from here](https://github.com/UnknownShadow200/ClassiCube/actions/workflows/build_psp.yml))
* PS Vita - unfinished, rendering issues (if you have a GitHub account, can [download from here](https://github.com/UnknownShadow200/ClassiCube/actions/workflows/build_vita.yml))
* Xbox - unfinished, major rendering issues (if you have a GitHub account, can [download from here](https://github.com/UnknownShadow200/ClassiCube/actions/workflows/build_xbox.yml))
* PS3 - unfinished, rendering issues
* 3DS - unfinished, but usable (can [download from here](https://www.classicube.net/download/3ds))
* Wii - unfinished, but usable (can [download from here](https://www.classicube.net/download/wii))
* GameCube - unfinished, but usable (can [download from here](https://www.classicube.net/download/gamecube))
* Dreamcast - unfinished, but renders (can [download from here](https://www.classicube.net/download/dreamcast))
* PSP - unfinished, rendering issues (can [download from here](https://www.classicube.net/download/psp), **untested on real hardware**)
* PS Vita - unfinished, rendering issues (can [download from here](https://www.classicube.net/download/vita), **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/xbox), **untested on real hardware**)
* Nintendo 64 - unfinished, major rendering issues
# Compiling

View file

@ -81,10 +81,13 @@ enum PngFilter {
typedef void (*Png_RowExpander)(int width, BitmapCol* palette, cc_uint8* src, BitmapCol* dst);
static const cc_uint8 pngSig[PNG_SIG_SIZE] = { 137, 80, 78, 71, 13, 10, 26, 10 };
/* 5.2 PNG signature */
cc_bool Png_Detect(const cc_uint8* data, cc_uint32 len) {
return len >= PNG_SIG_SIZE && Mem_Equal(data, pngSig, PNG_SIG_SIZE);
}
/* 9 Filtering */
/* 13.9 Filtering */
static void Png_Reconstruct(cc_uint8 type, cc_uint8 bytesPerPixel, cc_uint8* line, cc_uint8* prior, cc_uint32 lineLen) {
cc_uint32 i, j;
switch (type) {
@ -134,6 +137,7 @@ static void Png_Reconstruct(cc_uint8 type, cc_uint8 bytesPerPixel, cc_uint8* lin
#define Bitmap_Set(dst, r,g,b,a) dst = BitmapCol_Make(r, g, b, a);
/* 7.2 Scanlines */
#define PNG_Do_Grayscale(dstI, src, scale) rgb = (src) * scale; Bitmap_Set(dst[dstI], rgb, rgb, rgb, 255);
#define PNG_Do_Grayscale_8(dstI, srcI) rgb = src[srcI]; Bitmap_Set(dst[dstI], rgb, rgb, rgb, 255);
#define PNG_Do_Grayscale_A__8(dstI, srcI) rgb = src[srcI]; Bitmap_Set(dst[dstI], rgb, rgb, rgb, src[srcI + 1]);
@ -380,6 +384,7 @@ cc_result Png_Decode(struct Bitmap* bmp, struct Stream* stream) {
fourCC = Stream_GetU32_BE(tmp + 4);
switch (fourCC) {
/* 11.2.2 IHDR Image header */
case PNG_FourCC('I','H','D','R'): {
if (dataSize != PNG_IHDR_SIZE) return PNG_ERR_INVALID_HDR_SIZE;
res = Stream_Read(stream, tmp, PNG_IHDR_SIZE);
@ -406,6 +411,7 @@ cc_result Png_Decode(struct Bitmap* bmp, struct Stream* stream) {
scanlineBytes = scanlineSize + 1; /* Add 1 byte for filter byte of each scanline */
} break;
/* 11.2.3 PLTE Palette */
case PNG_FourCC('P','L','T','E'): {
if (dataSize > PNG_PALETTE * 3) return PNG_ERR_PAL_SIZE;
if ((dataSize % 3) != 0) return PNG_ERR_PAL_SIZE;
@ -421,6 +427,7 @@ cc_result Png_Decode(struct Bitmap* bmp, struct Stream* stream) {
}
} break;
/* 11.3.2.1 tRNS Transparency */
case PNG_FourCC('t','R','N','S'): {
if (col == PNG_COLOR_GRAYSCALE) {
if (dataSize != 2) return PNG_ERR_TRANS_COUNT;
@ -456,6 +463,7 @@ cc_result Png_Decode(struct Bitmap* bmp, struct Stream* stream) {
}
} break;
/* 11.2.4 IDAT Image data */
case PNG_FourCC('I','D','A','T'): {
Stream_ReadonlyPortion(&datStream, stream, dataSize);
inflate.Source = &datStream;
@ -519,6 +527,7 @@ cc_result Png_Decode(struct Bitmap* bmp, struct Stream* stream) {
}
} break;
/* 11.2.5 IEND Image trailer */
case PNG_FourCC('I','E','N','D'):
/* Reading all image data should be handled by above if in the IDAT chunk */
/* If we reached here, it means not all of the image data was read */

View file

@ -1050,7 +1050,7 @@ static const struct AssetSet* const asset_sets[] = {
&ccTexsAssetSet,
&mccTexsAssetSet,
&mccMusicAssetSet,
#ifndef CC_BUILD_LOWMEM
#ifndef CC_BUILD_CONSOLE
&mccSoundAssetSet
#endif /* TODO: Vorbis decoding */
};