Guild icon
DDraceNetwork
Development / developer
Development discussion. Logged to https://ddnet.org/irclogs/ Connected with DDNet's IRC channel, Matrix room and GitHub repositories β€” IRC: #ddnet on Quakenet | Matrix: #ddnet-developer:matrix.org GitHub: https://github.com/ddnet
Between 10/16/2023 12:00AM and 10/17/2023 12:00AM
Avatar
Avatar
murpi
Developers now: Let's just add DLSS/FSR as an excuse to not optimize
owo me rn
Avatar
hi fred
6:01AM
what's good in the hood
Avatar
nothing
Avatar
its raining
Avatar
it's foggy
Avatar
raining
Avatar
it's cold
Avatar
I'm bored πŸ₯± Someone bring up a controversial topic pls
Avatar
rust is better than c
Avatar
Avatar
Teero
I'm bored πŸ₯± Someone bring up a controversial topic pls
UFOs are real
Avatar
Avatar
fokkonaut
UFOs are real
I'm sure the are some unidentifizierte Flugobjekte
Avatar
Avatar
Ryozuki
rust is better than c
you can still write shit slow code even if you write it in ASM. Not a worthy convo
Avatar
@Teero u said controversial not worthy
Avatar
Hmm okay mb
Avatar
Avatar
Teero
I'm sure the are some unidentifizierte Flugobjekte
german sounds alien
Avatar
Which people do you think are botting?
7:59AM
*that are publicly seen as legit players
Avatar
Avatar
Ryozuki
german sounds alien
Aggressive alien
Avatar
Avatar
Ryozuki
rust is better than c
Jupstar βœͺ 10/16/2023 8:00AM
he said controversial xd
8:01AM
not truth
Avatar
untruth
8:01AM
I'm a C fan
8:01AM
πŸͺ­
Avatar
then u can upgrade
8:01AM
to rust fan
Avatar
If you don't have a long beard
8:01AM
You're not a C fan
Avatar
Avatar
ReiTW
If you don't have a long beard
😭
Avatar
Avatar
Ryozuki
to rust fan
Usually I would try to remove as much rust as possible from old objects when I need to use them. And then add some wd40 into the mix and then everything is working again
8:05AM
On the other hand carbon is a very good material
Avatar
Jupstar βœͺ 10/16/2023 8:05AM
the name rust is ambiguous
8:06AM
in this case Rust means a mushroom
Avatar
its a mushroom yes
Avatar
Jupstar βœͺ 10/16/2023 8:06AM
not the metal rusting stuff
8:07AM
me when coding rust
Avatar
Hmm who would name a programming language like one of most annoying things in the wolrd
Avatar
Jupstar βœͺ 10/16/2023 8:07AM
bcs it makes u high
Avatar
Avatar
Jupstar βœͺ
bcs it makes u high
You mean a rusty syringe? XD (edited)
Avatar
Jupstar βœͺ 10/16/2023 8:08AM
xd
Avatar
Jupstar βœͺ 10/16/2023 8:09AM
a rusty syringe with rust elixir
Avatar
Look at that beautiful C
Avatar
Avatar
Jupstar βœͺ
a rusty syringe with rust elixir
Sudden 10X dev potion
Avatar
Jupstar βœͺ 10/16/2023 8:09AM
yes, that C is beatiful. but it's a capital C.. nothing to do with c
8:09AM
xd
Avatar
C is a capital C
Avatar
Jupstar βœͺ 10/16/2023 8:10AM
C-- (pronounced C minus minus) is a C-like programming language. Its creators, functional programming researchers Simon Peyton Jones and Norman Ramsey, designed it to be generated mainly by compilers for very high-level languages rather than written by human programmers. Unlike many other intermediate languages, its representation is plain ASCII...
8:11AM
where is c// and c**
8:11AM
at least there is c:// on windows xd
Avatar
There is also c-hashtag troll
Avatar
Jupstar βœͺ 10/16/2023 8:12AM
😬
Avatar
The c on windows is fake (edited)
8:13AM
Any good words starting with C?
8:14AM
wtf is clunking?
Avatar
Jupstar βœͺ 10/16/2023 8:14AM
Cool
Avatar
cock
8:14AM
πŸ“
8:15AM
New favourite word
Avatar
tf is that translator
Avatar
huh? Deepl
Avatar
tf is that phone
Avatar
nothing 1
Avatar
whats your reason for having bought that
Avatar
Avatar
fokkonaut
whats your reason for having bought that
needed a phone
Avatar
Jupstar βœͺ 10/16/2023 8:17AM
Hipster
Avatar
specifically this, i mean
Avatar
Was easy to jailbreak
Avatar
Arent all phones easy to jailbreak
8:18AM
android*
Avatar
I was looking at phones and this one looked good and it has good performance
Avatar
Jupstar βœͺ 10/16/2023 8:19AM
@fokkonaut leak urs
Avatar
I was just about to write an essay of my current phone dilemma
Avatar
fokkonaut is chatting from the landline
8:21AM
Haustelefon ftw
Avatar
Jupstar βœͺ 10/16/2023 8:21AM
Telefonzelle
brownbear 1
Avatar
So, I have had a S9 for 5 years now and its broken now so I really need a new one. Been looking at the S23 lately as its dropping in price more and more, but it has no SD card slot and no headphone jack, and I hate that companies follow Apple on this shit
Avatar
Got my phone for 200
Avatar
Avatar
fokkonaut
So, I have had a S9 for 5 years now and its broken now so I really need a new one. Been looking at the S23 lately as its dropping in price more and more, but it has no SD card slot and no headphone jack, and I hate that companies follow Apple on this shit
Don't buy Samsung
Avatar
I'll be happy to pay 550€+ for the S23, but those two things suck
8:22AM
Ofc I'll buy Samsung
Avatar
Jupstar βœͺ 10/16/2023 8:22AM
I have pocophone f5
Avatar
Snapdragon 8 pro
8:22AM
so efficient cpu
Avatar
Nothing phone cuz they 're not that expensive or google pixel 8
Avatar
gen 2*
Avatar
Jupstar βœͺ 10/16/2023 8:23AM
I have the snapdragon 7 gen 2
Avatar
(Yay started a controversial topic)
❀️ 1
Avatar
Jupstar βœͺ 10/16/2023 8:23AM
4nm
Avatar
Avatar
fokkonaut
Arent all phones easy to jailbreak
No
Avatar
Sadly nothing phone doesnt have a headphone jack either
Avatar
Avatar
Jupstar βœͺ
I have the snapdragon 7 gen 2
snapdragon 8 gen 2 has been adjusted to samsungs software
8:23AM
to be more efficient
Avatar
I'm thinking between Google pixel 8 or 8 pro
Avatar
Jupstar βœͺ 10/16/2023 8:24AM
I don't want Samsung software
8:24AM
Lmao
Avatar
Native Android> all
Avatar
samsung phones are the best android phones
Avatar
What do you need to be efficient about? I play minesweeper on my phone and tats the only game xd
Avatar
Jupstar βœͺ 10/16/2023 8:24AM
I jailbreak it and put custom rom
πŸ‘ 2
Avatar
Avatar
fokkonaut
samsung phones are the best android phones
Lol no
Avatar
lol yes
8:24AM
I like Samsung most
Avatar
Avatar
fokkonaut
lol yes
In what exactly, cuz they're never above google in dxomark lmao
Avatar
Avatar
Jupstar βœͺ
I jailbreak it and put custom rom
same. native android there isn't much to control
Avatar
Jupstar βœͺ 10/16/2023 8:25AM
Its pretty expensive for what it delivers
8:25AM
But they have quite good phones
Avatar
Avatar
Jupstar βœͺ
Its pretty expensive for what it delivers
True, but UX is on point
Avatar
Jupstar βœͺ 10/16/2023 8:25AM
Feature wise
Avatar
Thats why I'm waiting a little for the price to drop even more
8:26AM
Might buy it on black friday
Avatar
hey fellas
β˜• 2
Avatar
Currently Google pixel 8 has the best screen + probably best photoshoot phone, just waiting for dxomark to release it
Avatar
or earlier, if its cheap enough
Avatar
Jupstar βœͺ 10/16/2023 8:26AM
I have 120hz. That's all i ever needed
8:26AM
Xd
Avatar
so good for the eyes
Avatar
Jupstar βœͺ 10/16/2023 8:26AM
And big barriers
8:26AM
Battery
Avatar
Avatar
ReiTW
Currently Google pixel 8 has the best screen + probably best photoshoot phone, just waiting for dxomark to release it
best screen? doubt, samsungs amoled is pro
Avatar
Jupstar βœͺ 10/16/2023 8:27AM
And 12gb ram 😬
Avatar
Avatar
Jupstar βœͺ
I have 120hz. That's all i ever needed
same but it sucks on my battery like it's a Capri sun (edited)
Avatar
Avatar
fokkonaut
best screen? doubt, samsungs amoled is pro
8:27AM
@fokkonaut sorry for you but dxomark is a reference since years for everyone
Avatar
Avatar
ReiTW
Click to see attachment πŸ–ΌοΈ
Jupstar βœͺ 10/16/2023 8:28AM
Don't they all use Samsung screens xd
Avatar
its fine, samsung is just right after google
Avatar
im getting stack corruption from an in-bounds write to a locked SDL_Surface's pixels
8:28AM
void RenderUtilities::FadeSurfaceOut(SDL_Surface *surf, const SDL_Rect *rect, bool axis, bool direction) { if (!SDLUtilities::SurfaceIsValid(surf) || surf->format->Amask == 0) // surface is invalid or doesn't have an alpha channel return; SDL_LockSurface(surf); int x_start = rect->x + (axis ? 0 : rect->w); int x_target = rect->x + (axis ? rect->w : 0); int y_start = rect->y + (axis ? 0 : rect->h); int y_target = rect->y + (axis ? rect->h : 0); if (x_target > surf->w || y_target > surf->h) return; auto AdjustPixelAlpha = [&](int a_x, int a_y) { static uint32_t *pixels, *target_pixel = nullptr; static uint8_t r, g, b, src_a, new_a; static float fraction; pixels = reinterpret_cast<uint32_t *>(surf->pixels); target_pixel = &pixels[((a_y * surf->pitch) / surf->format->BytesPerPixel) + a_x]; if (axis) fraction = direction ? (float(a_x - x_start) / float(x_target - x_start)) : (float(a_y - y_start) / float(y_target - y_start)); else fraction = direction ? (float(x_start - a_x) / float(x_start - x_target)) : (float(y_start - a_y) / float(y_start - y_target)); SDL_GetRGBA(*target_pixel, surf->format, &r, &g, &b, &src_a); new_a = std::ceil(fraction * src_a); *target_pixel = SDL_MapRGBA(surf->format, r, g, b, new_a); /* <- here */ }; int x; int y; auto LoopY = [&](int a_x) { if (axis) for (y = y_start; y < y_target; y++) AdjustPixelAlpha(a_x, y); else for (y = y_start; y > y_target; y--) AdjustPixelAlpha(a_x, y); }; if (axis) for (x = x_start; x < x_target; x++) LoopY(x); else for (x = x_start; x > x_target; x--) LoopY(x); SDL_UnlockSurface(surf); }
8:28AM
WTF
Avatar
Ban
Avatar
wdym ban
8:28AM
ban
Avatar
Ban
Avatar
Jupstar βœͺ 10/16/2023 8:29AM
Nab
Avatar
ban ban caliban
Avatar
tali
Avatar
Avatar
Jupstar βœͺ
Don't they all use Samsung screens xd
Seems like not
Avatar
Avatar
Ewan
im getting stack corruption from an in-bounds write to a locked SDL_Surface's pixels
i cannot fathom why
8:29AM
experts help me
Avatar
It's Samsung, lg or boe
Avatar
Avatar
Jupstar βœͺ
Don't they all use Samsung screens xd
And the camera on the 8 pro damn
8:31AM
Will get 1st probably on dxomark
Avatar
google fanboy
Avatar
Avatar
Ewan
void RenderUtilities::FadeSurfaceOut(SDL_Surface *surf, const SDL_Rect *rect, bool axis, bool direction) { if (!SDLUtilities::SurfaceIsValid(surf) || surf->format->Amask == 0) // surface is invalid or doesn't have an alpha channel return; SDL_LockSurface(surf); int x_start = rect->x + (axis ? 0 : rect->w); int x_target = rect->x + (axis ? rect->w : 0); int y_start = rect->y + (axis ? 0 : rect->h); int y_target = rect->y + (axis ? rect->h : 0); if (x_target > surf->w || y_target > surf->h) return; auto AdjustPixelAlpha = [&](int a_x, int a_y) { static uint32_t *pixels, *target_pixel = nullptr; static uint8_t r, g, b, src_a, new_a; static float fraction; pixels = reinterpret_cast<uint32_t *>(surf->pixels); target_pixel = &pixels[((a_y * surf->pitch) / surf->format->BytesPerPixel) + a_x]; if (axis) fraction = direction ? (float(a_x - x_start) / float(x_target - x_start)) : (float(a_y - y_start) / float(y_target - y_start)); else fraction = direction ? (float(x_start - a_x) / float(x_start - x_target)) : (float(y_start - a_y) / float(y_start - y_target)); SDL_GetRGBA(*target_pixel, surf->format, &r, &g, &b, &src_a); new_a = std::ceil(fraction * src_a); *target_pixel = SDL_MapRGBA(surf->format, r, g, b, new_a); /* <- here */ }; int x; int y; auto LoopY = [&](int a_x) { if (axis) for (y = y_start; y < y_target; y++) AdjustPixelAlpha(a_x, y); else for (y = y_start; y > y_target; y--) AdjustPixelAlpha(a_x, y); }; if (axis) for (x = x_start; x < x_target; x++) LoopY(x); else for (x = x_start; x > x_target; x--) LoopY(x); SDL_UnlockSurface(surf); }
btw in the last else thing in the loop shouldn't it be a >= instead of a >? (edited)
Avatar
Avatar
fokkonaut
google fanboy
Native is Always better
8:31AM
Less shit
Avatar
Avatar
Teero
btw in the last else thing in the loop shouldn't it be a >= instead of a >? (edited)
perhaps
Avatar
thats true yes
Avatar
it was but then i changed it to see if it was making an oob access (and it wasn't)
8:32AM
but i forgot to change it back
Avatar
Avatar
Teero
btw in the last else thing in the loop shouldn't it be a >= instead of a >? (edited)
Same for the other backwards forloops
8:35AM
Btw when you return you want to unlock the surface again if that's a thing
Avatar
um i did
Avatar
In the exceptions
8:36AM
The if after the lock
Avatar
oh yeah i missed that
8:36AM
thanks
8:37AM
not the issue tho
8:41AM
Well you just can't write to a locked surface with SDL_MapRGBA right?
Avatar
ah wait
Avatar
i also tried a SDL_memcpy
8:44AM
which did not work
8:44AM
cuz it wouldn't do anything differently
Avatar
Why use Sdl functions anyway?
8:45AM
unknown endianness and pixel format
8:45AM
sdl functions account for all of that (edited)
Avatar
i'll have to sleep on it
Avatar
Avatar
ReiTW
Seems like not
Seems the 8 pro does use a samsung oled panel, I wonder how dxomark grades the display
Avatar
heinrich5991 10/16/2023 1:12PM
what's the best UX for the ipv6 registering? perhaps only show errors the first time?
Avatar
Yes, would be nice to have a message "ipv6 registering failed, will ignore it from now on"
2:30PM
Also maybe a message that this doesn't mean that the registering failed in total. Would be best to wait until both register attempts are finished, then print registered on ipv4, ipv6 if both worked, or registered on ipv4 if only that worked. I think many won't even know what ipv6 is and just read the error as "registering failed"
Avatar
@Learath2 is C __uint128_t something i can expect to be in most modern compilers?
2:52PM
or should i use unsigned __int128
Avatar
If int128 is there uint128 will be there too
Avatar
but apparently unsigned __int128 is the way
2:55PM
there is no __uint128
2:55PM
iirc
2:55PM
without the _t
2:56PM
I want a 128 bit integer because I want to store results of multiplication of two 64 bit numbers. Is there any such thing in gcc 4.4 and above?
Avatar
Oh without the t hmm
Avatar
typedef unsigned _BitInt(128) u128
2:56PM
this is C23 feature
2:56PM
i wish it was earlier
2:56PM
arbitrary bit ints (edited)
3:00PM
#define __GLIBCXX_TYPE_INT_N_0 __int128 #define __GLIBCXX_BITSIZE_INT_N_0 128 apparently u need this if u want libstdc++ to handle them too
Avatar
@Jupstar βœͺ new pfp
3:09PM
i think its better
Avatar
Avatar
Ryozuki
typedef unsigned _BitInt(128) u128
The only piece of code I ever used a 128 bit integer in seems to use the uint128_t
Avatar
Avatar
Ryozuki
@Jupstar βœͺ new pfp
Jupstar βœͺ 10/16/2023 3:25PM
epic
Avatar
i also changed it on gh
3:26PM
cuz i was bored of the fish
3:26PM
no more fish
Avatar
Jupstar βœͺ 10/16/2023 3:28PM
+30% coding skill
Avatar
Is it anime girl on gh?
3:29PM
If so you are now the bestest programmist among us
Avatar
@Ryozuki when v-tuber rust coding stream?
Avatar
ryozuki still has anime pfp on gh
Avatar
Avatar
Voxel
ryozuki still has anime pfp on gh
i mean i just put it now
3:29PM
before i had a fish
Avatar
Avatar
Learath2
If so you are now the bestest programmist among us
it is
3:30PM
i have no fear
Avatar
ok now fix all 512+ issues
Avatar
since i have a anime pfp i can only code in rust
3:31PM
as its a weeb lang
Avatar
fake programmer
Avatar
Avatar
Ryozuki
i have no fear
Fearless concurrency?
Avatar
fearless weebency
Avatar
heinrich5991 10/16/2023 3:36PM
@Learath2 know a tool that can show me the dependencies of a dll on windows?
Avatar
Jupstar βœͺ 10/16/2023 3:38PM
wine-dump
3:38PM
its hilarious u need wine
3:38PM
wine better than win itself
Avatar
Avatar
Jupstar βœͺ
wine-dump
heinrich5991 10/16/2023 3:38PM
I don't have that installed, where do I get it?
Avatar
Avatar
Ryozuki
its hilarious u need wine
heinrich5991 10/16/2023 3:39PM
unlikely that you need wine, probably just because we're mostly using linux here
Avatar
Jupstar βœͺ 10/16/2023 3:39PM
i dunno, mingw package manager
3:39PM
u can download the packages
3:39PM
without pacman
Avatar
heinrich5991 10/16/2023 3:39PM
ah, on windows? tried on my arch linux
Avatar
my coffee got cold again
Avatar
sometimes i wonder when someone will ask for how to do something on windows and one of you guys will send the arch/gentoo installation website
Avatar
heinrich5991 10/16/2023 3:42PM
already happened, I think
Avatar
Avatar
heinrich5991
@Learath2 know a tool that can show me the dependencies of a dll on windows?
heinrich5991 10/16/2023 3:49PM
actually sounds like something where chatgpt might be helpful
Avatar
Avatar
heinrich5991
actually sounds like something where chatgpt might be helpful
heinrich5991 10/16/2023 3:52PM
indeed: it suggested dependency walker
Avatar
Avatar
heinrich5991
@Learath2 know a tool that can show me the dependencies of a dll on windows?
On windows or on linux?
Avatar
Avatar
Learath2
On windows or on linux?
heinrich5991 10/16/2023 3:52PM
it's right there in the question πŸ˜„ "on windows"
3:53PM
500 KiB tool
3:53PM
I wonder how they build it
Avatar
If you have VC there is a dumpbin
Avatar
Avatar
heinrich5991
indeed: it suggested dependency walker
I used this too, it's much more userfriendly
Avatar
heinrich5991 10/16/2023 3:56PM
is there an equivalent to rpath on windows? (edited)
Avatar
heinrich5991 10/16/2023 3:59PM
@Learath2 do you know whether I can get a more useful error than "File not found" from LoadLibrary?
3:59PM
I guess tracing the dynamic linker… don't want to do that
Avatar
Avatar
heinrich5991
@Learath2 do you know whether I can get a more useful error than "File not found" from LoadLibrary?
Uhhhhm, where do you get the "File not found"?
4:01PM
I'm guessing GetLastError
Avatar
heinrich5991 10/16/2023 4:02PM
yup, GetLastError
Avatar
I'm afraid that's all I know aswell. You'll have to trace
4:03PM
API Monitor is the only tool I know for it
4:04PM
Or maybe you can intercept a couple file opening functions and hope you get lucky?
4:05PM
Secure Connection Failed An error occurred during a connection to www.rohitab.com. Peer using unsupported version of security protocol. Error code: SSL_ERROR_UNSUPPORTED_VERSION The page you are trying to view cannot be shown because the authenticity of the received data could not be verified. Please contact the website owners to inform them of this problem. This website might not support the TLS 1.2 protocol, which is the minimum version supported by Firefox.
Avatar
Apparently ProcMon can trace api calls too
Avatar
Avatar
heinrich5991
Secure Connection Failed An error occurred during a connection to www.rohitab.com. Peer using unsupported version of security protocol. Error code: SSL_ERROR_UNSUPPORTED_VERSION The page you are trying to view cannot be shown because the authenticity of the received data could not be verified. Please contact the website owners to inform them of this problem. This website might not support the TLS 1.2 protocol, which is the minimum version supported by Firefox.
Yeah, it's ancient 😭
4:08PM
Windows debugging tooling is all from a couple decades ago
Avatar
average windows dev experience
Avatar
heinrich5991 10/16/2023 4:08PM
but the tooling is kinda nice, quite polished IME
Avatar
whats ime
Avatar
heinrich5991 10/16/2023 4:09PM
in my experience
Avatar
Windbg has a logger but idk if it ever became 64bit aware
Avatar
heinrich5991 10/16/2023 4:09PM
the certificate for rohitab.com also expired in 2020
Avatar
Avatar
heinrich5991
but the tooling is kinda nice, quite polished IME
Except for visual studio, what tooling is there even? Most everything is ancient broken tools
Avatar
heinrich5991 10/16/2023 4:09PM
how is that servers still online? ^^
Avatar
Avatar
Learath2
Except for visual studio, what tooling is there even? Most everything is ancient broken tools
heinrich5991 10/16/2023 4:10PM
random tools from third parties that work nicely for what they do, also with polished UIs
4:10PM
e.g. x64dbg
4:10PM
or the .net decompiler whose name I forgot
Avatar
Avatar
heinrich5991
or the .net decompiler whose name I forgot
Oh this one is a nice tool indeed
4:14PM
I'm honestly far more used to gdb, but I do see the charm to the nice ui
Avatar
Avatar
heinrich5991
random tools from third parties that work nicely for what they do, also with polished UIs
CFF Explorer is nice too now that I think about it
Avatar
heinrich5991 10/16/2023 4:16PM
how are we gonna fix up strace to work with uring btw?
Avatar
On linux or without it I'm stuck with python and pefile, which is nice but definitely not as pretty and simple πŸ˜„
Avatar
heinrich5991 10/16/2023 4:17PM
what's cff explorer?
Avatar
Avatar
heinrich5991
what's cff explorer?
A PE file editor
Avatar
heinrich5991 10/16/2023 4:17PM
ah, nice πŸ™‚
4:17PM
does it work with obfuscated binaries?
Avatar
Avatar
heinrich5991
how are we gonna fix up strace to work with uring btw?
I don't think there is any decent fix to it tbf
Avatar
Avatar
heinrich5991
does it work with obfuscated binaries?
If it's a valid or atleast runnable PE file, it'll work. It's very aggressive. But it does crash if some kinds of binary trickery is employed
4:19PM
One bot client we encountered broke it. It's the ghidra PR I made πŸ˜„
4:19PM
It broke ghidra too
Avatar
heinrich5991 10/16/2023 4:21PM
^^
Avatar
Avatar
heinrich5991
@Learath2 know a tool that can show me the dependencies of a dll on windows?
objdump -p program.exe | grep "DLL Name:" ?
Avatar
Avatar
deen
objdump -p program.exe | grep "DLL Name:" ?
using git bash u can simply do ldd prog.exe
5:25PM
$ ldd DDNet.exe ntdll.dll => /c/Windows/SYSTEM32/ntdll.dll (0x7ff832230000) KERNEL32.DLL => /c/Windows/System32/KERNEL32.DLL (0x7ff830f60000) KERNELBASE.dll => /c/Windows/System32/KERNELBASE.dll (0x7ff82f810000) ADVAPI32.dll => /c/Windows/System32/ADVAPI32.dll (0x7ff831db0000) msvcrt.dll => /c/Windows/System32/msvcrt.dll (0x7ff831890000) ... (edited)
Avatar
I'm very confused about Windows. The client seems to consistently use 5-10 MB less RAM when I rename it to DDNet_2.exe
5:35PM
My measurements for #7353 first made me think that using more threads makes the client use less RAM
Avatar
See commit messages. Checklist Tested the change ingame Provided screenshots if it is a visual change Tested in combination with possibly related configuration options Written a unit test (esp...
Avatar
That exe has a different name, so somehow this influences the memory usage pepeW
Avatar
its the sign that ddnet 2 has to happen
Avatar
Avatar
heinrich5991
@Learath2 know a tool that can show me the dependencies of a dll on windows?
dependency walker
8:03PM
oh sorry you found it already
Avatar
See commit messages.

Checklist

  • [X] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test (especially base/) or added coverage to integration test
  • [X] Considered possible null pointers and out of bounds array indexing
  • [X] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet...
Avatar
cd4a13e Remove unnecessary check for open file in ReadChunkHeader - Robyt3 c3b8c94 Use std::vector for demo player keyframes - Robyt3 82d94fa Refactor GetDemoName using IStorage::StripPathAndExtension - Robyt3 5681771 Remove unnecessary parentheses - Robyt3 1333ac3 Use nullptr instead of 0 and NULL - Robyt3 9b68b9d Use bool instead of int - Robyt3 dbbae72 Move variable declarations closer to usages - Robyt3 f7b8738 Remove obsolete TODO about improving demo player map checking - Robyt3 ed92a9e Remove redundant checks for missing SHA256 when recording demo - Robyt3 af4b1c9 Remove tick error debug message - Robyt3 f1e74c1 Remove unused IDemoPlayer::GetDemoType and enum literals - Robyt3 f06f65d Merge pull request #7354 from Robyt3/Engine-Demo-Refactoring - def-
Avatar
i had an oversight
Avatar
Avatar
Ewan
void RenderUtilities::FadeSurfaceOut(SDL_Surface *surf, const SDL_Rect *rect, bool axis, bool direction) { if (!SDLUtilities::SurfaceIsValid(surf) || surf->format->Amask == 0) // surface is invalid or doesn't have an alpha channel return; SDL_LockSurface(surf); int x_start = rect->x + (axis ? 0 : rect->w); int x_target = rect->x + (axis ? rect->w : 0); int y_start = rect->y + (axis ? 0 : rect->h); int y_target = rect->y + (axis ? rect->h : 0); if (x_target > surf->w || y_target > surf->h) return; auto AdjustPixelAlpha = [&](int a_x, int a_y) { static uint32_t *pixels, *target_pixel = nullptr; static uint8_t r, g, b, src_a, new_a; static float fraction; pixels = reinterpret_cast<uint32_t *>(surf->pixels); target_pixel = &pixels[((a_y * surf->pitch) / surf->format->BytesPerPixel) + a_x]; if (axis) fraction = direction ? (float(a_x - x_start) / float(x_target - x_start)) : (float(a_y - y_start) / float(y_target - y_start)); else fraction = direction ? (float(x_start - a_x) / float(x_start - x_target)) : (float(y_start - a_y) / float(y_start - y_target)); SDL_GetRGBA(*target_pixel, surf->format, &r, &g, &b, &src_a); new_a = std::ceil(fraction * src_a); *target_pixel = SDL_MapRGBA(surf->format, r, g, b, new_a); /* <- here */ }; int x; int y; auto LoopY = [&](int a_x) { if (axis) for (y = y_start; y < y_target; y++) AdjustPixelAlpha(a_x, y); else for (y = y_start; y > y_target; y--) AdjustPixelAlpha(a_x, y); }; if (axis) for (x = x_start; x < x_target; x++) LoopY(x); else for (x = x_start; x > x_target; x--) LoopY(x); SDL_UnlockSurface(surf); }
my bounds checking was bs
Exported 299 message(s)
Timezone: UTC+0