Skip to content
Permalink
Browse files

make field names of structs in LScreens.c lowercase

  • Loading branch information...
UnknownShadow200 committed Jul 12, 2019
1 parent ee3f89b commit 508414c96f6d26fd8a2f38e7819b3ef93402aad3
Showing with 500 additions and 464 deletions.
  1. +2 −2 readme.md
  2. +3 −2 src/Drawer2D.c
  3. +9 −9 src/Entity.c
  4. +1 −1 src/Entity.h
  5. +4 −4 src/Http.c
  6. +424 −424 src/LScreens.c
  7. +7 −7 src/LScreens.h
  8. +1 −1 src/Launcher.c
  9. +39 −9 src/Platform.c
  10. +4 −1 src/Program.c
  11. +6 −4 src/Window.c
@@ -15,8 +15,8 @@ You can grab the latest stable binaries [from here](https://cs.classicube.net/c_
It **does not** work with 'modern/premium' Minecraft servers.

#### Requirements
* Windows: 2000 or later.
* OSX: Only tested on OSX 10.5, may or may not work on later versions.
* Windows: 2000 or later. (Windows 98 with KernelEx also *technically* works)
* OSX: OSX 10.5 or later.
* Linux: libcurl and libopenal.

#### Instructions
@@ -686,14 +686,15 @@ static void Drawer2D_TextureChanged(void* obj, struct Stream* src, const String*
}

static void Drawer2D_CheckFont(void) {
static const String default_fonts[7] = {
static const String default_fonts[8] = {
String_FromConst("Arial"), /* preferred font on all platforms */
String_FromConst("Century Schoolbook L Roman"), /* commonly available on linux */
String_FromConst("Nimbus Sans"), /* other common ones */
String_FromConst("Liberation Sans"),
String_FromConst("Bitstream Charter"),
String_FromConst("Cantarell"),
String_FromConst("DejaVu Sans Book")
String_FromConst("DejaVu Sans Book"),
String_FromConst("Roboto") /* android */
};
String path;
int i;
@@ -940,9 +940,9 @@ static void LocalPlayer_OnNewMap(void) {
p->Base.Velocity = Vec3_Zero();
p->OldVelocity = Vec3_Zero();

p->_WarnedRespawn = false;
p->_WarnedFly = false;
p->_WarnedNoclip = false;
p->_warnedRespawn = false;
p->_warnedFly = false;
p->_warnedNoclip = false;
}

static bool LocalPlayer_IsSolidCollide(BlockID b) { return Blocks.Collide[b] == COLLIDE_SOLID; }
@@ -992,8 +992,8 @@ static bool LocalPlayer_HandleRespawn(void) {
if (p->Hacks.CanRespawn) {
LocalPlayer_DoRespawn();
return true;
} else if (!p->_WarnedRespawn) {
p->_WarnedRespawn = true;
} else if (!p->_warnedRespawn) {
p->_warnedRespawn = true;
if (hackPermMsgs) Chat_AddRaw("&cRespawning is currently disabled");
}
return false;
@@ -1028,8 +1028,8 @@ static bool LocalPlayer_HandleFly(void) {
if (p->Hacks.CanFly && p->Hacks.Enabled) {
p->Hacks.Flying = !p->Hacks.Flying;
return true;
} else if (!p->_WarnedFly) {
p->_WarnedFly = true;
} else if (!p->_warnedFly) {
p->_warnedFly = true;
if (hackPermMsgs) Chat_AddRaw("&cFlying is currently disabled");
}
return false;
@@ -1043,8 +1043,8 @@ static bool LocalPlayer_HandleNoClip(void) {

p->Hacks.Noclip = !p->Hacks.Noclip;
return true;
} else if (!p->_WarnedNoclip) {
p->_WarnedNoclip = true;
} else if (!p->_warnedNoclip) {
p->_warnedNoclip = true;
if (hackPermMsgs) Chat_AddRaw("&cNoclip is currently disabled");
}
return false;
@@ -192,7 +192,7 @@ struct LocalPlayer {
struct InterpComp Interp;
struct CollisionsComp Collisions;
struct PhysicsComp Physics;
bool _WarnedRespawn, _WarnedFly, _WarnedNoclip;
bool _warnedRespawn, _warnedFly, _warnedNoclip;
};

extern struct LocalPlayer LocalPlayer_Instance;
@@ -752,20 +752,20 @@ static void Http_AddHeader(const char* key, const String* value) {
args[0].l = JavaMakeConst(env, key);
args[1].l = JavaMakeString(env, value);

JavaCallVoid(env, "httpSetHeader", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", args);
JavaCallVoid(env, "httpSetHeader", "(Ljava/lang/String;Ljava/lang/String;)V", args);
(*env)->DeleteLocalRef(env, args[0].l);
(*env)->DeleteLocalRef(env, args[1].l);
}

/* Processes a HTTP header downloaded from the server */
static JNIEXPORT void JNICALL Java_com_classicube_Wrappers_httpParseHeader(JNIEnv* env, jclass c, jstring header) {
static JNIEXPORT void JNICALL Java_com_classicube_MainActivity_httpParseHeader(JNIEnv* env, jclass c, jstring header) {
String line = JavaGetString(env, header);
Http_ParseHeader(java_req, &line);
(*env)->ReleaseStringUTFChars(env, header, line.buffer);
}

/* Processes a chunk of data downloaded from the web server */
static JNIEXPORT void JNICALL Java_com_classicube_Wrappers_httpAppendData(JNIEnv* env, jclass c, jbyteArray arr, jint len) {
static JNIEXPORT void JNICALL Java_com_classicube_MainActivity_httpAppendData(JNIEnv* env, jclass c, jbyteArray arr, jint len) {
jbyte* src = (*env)->GetByteArrayElements(env, NULL, 0);
struct HttpRequest* req = java_req;

@@ -792,7 +792,7 @@ static ReturnCode Http_SysDo(struct HttpRequest* req) {
args[1].l = JavaMakeConst(env, verbs[req->RequestType]);
args[2].l = JavaMakeBytes(env, req->Data, req->Size);

res = JavaCallInt(env, "httpInit", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[B)I", args);
res = JavaCallInt(env, "httpInit", "(Ljava/lang/String;Ljava/lang/String;[B)I", args);
(*env)->DeleteLocalRef(env, args[0].l);
(*env)->DeleteLocalRef(env, args[1].l);
(*env)->DeleteLocalRef(env, args[2].l);

0 comments on commit 508414c

Please sign in to comment.
You can’t perform that action at this time.