Skip to content

Commit

Permalink
clean up lgl display ui
Browse files Browse the repository at this point in the history
  • Loading branch information
JLaferri committed Jul 5, 2024
1 parent ccb5923 commit 3cd9fb3
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 116 deletions.
23 changes: 11 additions & 12 deletions Online/Core/LGLExceededGameEnd.asm
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@
.set REG_LGL_LOSER, 26
.set REG_DISPLAY_MESSAGE_ID, 25
.set REG_DO, 24
.set REG_LGL_LOSER_GRAB_COUNT, 23
.set REG_FILL_COLOR, 22
.set REG_FIRST_STRING, 21
.set REG_FILL_COLOR, 23
.set REG_FIRST_STRING, 22

# This function's main goal is to overwrite the message displayed on an LGL timeout. Here are the options:
# 0: Time, 1: Sudden Death, 2: Success, 3: Ready, 4: GO!, 5: Game!, 6: Failure, 7: Complete, 8: Nothing, 9: Crash
Expand All @@ -25,9 +24,11 @@ blrl
.float 0.7
.set DO_POS_X, DO_SCALE + 4
.float 0
.set DO_POS_Y, DO_POS_X + 4
.set DO_POS_Y_WIN, DO_POS_X + 4
.float 70
.set DO_STROKE_OFFSET, DO_POS_Y + 4
.set DO_POS_Y_LOSS, DO_POS_Y_WIN + 4
.float 60
.set DO_STROKE_OFFSET, DO_POS_Y_LOSS + 4
.float 1
.set DO_COLOR_OUTLINE, DO_STROKE_OFFSET + 4
.byte 0,0,0,255
Expand All @@ -38,9 +39,9 @@ blrl
.set DO_STRING_YOU, DO_COLOR_FILL_WIN + 4
.string "You"
.set DO_STRING_OPP, DO_STRING_YOU + 4
.string "Opp"
.set DO_STRING, DO_STRING_OPP + 4
.string "%s Exceeded Ledge Grab Limit of %d: %d"
.string "Opponent"
.set DO_STRING, DO_STRING_OPP + 9
.string "%s Exceeded Ledge Grab Limit of %d"
.align 2


Expand Down Expand Up @@ -87,11 +88,9 @@ bgt EXIT # If we branch here both players have more than 45 so ignore LGL
CHECK_LGL_LOSS:
cmpwi REG_P1_LEDGE_GRABS, LGL_LIMIT
li REG_LGL_LOSER, 0
mr REG_LGL_LOSER_GRAB_COUNT, REG_P1_LEDGE_GRABS
bgt SET_MODIFIED_MESSAGE # If P1 has more than 45 ledge grabs, P2 wins
cmpwi REG_P2_LEDGE_GRABS, LGL_LIMIT
li REG_LGL_LOSER, 1
mr REG_LGL_LOSER_GRAB_COUNT, REG_P2_LEDGE_GRABS
bgt SET_MODIFIED_MESSAGE # If P2 has more than 45 ledge grabs, P1 wins
b EXIT # If neither player has more than 45 ledge grabs, exit

Expand All @@ -103,10 +102,12 @@ cmpw r3, REG_LGL_LOSER # Compare local player index of winner
li REG_DISPLAY_MESSAGE_ID, 2 # Set message to "Success" if we won
addi REG_FILL_COLOR, REG_DO, DO_COLOR_FILL_WIN
addi REG_FIRST_STRING, REG_DO, DO_STRING_OPP
lfs f3, DO_POS_Y_WIN(REG_DO)
bne DISPLAY_LGL_MESSAGE
li REG_DISPLAY_MESSAGE_ID, 6 # Set message to "Failure" if we lost
addi REG_FILL_COLOR, REG_DO, DO_COLOR_FILL_LOSS
addi REG_FIRST_STRING, REG_DO, DO_STRING_YOU
lfs f3, DO_POS_Y_LOSS(REG_DO)

