(lcs) reversed CScrollBar #1297

Open
asm95 wants to merge 2 commits from asm95/lcs-scrollbar into lcs
asm95 commented 3 years ago (Migrated from github.com)

Summary of changes compared to VC

  • Now we have 12 scroll bars instead of one

  • Copied the enum names from re3: d0404cbdb7/src/renderer/Fluff.cpp (L80)

  • CScrollBar::Init ~ no changes

  • CScrollBar::Update ~ added many hard-coded text

  • CScrollBar::Render ~ minor changes on corona coordinates formula

  • CMovingThings::Init ~ initialize the 12 scroll bars now

  • CMovingThings::Update, CMovingThings::Render ~ no changes

  • CMovingThings::Shutdown ~ iterate over aScrollBars to disable visibility

Showcase

The following picture reveals Toni observing the blue text propaganda. In previous reLCS version, this text was not shown.

Other notes

  • Android and PSP CScrollBar logic is identical
  • Issue: the text scrolls too fast. This might be related to the FPS in PC.
### Summary of changes compared to VC - Now we have 12 scroll bars instead of one - Copied the `enum` names from re3: https://github.com/GTAmodding/re3/blob/d0404cbdb77bd82abf578ce28093990db94743f2/src/renderer/Fluff.cpp#L80 - `CScrollBar::Init` ~ no changes - `CScrollBar::Update` ~ added many hard-coded text - `CScrollBar::Render` ~ minor changes on corona coordinates formula - `CMovingThings::Init` ~ initialize the 12 scroll bars now - `CMovingThings::Update`, `CMovingThings::Render` ~ no changes - `CMovingThings::Shutdown` ~ iterate over aScrollBars to disable visibility ### Showcase The following picture reveals Toni observing the blue text propaganda. In previous `reLCS` version, this text was not shown. <p align="center"><img width="50%" src="https://user-images.githubusercontent.com/13230288/129466133-e52c0436-1e02-4127-9f04-189d6015ee20.png"></p> ### Other notes - Android and PSP CScrollBar logic is identical - Issue: the text scrolls too fast. This might be related to the FPS in PC.
Nick007J (Migrated from github.com) reviewed 3 years ago
Nick007J (Migrated from github.com) commented 3 years ago

Floats need to have f suffix, and also this needs to be in different order:

if (CWeather::Foggyness > 0.5f)
    m_pMessage = ...
else if (CWeather::WetRoads > 0.5f)
    m_pMessage = ...
else
    m_pMessage = ...
Floats need to have `f` suffix, and also this needs to be in different order: ``` if (CWeather::Foggyness > 0.5f) m_pMessage = ... else if (CWeather::WetRoads > 0.5f) m_pMessage = ... else m_pMessage = ... ```
asm95 (Migrated from github.com) reviewed 3 years ago
asm95 (Migrated from github.com) commented 3 years ago

Got the corrections in check. Thanks for the suggestions 😺

Got the corrections in check. Thanks for the suggestions 😺
Nick007J (Migrated from github.com) reviewed 3 years ago
Nick007J (Migrated from github.com) commented 3 years ago

Looks like all digits originally were at most 3 digits after decimal point, e.g. -591.048f. Same applies to all initialization here.

Looks like all digits originally were at most 3 digits after decimal point, e.g. -591.048f. Same applies to all initialization here.
Nick007J (Migrated from github.com) commented 3 years ago

This was a switch. If it was taken from re3, then it needs to be fixed as well :P

This was a switch. If it was taken from re3, then it needs to be fixed as well :P
Nick007J (Migrated from github.com) commented 3 years ago

Random glitches part blow has changed, check it out

Random glitches part blow has changed, check it out
asm95 (Migrated from github.com) reviewed 3 years ago
asm95 (Migrated from github.com) commented 3 years ago

Oh, damn that's right... Will change that to a switch(m_Type){...} statement. Yeah, I followed miami's branch but forgot that was a switch in IDA and also in master branch.

Oh, damn that's right... Will change that to a `switch(m_Type){...}` statement. Yeah, I followed [miami](https://github.com/GTAmodding/re3/blob/miami/src/renderer/Fluff.cpp#L672)'s branch but forgot that was a `switch` in IDA and also in [master](https://github.com/GTAmodding/re3/blob/master/src/renderer/Fluff.cpp#L361) branch.
asm95 (Migrated from github.com) reviewed 3 years ago
asm95 (Migrated from github.com) commented 3 years ago

Those extra digits were usually appearing in IDA. Anyway, I'll remove those cases with more than 3 decimal digits.

Those extra digits were usually appearing in IDA. Anyway, I'll remove those cases with more than 3 decimal digits.
This repo is archived. You cannot comment on pull requests.
Loading…
There is no content yet.