05:02 <+sctt_> @heinrich5991: i've finished map_image_replace tool, it works fine! :) 05:03 <+sctt_> @heinrich5991: you think it's worth to make a PR on ddnet for this? maybe it's not so useful for you and you are not interested 05:03 <+sctt_> @heinrich5991: let me know^^ 07:04 <+ddnet-discord> yes, make a pr 11:20 <@heinrich5991> sctt_: as deen said, make a PR, and if you're super awesome, also fix the map_resave tool :) 18:14 < ddnet-commits> [ddnet] sctt opened pull request #844: Fixing map_resave tool (master...master) https://git.io/v5G2x 18:45 <+sctt_> guys before commiting map_image_replace tool i'd like to clean up the code a bit 18:45 <+sctt_> but there is something i'm struggling with 18:47 <+sctt_> currently i've copied and paste function LoadPNG into image_replace_image.cpp cause i wasn't able to include it from graphics_threaded.h 18:48 <+sctt_> it's not a problem for me cause it works, but for an official commit i guess it's not that great 18:48 <+sctt_> do you know if there is any better solution to integrate LoadPNG into a tool? 19:01 <+ddnet-discord> where u buy ddnet servers? 19:04 <+ddnet-discord> i mean the provider 19:08 <@deen> @Ezy which one specifically? 19:08 <@deen> sctt_: move it to a separate header 19:08 <@deen> include in both places 19:08 <@deen> DDNet.tw, GER, USA: nfoservers 19:09 <@deen> RUS: ihor.ru 19:09 <@deen> Chile: zgh.cl 19:09 <@deen> South Africa: clickworks.co.za 19:09 <@deen> CAN: OVH 19:10 <@deen> but they're just ~10 € virtual servers, nothing fancy 19:10 <+sctt_> @deen: ok i will do that, but i'm not an expert of tw structure, can you tell me in which folder would you define that header and with which name? 19:10 <@deen> and we used to jump isps pretty frequently due to ddos attacks, but not so much recently 19:11 <+ddnet-discord> @deen y thats what i need ty 19:11 <@deen> sctt_: no idea :D 19:12 <@deen> sctt_: but the tools link to game_shared and engine, so those are your options 19:13 <+sctt_> @deen: can it be engine/shared/pngutils.h ? 19:15 <@deen> ok i guess 19:15 <+sctt_> ok :D 20:53 <+ddnet-discord> Does anyone here have an idea why SDL2 (SDL however not) tries to disable compositing on kde (even most basic SDL2 programs only displaying an empty window) ? 21:01 <@heinrich5991> what is compositing? 21:02 <@heinrich5991> https://forums.libsdl.org/viewtopic.php?p=52644 21:04 <+ddnet-discord> yes, that is exactly what I did too but now I wonder why SDL2 does this and SDL does not 21:06 <@deen> because compositing increases latency with an extra frame or two 21:07 <@deen> SDL2 is frequently used for low latency applications like gaming 21:07 <@deen> so disabling it is vital 21:07 <@heinrich5991> what is compositing? 21:07 <@deen> See people complaining about having 1 more frame of latency on Windows 21:07 <@deen> with vsync for example, or some weird sdl2 behaviour 21:07 <@deen> https://en.wikipedia.org/wiki/Compositing_window_manager 21:10 <+ddnet-discord> I see unfortunately it seems to break some things on kde, switching workspaces seems to freeze the game and results in timeouts for example. Not sure if this is an error of kde or SDL2. 21:16 <+sctt_> @heinrich55991 do you know if there is something special to do in ddnet to add a new .h? 21:16 <@heinrich5991> add it to the cmakelists.txt, otherwise nothing 21:16 <+sctt_> @heinrich55991 i've changed the MakeFile to add the new files 21:17 <+sctt_> oh so i shouldnt touch the MakeFile 21:17 <@heinrich5991> no 21:17 <@heinrich5991> that is automatically generated 21:17 <+sctt_> oh ok 21:17 <+sctt_> i use make 21:17 <+sctt_> is it allright? 21:17 <+sctt_> i see you have bam and also other tools 21:18 <@heinrich5991> yes, that is all 21:18 <@heinrich5991> in fact, cmake will complain if you don't add it, and bam will pick it up automatically 21:18 <+sctt_> i see 21:18 <+sctt_> can i ask why you have two compilation tools? xD 21:20 <@heinrich5991> because we're kind of in a transition 21:21 <@heinrich5991> cmake isn't there yet 21:21 <+sctt_> oh right that's what i thought 21:21 <+sctt_> @heinrich5991 anyway i still have problems after modifying cmakelists.txt 21:22 <+sctt_> i've got pnglite undefined references like this 21:22 <+sctt_> pngutils.cpp:(.text+0x23): undefined reference to `png_init' 21:22 <+sctt_> but in pngutils.cpp i've included 21:22 <+sctt_> #include 21:23 <@heinrich5991> sctt_: higlight me like this, with a colon instead of an @ 21:23 <@heinrich5991> I don't get highlighted by @s for some reason 21:24 <+sctt_> heinrich5591: ok^^ 21:24 <@heinrich5991> ahh 21:25 <@heinrich5991> you're misspelt my name :D 21:25 <@heinrich5991> just type hein and press tab 21:25 <@heinrich5991> the pnglite.h file just says "there is a function png_init, somewhere" 21:25 <+sctt_> @heinrich5991 lol 21:26 <@heinrich5991> but @ still doesn't seem to work ^^ 21:26 <@heinrich5991> you have to actually add the png_init function to your tool executable 21:27 <+sctt_> heinrich5991: consider it is linking ddnet server 21:27 <+sctt_> Linking CXX executable DDNet-Server 21:27 <@heinrich5991> check line 836 of CMakeLists.tx 21:27 <@heinrich5991> t 21:28 <@heinrich5991> list(APPEND EXTRA_TOOL_SRC ${DEP_PNG}) 21:28 <@heinrich5991> that adds the png stuff to the TOOL if it matches the regex the line before 21:28 <@heinrich5991> if(TOOL MATCHES "^(tileset_|dilate|map_extract$)") 21:29 <@heinrich5991> you could add |your_tool_name there 21:29 <+sctt_> i see 21:29 <+sctt_> but how can i add it to the main binaries? 21:29 <+sctt_> cause i've isolated LoadPNG also for graphic_trheated 21:30 <+sctt_> in fact now it's failing when it tries to link DDnet-Server 21:30 <@heinrich5991> hmm 21:31 <@heinrich5991> not sure that we want a png library in the server 21:31 <@heinrich5991> mh 21:31 <+sctt_> yeah that's seem strange to me too 21:31 <+sctt_> :/ 21:31 <@deen> @HMH update both? 21:31 <+sctt_> only tools and src/engine/client/graphics_threaded.cpp includes that 21:33 <+sctt_> [ 79%] Built target DDNet 21:33 <@heinrich5991> sctt_: dilate.cpp and tileset_*.cpp also uses png stuff, btu without graphics_threaded 21:33 <@heinrich5991> maybe you can pick up something from there? 21:33 <+sctt_> thats what i did before 21:34 <+sctt_> i copied and changed a bit LoadPNG function 21:34 <+sctt_> but that deen suggested me 21:34 <+sctt_> to create another .h file 21:34 <+sctt_> and include that on both my tool and graphics_threaded 21:34 <@deen> ah, so now the cpp has it too 21:34 <@deen> that's wrong, my bad 21:34 <+sctt_> so that's not possible? :( 21:34 <@deen> you need to put the code somewhere else, so that it's not linked into the server 21:35 <+sctt_> mmm 21:35 <@deen> I guess there is nothing that's linked into client and tools, but not server 21:35 <@heinrich5991> not sure if there's a good way to do this without creating a dependency nightmare 21:35 <+sctt_> i see 21:35 <@heinrich5991> also, the LoadPNG function doesn't really do a lot of work 21:35 <@deen> well, you can make it an inline function in the header directly :D 21:35 <@heinrich5991> argh 21:36 <@heinrich5991> in dilate.cpp, there's a stripped down version of LoadPNG 21:36 <+sctt_> you are the experts guys, thell me if it's better to just copy that function or try to include it somewhere 21:36 <@heinrich5991> essentially: 21:36 <+sctt_> oh 21:36 <@heinrich5991> png_t png; 21:36 <@heinrich5991> png_open_file(&png, filename); 21:37 <@heinrich5991> if(png.color_type != PNG_TRUECOLOR_ALPHA) { /* abort */ } 21:37 <+sctt_> yes i see 21:37 <@heinrich5991> allocate, get_data, close_file 21:37 <+sctt_> so i guess i'll stick with replicating part of the logic inside the tool itself 21:38 <+sctt_> no .h 21:38 <@heinrich5991> yeah :/ 21:38 <@heinrich5991> not the best solution, but I don't see a better one 21:38 <+sctt_> yeah well we will live with that^^ 21:53 <+ddnet-discord> @deen nah, already running the latest 21:53 <@deen> then look for bug reports I guess 23:34 <+sctt_> heinrich5991: i've added map_replace_image tool, do you want to take a look? ^^