[Back to Index]

[00:04] <-- _sev left irc: Read error: Connection reset by peer
[00:14] --> _sev joined #scummvm.
[00:14] #scummvm: mode change '+o _sev' by ChanServ!ChanServ@services.
[00:17] <ScummBot> Port build status changed with ff044aa4: Failure: master-motoezx
[00:32] <-- _sev left irc: Ping timeout: 240 seconds
[00:34] --> _sev joined #scummvm.
[00:34] #scummvm: mode change '+o _sev' by ChanServ!ChanServ@services.
[00:37] <ScummBot> Port build status changed with ff044aa4: Failure: master-debian-x86-nullbackend
[01:03] <-- _sev left irc: Ping timeout: 272 seconds
[02:37] <-- SylvainTV left irc: Read error: Connection reset by peer
[02:37] --> DominusExult joined #scummvm.
[02:37] <-- DominusExult left irc: Changing host
[02:37] --> DominusExult joined #scummvm.
[02:40] <-- Dominus left irc: Ping timeout: 260 seconds
[02:40] Nick change: DominusExult -> Dominus
[03:09] <-- JohnnyonFlame left irc: Read error: Connection reset by peer
[03:09] <-- lb_ii left irc: Ping timeout: 260 seconds
[04:00] --> _sev joined #scummvm.
[04:00] #scummvm: mode change '+o _sev' by ChanServ!ChanServ@services.
[04:06] --> Strangerke_ joined #scummvm.
[04:08] <-- Strangerke left irc: Ping timeout: 240 seconds
[04:08] Nick change: Strangerke_ -> Strangerke
[04:24] --> JohnnyonFlame joined #scummvm.
[04:40] <-- BeefEats left irc: Read error: Connection reset by peer
[05:31] <-- Dominus left irc: Ping timeout: 260 seconds
[05:39] <Scummette> [scummvm] dreammaster pushed 1 new commits to master: https://git.io/JvcVG
[05:39] <Scummette> scummvm/master 44f5bed dreammaster: ULTIMA8: Fixing uninitialized field warnings
[05:51] --> Dominus joined #scummvm.
[05:51] <-- Dominus left irc: Changing host
[05:51] --> Dominus joined #scummvm.
[06:06] --> Begasus joined #scummvm.
[06:10] <-- Dominus left irc: Ping timeout: 272 seconds
[06:14] --> Dominus joined #scummvm.
[06:14] <-- Dominus left irc: Changing host
[06:14] --> Dominus joined #scummvm.
[06:41] <-- eriktorbjorn left irc: Quit: Leaving.
[06:41] <grogbot> <ZvikaZ> Hi. I've just installed ScummVM on a new computer, and MS defender SmartScreen tried to block it. Are we aware of this?
[06:43] <grogbot> <SupSuper> it will do that for any new download, unless you shell out for a digital signature
[06:44] <grogbot> <ZvikaZ> The only way to fix that is with money? What othet Open Source projects are doing?
[06:46] <grogbot> <ZvikaZ> And others weird thing - I've downloaded 2.1.1 Windows release binary. After installation, when I run, it suggested to download a newer version, 2.1.1a
[06:49] <-- dreammaster left irc:
[06:51] <grogbot> <ZvikaZ> And another thing... I tried to use it with Hebrew, and it's completely unusable. I think it's better to not allow this on Release binaries (or at least, make it not default, and warn that it's work in progress) until we will support BiDi.
[06:51] --> jamm joined #scummvm.
[06:54] <grogbot> <SupSuper> windows releases are probably a question for @rootfather
[06:55] <grogbot> <SupSuper> and it's not worth signing executables unless you're an enterprise, windows will always alert of "unknown" new exes, because not enough people have downloaded them to be trusted
[07:08] <grogbot> <ZvikaZ> Makes sense. But we should address that in the Downloads page. I assume there are users that download ScummVM, get this scary notice, and either gey afraid and avoid running, or even if they still want to run, they don't know how to ignore that message (it's not straightforward to click that "more info" button...)
[07:17] --> freanux joined #scummvm.
[07:48] <-- Begasus left irc: Ping timeout: 246 seconds
[07:48] --> Begasus joined #scummvm.
[08:00] --> waltervn joined #scummvm.
[08:00] #scummvm: mode change '+o waltervn' by ChanServ!ChanServ@services.
[08:00] <-- cd left irc: Quit: cd
[08:03] <grogbot> <antoniou79> The download of a newer version is due to updates (via WinSparkle library (windows only)) are enabled for the release. It is a cool feature.
[08:04] <grogbot> <antoniou79> @ZvikaZ how do you mean completely unusable with Hebrew? What exactly is the issue there?
[08:07] <grogbot> <ZvikaZ> well, I probably exaggerated ๐Ÿคจ . Sorry. What I meant is that everything is reversed (because we don't support BiDi yet). Imagine having seeing words like "trats", "tide", "emag dda" (instead of 'start', 'edit', 'add game') Annoying... Looks gyberish. But yes, it is usable
[08:08] <grogbot> <ZvikaZ> However, I still think that in current situation it shouldn't be default. Most Hebrew speaker can read English, and it's more annoying to get "half-baked-Hebrew" than to get English as default.
[08:09] <grogbot> <antoniou79> Ah, I understand,
[08:10] <grogbot> <SupSuper> ironically in my last project i had bidi support before actual bidi translations
[08:10] <grogbot> <SupSuper> but we should probably flag release-ready languages
[08:17] --> vliaskov joined #scummvm.
[08:42] --> ldevulder joined #scummvm.
[09:08] <-- girafe2 left irc: Read error: Connection reset by peer
[09:09] <-- JohnnyonFlame left irc: Read error: Connection reset by peer
[09:16] <Scummette> [scummvm] SupSuper pushed 2 new commits to master: https://git.io/JvcKj
[09:16] <Scummette> scummvm/master aeddfe1 SupSuper: WIN32: Remove duplicate Polish in Inno Setup file
[09:16] <Scummette> scummvm/master 0043c27 SupSuper: WIN32: Add Portuguese language to Inno Setup file
[09:18] <grogbot> <ZvikaZ> I've looked at https://github.com/fribidi/fribidi which might be the solution for BiDi support - required for Hebrew, Arabic and Parsi support. It looks not complicated, the API is really just one function... However, this library assumes that the strings are Unicode. I understand that currently our strings are coded, in some "code page" according to the used language, am I correct? (and therefore, in order to use that library, I'll
[09:18] <grogbot> need to convert the string to Unicode, run the BiDi algorithm, and then convert back the string from Unicode to the original coding) I did see Unicode mentions in grepping - can someone explain what's the current status of Unicode support, and do we plan to extend it anytime in the foreseeable future?
[09:26] <grogbot> <SupSuper> launcher gui needs to be updated to use unicode strings and fonts first, then you can add bidi. you would also need rtl layout
[09:28] <grogbot> <ZvikaZ> OK, it's beyond my current capacity... Is anyone interested in doing the Unicode transition? Or maybe it could be a nice GSOC project ๐Ÿ˜‰
[09:31] <grogbot> <SupSuper> yes, i suggested it before. we have unicode string support now (used by select engines) so it's not that far
[09:33] <grogbot> <ZvikaZ> well, I hope that your suggestion will be accepted.
[09:34] <grogbot> <ZvikaZ> Another advantage of Unicode support , is that currently it's impossible to enter Hebrew characters (even reversed...) for game names and save game names. I assume it's the same for other special encodings. And I assume that it'll be solved with Unicode.
[09:36] <grogbot> <SupSuper> right, filenames are also mangled if you use the gui browser
[09:38] <grogbot> <ZvikaZ> I meant that it's impossible to even type the Hebrew characters in input dialogs. If I enter a Hebrew character, I see on the screen the equivalent English character that would have been typed had I been in English keyboard.
[09:41] <grogbot> <SupSuper> i don't know who would guide gsoc idea though. i'm quite familiar with the challenges of unicode but not the scummvm gui/language framework
[09:51] <grogbot> <ZvikaZ> Well, I'm new around here, so maybe its nonsense... But maybe it's possible to have a shared guidance? You, together with a gui/language framework expert?
[10:13] Nick change: Polynomi1l-C -> Polynomial-C
[10:33] --> ldevulder_ joined #scummvm.
[10:37] <-- ldevulder left irc: Ping timeout: 265 seconds
[10:40] <-- yuv422 left irc: Remote host closed the connection
[10:40] --> yuv422 joined #scummvm.
[10:40] #scummvm: mode change '+o yuv422' by ChanServ!ChanServ@services.
[11:28] <-- TAS_2012v left irc: Ping timeout: 268 seconds
[11:32] <-- ink0gnito left irc: Quit: ZNC - 1.7.0 - http://znc.in
[11:33] --> ink0gnito joined #scummvm.
[12:32] <-- yuv422 left irc: Remote host closed the connection
[12:32] --> yuv422 joined #scummvm.
[12:32] #scummvm: mode change '+o yuv422' by ChanServ!ChanServ@services.
[13:12] --> nck99 joined #scummvm.
[13:13] <nck99> hi, is anyone there
[13:14] <grogbot> <antoniou79> Hello
[13:15] <nck99> why no conversation is going on here, I can't see anything being discussed.
[13:17] <grogbot> <antoniou79> You could try coming over on discord
[13:18] <grogbot> <antoniou79> Otherwise you could check the irc logs
[13:18] <nck99> wht is the discord channel for scummvm?
[13:19] <grogbot> <antoniou79> https://discord.gg/ReGSkVs
[13:19] <nck99> thanks a lot!!
[13:20] <grogbot> <antoniou79> So, do you have a question about scummvm?
[13:22] <grogbot> <nck99> Yes!! I want to contribute in this organization. How could I possiibly contribute?
[13:23] <grogbot> <nck99> your guidance would help me a lot.
[13:25] <grogbot> <antoniou79> There is lots of things you could help with. It really depends on your skills, your free time and personal preference
[13:25] <grogbot> <antoniou79> Are you interested in contributing to the development?
[13:26] <-- nck99 left irc: Remote host closed the connection
[13:27] <grogbot> <antoniou79> There's some info in the wiki about that https://wiki.scummvm.org/index.php/Developer_Central?
[13:28] <grogbot> <Henke37> the first step should be making your own build
[13:28] <grogbot> <antoniou79> Other areas to contribute would be the wiki manual itself https://wiki.scummvm.org/index.php?title=User_Manual
[13:29] <grogbot> <antoniou79> Or stuff like helping out with translation projects
[13:29] <grogbot> <Henke37> good luck if you dare go for documentation. if the info isn't in the docs, then you have to extract it from the code
[13:29] <grogbot> <nck99> thanks a lot @antoniou79 . I am skilled with c++ and OpenGL. I would try to look out at the existing projects and start asap
[13:31] <grogbot> <GeekOB> Hi @DreamMaster , is there a place in the docs where I can find what folders/files are needed to play the ultima games? Some of the games have subfolders
[13:36] <grogbot> <antoniou79> @nck99 if you find yourself overwhelmed or don't know what to start with, you could have a look at open tickets on the bug tracker. Start with something that seems easy or most exciting to you.
[13:37] <grogbot> <antoniou79> We're also kind of shorthanded as far as the Android port is concerned (and the iOS port, I think).
[13:40] <-- jamm left irc: Ping timeout: 272 seconds
[13:41] <grogbot> <nck99> @antoniou79 thank you for your concern, I will go through the documentations first and then ask if anything creates a problem!
[13:41] <grogbot> <antoniou79> ok, that sounds great
[14:07] <-- Scummette left irc: Ping timeout: 272 seconds
[14:08] --> Scummette joined #scummvm.
[14:14] <-- Begasus left irc: Ping timeout: 272 seconds
[14:27] --> Begasus joined #scummvm.
[14:53] --> TAS_2012v joined #scummvm.
[15:11] <-- TAS_2012v left irc: Ping timeout: 240 seconds
[15:14] --> TAS_2012v joined #scummvm.
[15:37] <grogbot> <ZvikaZ> @SupSuper , regarding our Unicode discussion, and the recent discussion with @nck99, maybe we should create an issue to capture that?
[15:59] --> JohnnyonFlame joined #scummvm.
[16:03] Nick change: ldevulder_ -> ldevulder
[16:18] --> eriktorbjorn joined #scummvm.
[16:18] #scummvm: mode change '+o eriktorbjorn' by ChanServ!ChanServ@services.
[16:37] --> BeefEats joined #scummvm.
[16:39] --> girafe joined #scummvm.
[16:41] --> Deledrius_ joined #scummvm.
[16:44] <-- Deledrius left irc: Ping timeout: 240 seconds
[16:57] <grogbot> <DreamMaster> @GeekOB Not yet. Figuring out the minimum required files to play either game hasn't yet been a priority. I've done the integration into ScummVM simply pointing to my installed GOG copy of the games
[17:06] <grogbot> <GeekOB> Understood, happy to help test if you need
[17:14] <grogbot> <DreamMaster> Sure, when the time comes. The more testers the better
[17:14] <-- _sev left irc: Read error: No route to host
[17:14] --> _sev joined #scummvm.
[17:14] #scummvm: mode change '+o _sev' by ChanServ!ChanServ@services.
[17:45] <-- ny00123 left irc: Read error: Connection reset by peer
[17:46] --> ny00123 joined #scummvm.
[17:47] <grogbot> <GeekOB> ๐Ÿ‘
[18:03] <-- Begasus left irc: Quit: Ex-Chat
[18:15] --> ajax16384 joined #scummvm.
[18:15] #scummvm: mode change '+o ajax16384' by ChanServ!ChanServ@services.
[19:12] #scummvm: mode change '+o Strangerke' by ChanServ!ChanServ@services.
[19:22] --> SylvainTV joined #scummvm.
[19:23] #scummvm: mode change '+o SylvainTV' by ChanServ!ChanServ@services.
[20:26] --> cd joined #scummvm.
[21:23] <-- waltervn left irc: Quit: Leaving
[21:29] <grogbot> <rsn8887> Quick c++ question
[21:31] <grogbot> <rsn8887> If multiple children override a virtual member, which one is used?
[21:31] <grogbot> <rsn8887> Also, what exactly is the use of that override keyword again, I still don't get it.
[21:32] <grogbot> <SupSuper> override just gives you a compiler error if you're not actually overriding anything (catches typos)
[21:32] <grogbot> <Henke37> is this a diamond of death situation?
[21:33] <grogbot> <SupSuper> if you have multiple inheritance you have to specify which parent method you want
[21:33] <grogbot> <rsn8887> Say class A has a member virtual f() override. Class B inherits from A and has public member virtual f() {return false} . Class C inherits from B and does virtual f() override what does that mean?
[21:33] <grogbot> <rsn8887> Then class D inherits from B and does virtual f() {return true}
[21:33] <grogbot> <Henke37> it means that A objects have one implementation, B objects have a second and C objects have a third one
[21:34] <grogbot> <SupSuper> it means if you accidentally called any of those ff() you would get an error
[21:34] <grogbot> <SupSuper> without override that would not happen
[21:34] <grogbot> <rsn8887> I don't think so?!
[21:34] <grogbot> <Henke37> note his intentional typo there
[21:34] <-- ajax16384 left irc: Quit: Leaving
[21:34] <grogbot> <Henke37> the implementation used in a virtual member function depends on the identity of the object
[21:35] <grogbot> <Henke37> which is the most derived class? that's the implementation it will use.
[21:35] <grogbot> <rsn8887> class A wants an override, class B overrides the function, class C wants an override again, class D overrides it again.
[21:35] <grogbot> <Henke37> in other words, the object itself knows which member function will be used
[21:36] <grogbot> <rsn8887> if it is an override virtual function it has to look down in the hierarchy?
[21:36] <grogbot> <rsn8887> How can it go down?
[21:36] <grogbot> <rsn8887> It should only go up?
[21:36] <grogbot> <Henke37> the override keyword is irrelevant here
[21:36] <grogbot> <rsn8887> I thought override enforces that the function be implemented in a child.
[21:37] <grogbot> <SupSuper> no
[21:37] <grogbot> <SupSuper> say you have cpp class A { virtual f() } class B : A { virtual f() } class C : B { virtual f() } C obj; obj->f(); this will always call C::f()
[21:37] <grogbot> <Henke37> it is the child enforcing that itself is indeed overriding a function found in a base class
[21:37] <grogbot> <rsn8887> so if the function is declared virtual f(), it HAS to be implemented by the class declaring it?
[21:38] <grogbot> <SupSuper> but say i make a typo: cpp class A { virtual f() } class B : A { virtual f() } class C : B { virtual ff() } C obj; obj->f(); now suddenly i'm actually calling B::f() without notice
[21:38] <grogbot> <SupSuper> if i do: cpp class A { virtual f() } class B : A { virtual f() override } class C : B { virtual ff() override } C obj; obj->f(); now it's an error because ff() is not overriding a parent ff()
[21:38] <grogbot> <Henke37> btw, it's not ->, that's only for pointers. the correct syntax is obj.f()
[21:38] <grogbot> <rsn8887> So a function declared as virtual has to be implemented in the same class? I thought it could be left blank, like an interface?
[21:38] <grogbot> <rsn8887> and implemented "further down"
[21:39] <grogbot> <Henke37> yes and no.
[21:39] <grogbot> <SupSuper> you are mixing up concepts from other languages
[21:39] <grogbot> <SupSuper> inheritance always works by default, no keywords necessary
[21:39] <grogbot> <SupSuper> B::f() will always override A::f() etc
[21:39] <grogbot> <Henke37> a virtual member function can be marked as pure virtual. a class with pure virtual member functions can not be the most derived class for a fully constructed object
[21:40] <grogbot> <rsn8887> how is it marked pure virtual? Is that not override?
[21:40] <grogbot> <Henke37> cpp class Abstract { virtual f() = 0; }
[21:41] <grogbot> <SupSuper> "override" just means "this function has to be overriding a parent function. otherwise it's an error"
[21:41] <grogbot> <SupSuper> it makes it explicit what your intentions are
[21:41] <grogbot> <Henke37> override was a late addition to c++. only like a decade old
[21:41] <grogbot> <rsn8887> So in that case, an object of type Abstract can never be instantiated?
[21:41] <grogbot> <rsn8887> Is that a compiler error?
[21:41] <grogbot> <rsn8887> What if I cast to Abstract? Which function implementation is called?
[21:41] <grogbot> <Henke37> cpp class Derived : public Abstract { f() { return 42;} }
[21:42] <grogbot> <Henke37> you can cast a pointer to Derived to a pointer to Abstract. it being a pointer is critical here
[21:43] <grogbot> <Henke37> you can't cast the actual object here.
[21:43] <grogbot> <Henke37> this cast is even allowed to be implicit.
[21:43] <grogbot> <rsn8887> If I create an object pointer of type Derived. Than I cast it to Abstract and call f. What does it do?
[21:44] <grogbot> <Henke37> compile error, you have to cast the pointer
[21:44] <grogbot> <rsn8887> The abstract pointer has to be cast to a child pointer type first before dereferencing?
[21:45] <grogbot> <Henke37> it does not
[21:45] <grogbot> <Henke37> if you have a pointer to a Derived object, it doesn't matter if the type of the pointer is "pointer to Abstract", because f is virtual
[21:46] <grogbot> <Henke37> the virtual keyword means that Derived::f is called even if the pointer is of type "pointer to Abstract"
[21:47] <grogbot> <Henke37> the c++ implementation will use magic to ensure that this happens.
[21:48] <grogbot> <Henke37> filling in that hole marked as "magic" is left for a more advanced class that delves into typical c++ implementations
[21:49] <grogbot> <SupSuper> in practice you will always wanna mark stuff as virtual and override appropriately unless you really care about their performance implications
[21:49] <grogbot> <Henke37> now you may ask, what if Abstract didn't mark f as virtual? in short: Abstract::f would be called.
[21:52] <grogbot> <Henke37> To sum it all up: cpp Abstract *ap=new Derived(); ap->f();//calls Abstract::f() if not virtual. calls Derived::f() if virtual
[22:06] <-- angel_killah left irc: Ping timeout: 260 seconds
[22:22] <grogbot> <rsn8887> But abstract f is a null pointer?
[22:22] <grogbot> <rsn8887> how can it be called?
[22:22] <grogbot> <rsn8887> Also, I find it extremely disturbing that derived f is called when the pointer type is abstract.
[22:22] <grogbot> <rsn8887> How am I supposed to remember that when looking at code.
[22:23] <grogbot> <rsn8887> So virtual means it does go down the hierarchy.
[22:23] <grogbot> <Henke37> if ap is nullptr then the result is BADNESS
[22:23] <grogbot> <rsn8887> I don't like anything going down. What if there's two children? It remembers, but I won't.
[22:23] <grogbot> <rsn8887> Makes code unreadable IMO.
[22:23] <grogbot> <rsn8887> What if there's nothing there going down?
[22:24] <grogbot> <rsn8887> E.g. the function is never implemented not even in the child?
[22:26] <grogbot> <Henke37> that's not legal. cpp class PureAbstract { virtual void f() =0; } class Fractional : public Abstract { } Fractional fr;//Error: can't instantiate a class with at least one pure virtual member function
[22:28] <grogbot> <rsn8887> class PureAbstract { virtual void f() =0; } class Fractional : public PureAbstract { } class Child : public Fractional { virtual Child::f() { return false;} }; Child fr; fr.f();
[22:28] <grogbot> <rsn8887> So this works?
[22:28] <grogbot> <Henke37> that's legal and it works.
[22:28] <grogbot> <Henke37> i mean, you got the return type messed up, but i will excuse that
[22:29] <grogbot> <Henke37> i'v committed an offence or two myself here. for one thing, f isn't public in PureAbstract
[22:32] <grogbot> <Henke37> let me know when you are ready for "Virtual member functions 201: Objects in C++ live exciting lives"
[22:34] <grogbot> <rsn8887> Why would concoct all this complexity?
[22:34] <grogbot> <rsn8887> It reminds me of garbage collection.
[22:35] <grogbot> <Henke37> one word: polymorphism
[22:35] <grogbot> <Henke37> lets use a familiar example. We (the scummvm project) have a class called Engine.
[22:35] <grogbot> <SupSuper> because performance. c++ is "you pay for what you use" and they want you being explicit about it
[22:36] <grogbot> <rsn8887> Like all this stuff happening behind the scenes must add additional computational complexity. I bet in c++ suddenly simple function calls suddently become O(n^2) if the hierarchy is large or whatever.
[22:36] <grogbot> <Henke37> the Engine class has a bunch of cool member functions. but each engine in the project has radically different ideas of how to implement them
[22:36] <grogbot> <rsn8887> Because it has to traverse some tree just to call a simple funciton
[22:36] <grogbot> <Henke37> it's actually quite efficient. it will be covered in "Virtual member functions 202: Virtual tables and you"
[22:38] <grogbot> <rsn8887> Eventually I always get to const_cast or whatever and throw my hands in the air.
[22:38] <grogbot> <rsn8887> implicit_cast etc.
[22:38] <grogbot> <rsn8887> Meh.
[22:38] <grogbot> <rsn8887> dynamic_cast
[22:38] <grogbot> <rsn8887> static_cast lol
[22:38] <grogbot> <rsn8887> insane
[22:38] <grogbot> <Henke37> static_cast is the least disliked one
[22:39] <grogbot> <rsn8887> Everybody says casting should be avoided like tha plaque, then they built a whole language around it lol.
[22:39] <grogbot> <Henke37> dynamic_cast is... bad. so bad that the standard doesn't define a complexity requirement for it.
[22:39] <grogbot> <Henke37> but static_cast is quite fine where really needed.
[22:39] <grogbot> <rsn8887> The fact that C++ cannot exist without dynamic_cast, that it is necessary in some cases...
[22:40] <grogbot> <Henke37> some rather rare cases actually.
[22:40] <grogbot> <Henke37> using virtual member functions is usually more than enough. and those are fast
[22:42] <grogbot> <rsn8887> ScummVM uses dynamic_cast about 600 times.
[22:44] <grogbot> <Henke37> it also has 75+ engines
[22:45] <grogbot> <rsn8887> I think dynamic_cast is like the only way to actually find out what type some pointer is. void SdlGraphicsManager::saveScreenshot() { Common::String filename; Common::String screenshotsPath; OSystem_SDL *sdl_g_system = dynamic_cast<OSystem_SDL*>(g_system); if (sdl_g_system) screenshotsPath = sdl_g_system->getScreenshotsPath();
[22:46] <grogbot> <rsn8887> So here it is used to ensure that g_system is really an OSystem_SDL because, well, without it, all bets are off.
[22:47] <grogbot> <rsn8887> I guess one could just implement a virtual function in each class which returns a string with the class name, then compare strings.
[22:48] <grogbot> <Henke37> except, the rules for casts aren't that simple
[22:48] <grogbot> <rsn8887> Because in c++, for some reason, I cannot access the names of things from within the language at all.
[22:48] <grogbot> <Henke37> they may even be so complex that the actual dynamic_cast implementation gets them wrong
[22:49] <grogbot> <rsn8887> this is another thing that has bothered me: Say I have variables int x0; int x1; int x2; int ...
[22:49] <grogbot> <rsn8887> How do I loop across them?
[22:49] <grogbot> <Henke37> you can't. should've used std::vector
[22:50] <grogbot> <Henke37> C++ does not make any promises about where in memory the variables are.
[22:50] <grogbot> <rsn8887> it should be possible IMO to dynamically adress variable names, like for each (x?) do
[22:50] <grogbot> <rsn8887> I see in most complex programs, eventually it reverts back to strings for everything.
[22:51] <grogbot> <Henke37> heck, the implementation is allowed to remove the variables using the "as-if" rule.
[22:51] <grogbot> <rsn8887> and uses strcmp to achieve some such things.
[22:51] <grogbot> <rsn8887> ScummVM does that too with option names etc.
[22:51] <grogbot> <Henke37> it is a perfectly legal optimization to remove variables that the optimizer thinks is pointless
[22:51] <grogbot> <rsn8887> They are all strings, not just in the config file only, but even in memory.
[22:52] <grogbot> <rsn8887> But there's still some functionality missing there IMO, not just what you mean.
[22:53] <grogbot> <rsn8887> I think the functionality that is missing is to construct a variable name dynamically from a string. That's it.
[22:53] <grogbot> <Henke37> again, allowed to remove variables
[22:54] <Scummette> [scummvm] antoniou79 pushed 2 new commits to master: https://git.io/JvCUL
[22:54] <Scummette> scummvm/master d6bbc67 antoniou79: GUI: Fix invalid message when browser path was chosen empty
[22:54] <Scummette> scummvm/master 6e7bfc5 antoniou79: GUI: Don't store an invalid browser_lastpath in updateListing()
[22:55] <grogbot> <rsn8887> The only way to do it is to create some kind of struct with a string and value member.
[22:55] <grogbot> <rsn8887> But it is still not the same.
[22:55] <grogbot> <Henke37> because that's how it is in the actual hardware
[22:56] <grogbot> <Henke37> things aren't named in machine code for the simple reason that they don't need to be
[22:57] <grogbot> <rsn8887> Well they are named, it is just all hex numbers.
[22:57] <grogbot> <rsn8887> Not very convenient.
[22:59] <grogbot> <DreamMaster> Variables can even be in registers only
[23:01] <grogbot> <rsn8887> In lua I was able to do things like for i=1,maxNumPlayers do tileMapContents["player"..i] = { {"player"..i.."NoGear","none",1}, {"player"..i.."NoGear","destroyed",8}, {"player"..i.."NoGearRight","none",1}, {"player"..i.."NoGearRight","destroyed",8}, {"player"..i.."Gear","none",1}, {"player"..i.."Gear","destroyed",8}, {"player"..i.."GearRight","none",1},
[23:01] <grogbot> {"player"..i.."GearRight","destroyed",8}, {"player"..i.."Gear","roughLanding",6}, {"player"..i.."GearRight","roughLanding",6}, } end
[23:01] <grogbot> <DreamMaster> In some cases where it's been desirable to have both an array and individual members at the same time, I've defined an array, and then used C++ reference variables to be mapped to a specific array index.
[23:01] <grogbot> <rsn8887> I just haven't found a good way in c++ for such stuff.
[23:01] <-- ny00123 left irc: Quit: Leaving
[23:01] --> ny00123 joined #scummvm.
[23:02] <grogbot> <DreamMaster> Occassionally C++ references can actually be good for something.
[23:02] <grogbot> <Henke37> use real containers instead of gluing strings together to make up variable names
[23:03] <grogbot> <rsn8887> I think lua is more lisp like. C++ is diametrically opposite from lisp.
[23:03] <grogbot> <DreamMaster> Like in the Xeen engine, which had a massive array of draw structures for the elements of the scene, yet it was more convenient to have some of the important indexes referred to by specific variables rather than having to keep using the array and specifying index constants
[23:10] <grogbot> <Henke37> anyway, so see why there are virtual member functions, try looking at Engine::run(), which is virtual. pure virtual even.
[23:11] <grogbot> <Henke37> each engine has a radically different implementation of run() (to my great dislike), but the calling code need not know any of the details
[23:11] <grogbot> <Henke37> all it knows is that if it calls the run() member function then the engine does what that particular engine needs to do.
[23:15] <grogbot> <rsn8887> The main problem I have is understanding ModularBackend and BaseBackend.
[23:17] <grogbot> <rsn8887> ModularBackend is a child of BaseBackend which is a child of OSystem.
[23:17] <grogbot> <rsn8887> But the platform backends like OSystem_PSP2 are also children of OSystem.
[23:18] <grogbot> <Henke37> i admit, some of the layers of inhertience could be cut
[23:18] <grogbot> <rsn8887> And somehow, if a function is not implemented in OSystem_PSP2, it goes all the way up to OSystem, then back down into ModularBackend?!?!
[23:18] <grogbot> <rsn8887> How on earth does it traverse that tree?
[23:18] <grogbot> <rsn8887> It goes all the way up, then back down.
[23:19] <grogbot> <rsn8887> Somehow ModularBackend contains the default functions that are used if no other one is found.
[23:20] <grogbot> <Henke37> lets start with a basic fact: all of this is figured out at compile time. no runtime cost.
[23:20] <grogbot> <rsn8887> But it would be so much simpler if those defaults would just be in OSystem instead of making a whole nother two children named BaseBackend and ModularBackend that branch of from OSystem.
[23:20] <grogbot> <Henke37> again, agreed
[23:20] <grogbot> <Henke37> this design is needlessly complicated
[23:21] <grogbot> <rsn8887> Is there even a reason to have BaseBackend and ModularBackend? Is there a functionality in c++ where the "defaults" just reside in OSystem, the parent of it all?
[23:22] <grogbot> <rsn8887> Because when I look at OSystem, there's nothing that tells me that there's another set of children "next to" OSystem_PSP2 etc.
[23:22] <grogbot> <Henke37> c++ can certainly do it. no requirement from c++ here
[23:22] <grogbot> <Henke37> C++ is not to blame for this mess
[23:22] <grogbot> <rsn8887> I wonder what the rationale was to have those things.
[23:23] <grogbot> <rsn8887> There must have been a reason, because no-one in their right mind would just make up "BaseBackend" and "ModularBackend" jsut for fun ๐Ÿ™‚
[23:26] <grogbot> <ccawley2011> The reason why BaseBackend is separate from OSystem is because the implementations of fillScreen() and displayMessageOnOSD() in BaseBackend call functions from Graphics and GUI respectively.
[23:27] <grogbot> <ccawley2011> If they were in the base OSystem class, it would break the test runner, which doesn't link to either of those modules.
[23:27] <grogbot> <rsn8887> I see.
[23:28] <grogbot> <rsn8887> So the hierarchy is linear and 1-dimensional apart from test runner shennanigans? OSystem at the top, with child BaseBackend with child ModularBackend with child OSystem_SDL with child OSystem_PSP2 etc. ?
[23:30] <grogbot> <rsn8887> I think I understood it wrong then, and it is much more simple than I thought.
[23:30] <grogbot> <SupSuper> https://doxygen.scummvm.org/d8/d1e/classOSystem__PSP2__inherit__graph.png
[23:30] <grogbot> <rsn8887> Ah nice! So everything is simple!!!!
[23:30] <grogbot> <SupSuper> multi-inheritance (multi parents) is generally avoided as it's more trouble than it's worth
[23:30] <grogbot> <Henke37> do you have any graphs covering more backends at once?
[23:31] <grogbot> <SupSuper> https://doxygen.scummvm.org/d8/dc8/classOSystem__inherit__graph.png
[23:31] <grogbot> <SupSuper> doxygen is handy
[23:32] <grogbot> <rsn8887> and g_system is a true global variable?
[23:33] <grogbot> <DreamMaster> It'd better be, considering how frequently engines use it ๐Ÿ™‚
[23:38] <grogbot> <Henke37> doesn't look like it's going anywhere.
[23:39] <grogbot> <Henke37> it's very handy for my braindrain project
[23:39] <grogbot> <rsn8887> I think whoever ported ScummVM to PSP did quite a feat, because it doesn't use OSystem_SDL and implements everything from scratch
[23:40] <grogbot> <rsn8887> class OSystem_PSP : public EventsBaseBackend, public PaletteManager { ...
[23:40] <grogbot> <rsn8887> It doesn't use modularbackend.
[23:40] <grogbot> <Henke37> maybe not everything. some features are reused without inhertience
[23:42] <grogbot> <rsn8887> How did the porter know which functions to implement?
[23:42] <grogbot> <rsn8887> For example copyRectToScreen
[23:43] <grogbot> <Henke37> again we come back to pure virtual functions.
[23:46] <grogbot> <rsn8887> Ah they are in OSystem (system.h) of course. Nice!
[23:48] <grogbot> <rsn8887> So system.h has the OSystem class declaration. I guess it is not called osystem.h because it has other globals, too.
[23:48] <grogbot> <antoniou79> @SupSuper how come the Android port (OSystem_Android) does not appear in Doxygen graphs?
[23:48] <grogbot> <antoniou79> probably something obvious that I'm missing here.
[23:50] <grogbot> <Henke37> andoid involves Java in ALL APPS
[23:51] <grogbot> <SupSuper> i don't know who maintains doxygen, possibly it's out of date: https://doxygen.scummvm.org/
[23:52] <grogbot> <antoniou79> hmm, I guess it could be that then
[23:53] <grogbot> <SupSuper> there is ANDROIDSDL
[23:53] <grogbot> <SupSuper> maybe the old osystem_android is deprecated?
[23:55] <grogbot> <antoniou79> It's not. They are two different ports and currently the plain port is in active development
[23:56] <grogbot> <antoniou79> But maybe it was considered deprecated when the doxygen was last built/updated?
[23:56] <grogbot> <Henke37> i assumed that it's rerun on each commit?
[00:00] --- Tue Feb 11 2020