mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-18 12:05:14 -04:00
remove unused code
This commit is contained in:
parent
31b22f2e37
commit
2238894968
@ -397,10 +397,10 @@ static void Http_DownloadAsync(struct HttpRequest* req) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Can't use this for all URLs, because cache-control isn't in allowed CORS headers */
|
/* Can't use this for all URLs, because cache-control isn't in allowed CORS headers */
|
||||||
/* For example, if you try this with dropbox, you'll get a '404' with
|
/* For example, if you try this with dropbox, you'll get a '404' with */
|
||||||
/* Access to XMLHttpRequest at 'https://dl.dropbox.com/s/a/a.zip' from
|
/* Access to XMLHttpRequest at 'https://dl.dropbox.com/s/a/a.zip' from */
|
||||||
/* origin 'http://www.classicube.net' has been blocked by CORS policy:
|
/* origin 'http://www.classicube.net' has been blocked by CORS policy: */
|
||||||
/* Response to preflight request doesn't pass access control check:
|
/* Response to preflight request doesn't pass access control check: */
|
||||||
/* Redirect is not allowed for a preflight request. */
|
/* Redirect is not allowed for a preflight request. */
|
||||||
/* printed to console. But this is still used for skins, that way when users change */
|
/* printed to console. But this is still used for skins, that way when users change */
|
||||||
/* their skins, the change shows up instantly. But 99% of the time we'll get a 304 */
|
/* their skins, the change shows up instantly. But 99% of the time we'll get a 304 */
|
||||||
|
@ -798,7 +798,6 @@ void Logger_Abort2(cc_result result, const char* raw_msg) {
|
|||||||
/*########################################################################################################################*
|
/*########################################################################################################################*
|
||||||
*----------------------------------------------------------Common---------------------------------------------------------*
|
*----------------------------------------------------------Common---------------------------------------------------------*
|
||||||
*#########################################################################################################################*/
|
*#########################################################################################################################*/
|
||||||
static FileHandle logFile;
|
|
||||||
static struct Stream logStream;
|
static struct Stream logStream;
|
||||||
static cc_bool logOpen;
|
static cc_bool logOpen;
|
||||||
|
|
||||||
|
@ -1484,7 +1484,6 @@ static void DisconnectScreen_BuildMesh(void* screen) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void DisconnectScreen_Init(void* screen) {
|
static void DisconnectScreen_Init(void* screen) {
|
||||||
static struct Widget* widgets[3];
|
|
||||||
struct DisconnectScreen* s = (struct DisconnectScreen*)screen;
|
struct DisconnectScreen* s = (struct DisconnectScreen*)screen;
|
||||||
|
|
||||||
TextWidget_Make(&s->title, ANCHOR_CENTRE, ANCHOR_CENTRE, 0, -30);
|
TextWidget_Make(&s->title, ANCHOR_CENTRE, ANCHOR_CENTRE, 0, -30);
|
||||||
@ -1509,7 +1508,6 @@ static void DisconnectScreen_Update(void* screen, double delta) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void DisconnectScreen_Render(void* screen, double delta) {
|
static void DisconnectScreen_Render(void* screen, double delta) {
|
||||||
struct DisconnectScreen* s = (struct DisconnectScreen*)screen;
|
|
||||||
PackedCol top = PackedCol_Make(64, 32, 32, 255);
|
PackedCol top = PackedCol_Make(64, 32, 32, 255);
|
||||||
PackedCol bottom = PackedCol_Make(80, 16, 16, 255);
|
PackedCol bottom = PackedCol_Make(80, 16, 16, 255);
|
||||||
Gfx_Draw2DGradient(0, 0, Window_Width, Window_Height, top, bottom);
|
Gfx_Draw2DGradient(0, 0, Window_Width, Window_Height, top, bottom);
|
||||||
|
@ -74,14 +74,6 @@ static int SelectionBox_Compare(struct SelectionBox* a, struct SelectionBox* b)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SelectionBox_UpdateDist(Vec3 p, float x2, float y2, float z2, float* closest, float* furthest) {
|
|
||||||
float dx = x2 - p.X, dy = y2 - p.Y, dz = z2 - p.Z;
|
|
||||||
float dist = dx * dx + dy * dy + dz * dz;
|
|
||||||
|
|
||||||
if (dist < *closest) *closest = dist;
|
|
||||||
if (dist > *furthest) *furthest = dist;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void SelectionBox_Intersect(struct SelectionBox* box, Vec3 P) {
|
static void SelectionBox_Intersect(struct SelectionBox* box, Vec3 P) {
|
||||||
float dx1 = (P.X - box->Min.X) * (P.X - box->Min.X), dx2 = (P.X - box->Max.X) * (P.X - box->Max.X);
|
float dx1 = (P.X - box->Min.X) * (P.X - box->Min.X), dx2 = (P.X - box->Max.X) * (P.X - box->Max.X);
|
||||||
float dy1 = (P.Y - box->Min.Y) * (P.Y - box->Min.Y), dy2 = (P.Y - box->Max.Y) * (P.Y - box->Max.Y);
|
float dy1 = (P.Y - box->Min.Y) * (P.Y - box->Min.Y), dy2 = (P.Y - box->Max.Y) * (P.Y - box->Max.Y);
|
||||||
|
@ -1074,15 +1074,6 @@ static void InputWidget_DeleteChar(struct InputWidget* w) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static cc_bool InputWidget_CheckCol(struct InputWidget* w, int index) {
|
|
||||||
char code, col;
|
|
||||||
if (index < 0) return false;
|
|
||||||
|
|
||||||
code = w->text.buffer[index];
|
|
||||||
col = w->text.buffer[index + 1];
|
|
||||||
return (code == '%' || code == '&') && BitmapCol_A(Drawer2D_GetCol(col));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void InputWidget_BackspaceKey(struct InputWidget* w) {
|
static void InputWidget_BackspaceKey(struct InputWidget* w) {
|
||||||
int i, len;
|
int i, len;
|
||||||
|
|
||||||
|
@ -1002,8 +1002,6 @@ static cc_bool Window_GetPendingEvent(XEvent* e) {
|
|||||||
|
|
||||||
void Window_ProcessEvents(void) {
|
void Window_ProcessEvents(void) {
|
||||||
XEvent e;
|
XEvent e;
|
||||||
cc_bool wasFocused;
|
|
||||||
|
|
||||||
while (Window_Exists) {
|
while (Window_Exists) {
|
||||||
if (!Window_GetPendingEvent(&e)) break;
|
if (!Window_GetPendingEvent(&e)) break;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user