Skip to content
Permalink
Browse files

remove more unused bits

  • Loading branch information...
UnknownShadow200 committed Mar 14, 2019
1 parent c1afbb7 commit 637967042958b260fd903bfb6bad9c94c3fa40a4
@@ -314,10 +314,8 @@
<ClCompile Include="_autofit.c" />
<ClCompile Include="_cff.c" />
<ClCompile Include="_ftbase.c" />
<ClCompile Include="_ftbbox.c" />
<ClCompile Include="_ftbitmap.c" />
<ClCompile Include="_ftcid.c" />
<ClCompile Include="_ftgasp.c" />
<ClCompile Include="_ftglyph.c" />
<ClCompile Include="_ftinit.c" />
<ClCompile Include="_ftsynth.c" />
@@ -467,18 +467,12 @@
<ClCompile Include="_ftbase.c">
<Filter>Source Files\Freetype</Filter>
</ClCompile>
<ClCompile Include="_ftbbox.c">
<Filter>Source Files\Freetype</Filter>
</ClCompile>
<ClCompile Include="_ftbitmap.c">
<Filter>Source Files\Freetype</Filter>
</ClCompile>
<ClCompile Include="_ftcid.c">
<Filter>Source Files\Freetype</Filter>
</ClCompile>
<ClCompile Include="_ftgasp.c">
<Filter>Source Files\Freetype</Filter>
</ClCompile>
<ClCompile Include="_ftglyph.c">
<Filter>Source Files\Freetype</Filter>
</ClCompile>
@@ -171,10 +171,6 @@ bool HacksComp_CanJumpHigher(struct HacksComp* hacks) {
return hacks->Enabled && hacks->CanAnyHacks && hacks->CanSpeed;
}

bool HacksComp_Floating(struct HacksComp* hacks) {
return hacks->Noclip || hacks->Flying;
}

static String HacksComp_UNSAFE_FlagValue(const char* flagRaw, struct HacksComp* hacks) {
String* joined = &hacks->HacksFlags;
String flag = String_FromReadonly(flagRaw);
@@ -67,7 +67,6 @@ struct HacksComp {

void HacksComp_Init(struct HacksComp* hacks);
bool HacksComp_CanJumpHigher(struct HacksComp* hacks);
bool HacksComp_Floating(struct HacksComp* hacks);
void HacksComp_SetUserType(struct HacksComp* hacks, uint8_t value, bool setBlockPerms);
void HacksComp_CheckConsistency(struct HacksComp* hacks);
void HacksComp_UpdateState(struct HacksComp* hacks);
@@ -4,9 +4,9 @@
#include "ExtMath.h"
#include "Drawer2D.h"
#include "Funcs.h"
#include "Http.h"
#include "Bitmap.h"
#include "Window.h"
#include "Utils.h"

#include "freetype/ft2build.h"
#include "freetype/freetype.h"
@@ -39,9 +39,7 @@
#include <shellapi.h>
#include <wincrypt.h>

#define HTTP_QUERY_ETAG 54 /* Missing from some old MingW32 headers */
#define Socket__Error() WSAGetLastError()

static HANDLE heap;
const char* Platform_NewLine = "\r\n";

@@ -84,7 +84,7 @@ static void Program_SetCurrentDirectory(void) {
}

/* Terminates the program due to an invalid command line argument */
CC_NOINLINE static void Exit_InvalidArg(const char* name, const String* arg) {
CC_NOINLINE static void ExitInvalidArg(const char* name, const String* arg) {
String tmp; char tmpBuffer[256];
String_InitArray(tmp, tmpBuffer);
String_Format2(&tmp, "%c '%s'", name, arg);
@@ -95,7 +95,7 @@ CC_NOINLINE static void Exit_InvalidArg(const char* name, const String* arg) {
}

/* Terminates the program due to insufficient command line arguments */
CC_NOINLINE static void Exit_MissingArgs(int argsCount, const String* args) {
CC_NOINLINE static void ExitMissingArgs(int argsCount, const String* args) {
String tmp; char tmpBuffer[256];
int i;
String_InitArray(tmp, tmpBuffer);
@@ -149,19 +149,19 @@ int main(int argc, char** argv) {
String_Copy(&Game_Username, &args[0]);
Program_RunGame();
} else if (argsCount < 4) {
Exit_MissingArgs(argsCount, args);
ExitMissingArgs(argsCount, args);
return 1;
} else {
String_Copy(&Game_Username, &args[0]);
String_Copy(&Game_Mppass, &args[1]);
String_Copy(&Game_IPAddress, &args[2]);

if (!Utils_ParseIP(&args[2], ip)) {
Exit_InvalidArg("Invalid IP", &args[2]);
ExitInvalidArg("Invalid IP", &args[2]);
return 1;
}
if (!Convert_ParseUInt16(&args[3], &port)) {
Exit_InvalidArg("Invalid port", &args[3]);
ExitInvalidArg("Invalid port", &args[3]);
return 1;
}
Game_Port = port;
@@ -778,11 +778,6 @@ void StringsBuffer_Clear(StringsBuffer* buffer) {
StringsBuffer_Init(buffer);
}

void StringsBuffer_Get(StringsBuffer* buffer, int i, String* str) {
String entry = StringsBuffer_UNSAFE_Get(buffer, i);
String_Copy(str, &entry);
}

String StringsBuffer_UNSAFE_Get(StringsBuffer* buffer, int i) {
uint32_t flags, offset, len;
if (i < 0 || i >= buffer->Count) Logger_Abort("Tried to get String past StringsBuffer end");
@@ -212,9 +212,8 @@ typedef struct StringsBuffer_ {

/* Resets counts to 0, and frees any allocated memory. */
CC_API void StringsBuffer_Clear(StringsBuffer* buffer);
/* Copies the characters from the i'th string in the given buffer into the given string. */
CC_API void StringsBuffer_Get(StringsBuffer* buffer, int i, String* str);
/* UNSAFE: Returns a direct pointer to the i'th string in the given buffer. */
/* You MUST NOT change the characters of this string. Copy to another string if necessary.*/
CC_API STRING_REF String StringsBuffer_UNSAFE_Get(StringsBuffer* buffer, int i);
/* Adds a given string to the end of the given buffer. */
CC_API void StringsBuffer_Add(StringsBuffer* buffer, const String* str);
@@ -132,7 +132,7 @@ void Utils_UNSAFE_GetFilename(STRING_REF String* path) {

int Utils_AccumulateWheelDelta(float* accumulator, float delta) {
int steps;
/* Some mice may use deltas of say (0.2, 0.2, 0.2, 0.2, 0.2) */
/* Some mice may use deltas of say (0.2, 0.3, 0.4, 0.1) */
/* We must use rounding at final step, not at every intermediate step. */
*accumulator += delta;
steps = (int)(*accumulator);
Oops, something went wrong.

0 comments on commit 6379670

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.