Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix function order [palette.cpp] #1846

Merged
merged 1 commit into from Nov 11, 2019
Merged

Fix function order [palette.cpp] #1846

merged 1 commit into from Nov 11, 2019

Conversation

ghost
Copy link

@ghost ghost commented Nov 11, 2019

PSX                    MAC                        1.09                       EXTERN
EXT LoadPalette        palette_update             SaveGamma                  Y   
EXT LoadRndLvlPal      ApplyGamma                 palette_init               Y   
EXT ResetPal           SaveGamma                  LoadGamma                      
STAT SetFadeLevel      LoadGamma                  LoadSysPal                     
EXT GetFadeState       [LoadSysPal]               LoadPalette                Y   
EXT DrawFadedScreen    palette_init               LoadRndLvlPal              Y   
EXT BlackPalette       LoadPalette                ResetPal                   Y   
EXT PaletteFadeInTask  LoadRndLvlPal              IncreaseGamma              Y   
EXT PaletteFadeIn      ResetPal                   palette_update                 
EXT PaletteFadeOutTask IncreaseGamma              ApplyGamma                     
EXT PaletteFadeOut     DecreaseGamma              DecreaseGamma              Y   
                       UpdateGamma                UpdateGamma                Y
                       SetFadeLevel               BlackPalette               Y
                       BlackPalette               SetFadeLevel               
                       PaletteFadeIn              PaletteFadeIn              Y
                       PaletteFadeOut             PaletteFadeOut             Y
                       palette_update_caves       palette_update_caves       Y
                       Lava2Water                 Lava2Water                 Y
                       palette_get_colour_cycling palette_get_colour_cycling Y
                       palette_set_color_cycling  palette_set_color_cycling  Y

@ghost ghost added the code cleanup Cosmetic enhancement to the code to make it look nicer. label Nov 11, 2019
@AJenbo
Copy link
Member

AJenbo commented Nov 11, 2019

LGTM

@AJenbo AJenbo merged commit 5f941e8 into diasurgical:master Nov 11, 2019
@ghost ghost mentioned this pull request Nov 11, 2019
67 tasks
@AJenbo
Copy link
Member

AJenbo commented Nov 11, 2019

@galaxyhaxz p.s. any chance you could take a look at what parts of the code are changing with thease reorderings?
1% change, 2520 insertions(+), 2546 deletions(-)
1% change, 2534 insertions(+), 2562 deletions(-)

@ghost
Copy link
Author

ghost commented Nov 11, 2019

Just checked every function in palette.cpp in the comparer and they are still bin exact. It is probably more alignment as is with all these commits :P

@AJenbo
Copy link
Member

AJenbo commented Nov 11, 2019

Yeah I'm just wondering what specific alighment we are dealing with :)

@ghost
Copy link
Author

ghost commented Nov 11, 2019

I am also curious too, but it's so hard to say for sure and I don't feel like checking every function. As it was pointed out before, the docker uses a retail build with debug database enabled, which outputs a slightly different release build than one without. In my previous cases, the one without remained byte identical all the way through.

@ghost ghost deleted the fuuuuuuuuck branch November 11, 2019 06:53
@AJenbo
Copy link
Member

AJenbo commented Nov 11, 2019

Well a full diff should be good enough :)

@AJenbo
Copy link
Member

AJenbo commented Dec 15, 2019

Took a look in to this, we do see some jitter in all the jumps and globals, but also in SpawnPremium
lea edx, [eax+ecx*1] became lea edx, [ecx+eax*1], SpawnWitch:
image

I guess both can be explained by the fact that they live right where the alignment issue is so removing things from the header files will cause them to jitter.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
code cleanup Cosmetic enhancement to the code to make it look nicer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants