.import
exists. that seems unreliable to mechar
in type char***
? Severity Code Description Project File Line Suppression State
Error C1083 Cannot open include file: 'vulkan/vk_platform.h': No such file or directory game-client C:\Users\---\Documents\GitHub\ddnet\src\engine\client\backend\vulkan\backend_vulkan.cpp 39
Severity Code Description Project File Line Suppression State
Error C1083 Cannot open include file: 'vulkan/vk_platform.h': No such file or directory game-client C:\Users\---\Documents\GitHub\ddnet\src\engine\client\backend\vulkan\backend_vulkan.cpp 39
-DVULKAN=off
option should be off by default then if it's not necessarycl_show_hook_coll_own 2
and cl_show_hook_coll_other 2
is set.
Git bisect:
``
7da8308c3fe24e546bc185463da8ef3a66c6b7a7 is the first bad commit
commit 7da8308c3fe24e546bc185463da8ef3a66c6b7a7
Author: Robert Müller
Date: Mon May 20 10:57:24 2024 +0200
Remove
cl_ddrace_scoreboard and
cl_demo_assume_race settings
Time score will now always be used for any game with the flag
GAMEINFOFLAG_TIMESCORE` set in ...ddnet-serverlist-urls.cfg
with the following content to access the new domains:
https://master1.ddnet.org/ddnet/15/servers.json
https://master2.ddnet.org/ddnet/15/servers.json
https://master3.ddnet.org/ddnet/15/servers.json
https://master4.ddnet.org/ddnet/15/servers.json
ddnet-serverlist-urls.cfg
with the following content to access the new domains:
https://master1.ddnet.org/ddnet/15/servers.json
https://master2.ddnet.org/ddnet/15/servers.json
https://master3.ddnet.org/ddnet/15/servers.json
https://master4.ddnet.org/ddnet/15/servers.json
ddnet-serverlist-urls.cfg
with the following content to access the new domains:
https://master1.ddnet.org/ddnet/15/servers.json
https://master2.ddnet.org/ddnet/15/servers.json
https://master3.ddnet.org/ddnet/15/servers.json
https://master4.ddnet.org/ddnet/15/servers.json
struct A {
a: u8,
// padding of 1 byte to align b
b: u16, // no padding here
c: u32,
d: u8,
// padding of 3 bytes to align the whole struct A
}
(edited)struct A {
a: u8,
// padding of 1 byte to align b
b: u16, // no padding here
c: u32,
d: u8,
// padding of 3 bytes to align the whole struct A
}
(edited)Here is a structure with members of various types, totaling 8 bytes before compilation:
struct MixedData
{
char Data1;
short Data2;
int Data3;
char Data4;
};
After compilation the data structure will be supplemented with padding bytes to ensure a proper alignment for each of its members:
struct MixedData /* After compilation in 32-bit x86 machine */
{
char Data1; /* 1 byte */
char Padding1[1]; /* 1 byte for the following 'short' to be aligned on a 2 byte boundary
assuming that the address where structure begins is an even number */
short Data2; /* 2 bytes */
int Data3; /* 4 bytes - largest structure member */
char Data4; /* 1 byte */
char Padding2[3]; /* 3 bytes to make total size of the structure 12 bytes */
};
The compiled size of the structure is now 12 bytes.
struct Foo {
u8 a;
u16 b;
u8 c;
u8 *d;
u8 e;
}
+----+-----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
| u8 | pad | u16 | u8 | | pointer | u8 | padding |
+----+-----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
I have something like this now (edited)struct A {
a: u8,
// padding of 1 byte to align b
b: u16, // no padding here
c: u32,
d: u8,
// padding of 3 bytes to align the whole struct A
}
(edited)struct Foo {
u8 a;
u16 b;
u8 c;
u8 *d;
u8 e;
}
+----+-----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
| u8 | pad | u16 | u8 | | pointer | u8 | padding |
+----+-----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
I have something like this now (edited)struct Foo {
u8 a;
u16 b;
u8 c;
u8 *d;
u8 e;
}
+----+-----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
| u8 | pad | u16 | u8 | | pointer | u8 | padding |
+----+-----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
I have something like this now (edited)struct Foo {
u8 a;
// pad 1 x u8
u16 b;
u8 c;
// pad 3 x u8
u8 *d;
u8 e;
// pad 7 x u8
}
(edited)sudo apt install build-essential cargo cmake git glslang-tools google-mock libavcodec-extra libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libcurl4-openssl-dev libfreetype6-dev libglew-dev libnotify-dev libogg-dev libopus-dev libopusfile-dev libpng-dev libsdl2-dev libsqlite3-dev libssl-dev libvulkan-dev libwavpack-dev libx264-dev python3 rustc spirv-tools
/root/ddnet/Cargo.toml
Caused by:
feature resolver
is required
consider adding cargo-features = ["resolver"]
to the manifest
make[2]: [CMakeFiles/rust_engine_shared_target.dir/build.make:93: release/libddnet_engine_shared.a] Error 101
make[1]: [CMakeFiles/Makefile2:786: CMakeFiles/rust_engine_shared_target.dir/all] Error 2
make: *** [Makefile:171: all] Error 2curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
localhost
when the connect address cannot be resolved.
Copy
trait for a struct and return owned type everywhere xdCopy
trait for a struct and return owned type everywhere xd #[derive(Debug, Clone, Copy, PartialEq)]
pub struct Register {
byte: &'static str,
word: &'static str,
dword: &'static str,
qword: &'static str,
}
rustup
instead of with apt
, see https://discord.com/channels/252358080522747904/745926398140612678/1259978006617653409#[derive(Debug, Clone, Copy, PartialEq)]
pub struct Register {
byte: &'static str,
word: &'static str,
dword: &'static str,
qword: &'static str,
}
#[derive(Debug, Clone, Copy, PartialEq)]
pub struct Register {
byte: &'static str,
word: &'static str,
dword: &'static str,
qword: &'static str,
}
struct Foo {
u8 a;
u8 *d;
}
u8 main() {
Foo foo;
foo = Foo {
a: 69,
d: &foo.a,
};
Foo *foo_ptr;
foo_ptr = &foo;
return *((*foo_ptr).d);
}
holly molly, it works #define defer(...) \
for (int var_line(cond) = 0; var_line(cond) == 0; ) \
for (FIRST_ARG(__VA_ARGS__); var_line(cond) == 0; ) \
for (SKIP_LAST_ARG(SKIP_FIRST_ARG(__VA_ARGS__)); \
var_line(cond) == 0; \
var_line(cond) += 1 ) \
for (int var_line(cond_int) = 0; \
var_line(cond_int) <= 1; \
var_line(cond_int) += 1 ) \
if (var_line(cond_int) == 1) \
{ \
LAST_ARG(__VA_ARGS__); \
} else if (var_line(cond_int) == 0)
nice macro Result
and Option
to your Clike#define defer(...) \
for (int var_line(cond) = 0; var_line(cond) == 0; ) \
for (FIRST_ARG(__VA_ARGS__); var_line(cond) == 0; ) \
for (SKIP_LAST_ARG(SKIP_FIRST_ARG(__VA_ARGS__)); \
var_line(cond) == 0; \
var_line(cond) += 1 ) \
for (int var_line(cond_int) = 0; \
var_line(cond_int) <= 1; \
var_line(cond_int) += 1 ) \
if (var_line(cond_int) == 1) \
{ \
LAST_ARG(__VA_ARGS__); \
} else if (var_line(cond_int) == 0)
nice macro 2024-08-09 13:39:03 I server: +-------------------------+
2024-08-09 13:39:03 I register/6/ipv6: registering...
2024-08-09 13:39:03 I register/6/ipv4: registering...
2024-08-09 13:39:03 I register/7/ipv6: registering...
2024-08-09 13:39:03 I register/7/ipv4: registering...
2024-08-09 13:39:03 I sql: [2] load best time done on read database 0
2024-08-09 13:39:03 E http: https://master1.ddnet.org/ddnet/15/register failed. libcurl error (6): Could not resolve host: master1.ddnet.org
2024-08-09 13:39:03 E http: https://master1.ddnet.org/ddnet/15/register failed. libcurl error (6): Could not resolve host: master1.ddnet.org
2024-08-09 13:39:03 E register/7/ipv6: error sending request to master
2024-08-09 13:39:03 E register/6/ipv6: error sending request to master
Ping request could not find host https://master1.ddnet.org/ddnet/15/register. Please check the name and try again.
Ping request could not find host https://master1.ddnet.org/ddnet/15/register. Please check the name and try again.
ping master1.ddnet.org
Pinging master1.ddnet.org [104.18.11.44] with 32 bytes of data:
Reply from 104.18.11.44: bytes=32 time=5ms TTL=58
Reply from 104.18.11.44: bytes=32 time=5ms TTL=58
Reply from 104.18.11.44: bytes=32 time=5ms TTL=58
Reply from 104.18.11.44: bytes=32 time=5ms TTL=58
Ping statistics for 104.18.11.44:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 5ms, Maximum = 5ms, Average = 5ms
(edited)struct Foo {
u8 a;
u16 b;
u8 c;
u8 *d;
u8 e;
}
+----+-----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
| u8 | pad | u16 | u8 | | pointer | u8 | padding |
+----+-----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
I have something like this now (edited)struct S {
char x : 3; // 3 bits
int : 0; // "advance to int alignment boundary"
char y : 3; // 3 bits
};
this is how i know it behaves in cpp but i think c is the same in this regard (edited)