mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-09 07:18:34 -04:00
N64: Text sometimes works
This commit is contained in:
parent
b603cad5ae
commit
ef64163e57
@ -7,7 +7,6 @@
|
||||
#include <libdragon.h>
|
||||
#include <GL/gl.h>
|
||||
#include <GL/gl_integration.h>
|
||||
#include <GL/gl.h>
|
||||
|
||||
typedef void (*GL_SetupVBFunc)(void);
|
||||
typedef void (*GL_SetupVBRangeFunc)(int startVertex);
|
||||
@ -29,8 +28,9 @@ void Gfx_Create(void) {
|
||||
//rdpq_debug_log(true);
|
||||
zbuffer = surface_alloc(FMT_RGBA16, display_get_width(), display_get_height());
|
||||
|
||||
Gfx.MaxTexWidth = 32;
|
||||
Gfx.MaxTexHeight = 32;
|
||||
Gfx.MaxTexWidth = 128;
|
||||
Gfx.MaxTexHeight = 128;
|
||||
Gfx.MaxTexSize = 1024; // TMEM only has 4 KB in it
|
||||
Gfx.Created = true;
|
||||
|
||||
Gfx_RestoreState();
|
||||
@ -219,7 +219,7 @@ static void Gfx_RestoreState(void) {
|
||||
glHint(GL_FOG_HINT, GL_NICEST);
|
||||
glAlphaFunc(GL_GREATER, 0.5f);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
glDepthFunc(GL_LESS);
|
||||
glDepthFunc(GL_LESS_INTERPENETRATING_N64);
|
||||
//glEnable(GL_RDPQ_TEXTURING_N64);
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "Window.h"
|
||||
#include "Utils.h"
|
||||
#include "Errors.h"
|
||||
#include "Options.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
@ -114,10 +115,14 @@ cc_result File_Open(cc_file* file, const cc_string* path) {
|
||||
return File_Do(file, path);
|
||||
}
|
||||
cc_result File_Create(cc_file* file, const cc_string* path) {
|
||||
return File_Do(file, path);
|
||||
*file = -1;
|
||||
return ERR_NOT_SUPPORTED;
|
||||
//return File_Do(file, path);
|
||||
}
|
||||
cc_result File_OpenOrCreate(cc_file* file, const cc_string* path) {
|
||||
return File_Do(file, path);
|
||||
*file = -1;
|
||||
return ERR_NOT_SUPPORTED;
|
||||
//return File_Do(file, path);
|
||||
}
|
||||
|
||||
cc_result File_Read(cc_file file, void* data, cc_uint32 count, cc_uint32* bytesRead) {
|
||||
@ -248,6 +253,9 @@ void Platform_Init(void) {
|
||||
debug_init_isviewer();
|
||||
debug_init_usblog();
|
||||
|
||||
// TODO: Redesign Drawer2D to better handle this
|
||||
Options_SetBool(OPT_USE_CHAT_FONT, true);
|
||||
|
||||
//console_init();
|
||||
//console_set_render_mode(RENDER_AUTOMATIC);
|
||||
//console_set_debug(true);
|
||||
|
@ -841,6 +841,7 @@ const cc_string* SysFonts_UNSAFE_GetDefault(void) { return &String_Empty; }
|
||||
void SysFonts_GetNames(struct StringsBuffer* buffer) { }
|
||||
|
||||
cc_result SysFont_Make(struct FontDesc* desc, const cc_string* fontName, int size, int flags) {
|
||||
size *= DisplayInfo.ScaleY;
|
||||
/* Round upwards to nearest 8 */
|
||||
size = (size + 7) & ~0x07;
|
||||
|
||||
|
@ -27,8 +27,8 @@ void Window_Init(void) {
|
||||
DisplayInfo.Width = display_get_width();
|
||||
DisplayInfo.Height = display_get_height();
|
||||
DisplayInfo.Depth = 4; // 32 bit
|
||||
DisplayInfo.ScaleX = 1;
|
||||
DisplayInfo.ScaleY = 1;
|
||||
DisplayInfo.ScaleX = 0.5f;
|
||||
DisplayInfo.ScaleY = 0.5f;
|
||||
|
||||
WindowInfo.Width = DisplayInfo.Width;
|
||||
WindowInfo.Height = DisplayInfo.Height;
|
||||
|
Loading…
x
Reference in New Issue
Block a user