Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 13:40
    Broxzier labeled #9915
  • 12:51
    ZehMatt review_requested #9915
  • 12:49
    ZehMatt opened #9915
  • 10:43
    ZehMatt commented #9877
  • 10:31
    ZehMatt synchronize #9877
  • Aug 20 22:37
    ZehMatt review_requested #9914
  • Aug 20 22:36
    ZehMatt review_requested #9914
  • Aug 20 22:32
    ZehMatt opened #9914
  • Aug 20 18:47
    Gymnasiast commented #9557
  • Aug 20 17:22
    duncanspumpkin closed #9557
  • Aug 20 17:22

    duncanspumpkin on develop

    Refactor map_is_location_owned … Fix mistake Return a SurfaceElement from ge… and 25 more (compare)

  • Aug 20 17:22
    duncanspumpkin closed #9867
  • Aug 20 09:27
    ZehMatt closed #9728
  • Aug 20 09:27
    ZehMatt commented #9728
  • Aug 20 08:54

    ZehMatt on develop

    Avoid redefining JobPool::AddTa… Merge pull request #9912 from s… (compare)

  • Aug 20 08:54
    ZehMatt closed #9912
  • Aug 20 07:29
    OpenRCT2-git-bot edited #9913
  • Aug 20 07:29
    OpenRCT2-git-bot labeled #9913
  • Aug 20 07:29
    OpenRCT2-git-bot labeled #9913
  • Aug 20 07:29
    OpenRCT2-git-bot assigned #9913
Duncan
@duncanspumpkin
Hmm the banner style is wrong.
Ted John
@IntelOrca
What version is this though?
There were a number of builds where banners and stuff were broken. Unless this can be reproduced in latest build I am not concerned.
Aaron van Geffen
@AaronVanGeffen
But if you reckon the bug has already been fixed, that's fine then :)
Ted John
@IntelOrca
Of course it could be a giant screenshot bug...
I wonder actually if it is now
We have a limit to the number of scroll infos we can create for one single render, perhaps it ran out.
ζeh Matt
@ZehMatt
that just applies to the caching if i recall correctly
Ted John
@IntelOrca
no, sub_98199C takes the scroll index. That scroll index must be immutable until painting is complete.
ζeh Matt
@ZehMatt
i see
r0
@s0r00t
@Gymnasiast did you mean clang-format instead of git clang-format?
oh, my bad, turns out there is a git extension for that. seems like my clang-formatinstall didn't include it... sorry for the mention :/
ζeh Matt
@ZehMatt
are you using visual studio?
r0
@s0r00t
nope
macOS Mojave with MacPorts
ζeh Matt
@ZehMatt
too bad, it has clang-format too
r0
@s0r00t
VS or VS Code?
ζeh Matt
@ZehMatt
i suppose both can do it
but i was talking VS
r0
@s0r00t
i'm not using VS
seems like git-clang-format is not included inside the clang-8.0 port
Michael Steenbeek
@Gymnasiast
You can also do clang-format -i /path/to/file.
r0
@s0r00t
i ended up wget'ing the git script and putting it alongside clang-format
r0
@s0r00t
i just opened another PR for my small JobPool change, please tell me if there's anything wrong
ζeh Matt
@ZehMatt
@s0r00t thanks
Duncan
@duncanspumpkin
{
    constexpr Probability16 _00_14_Percent = 0x005D; // 93
    constexpr Probability16 _00_18_Percent = 0x0077; // 119
    constexpr Probability16 _00_2_Percent = 0x0083;  // 131
    constexpr Probability16 _00_5_Percent = 0x0147;  // 327
    constexpr Probability16 _01_0_Percent = 0x028F;  // 655
    constexpr Probability16 _01_4_Percent = 0x03A8;  // 936
    constexpr Probability16 _02_0_Percent = 0x051E;  // 1310
    constexpr Probability16 _02_2_Percent = 0x05B0;  // 1455
    constexpr Probability16 _02_5_Percent = 0x0666;  // 1638
    constexpr Probability16 _03_3_Percent = 0x0888;  // 2184
    constexpr Probability16 _03_5_Percent = 0x0900;  // 2304
    constexpr Probability16 _03_7_Percent = 0x097B;  // 2427
    constexpr Probability16 _04_0_Percent = 0x0A3D;  // 2621
    constexpr Probability16 _02_0_Percent = 0x0AAA;  // 2730
    constexpr Probability16 _04_3_Percent = 0x0B21;  // 2849
    constexpr Probability16 _05_0_Percent = 0x0CCC;  // 3276
    constexpr Probability16 _06_2_Percent = 0x1000;  // 4096
    constexpr Probability16 _06_6_Percent = 0x1111;  // 4369
    constexpr Probability16 _08_3_Percent = 0x1555;  // 5461
    constexpr Probability16 _10_0_Percent = 0x1999;  // 6553
    constexpr Probability16 _11_1_Percent = 0x1C71;  // 7281
    constexpr Probability16 _12_5_Percent = 0x2000;  // 8192
    constexpr Probability16 _14_2_Percent = 0x2492;  // 9362
    constexpr Probability16 _20_0_Percent = 0x3333;  // 13107
    constexpr Probability16 _16_6_Percent = 0x2AAA;  // 10922
    constexpr Probability16 _25_0_Percent = 0x4000;  // 16384
    constexpr Probability16 _33_3_Percent = 0x5555;  // 21845
    constexpr Probability16 _50_0_Percent = 0x8000;  // 32768
    constexpr Probability16 _62_5_Percent = 0xA000;  // 40960
went through all of the scenario_rands looking at 16bit probability calcs
is that clear that _00_14 means 0.14%
ζeh Matt
@ZehMatt
yeah
Duncan
@duncanspumpkin
and _62_5 means 62.5%
ζeh Matt
@ZehMatt
what im wondering is about the values
how did he come up with that
is it N / 0xFFFF
Duncan
@duncanspumpkin
if ((scenario_rand() & 0xFFFF) <= 0x5555) so yeah basically
ζeh Matt
@ZehMatt
perhaps we could use a constexpr function to clarify this
at first glance the number has no meaning
plus we wouldnt need to have a huge table of em
Duncan
@duncanspumpkin
bool scenario_rand_probability16(Probability16 probability)
{
    return (scenario_rand() & 0xFFFF) > probability;
}
I don't really want to adjust the table values though and getting a constexpr to give the exact same results would be difficult.
In theory constexpr Probability16 GetProbability16(double value){ return static_cast<Probabilty16>(value*65535 / 100);} would give the same results.
Duncan
@duncanspumpkin
but there are a few cases where it would be a couple of points out.
if we are okay with changing some of the values I can certainly change it to use the constexpr but maybe people will complain that the balance has changed
ζeh Matt
@ZehMatt
constexpr uint32_t cceil(float num) 
{
    uint32_t val = static_cast<uint32_t>(num);
    if (num == static_cast<float>(val)) 
    {
        return val;
    }
    return val + (num > 0 ? 1 : 0);
}

constexpr uint16_t Probablity16(const double prob)
{
    return static_cast<uint16_t>(cceil((prob / 100.0) * 0xFFFF));
}

constexpr auto prob_33_33 = Probablity16(33.3333);
this should work
yields pretty much the same values
ζeh Matt
@ZehMatt
also note
005C = 00.0014
not 00.14
ζeh Matt
@ZehMatt
https://share.epic-domain.com/2019-08-21_13-16-386ebedcd6e1b3a64e1.mp4 so this is what it would sound like if i lift the limit of music being played at the same time