commit 38139ba

uint  ·  2026-08-04 15:37:25 +0000 UTC
parent 93ff504
prefix mc_proto sources with mc_
12 files changed,  +20, -20
+1, -1
1@@ -3,7 +3,7 @@
2 
3 #include "types.h"
4 #include "client/camera.h"
5-#include "net/mcproto.h"
6+#include "net/mc_proto.h"
7 
8 typedef struct {
9 	double x;
R include/net/mcproto.h => include/net/mc_proto.h
+3, -3
 1@@ -1,5 +1,5 @@
 2-#ifndef MCPROTO_H
 3-#define MCPROTO_H
 4+#ifndef MC_PROTO_H
 5+#define MC_PROTO_H
 6 
 7 #include <stddef.h>
 8 
 9@@ -43,4 +43,4 @@ int mc_client_send_position_look(MCClient* client, double x, double feet_y, doub
10 const char* mc_client_username(const MCClient* client);
11 const char* mc_client_uuid(const MCClient* client);
12 
13-#endif /* MCPROTO_H */
14+#endif /* MC_PROTO_H */
+1, -1
1@@ -5,7 +5,7 @@
2 
3 #include "mgmath.h"
4 #include "util.h"
5-#include "net/mcproto.h"
6+#include "net/mc_proto.h"
7 #include "net/packet.h"
8 #include "client/camera.h"
9 #include "client/player.h"
+5, -5
 1@@ -29,11 +29,11 @@ sources = [
 2 	'source/world/chunk.c',
 3 	'source/client/camera.c',
 4 	'source/client/player.c',
 5-	'source/net/auth.c',
 6-	'source/net/buffer.c',
 7-	'source/net/client.c',
 8-	'source/net/crypto.c',
 9-	'source/net/packet.c',
10+	'source/net/mc_auth.c',
11+	'source/net/mc_buffer.c',
12+	'source/net/mc_client.c',
13+	'source/net/mc_crypto.c',
14+	'source/net/mc_packet.c',
15 	'vendor/stb_image_c89.c',
16 	'vendor/json.c',
17 ]
+1, -1
1@@ -1,7 +1,7 @@
2 #include "mgmath.h"
3 #include "util.h"
4 #include "client/player.h"
5-#include "net/mcproto.h"
6+#include "net/mc_proto.h"
7 #include "net/packet.h"
8 #include "platform/platform.h"
9 
+1, -1
1@@ -4,7 +4,7 @@
2 #include "config.h"
3 #include "util.h"
4 #include "client/player.h"
5-#include "net/mcproto.h"
6+#include "net/mc_proto.h"
7 #include "platform/platform.h"
8 #include "renderer/renderer.h"
9 #include "renderer/test_scene.h"
R source/net/auth.c => source/net/mc_auth.c
+1, -1
1@@ -6,7 +6,7 @@
2 
3 #include <tls.h>
4 
5-#include "internal.h"
6+#include "mc_internal.h"
7 
8 #define MC_JOIN_HOST "sessionserver.mojang.com"
9 #define MC_JOIN_PORT "443"
R source/net/buffer.c => source/net/mc_buffer.c
+1, -1
1@@ -3,7 +3,7 @@
2 #include <stdlib.h>
3 #include <string.h>
4 
5-#include "internal.h"
6+#include "mc_internal.h"
7 
8 void mc_set_error(char* error, size_t error_size, const char* fmt, ...)
9 {
R source/net/client.c => source/net/mc_client.c
+1, -1
1@@ -11,7 +11,7 @@
2 
3 #include <zlib.h>
4 
5-#include "internal.h"
6+#include "mc_internal.h"
7 #include "mg_random.h"
8 
9 #ifndef MSG_NOSIGNAL
R source/net/crypto.c => source/net/mc_crypto.c
+1, -1
1@@ -1,7 +1,7 @@
2 #include <stdlib.h>
3 #include <string.h>
4 
5-#include "internal.h"
6+#include "mc_internal.h"
7 #include "mg_random.h"
8 
9 /* naive der parser */
R source/net/internal.h => source/net/mc_internal.h
+4, -4
 1@@ -1,11 +1,11 @@
 2-#ifndef MCPROTO_INTERNAL_H
 3-#define MCPROTO_INTERNAL_H
 4+#ifndef MC_PROTO_INTERNAL_H
 5+#define MC_PROTO_INTERNAL_H
 6 
 7 #include <stddef.h>
 8 
 9 #include <bearssl.h>
10 
11-#include "net/mcproto.h"
12+#include "net/mc_proto.h"
13 
14 #define MC_MAX_PACKET_SIZE (16u * 1024u * 1024u)
15 #define MC_MAX_STRING_SIZE 32767u
16@@ -71,4 +71,4 @@ void mc_server_hash(const char* server_id, const u8 shared_secret[16], const u8*
17 int  mc_join_server(const MCAccount* account, const char* server_id, const u8 shared_secret[16], const u8* public_key,
18                     size_t public_key_size, char* error, size_t error_size);
19 
20-#endif /* MCPROTO_INTERNAL_H */
21+#endif /* MC_PROTO_INTERNAL_H */
R source/net/packet.c => source/net/mc_packet.c
+0, -0