# Make game exit transition longer
load r3, 0x8046b6a0 # Some static match state struct
Expand All @@ -123,10 +124,8 @@ addi r6, REG_DO, DO_COLOR_OUTLINE # Outline Color
addi r7, REG_DO, DO_STRING # String
mr r8, REG_FIRST_STRING
li r9, LGL_LIMIT # LGL Limit
mr r10, REG_LGL_LOSER_GRAB_COUNT # Grab Count
lfs f1, DO_SCALE(REG_DO)
lfs f2, DO_POS_X(REG_DO)
lfs f3, DO_POS_Y(REG_DO)
lfs f6, DO_STROKE_OFFSET(REG_DO)
branchl r12, FG_CreateSubtext

Expand Down
103 changes: 51 additions & 52 deletions Output/Netplay/GALE01r2.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1598,60 +1598,59 @@ C216E904 0000004C #Online/Core/InitPause.asm
800100E4 382100E0
7C0803A6 4E800020
881F0001 00000000
C22F70C4 00000035 #Online/Core/LGLExceededGameEnd.asm
48000054 4E800021
C22F70C4 00000034 #Online/Core/LGLExceededGameEnd.asm
48000058 4E800021
3F333333 00000000
428C0000 3F800000
000000FF D7A5FFFF
FAFA78FF 596F7500
4F707000 25732045
78636565 64656420
4C656467 65204772
6162204C 696D6974
206F6620 25643A20
25640000 7C0802A6
90010004 9421FF20
BE8100B0 7C9F2378
7CBE2B78 7CDD3378
3B200000 4BFFFF91
7F0802A6 3C608048
80639D30 5463443E
2C030208 408200F0
886DAFA0 2C030003
418200E4 38600000
3D808004 618C0AF0
7D8903A6 4E800421
7C7C1B78 38600001
3D808004 618C0AF0
428C0000 42700000
3F800000 000000FF
D7A5FFFF FAFA78FF
596F7500 4F70706F
6E656E74 00257320
45786365 65646564
204C6564 67652047
72616220 4C696D69
74206F66 20256400
7C0802A6 90010004
9421FF20 BE8100B0
7C9F2378 7CBE2B78
7CDD3378 3B200000
4BFFFF8D 7F0802A6
3C608048 80639D30
5463443E 2C030208
408200E8 886DAFA0
2C030003 418200DC
38600000 3D808004
618C0AF0 7D8903A6
4E800421 7C7C1B78
38600001 3D808004
618C0AF0 7D8903A6
4E800421 7C7B1B78
2C1C002D 4081000C
2C1B002D 4181009C
2C1C002D 3B400000
41810014 2C1B002D
3B400001 41810008
48000080 806DB61C
88630000 7C03D000
3B200002 3AF8001C
3AD80024 C0780008
40820024 3B200006
3AF80018 3AD80020
C078000C 3C608046
6063B6A0 388000FD
988324D5 806DB61C
80630912 7EE4BB78
38A00001 38D80014
38F8002D 7EC8B378
3920002D C0380000
C0580004 C0D80010
3D808000 618C56B4
7D8903A6 4E800421
7C7B1B78 2C1C002D
4081000C 2C1B002D
418100A4 2C1C002D
3B400000 7F97E378
41810018 2C1B002D
3B400001 7F77DB78
41810008 48000080
806DB61C 88630000
7C03D000 3B200002
3AD80018 3AB80020
40820020 3B200006
3AD80014 3AB8001C
3C608046 6063B6A0
388000FD 988324D5
806DB61C 80630912
7EC4B378 38A00001
38D80010 38F80024
7EA8AB78 3920002D
7EEABB78 C0380000
C0580004 C0780008
C0D8000C 3D808000
618C56B4 7D8903A6
4E800421 7FE4FB78
7FC5F378 7FA6EB78
7F23CB78 BA8100B0
800100E4 382100E0
7C0803A6 38FF0000
60000000 00000000
7FE4FB78 7FC5F378
7FA6EB78 7F23CB78
BA8100B0 800100E4
382100E0 7C0803A6
38FF0000 00000000
C21A5014 0000005C #Online/Core/LoopEngineForRollback.asm
41A20014 3D80801A
618C5024 7D8903A6
Expand Down
103 changes: 51 additions & 52 deletions Output/Netplay/GALJ01r2.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1597,60 +1597,59 @@ C216E904 0000004C #Online/Core/InitPause.asm
800100E4 382100E0
7C0803A6 4E800020
881F0001 00000000
C22F70C4 00000035 #Online/Core/LGLExceededGameEnd.asm
48000054 4E800021
C22F70C4 00000034 #Online/Core/LGLExceededGameEnd.asm
48000058 4E800021
3F333333 00000000
428C0000 3F800000
000000FF D7A5FFFF
FAFA78FF 596F7500
4F707000 25732045
78636565 64656420
4C656467 65204772
6162204C 696D6974
206F6620 25643A20
25640000 7C0802A6
90010004 9421FF20
BE8100B0 7C9F2378
7CBE2B78 7CDD3378
3B200000 4BFFFF91
7F0802A6 3C608048
80639D30 5463443E
2C030208 408200F0
886DAFA0 2C030003
418200E4 38600000
3D808004 618C0AF0
7D8903A6 4E800421
7C7C1B78 38600001
3D808004 618C0AF0
428C0000 42700000
3F800000 000000FF
D7A5FFFF FAFA78FF
596F7500 4F70706F
6E656E74 00257320
45786365 65646564
204C6564 67652047
72616220 4C696D69
74206F66 20256400
7C0802A6 90010004
9421FF20 BE8100B0
7C9F2378 7CBE2B78
7CDD3378 3B200000
4BFFFF8D 7F0802A6
3C608048 80639D30
5463443E 2C030208
408200E8 886DAFA0
2C030003 418200DC
38600000 3D808004
618C0AF0 7D8903A6
4E800421 7C7C1B78
38600001 3D808004
618C0AF0 7D8903A6
4E800421 7C7B1B78
2C1C002D 4081000C
2C1B002D 4181009C
2C1C002D 3B400000
41810014 2C1B002D
3B400001 41810008
48000080 806DB61C
88630000 7C03D000
3B200002 3AF8001C
3AD80024 C0780008
40820024 3B200006
3AF80018 3AD80020
C078000C 3C608046
6063B6A0 388000FD
988324D5 806DB61C
80630912 7EE4BB78
38A00001 38D80014
38F8002D 7EC8B378
3920002D C0380000
C0580004 C0D80010
3D808000 618C56B4
7D8903A6 4E800421
7C7B1B78 2C1C002D
4081000C 2C1B002D
418100A4 2C1C002D
3B400000 7F97E378
41810018 2C1B002D
3B400001 7F77DB78
41810008 48000080
806DB61C 88630000
7C03D000 3B200002
3AD80018 3AB80020
40820020 3B200006
3AD80014 3AB8001C
3C608046 6063B6A0
388000FD 988324D5
806DB61C 80630912
7EC4B378 38A00001
38D80010 38F80024
7EA8AB78 3920002D
7EEABB78 C0380000
C0580004 C0780008
C0D8000C 3D808000
618C56B4 7D8903A6
4E800421 7FE4FB78
7FC5F378 7FA6EB78
7F23CB78 BA8100B0
800100E4 382100E0
7C0803A6 38FF0000
60000000 00000000
7FE4FB78 7FC5F378
7FA6EB78 7F23CB78
BA8100B0 800100E4
382100E0 7C0803A6
38FF0000 00000000
C21A5014 0000005C #Online/Core/LoopEngineForRollback.asm
41A20014 3D80801A
618C5024 7D8903A6
Expand Down

0 comments on commit 3cd9fb3

Please sign in to comment.