diff --git a/asm/battle_814AEAC.s b/asm/battle_814AEAC.s index d4568dd5f..f0b4c9467 100644 --- a/asm/battle_814AEAC.s +++ b/asm/battle_814AEAC.s @@ -3336,7 +3336,7 @@ sub_814CC98: @ 814CC98 lsrs r0, 16 mov r8, r0 ldr r0, =sub_805D714 - bl object_new_hidden_with_callback + bl CreateInvisibleSpriteWithCallback ldr r1, =gUnknown_03005D7C mov r9, r1 add r9, r6 diff --git a/asm/battle_ai.s b/asm/battle_ai.s index 0c59e12d7..9a4acde3d 100644 --- a/asm/battle_ai.s +++ b/asm/battle_ai.s @@ -136,7 +136,7 @@ _081309B4: movs r1, 0 strb r1, [r0] _081309CE: - bl GenerateRandomNumber + bl Random ldr r1, [r5] ldr r2, [r1, 0x14] adds r2, 0x18 @@ -168,7 +168,7 @@ _081309CE: cmp r0, 0 beq _08130A60 ldr r5, =gUnknown_0202420C - bl GenerateRandomNumber + bl Random adds r4, r0, 0 ldrb r0, [r6] bl battle_side_get_owner @@ -493,7 +493,7 @@ _08130CC6: adds r3, 0x1 cmp r3, 0x3 ble _08130C7C - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 adds r1, r6, 0 @@ -703,7 +703,7 @@ _08130E72: adds r3, 0x1 cmp r3, 0x3 ble _08130E30 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 adds r1, r5, 0 @@ -778,7 +778,7 @@ _08130EFE: mov r7, r8 cmp r7, 0x3 ble _08130EDA - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 adds r1, r4, 0 @@ -1097,7 +1097,7 @@ sub_8131160: @ 8131160 thumb_func_start tai00_unk tai00_unk: @ 8131178 push {lr} - bl GenerateRandomNumber + bl Random lsls r0, 16 movs r1, 0xFF lsls r1, 16 @@ -1132,7 +1132,7 @@ _081311B4: thumb_func_start tai01_unk tai01_unk: @ 81311B8 push {lr} - bl GenerateRandomNumber + bl Random lsls r0, 16 movs r1, 0xFF lsls r1, 16 @@ -1167,7 +1167,7 @@ _081311F4: thumb_func_start tai02_unk tai02_unk: @ 81311F8 push {lr} - bl GenerateRandomNumber + bl Random lsls r0, 16 movs r1, 0xFF lsls r1, 16 @@ -1202,7 +1202,7 @@ _08131234: thumb_func_start tai03_unk tai03_unk: @ 8131238 push {lr} - bl GenerateRandomNumber + bl Random lsls r0, 16 movs r1, 0xFF lsls r1, 16 @@ -3536,7 +3536,7 @@ _08132480: ldrb r0, [r2, 0x17] cmp r0, 0 beq _081324E0 - bl GenerateRandomNumber + bl Random movs r1, 0x1 ands r1, r0 cmp r1, 0 @@ -5348,7 +5348,7 @@ tai46_unk: @ 8133328 adds r4, r0 lsls r4, 24 lsrs r4, 24 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x64 diff --git a/asm/battle_anim_80FE840.s b/asm/battle_anim_80FE840.s index 04b560698..8f7dfc009 100644 --- a/asm/battle_anim_80FE840.s +++ b/asm/battle_anim_80FE840.s @@ -69,7 +69,7 @@ sub_80FE898: @ 80FE898 ldrsh r0, [r4, r1] movs r2, 0x34 ldrsh r1, [r4, r2] - bl sine + bl Sin strh r0, [r4, 0x24] ldrh r0, [r4, 0x36] ldrh r1, [r4, 0x38] @@ -230,14 +230,14 @@ _080FEA1E: movs r1, 0x38 ldrsh r0, [r4, r1] movs r1, 0x5 - bl sine + bl Sin ldrh r1, [r4, 0x24] adds r0, r1 strh r0, [r4, 0x24] movs r1, 0x38 ldrsh r0, [r4, r1] movs r1, 0xE - bl cosine + bl Cos ldrh r1, [r4, 0x26] adds r0, r1 strh r0, [r4, 0x26] @@ -366,7 +366,7 @@ _080FEB3C: sub_80FEB44: @ 80FEB44 push {r4,r5,lr} adds r5, r0, 0 - bl GenerateRandomNumber2 + bl Random2 adds r1, r0, 0 lsls r1, 16 lsrs r1, 16 @@ -401,7 +401,7 @@ _080FEB90: adds r0, 0x14 _080FEB94: strh r0, [r5, 0x20] - bl GenerateRandomNumber2 + bl Random2 lsls r0, 16 lsrs r0, 16 movs r1, 0x1F @@ -427,7 +427,7 @@ _080FEB94: strh r0, [r5, 0x36] adds r0, r5, 0 bl sub_80A7160 - bl GenerateRandomNumber2 + bl Random2 movs r1, 0xFF ands r1, r0 strh r1, [r5, 0x38] @@ -460,7 +460,7 @@ _080FEC12: movs r1, 0x38 ldrsh r0, [r4, r1] movs r1, 0xC - bl cosine + bl Cos ldrh r1, [r4, 0x26] adds r0, r1 strh r0, [r4, 0x26] @@ -635,13 +635,13 @@ sub_80FED74: @ 80FED74 movs r1, 0x30 ldrsh r0, [r4, r1] movs r1, 0x20 - bl sine + bl Sin strh r0, [r4, 0x24] movs r1, 0x30 ldrsh r0, [r4, r1] movs r1, 0x3 negs r1, r1 - bl cosine + bl Cos ldrh r1, [r4, 0x32] adds r1, 0x18 strh r1, [r4, 0x32] @@ -805,7 +805,7 @@ sub_80FEECC: @ 80FEECC movs r1, 0x38 ldrsh r0, [r4, r1] movs r1, 0x20 - bl sine + bl Sin ldrh r1, [r4, 0x24] adds r0, r1 strh r0, [r4, 0x24] @@ -813,7 +813,7 @@ sub_80FEECC: @ 80FEECC ldrsh r0, [r4, r1] movs r1, 0x5 negs r1, r1 - bl cosine + bl Cos ldrh r1, [r4, 0x26] adds r0, r1 strh r0, [r4, 0x26] @@ -902,7 +902,7 @@ sub_80FEF98: @ 80FEF98 movs r1, 0x38 ldrsh r0, [r4, r1] movs r1, 0x8 - bl sine + bl Sin ldrh r1, [r4, 0x24] adds r0, r1 strh r0, [r4, 0x24] @@ -1035,7 +1035,7 @@ sub_80FF090: @ 80FF090 movs r1, 0x2E ldrsh r0, [r4, r1] movs r1, 0x19 - bl sine + bl Sin negs r0, r0 b _080FF0BE .pool @@ -1043,7 +1043,7 @@ _080FF0B4: movs r1, 0x2E ldrsh r0, [r4, r1] movs r1, 0x19 - bl sine + bl Sin _080FF0BE: strh r0, [r4, 0x24] ldrh r0, [r4, 0x2E] @@ -1339,12 +1339,12 @@ _080FF2F8: ldrsh r0, [r4, r1] movs r2, 0x34 ldrsh r1, [r4, r2] - bl cosine + bl Cos strh r0, [r4, 0x24] movs r5, 0x38 ldrsh r0, [r4, r5] movs r1, 0x5 - bl sine + bl Sin strh r0, [r4, 0x26] movs r1, 0x38 ldrsh r0, [r4, r1] @@ -2135,7 +2135,7 @@ _080FF974: ands r0, r1 movs r2, 0x32 ldrsh r1, [r6, r2] - bl sine + bl Sin strh r0, [r6, 0x26] movs r0, 0x2E ldrsh r1, [r6, r0] @@ -2325,7 +2325,7 @@ _080FFADE: subs r1, r2 lsls r1, 16 asrs r1, 16 - bl sine + bl Sin strh r0, [r4, 0x26] adds r0, r4, 0 bl sub_80FF9E0 @@ -2432,7 +2432,7 @@ _080FFBBA: subs r1, r2 lsls r1, 16 asrs r1, 16 - bl sine + bl Sin strh r0, [r4, 0x26] adds r0, r4, 0 bl sub_80FF9E0 @@ -2634,7 +2634,7 @@ _080FFD56: subs r1, r2 lsls r1, 16 asrs r1, 16 - bl sine + bl Sin strh r0, [r4, 0x26] lsls r0, 16 cmp r0, 0 @@ -2719,12 +2719,12 @@ _080FFE06: movs r1, 0x30 ldrsh r0, [r4, r1] movs r1, 0x3C - bl cosine + bl Cos strh r0, [r4, 0x24] movs r1, 0x30 ldrsh r0, [r4, r1] movs r1, 0x14 - bl sine + bl Sin strh r0, [r4, 0x26] ldr r0, =sub_80FFE58 str r0, [r4, 0x1C] @@ -2893,12 +2893,12 @@ _080FFF5E: movs r6, 0x30 ldrsh r0, [r4, r6] movs r1, 0x3C - bl cosine + bl Cos strh r0, [r4, 0x24] movs r1, 0x30 ldrsh r0, [r4, r1] movs r1, 0x14 - bl sine + bl Sin strh r0, [r4, 0x26] _080FFF76: pop {r4-r6} @@ -4012,7 +4012,7 @@ _0810081C: adds r1, r4 ldrh r3, [r1] movs r1, 0x10 - bl pal_fade_1 + bl BlendPalette ldrh r0, [r5, 0x20] ldrb r2, [r5, 0x1C] movs r3, 0x1E @@ -4021,7 +4021,7 @@ _0810081C: adds r1, r4 ldrh r3, [r1] movs r1, 0x10 - bl pal_fade_1 + bl BlendPalette ldrh r0, [r5, 0x1C] adds r0, 0x1 strh r0, [r5, 0x1C] @@ -4801,12 +4801,12 @@ sub_8100E80: @ 8100E80 movs r1, 0x2E ldrsh r0, [r4, r1] movs r1, 0x64 - bl cosine + bl Cos strh r0, [r4, 0x24] movs r2, 0x2E ldrsh r0, [r4, r2] movs r1, 0x14 - bl sine + bl Sin strh r0, [r4, 0x26] movs r1, 0x2E ldrsh r0, [r4, r1] @@ -5585,7 +5585,7 @@ sub_81014A0: @ 81014A0 lsls r0, 18 asrs r0, 16 movs r1, 0x3 - bl sine + bl Sin strh r0, [r4, 0x24] ldrh r0, [r4, 0x30] adds r0, 0x1 @@ -8284,7 +8284,7 @@ _08102A0C: movs r1, 0x10 movs r2, 0xB movs r3, 0 - bl pal_fade_1 + bl BlendPalette movs r0, 0 strh r0, [r6, 0xE] movs r5, 0 @@ -8468,7 +8468,7 @@ _08102B80: ldrsh r0, [r5, r1] movs r2, 0x36 ldrsh r1, [r5, r2] - bl sine + bl Sin strh r0, [r5, 0x24] _08102BC2: pop {r4,r5} @@ -8781,7 +8781,7 @@ _08102E00: lsls r0, 16 asrs r0, 16 movs r1, 0xF - bl sine + bl Sin strh r0, [r4, 0x26] ldrh r2, [r4, 0x22] ldrh r0, [r4, 0x20] @@ -8951,12 +8951,12 @@ sub_8102F40: @ 8102F40 movs r1, 0x32 ldrsh r0, [r4, r1] movs r1, 0x12 - bl cosine + bl Cos strh r0, [r4, 0x24] movs r2, 0x32 ldrsh r0, [r4, r2] movs r1, 0x12 - bl sine + bl Sin strh r0, [r4, 0x26] movs r1, 0x32 ldrsh r0, [r4, r1] @@ -9104,7 +9104,7 @@ sub_81030B0: @ 81030B0 movs r1, 0x38 ldrsh r0, [r4, r1] movs r1, 0x8 - bl sine + bl Sin lsls r0, 16 lsrs r1, r0, 16 ldrh r2, [r4, 0x24] @@ -9123,7 +9123,7 @@ _081030DC: movs r1, 0x38 ldrsh r0, [r4, r1] movs r1, 0x4 - bl sine + bl Sin ldrh r3, [r4, 0x26] adds r0, r3 strh r0, [r4, 0x26] @@ -11159,7 +11159,7 @@ _08104178: ldrsh r0, [r4, r1] movs r2, 0x32 ldrsh r1, [r4, r2] - bl sine + bl Sin strh r0, [r4, 0x26] ldrh r0, [r4, 0x30] adds r0, 0x5 @@ -11262,7 +11262,7 @@ _08104250: subs r1, 0x1 cmp r1, 0 bge _08104250 - bl GenerateRandomNumber2 + bl Random2 lsls r0, 16 lsrs r0, 16 movs r1, 0x7 @@ -11271,7 +11271,7 @@ _08104250: adds r1, r2, 0 subs r1, r0 strh r1, [r4, 0x3A] - bl GenerateRandomNumber2 + bl Random2 lsls r0, 16 lsrs r0, 16 movs r1, 0xA0 @@ -11314,7 +11314,7 @@ _081042BE: ldrsh r0, [r4, r1] movs r2, 0x3A ldrsh r1, [r4, r2] - bl sine + bl Sin strh r0, [r4, 0x26] ldrh r0, [r4, 0x30] adds r0, 0x8 @@ -13560,7 +13560,7 @@ sub_81054E8: @ 81054E8 ldrb r2, [r1, 0xA] ldrh r3, [r1, 0x8] movs r1, 0xF - bl pal_fade_1 + bl BlendPalette _0810550E: adds r0, r4, 0 movs r1, 0x1 @@ -14747,7 +14747,7 @@ _08105E7A: movs r1, 0x30 ldrsh r0, [r4, r1] movs r1, 0x8 - bl sine + bl Sin strh r0, [r4, 0x24] ldrh r2, [r4, 0x32] lsls r0, r2, 16 @@ -15108,7 +15108,7 @@ sub_810618C: @ 810618C movs r1, 0x38 ldrsh r0, [r4, r1] movs r1, 0xE - bl sine + bl Sin ldrh r1, [r4, 0x26] adds r0, r1 strh r0, [r4, 0x26] @@ -15157,7 +15157,7 @@ _081061E8: ldrsh r0, [r4, r1] movs r2, 0x32 ldrsh r1, [r4, r2] - bl sine + bl Sin strh r0, [r4, 0x26] ldrh r0, [r4, 0x34] adds r0, 0x3 @@ -15233,7 +15233,7 @@ sub_810627C: @ 810627C movs r1, 0x34 ldrsh r0, [r4, r1] movs r1, 0x4 - bl sine + bl Sin strh r0, [r4, 0x24] ldrh r0, [r4, 0x34] adds r0, 0x3 @@ -15837,14 +15837,14 @@ _081067B6: ldrh r1, [r4, 0x32] lsls r1, 16 asrs r1, 24 - bl sine + bl Sin strh r0, [r4, 0x24] movs r2, 0x30 ldrsh r0, [r4, r2] ldrh r1, [r4, 0x34] lsls r1, 16 asrs r1, 24 - bl cosine + bl Cos strh r0, [r4, 0x26] ldrh r0, [r4, 0x30] adds r0, 0x9 @@ -15941,12 +15941,12 @@ sub_8106878: @ 8106878 movs r1, 0 ldrsh r0, [r4, r1] movs r1, 0xA - bl sine + bl Sin strh r0, [r5, 0x2E] movs r1, 0 ldrsh r0, [r4, r1] movs r1, 0x7 - bl cosine + bl Cos strh r0, [r5, 0x30] ldr r0, =sub_81068CC str r0, [r5, 0x1C] @@ -16046,12 +16046,12 @@ sub_8106944: @ 8106944 movs r1, 0 ldrsh r0, [r4, r1] movs r1, 0xA - bl sine + bl Sin strh r0, [r5, 0x2E] movs r1, 0 ldrsh r0, [r4, r1] movs r1, 0x7 - bl cosine + bl Cos strh r0, [r5, 0x30] ldrh r0, [r4, 0x2] strh r0, [r5, 0x32] @@ -16124,7 +16124,7 @@ _081069EE: ands r5, r0 adds r0, r5, 0 movs r1, 0x50 - bl sine + bl Sin lsls r0, 16 asrs r0, 24 strh r0, [r4, 0x24] @@ -16134,7 +16134,7 @@ _081069EE: bgt _08106A32 adds r0, r5, 0 movs r1, 0x50 - bl cosine + bl Cos movs r2, 0x2E ldrsh r1, [r4, r2] lsrs r2, r1, 31 @@ -16182,7 +16182,7 @@ sub_8106A64: @ 8106A64 movs r1, 0x34 ldrsh r0, [r4, r1] movs r1, 0x5 - bl sine + bl Sin strh r0, [r4, 0x24] movs r1, 0x38 ldrsh r0, [r4, r1] @@ -16260,7 +16260,7 @@ _08106AF4: ldrsh r0, [r4, r1] movs r2, 0x32 ldrsh r1, [r4, r2] - bl sine + bl Sin adds r2, r0, 0 strh r2, [r4, 0x26] ldrh r0, [r4, 0x34] @@ -16281,7 +16281,7 @@ _08106AF4: strh r0, [r4, 0x22] strh r5, [r4, 0x24] strh r5, [r4, 0x26] - bl GenerateRandomNumber2 + bl Random2 lsls r0, 16 lsrs r0, 16 movs r1, 0xB4 @@ -16358,7 +16358,7 @@ _08106BC4: movs r1, 0x1E subs r1, r0 adds r0, r2, 0 - bl cosine + bl Cos strh r0, [r4, 0x24] movs r0, 0x30 ldrsh r2, [r4, r0] @@ -16372,7 +16372,7 @@ _08106BE0: movs r1, 0xA subs r1, r0 adds r0, r2, 0 - bl sine + bl Sin strh r0, [r4, 0x26] movs r2, 0x30 ldrsh r0, [r4, r2] @@ -16861,16 +16861,16 @@ _08106F8E: ands r4, r2 adds r0, r4, 0 movs r1, 0x64 - bl cosine + bl Cos strh r0, [r6, 0x24] adds r0, r4, 0 movs r1, 0xA - bl sine + bl Sin adds r4, r0, 0 movs r1, 0x3A ldrsh r0, [r6, r1] movs r1, 0x4 - bl cosine + bl Cos ldrh r2, [r6, 0x30] adds r4, r2 adds r0, r4 @@ -17116,7 +17116,7 @@ _081071B0: bl __modsi3 cmp r0, 0x1 bne _081071F8 - bl GenerateRandomNumber2 + bl Random2 lsls r0, 16 lsrs r0, 16 movs r1, 0xF0 @@ -17124,7 +17124,7 @@ _081071B0: adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 - bl GenerateRandomNumber2 + bl Random2 lsls r0, 16 lsrs r0, 16 movs r1, 0x50 @@ -17271,7 +17271,7 @@ _081072D8: adds r0, r6, 0 bl obj_translate_based_on_private_1_2_3_4 ldr r0, =DummyObjectCallback - bl object_new_hidden_with_callback + bl CreateInvisibleSpriteWithCallback adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 @@ -17279,14 +17279,14 @@ _081072D8: ldrb r0, [r5, 0x8] movs r2, 0x4 ldrsh r1, [r5, r2] - bl sine + bl Sin ldrh r1, [r6, 0x20] subs r1, r0 strh r1, [r6, 0x20] ldrb r0, [r5, 0x8] movs r2, 0x6 ldrsh r1, [r5, r2] - bl cosine + bl Cos ldrh r1, [r6, 0x22] subs r1, r0 strh r1, [r6, 0x22] @@ -17345,14 +17345,14 @@ sub_8107380: @ 8107380 movs r0, 0x2E ldrsh r1, [r7, r0] adds r0, r6, 0 - bl sine + bl Sin ldrh r1, [r5, 0x24] adds r0, r1 strh r0, [r5, 0x24] movs r0, 0x30 ldrsh r1, [r7, r0] adds r0, r6, 0 - bl cosine + bl Cos ldrh r1, [r5, 0x26] adds r0, r1 strh r0, [r5, 0x26] @@ -17690,7 +17690,7 @@ _08107688: asrs r0, 24 movs r2, 0x3C ldrsh r1, [r4, r2] - bl sine + bl Sin ldrh r1, [r4, 0x26] adds r0, r1 strh r0, [r4, 0x26] @@ -18007,7 +18007,7 @@ sub_810790C: @ 810790C movs r1, 0x2E ldrsh r0, [r4, r1] movs r1, 0x4 - bl sine + bl Sin strh r0, [r4, 0x24] ldrh r0, [r4, 0x30] adds r0, 0x30 @@ -18881,14 +18881,14 @@ sub_8108034: @ 8108034 adds r0, r4, 0 movs r1, 0x1 bl sub_80A6980 - bl GenerateRandomNumber2 + bl Random2 movs r5, 0xFF ands r5, r0 movs r0, 0x80 lsls r0, 1 adds r6, r0, 0 orrs r5, r6 - bl GenerateRandomNumber2 + bl Random2 ldr r1, =0x000001ff ands r1, r0 adds r0, r1, 0 @@ -19419,11 +19419,11 @@ _08108472: asrs r4, r6, 16 adds r0, r4, 0 movs r1, 0x40 - bl cosine + bl Cos strh r0, [r5, 0x36] adds r0, r4, 0 movs r1, 0x40 - bl sine + bl Sin strh r0, [r5, 0x38] mov r1, sp ldrh r1, [r1] @@ -20248,7 +20248,7 @@ sub_8108B2C: @ 8108B2C strh r0, [r6, 0x22] movs r0, 0x6 strh r0, [r6, 0x2E] - bl GenerateRandomNumber2 + bl Random2 movs r4, 0x1F adds r1, r4, 0 ands r1, r0 @@ -20257,13 +20257,13 @@ sub_8108B2C: @ 8108B2C ldrh r0, [r6, 0x20] adds r1, r0 strh r1, [r6, 0x32] - bl GenerateRandomNumber2 + bl Random2 ands r4, r0 adds r4, r5 ldrh r1, [r6, 0x22] adds r4, r1 strh r4, [r6, 0x36] - bl GenerateRandomNumber2 + bl Random2 movs r1, 0x7 ands r1, r0 mvns r1, r1 @@ -20362,7 +20362,7 @@ sub_8108C08: @ 8108C08 ldrsh r0, [r4, r1] movs r2, 0x32 ldrsh r1, [r4, r2] - bl sine + bl Sin strh r0, [r4, 0x24] ldrh r0, [r4, 0x34] subs r0, 0x1 @@ -20534,7 +20534,7 @@ sub_8108D54: @ 8108D54 lsls r1, 16 lsrs r1, 16 mov r10, r1 - bl GenerateRandomNumber2 + bl Random2 lsls r0, 16 lsrs r0, 16 movs r1, 0xA @@ -20544,7 +20544,7 @@ sub_8108D54: @ 8108D54 lsls r0, 16 lsrs r0, 16 mov r9, r0 - bl GenerateRandomNumber2 + bl Random2 negs r4, r4 lsls r0, 16 lsrs r0, 16 @@ -20962,7 +20962,7 @@ _081090F6: adds r1, r2 lsls r1, 16 asrs r1, 16 - bl sine + bl Sin strh r0, [r4, 0x24] movs r1, 0x2E ldrsh r0, [r4, r1] @@ -20973,7 +20973,7 @@ _081090F6: adds r1, r2 lsls r1, 16 asrs r1, 16 - bl cosine + bl Cos strh r0, [r4, 0x26] ldrh r0, [r4, 0x32] ldrh r2, [r4, 0x2E] @@ -21189,14 +21189,14 @@ _081092E4: movs r1, 0x3C ldrsh r0, [r6, r1] movs r1, 0x1C - bl sine + bl Sin ldrh r1, [r6, 0x24] adds r0, r1 strh r0, [r6, 0x24] movs r1, 0x3C ldrsh r0, [r6, r1] movs r1, 0x1C - bl cosine + bl Cos ldrh r1, [r6, 0x26] adds r0, r1 strh r0, [r6, 0x26] @@ -21238,12 +21238,12 @@ sub_8109338: @ 8109338 movs r1, 0x3C ldrsh r0, [r4, r1] movs r1, 0x1C - bl sine + bl Sin strh r0, [r4, 0x24] movs r1, 0x3C ldrsh r0, [r4, r1] movs r1, 0x1C - bl cosine + bl Cos strh r0, [r4, 0x26] ldrh r0, [r4, 0x3C] adds r0, 0x14 @@ -21344,14 +21344,14 @@ sub_810940C: @ 810940C ldrh r1, [r4, 0x32] lsls r1, 16 asrs r1, 24 - bl sine + bl Sin strh r0, [r4, 0x24] movs r1, 0x30 ldrsh r0, [r4, r1] ldrh r1, [r4, 0x32] lsls r1, 16 asrs r1, 24 - bl cosine + bl Cos strh r0, [r4, 0x26] ldrh r0, [r4, 0x30] adds r0, 0xA @@ -22301,7 +22301,7 @@ _08109B9A: ldrsh r0, [r5, r2] movs r2, 0x36 ldrsh r1, [r5, r2] - bl sine + bl Sin strh r0, [r5, 0x24] ldrh r0, [r5, 0x32] adds r0, 0x4 @@ -22327,7 +22327,7 @@ _08109BCE: ldrsh r0, [r5, r1] movs r2, 0x36 ldrsh r1, [r5, r2] - bl sine + bl Sin adds r2, r0, 0 movs r3, 0 strh r2, [r5, 0x24] @@ -22393,7 +22393,7 @@ sub_8109C4C: @ 8109C4C movs r1, 0x38 ldrsh r0, [r4, r1] movs r1, 0x10 - bl sine + bl Sin ldrh r1, [r4, 0x24] adds r0, r1 strh r0, [r4, 0x24] @@ -22461,14 +22461,14 @@ _08109CC8: ldrsh r0, [r4, r2] lsls r1, 16 asrs r1, 24 - bl sine + bl Sin strh r0, [r4, 0x24] movs r1, 0x30 ldrsh r0, [r4, r1] ldrh r1, [r4, 0x36] lsls r1, 16 asrs r1, 24 - bl cosine + bl Cos strh r0, [r4, 0x26] ldrh r0, [r4, 0x30] adds r0, 0x7 @@ -22930,7 +22930,7 @@ sub_810A060: @ 810A060 ldrb r2, [r1] ldrh r3, [r1, 0x2] movs r1, 0x10 - bl pal_fade_1 + bl BlendPalette adds r0, r4, 0 bl move_anim_task_del add sp, 0x10 @@ -23476,7 +23476,7 @@ sub_810A4F4: @ 810A4F4 ldrsh r0, [r4, r1] movs r2, 0x38 ldrsh r1, [r4, r2] - bl sine + bl Sin ldrh r1, [r4, 0x24] adds r0, r1 strh r0, [r4, 0x24] @@ -23484,7 +23484,7 @@ sub_810A4F4: @ 810A4F4 ldrsh r0, [r4, r2] movs r2, 0x38 ldrsh r1, [r4, r2] - bl cosine + bl Cos ldrh r1, [r4, 0x26] adds r0, r1 strh r0, [r4, 0x26] @@ -23714,13 +23714,13 @@ sub_810A6EC: @ 810A6EC ldrsh r0, [r4, r1] movs r2, 0x38 ldrsh r1, [r4, r2] - bl sine + bl Sin strh r0, [r4, 0x24] movs r1, 0x3C ldrsh r0, [r4, r1] movs r2, 0x38 ldrsh r1, [r4, r2] - bl cosine + bl Cos strh r0, [r4, 0x26] ldrh r0, [r4, 0x3A] ldrh r1, [r4, 0x3C] @@ -25910,7 +25910,7 @@ sub_810B848: @ 810B848 ldrsh r0, [r4, r1] movs r2, 0x34 ldrsh r1, [r4, r2] - bl sine + bl Sin ldrh r1, [r4, 0x24] adds r0, r1 strh r0, [r4, 0x24] @@ -25918,7 +25918,7 @@ sub_810B848: @ 810B848 ldrsh r0, [r4, r2] movs r2, 0x34 ldrsh r1, [r4, r2] - bl sine + bl Sin ldrh r1, [r4, 0x26] adds r0, r1 strh r0, [r4, 0x26] @@ -26290,12 +26290,12 @@ _0810BB90: ldrsh r0, [r4, r2] lsls r1, 16 asrs r1, 16 - bl sine + bl Sin strh r0, [r4, 0x34] movs r1, 0x2E ldrsh r0, [r4, r1] movs r1, 0xF - bl cosine + bl Cos strh r0, [r4, 0x36] strh r5, [r4, 0x38] ldr r1, =sub_810BBC8 @@ -26329,14 +26329,14 @@ _0810BBDE: ldrsh r0, [r4, r2] lsls r1, 16 asrs r1, 16 - bl sine + bl Sin ldrh r1, [r4, 0x34] subs r0, r1 strh r0, [r4, 0x24] movs r1, 0x2E ldrsh r0, [r4, r1] movs r1, 0xF - bl cosine + bl Cos ldrh r1, [r4, 0x36] subs r0, r1 strh r0, [r4, 0x26] @@ -26582,7 +26582,7 @@ _0810BDEC: ldrsh r0, [r4, r2] movs r2, 0x38 ldrsh r1, [r4, r2] - bl sine + bl Sin ldrh r1, [r4, 0x26] adds r0, r1 strh r0, [r4, 0x26] @@ -26853,7 +26853,7 @@ sub_810C008: @ 810C008 ldrsh r0, [r4, r1] movs r2, 0x3A ldrsh r1, [r4, r2] - bl sine + bl Sin ldrh r1, [r4, 0x24] adds r0, r1 strh r0, [r4, 0x24] @@ -26861,7 +26861,7 @@ sub_810C008: @ 810C008 ldrsh r0, [r4, r2] movs r1, 0x6 negs r1, r1 - bl cosine + bl Cos ldrh r1, [r4, 0x26] adds r0, r1 strh r0, [r4, 0x26] @@ -28451,14 +28451,14 @@ sub_810CD4C: @ 810CD4C adds r0, r4, 0 movs r1, 0x1 bl sub_80A6980 - bl GenerateRandomNumber2 + bl Random2 movs r5, 0xFF ands r5, r0 movs r0, 0x80 lsls r0, 1 adds r6, r0, 0 orrs r5, r6 - bl GenerateRandomNumber2 + bl Random2 ldr r1, =0x000001ff ands r1, r0 adds r0, r1, 0 @@ -28693,7 +28693,7 @@ _0810CF56: ldrsh r0, [r4, r3] cmp r0, 0 bge _0810CF74 - bl GenerateRandomNumber2 + bl Random2 lsls r0, 16 lsrs r0, 16 movs r1, 0x5 @@ -28735,7 +28735,7 @@ _0810CF74: _0810CFBE: lsls r4, r0, 14 lsrs r4, 16 - bl GenerateRandomNumber2 + bl Random2 lsls r0, 16 lsrs r0, 16 lsls r1, r6, 16 @@ -28743,7 +28743,7 @@ _0810CFBE: bl __modsi3 lsls r0, 16 lsrs r6, r0, 16 - bl GenerateRandomNumber2 + bl Random2 lsls r0, 16 lsrs r0, 16 lsls r4, 16 @@ -28752,7 +28752,7 @@ _0810CFBE: bl __modsi3 lsls r0, 16 lsrs r4, r0, 16 - bl GenerateRandomNumber2 + bl Random2 movs r7, 0x1 adds r1, r7, 0 ands r1, r0 @@ -28762,7 +28762,7 @@ _0810CFBE: negs r0, r0 lsrs r6, r0, 16 _0810D000: - bl GenerateRandomNumber2 + bl Random2 adds r1, r7, 0 ands r1, r0 cmp r1, 0 @@ -29048,7 +29048,7 @@ sub_810D240: @ 810D240 asrs r0, 24 movs r2, 0x38 ldrsh r1, [r4, r2] - bl sine + bl Sin ldrh r1, [r4, 0x26] adds r0, r1 strh r0, [r4, 0x26] @@ -29218,7 +29218,7 @@ _0810D3A8: ldrsh r0, [r4, r1] movs r2, 0x32 ldrsh r1, [r4, r2] - bl sine + bl Sin strh r0, [r4, 0x26] ldrh r0, [r4, 0x34] adds r0, 0x3 @@ -30057,7 +30057,7 @@ sub_810DA7C: @ 810DA7C movs r1, 0x30 ldrsh r0, [r4, r1] movs r1, 0x2 - bl sine + bl Sin strh r0, [r4, 0x24] ldrh r0, [r4, 0x2E] adds r0, 0x1 @@ -30497,7 +30497,7 @@ sub_810DE2C: @ 810DE2C movs r1, 0x2E ldrsh r0, [r4, r1] movs r1, 0x4 - bl sine + bl Sin strh r0, [r4, 0x24] ldrh r0, [r4, 0x30] adds r0, 0x30 @@ -30549,12 +30549,12 @@ sub_810DE98: @ 810DE98 movs r1, 0x30 ldrsh r0, [r4, r1] movs r1, 0x20 - bl sine + bl Sin strh r0, [r4, 0x24] movs r1, 0x30 ldrsh r0, [r4, r1] movs r1, 0x8 - bl cosine + bl Cos strh r0, [r4, 0x26] ldrh r0, [r4, 0x30] adds r0, 0x5 @@ -32223,13 +32223,13 @@ sub_810EB88: @ 810EB88 movs r5, 0xD negs r5, r5 adds r1, r5, 0 - bl sine + bl Sin ldr r4, =gUnknown_0203841E strh r0, [r4] movs r1, 0x8 ldrsh r0, [r7, r1] adds r1, r5, 0 - bl cosine + bl Cos strh r0, [r4, 0x2] movs r0, 0x1 strh r0, [r4, 0x4] @@ -32644,10 +32644,10 @@ _0810EEEC: sub_810EEF8: @ 810EEF8 push {r4,r5,lr} adds r5, r0, 0 - bl GenerateRandomNumber2 + bl Random2 ldr r4, =0x000001ff ands r4, r0 - bl GenerateRandomNumber2 + bl Random2 movs r1, 0x7F ands r1, r0 movs r0, 0x1 @@ -35438,7 +35438,7 @@ _08110592: ldrsh r0, [r4, r1] movs r2, 0x38 ldrsh r1, [r4, r2] - bl sine + bl Sin ldrh r1, [r4, 0x24] adds r0, r1 strh r0, [r4, 0x24] @@ -36165,7 +36165,7 @@ sub_8110B80: @ 8110B80 ldrsh r0, [r4, r2] movs r2, 0x34 ldrsh r1, [r4, r2] - bl sine + bl Sin strh r0, [r4, 0x24] ldrh r0, [r4, 0x32] ldrh r1, [r4, 0x38] @@ -37277,7 +37277,7 @@ sub_811149C: @ 811149C ldrsh r0, [r4, r2] movs r2, 0x38 ldrsh r1, [r4, r2] - bl sine + bl Sin ldrh r1, [r4, 0x26] subs r1, r0 strh r1, [r4, 0x26] @@ -37409,7 +37409,7 @@ _081115BC: movs r2, 0xA ldrsh r1, [r4, r2] movs r0, 0x4 - bl cosine + bl Cos ldrh r4, [r4, 0xC] adds r0, r4 strh r0, [r6] @@ -37495,14 +37495,14 @@ _08111694: movs r1, 0x38 ldrsh r0, [r4, r1] movs r1, 0xA - bl sine + bl Sin ldrh r1, [r4, 0x24] adds r0, r1 strh r0, [r4, 0x24] movs r1, 0x38 ldrsh r0, [r4, r1] movs r1, 0xF - bl cosine + bl Cos ldrh r1, [r4, 0x26] adds r0, r1 strh r0, [r4, 0x26] @@ -37545,14 +37545,14 @@ sub_81116E8: @ 81116E8 movs r1, 0x38 ldrsh r0, [r4, r1] movs r1, 0xA - bl sine + bl Sin ldrh r1, [r4, 0x24] adds r0, r1 strh r0, [r4, 0x24] movs r1, 0x38 ldrsh r0, [r4, r1] movs r1, 0xF - bl cosine + bl Cos ldrh r1, [r4, 0x26] adds r0, r1 strh r0, [r4, 0x26] @@ -37699,12 +37699,12 @@ sub_8111814: @ 8111814 movs r1, 0x2E ldrsh r0, [r4, r1] movs r1, 0x20 - bl sine + bl Sin strh r0, [r4, 0x24] movs r1, 0x2E ldrsh r0, [r4, r1] movs r1, 0x8 - bl cosine + bl Cos strh r0, [r4, 0x26] ldrh r0, [r4, 0x2E] subs r0, 0x41 @@ -38676,7 +38676,7 @@ _08111FD0: ldr r3, =0x00003c0d movs r1, 0x10 movs r2, 0xA - bl pal_fade_1 + bl BlendPalette b _081120C6 .pool _08112014: @@ -38910,7 +38910,7 @@ _081121DC: ldr r3, =0x00003c0d movs r1, 0x10 movs r2, 0 - bl pal_fade_1 + bl BlendPalette b _08112258 .pool _081121F0: @@ -40050,7 +40050,7 @@ sub_8112B78: @ 8112B78 movs r1, 0x2E ldrsh r0, [r5, r1] movs r1, 0xC - bl sine + bl Sin strh r0, [r5, 0x24] ldr r0, =gUnknown_02038436 ldrb r0, [r0] @@ -40464,7 +40464,7 @@ _08112EB2: ldrsh r0, [r4, r2] movs r2, 0x34 ldrsh r1, [r4, r2] - bl sine + bl Sin strh r0, [r4, 0x24] ldrh r0, [r4, 0x32] subs r0, 0x41 @@ -40516,7 +40516,7 @@ _08112F08: movs r2, 0x3A ldrsh r0, [r4, r2] movs r1, 0x7 - bl sine + bl Sin strh r0, [r4, 0x26] ldr r2, =gTasks movs r0, 0x2E @@ -40595,7 +40595,7 @@ sub_8112FB8: @ 8112FB8 ldrsh r0, [r5, r2] movs r2, 0x30 ldrsh r1, [r5, r2] - bl sine + bl Sin ldr r4, =gUnknown_02020630 movs r1, 0x38 ldrsh r2, [r5, r1] @@ -40608,7 +40608,7 @@ sub_8112FB8: @ 8112FB8 ldrsh r0, [r5, r2] movs r2, 0x30 ldrsh r1, [r5, r2] - bl cosine + bl Cos movs r1, 0x38 ldrsh r2, [r5, r1] lsls r1, r2, 4 @@ -40930,13 +40930,13 @@ _081132B2: ldrsh r0, [r6, r1] movs r2, 0x3C ldrsh r1, [r6, r2] - bl cosine + bl Cos strh r0, [r6, 0x24] movs r1, 0x3A ldrsh r0, [r6, r1] movs r2, 0x3C ldrsh r1, [r6, r2] - bl sine + bl Sin strh r0, [r6, 0x26] ldr r0, =sub_81132E0 str r0, [r6, 0x1C] @@ -40968,13 +40968,13 @@ _081132F2: ldrsh r0, [r4, r1] movs r2, 0x3C ldrsh r1, [r4, r2] - bl cosine + bl Cos strh r0, [r4, 0x24] movs r1, 0x3A ldrsh r0, [r4, r1] movs r2, 0x3C ldrsh r1, [r4, r2] - bl sine + bl Sin strh r0, [r4, 0x26] ldrh r0, [r4, 0x36] adds r0, 0x1 @@ -41037,13 +41037,13 @@ _08113386: ldrsh r0, [r4, r1] movs r2, 0x3C ldrsh r1, [r4, r2] - bl cosine + bl Cos strh r0, [r4, 0x24] movs r1, 0x3A ldrsh r0, [r4, r1] movs r2, 0x3C ldrsh r1, [r4, r2] - bl sine + bl Sin strh r0, [r4, 0x26] ldrh r0, [r4, 0x36] adds r0, 0x1 @@ -41363,14 +41363,14 @@ sub_81135EC: @ 81135EC ldrsh r0, [r5, r1] movs r2, 0x4 ldrsh r1, [r5, r2] - bl cosine + bl Cos strh r0, [r4, 0x30] movs r3, 0x2 ldrsh r0, [r5, r3] lsls r6, 16 asrs r6, 16 adds r1, r6, 0 - bl sine + bl Sin strh r0, [r4, 0x32] ldrh r1, [r4, 0x30] ldrh r2, [r5] @@ -41766,7 +41766,7 @@ _08113992: ldrsh r0, [r4, r1] movs r2, 0x3A ldrsh r1, [r4, r2] - bl sine + bl Sin ldrh r6, [r4, 0x26] adds r0, r6 strh r0, [r4, 0x26] @@ -43346,7 +43346,7 @@ _08114708: ldrh r3, [r2, 0x4] movs r1, 0x10 movs r2, 0xB - bl pal_fade_1 + bl BlendPalette _08114714: ldr r1, =gTasks lsls r0, r7, 2 @@ -43814,11 +43814,11 @@ sub_8114AF0: @ 8114AF0 bl sub_80A60AC lsls r0, 24 lsrs r7, r0, 24 - bl GenerateRandomNumber2 + bl Random2 movs r4, 0x1F adds r5, r4, 0 ands r5, r0 - bl GenerateRandomNumber2 + bl Random2 ands r4, r0 adds r1, r5, 0 cmp r1, 0x10 @@ -45363,12 +45363,12 @@ sub_8115798: @ 8115798 movs r1, 0x2E ldrsh r0, [r4, r1] movs r1, 0x1E - bl cosine + bl Cos strh r0, [r4, 0x24] movs r2, 0x2E ldrsh r0, [r4, r2] movs r1, 0xA - bl sine + bl Sin strh r0, [r4, 0x26] ldrh r0, [r4, 0x2E] cmp r0, 0x7F @@ -46977,7 +46977,7 @@ sub_8116458: @ 8116458 negs r0, r0 cmp r1, r0 bne _08116474 - bl GenerateRandomNumber2 + bl Random2 movs r1, 0x3 ands r1, r0 strh r1, [r5, 0x2] @@ -46999,7 +46999,7 @@ _08116494: movs r1, 0 bl sub_80A6980 _0811649C: - bl GenerateRandomNumber2 + bl Random2 lsls r0, 16 lsrs r0, 16 movs r1, 0x30 @@ -47009,7 +47009,7 @@ _0811649C: ldrh r1, [r4, 0x24] adds r0, r1 strh r0, [r4, 0x24] - bl GenerateRandomNumber2 + bl Random2 lsls r0, 16 lsrs r0, 16 movs r1, 0x18 @@ -47512,7 +47512,7 @@ _081168F8: ldrh r3, [r5, 0x12] adds r0, r6, 0 movs r1, 0x10 - bl pal_fade_1 + bl BlendPalette _0811690C: adds r0, r6, 0 adds r0, 0x10 @@ -48940,7 +48940,7 @@ _08117560: ldrb r2, [r4, 0xC] movs r1, 0x10 ldr r3, =0x0000ffff - bl pal_fade_1 + bl BlendPalette _0811757A: movs r1, 0x24 ldrsh r0, [r4, r1] @@ -48956,7 +48956,7 @@ _0811757A: ldrb r2, [r4, 0xC] movs r1, 0x10 movs r3, 0 - bl pal_fade_1 + bl BlendPalette _0811759A: adds r0, r5, 0x1 lsls r0, 16 @@ -50872,7 +50872,7 @@ _08118580: bne _081185E4 ldr r7, =gUnknown_02022E1A ldrh r0, [r4, 0x14] - bl cosine2 + bl Cos2 lsls r0, 16 asrs r0, 16 cmp r0, 0 diff --git a/asm/battle_setup.s b/asm/battle_setup.s index aee1c1d95..32b042cad 100644 --- a/asm/battle_setup.s +++ b/asm/battle_setup.s @@ -1222,7 +1222,7 @@ _080B1040: b _080B1120 _080B1048: ldr r4, =gUnknown_0854FEA4 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x3 @@ -1230,7 +1230,7 @@ _080B1048: .pool _080B105C: ldr r4, =gUnknown_0854FEA7 - bl GenerateRandomNumber + bl Random ands r5, r0 lsls r0, r5, 16 b _080B111A @@ -1243,7 +1243,7 @@ _080B106C: cmp r0, 0x3 beq _080B10EC ldr r4, =gUnknown_0854FE98 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 b _080B1112 @@ -1263,7 +1263,7 @@ _080B109E: b _080B1120 _080B10A6: ldr r4, =gUnknown_0854FEA4 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x3 @@ -1271,7 +1271,7 @@ _080B10A6: .pool _080B10B8: ldr r4, =gUnknown_0854FEA7 - bl GenerateRandomNumber + bl Random ands r5, r0 lsls r0, r5, 16 b _080B111A @@ -1284,7 +1284,7 @@ _080B10C8: cmp r0, 0x3 beq _080B10EC ldr r4, =gUnknown_0854FE98 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 b _080B1112 @@ -2858,7 +2858,7 @@ _080B1E1A: lsls r0, 24 cmp r0, 0 beq _080B1E74 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x64 diff --git a/asm/battle_transition.s b/asm/battle_transition.s index 51fdcecba..613460c39 100644 --- a/asm/battle_transition.s +++ b/asm/battle_transition.s @@ -665,7 +665,7 @@ sub_8146420: @ 8146420 _08146448: lsrs r0, r4, 8 asrs r1, r7, 16 - bl sine + bl Sin ldr r1, =gUnknown_02038C28 lsls r2, r5, 1 adds r2, r1 @@ -2094,7 +2094,7 @@ sub_8147018: @ 8147018 adds r0, r4, 0 movs r2, 0xA bl memcpy - bl GenerateRandomNumber + bl Random movs r5, 0x1 ands r5, r0 movs r1, 0 @@ -3042,7 +3042,7 @@ _081477E4: _081477E8: lsrs r0, r4, 8 asrs r1, r7, 16 - bl sine + bl Sin ldr r1, =gUnknown_02038C28 lsls r2, r5, 1 adds r2, r1 @@ -3250,7 +3250,7 @@ sub_814797C: @ 814797C _081479A4: adds r0, r5, 0 movs r1, 0x28 - bl sine + bl Sin ldrh r1, [r4, 0xA] adds r0, r1 lsls r0, 16 @@ -3652,7 +3652,7 @@ sub_8147CE4: @ 8147CE4 _08147CFE: adds r0, r5, 0 movs r1, 0x10 - bl sine + bl Sin ldrh r1, [r4, 0xC] adds r0, r1 lsls r0, 16 @@ -3683,7 +3683,7 @@ _08147D1E: _08147D38: adds r0, r5, 0 movs r1, 0x10 - bl sine + bl Sin ldrh r1, [r4, 0xE] subs r1, r0 lsls r1, 16 @@ -5733,7 +5733,7 @@ _08148E08: lsls r1, 16 asrs r1, 16 adds r0, r2, 0 - bl sine + bl Sin ldrh r2, [r4, 0xA] adds r0, r2 strh r0, [r4, 0xA] @@ -7938,7 +7938,7 @@ _08149FD0: ands r0, r4 mov r2, r8 asrs r1, r2, 16 - bl sine + bl Sin lsls r1, r6, 1 add r1, r10 add r0, r9 @@ -8000,13 +8000,13 @@ _0814A04C: asrs r0, r5, 16 mov r10, r0 ldr r1, [sp, 0x4] - bl sine + bl Sin adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 mov r0, r10 ldr r1, [sp, 0x4] - bl cosine + bl Cos ldr r2, [sp] lsls r1, r2, 16 asrs r1, 16 @@ -8071,7 +8071,7 @@ _0814A0B8: lsls r0, 16 asrs r0, 16 ldr r1, [sp, 0x4] - bl cosine + bl Cos lsls r0, 16 asrs r0, 16 ldr r2, [sp, 0x8] @@ -8717,7 +8717,7 @@ _0814A5E0: _0814A5E4: lsrs r0, r6, 8 asrs r1, r7, 16 - bl sine + bl Sin ldr r1, =gUnknown_02038C28 lsls r2, r5, 1 adds r2, r1 @@ -9195,7 +9195,7 @@ sub_814A960: @ 814A960 movs r1, 0x10 movs r2, 0x8 movs r3, 0 - bl pal_fade_1 + bl BlendPalette movs r1, 0 movs r0, 0x22 mov r2, r8 @@ -9283,7 +9283,7 @@ sub_814AA84: @ 814AA84 movs r1, 0x10 movs r2, 0x3 movs r3, 0 - bl pal_fade_1 + bl BlendPalette ldr r0, =0xffff3fff movs r1, 0x10 movs r2, 0 @@ -9526,7 +9526,7 @@ sub_814AC38: @ 814AC38 bl CreateTask lsls r0, 24 lsrs r5, r0, 24 - bl GenerateRandomNumber + bl Random lsls r0, 16 movs r1, 0xC0 lsls r1, 10 diff --git a/asm/berry.s b/asm/berry.s index 6b6e559e9..a6ee3d077 100644 --- a/asm/berry.s +++ b/asm/berry.s @@ -738,7 +738,7 @@ _080E1AFA: muls r5, r0 adds r4, r1, 0 muls r4, r2 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 subs r4, r5 diff --git a/asm/berry_blender.s b/asm/berry_blender.s index abbb7a597..c3711015c 100644 --- a/asm/berry_blender.s +++ b/asm/berry_blender.s @@ -2687,7 +2687,7 @@ _08080ED8: ldrb r0, [r0] cmp r0, 0 bne _08080F9A - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 ldr r1, =0x0000028f @@ -2830,7 +2830,7 @@ sub_8080FD0: @ 8080FD0 ldrb r0, [r0] cmp r0, 0 bne _080810CC - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 ldr r1, =0x0000028f @@ -2956,7 +2956,7 @@ sub_80810F8: @ 80810F8 ldrb r0, [r0] cmp r0, 0 bne _080811F8 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 ldr r1, =0x0000028f @@ -4432,7 +4432,7 @@ _08081D4C: ldrb r0, [r5] cmp r0, 0xC bne _08081DA6 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0xA @@ -6415,7 +6415,7 @@ sub_8082E84: @ 8082E84 mov r6, r9 mov r5, r8 push {r5-r7} - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r1, r0, 16 movs r0, 0x1 @@ -6432,7 +6432,7 @@ sub_8082E84: @ 8082E84 mov r8, r3 movs r7, 0x10 _08082EB0: - bl GenerateRandomNumber + bl Random ldr r1, =gUnknown_020322A4 ldr r4, [r1] adds r4, 0x4A @@ -6475,7 +6475,7 @@ _08082EF4: adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 - bl GenerateRandomNumber + bl Random lsls r5, r4, 4 adds r5, r4 lsls r5, 2 @@ -6487,7 +6487,7 @@ _08082EF4: ands r0, r1 subs r0, r7, r0 strh r0, [r4, 0x2E] - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 mov r2, r8 @@ -6968,7 +6968,7 @@ sub_80832BC: @ 80832BC ldrsh r0, [r6, r1] cmp r0, 0 bne _080832E0 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 adds r1, r5, 0 @@ -7042,7 +7042,7 @@ _08083344: ldrsh r1, [r4, r2] cmp r1, 0 bne _08083362 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 adds r1, r5, 0 diff --git a/asm/blend_palette.s b/asm/blend_palette.s index 9fa7ee4c3..81a847e87 100644 --- a/asm/blend_palette.s +++ b/asm/blend_palette.s @@ -5,8 +5,8 @@ .text - thumb_func_start pal_fade_1 -pal_fade_1: @ 806F98C + thumb_func_start BlendPalette +BlendPalette: @ 806F98C push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -85,6 +85,6 @@ _0806FA12: pop {r0} bx r0 .pool - thumb_func_end pal_fade_1 + thumb_func_end BlendPalette .align 2, 0 @ Don't pad with nop. diff --git a/asm/cable_car.s b/asm/cable_car.s index 0ccb2a0d8..16eac4fb1 100644 --- a/asm/cable_car.s +++ b/asm/cable_car.s @@ -1912,7 +1912,7 @@ sub_8150D28: @ 8150D28 add r0, sp, 0xC movs r2, 0x2 bl memcpy - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 mov r9, r0 diff --git a/asm/contest.s b/asm/contest.s index ec9614819..9c00bdc64 100644 --- a/asm/contest.s +++ b/asm/contest.s @@ -6072,7 +6072,7 @@ _080DAC3A: movs r5, 0 ldr r7, =gUnknown_085880A4 _080DAC50: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 adds r1, r6, 0 @@ -8264,7 +8264,7 @@ sub_80DBD4C: @ 80DBD4C str r6, [sp, 0x6C] mov r4, sp _080DBD7A: - bl GenerateRandomNumber + bl Random strh r0, [r4] movs r2, 0 cmp r2, r9 @@ -9472,7 +9472,7 @@ _080DC6DC: ldr r3, =0x00004bff movs r1, 0x2 movs r2, 0 - bl pal_fade_1 + bl BlendPalette adds r0, r6, 0 bl DestroyTask _080DC716: @@ -9567,7 +9567,7 @@ _080DC7AA: ldrb r2, [r1] movs r1, 0x2 ldr r3, =0x00004bff - bl pal_fade_1 + bl BlendPalette _080DC7CA: adds r0, r6, 0x1 lsls r0, 24 @@ -9790,14 +9790,14 @@ _080DC970: ldrb r2, [r5] movs r1, 0x1 mov r3, r10 - bl pal_fade_1 + bl BlendPalette adds r4, 0xC adds r4, r7 ldrb r2, [r5] adds r0, r4, 0 movs r1, 0x1 mov r3, r10 - bl pal_fade_1 + bl BlendPalette _080DC996: adds r0, r7, 0x1 lsls r0, 24 @@ -9930,7 +9930,7 @@ sub_80DC9EC: @ 80DC9EC movs r0, 0 movs r1, 0x3 adds r2, r4, 0 - bl rfu_MBOOT_CHILD_inheritanceLinkStatus + bl CopySpriteTiles ldrb r0, [r6] lsls r3, r0, 2 adds r3, r0 @@ -9943,7 +9943,7 @@ sub_80DC9EC: @ 80DC9EC movs r0, 0 movs r1, 0x3 adds r2, r4, 0 - bl rfu_MBOOT_CHILD_inheritanceLinkStatus + bl CopySpriteTiles movs r4, 0 str r4, [sp, 0x4] ldr r0, [r7] @@ -10393,7 +10393,7 @@ sub_80DCE58: @ 80DCE58 adds r6, r4, 0 movs r7, 0 _080DCE7E: - bl GenerateRandomNumber + bl Random adds r1, r0, 0 mov r0, sp adds r0, r7 @@ -11048,7 +11048,7 @@ _080DD388: movs r0, 0 _080DD38A: strb r0, [r3, 0x2] - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x3 @@ -11893,7 +11893,7 @@ _080DDA98: ldrb r2, [r4, 0x10] ldr r3, =0x00007fff movs r1, 0x1 - bl pal_fade_1 + bl BlendPalette movs r1, 0x10 ldrsh r0, [r4, r1] cmp r0, 0 @@ -11922,7 +11922,7 @@ _080DDACA: movs r1, 0x1 movs r2, 0 movs r3, 0x1F - bl pal_fade_1 + bl BlendPalette adds r0, r5, 0 bl DestroyTask _080DDAFE: @@ -12522,12 +12522,12 @@ _080DDFB8: ldrh r3, [r4, 0x8] movs r0, 0x11 movs r1, 0x1 - bl pal_fade_1 + bl BlendPalette ldrb r2, [r4, 0xA] ldrh r3, [r4, 0x8] movs r0, 0x1A movs r1, 0x1 - bl pal_fade_1 + bl BlendPalette movs r2, 0xA ldrsh r1, [r4, r2] movs r2, 0xE @@ -13795,7 +13795,7 @@ sub_80DE9DC: @ 80DE9DC sub_80DEA20: @ 80DEA20 push {lr} ldr r0, =DummyObjectCallback - bl object_new_hidden_with_callback + bl CreateInvisibleSpriteWithCallback ldr r1, =gUnknown_020241E4 strb r0, [r1, 0x3] ldr r0, =gUnknown_0202420C @@ -14227,7 +14227,7 @@ sub_80DEDA8: @ 80DEDA8 lsls r0, 24 lsrs r0, 24 str r0, [sp] - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x3 @@ -15122,7 +15122,7 @@ _080DF4B6: cmp r0, r7 bne _080DF478 _080DF4C0: - bl GenerateRandomNumber + bl Random ldr r1, =gUnknown_02039F34 ldr r1, [r1] ldr r4, [r1, 0x1C] @@ -15246,7 +15246,7 @@ _080DF5A0: subs r3, 0x1 cmp r3, 0 bge _080DF592 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 adds r1, r4, 0 @@ -15351,7 +15351,7 @@ _080DF67C: cmp r3, 0x3 ble _080DF644 _080DF682: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 adds r1, r5, 0 diff --git a/asm/contest_ai.s b/asm/contest_ai.s index fc3d48507..d680894ac 100644 --- a/asm/contest_ai.s +++ b/asm/contest_ai.s @@ -95,7 +95,7 @@ _0815634A: _0815636A: movs r6, 0x3 _0815636C: - bl GenerateRandomNumber + bl Random adds r5, r0, 0 ands r5, r6 ldr r4, =gUnknown_02039F34 @@ -4825,7 +4825,7 @@ _081587C4: thumb_func_start sub_81587CC sub_81587CC: @ 81587CC push {r4,r5,lr} - bl GenerateRandomNumber + bl Random movs r2, 0xFF ands r2, r0 ldr r0, =gUnknown_02039F34 @@ -4866,7 +4866,7 @@ _08158814: thumb_func_start sub_815881C sub_815881C: @ 815881C push {r4,r5,lr} - bl GenerateRandomNumber + bl Random movs r2, 0xFF ands r2, r0 ldr r0, =gUnknown_02039F34 diff --git a/asm/contest_effect.s b/asm/contest_effect.s index 36cafdb38..09c06b079 100644 --- a/asm/contest_effect.s +++ b/asm/contest_effect.s @@ -394,7 +394,7 @@ _080E56C6: thumb_func_start ContestEffectFunc_080E56E0 ContestEffectFunc_080E56E0: @ 80E56E0 push {lr} - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0xA @@ -450,7 +450,7 @@ _080E5736: ldr r1, [r0, 0x8] movs r0, 0xFF strb r0, [r1, 0x9] - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0xA @@ -1071,7 +1071,7 @@ _080E5BD2: beq _080E5CA0 mov r4, sp _080E5C16: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x64 @@ -1636,7 +1636,7 @@ _080E6060: thumb_func_start ContestEffectFunc_080E6068 ContestEffectFunc_080E6068: @ 80E6068 push {r4,lr} - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0xA @@ -2467,7 +2467,7 @@ _080E6680: movs r6, 0 adds r7, r5, 0 _080E66AA: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 lsls r2, r6, 24 diff --git a/asm/contest_link_80F57C4.s b/asm/contest_link_80F57C4.s index 9c289ea4a..3790a1da9 100644 --- a/asm/contest_link_80F57C4.s +++ b/asm/contest_link_80F57C4.s @@ -1925,17 +1925,17 @@ _080F6944: ldr r3, =0x00002ede movs r0, 0x6B movs r1, 0x1 - bl pal_fade_1 + bl BlendPalette ldrb r2, [r4, 0xA] ldr r3, =0x00007fff movs r0, 0x68 movs r1, 0x1 - bl pal_fade_1 + bl BlendPalette ldrb r2, [r4, 0xA] ldr r3, =0x000077be movs r0, 0x6E movs r1, 0x1 - bl pal_fade_1 + bl BlendPalette _080F6972: ldr r1, =gTasks lsls r0, r5, 2 @@ -3402,7 +3402,7 @@ sub_80F753C: @ 80F753C ldr r3, =0x00006f8d movs r0, 0x91 movs r1, 0x1 - bl pal_fade_1 + bl BlendPalette movs r1, 0x22 ldrsh r0, [r4, r1] cmp r0, 0 @@ -3565,7 +3565,7 @@ sub_80F7670: @ 80F7670 cmp r0, 0x27 bhi _080F7732 ldr r4, =gUnknown_0858D860 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0xF0 @@ -3581,7 +3581,7 @@ sub_80F7670: @ 80F7670 adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 - bl GenerateRandomNumber + bl Random ldr r1, =gUnknown_02020630 lsls r5, r4, 4 adds r5, r4 @@ -3590,21 +3590,21 @@ sub_80F7670: @ 80F7670 lsls r0, 23 lsrs r0, 23 strh r0, [r5, 0x2E] - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x18 bl __umodsi3 adds r0, 0x10 strh r0, [r5, 0x30] - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0xFF ands r0, r1 adds r0, 0x30 strh r0, [r5, 0x32] - bl GenerateRandomNumber + bl Random ldrh r6, [r5, 0x4] lsls r4, r6, 22 lsrs r4, 22 @@ -3656,7 +3656,7 @@ sub_80F7768: @ 80F7768 asrs r0, 24 movs r2, 0x30 ldrsh r1, [r4, r2] - bl sine + bl Sin strh r0, [r4, 0x24] ldrh r1, [r4, 0x32] ldrh r0, [r4, 0x36] diff --git a/asm/daycare.s b/asm/daycare.s index c8f012720..48d7afcd9 100644 --- a/asm/daycare.s +++ b/asm/daycare.s @@ -860,7 +860,7 @@ _080700C8: ble _080700AE cmp r5, 0x2 bne _080700E2 - bl GenerateRandomNumber + bl Random lsls r0, 16 ldr r1, =0x7ffe0000 movs r7, 0x1 @@ -875,7 +875,7 @@ _080700E2: bl pokemon_getattr_encrypted cmp r0, 0xC3 bne _080700FE - bl GenerateRandomNumber + bl Random lsls r0, 16 ldr r1, =0x7ffe0000 cmp r0, r1 @@ -907,9 +907,9 @@ sub_8070114: @ 8070114 adds r1, r0, 0 cmp r1, 0 bge _08070160 - bl GenerateRandomNumber2 + bl Random2 adds r4, r0, 0 - bl GenerateRandomNumber + bl Random movs r1, 0x8C lsls r1, 1 adds r5, r1 @@ -936,9 +936,9 @@ _08070160: lsls r0, 24 lsrs r7, r0, 24 _08070176: - bl GenerateRandomNumber2 + bl Random2 adds r4, r0, 0 - bl GenerateRandomNumber + bl Random lsls r4, 16 lsls r0, 16 lsrs r0, 16 @@ -974,7 +974,7 @@ _080701AC: sub_80701B8: @ 80701B8 push {r4,lr} adds r4, r0, 0 - bl GenerateRandomNumber + bl Random movs r1, 0x8C lsls r1, 1 adds r4, r1 @@ -1084,7 +1084,7 @@ _08070276: movs r5, 0 adds r6, r1, 0 _08070288: - bl GenerateRandomNumber + bl Random mov r1, sp adds r4, r1, r5 lsls r0, 16 @@ -1106,7 +1106,7 @@ _08070288: movs r5, 0 movs r4, 0x1 _080702B8: - bl GenerateRandomNumber + bl Random adds r1, r7, r5 lsls r0, 16 lsrs r0, 16 @@ -2154,7 +2154,7 @@ _08070AEE: adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x64 diff --git a/asm/dewford_trend.s b/asm/dewford_trend.s index 1fafbdbdf..aef73f46d 100644 --- a/asm/dewford_trend.s +++ b/asm/dewford_trend.s @@ -19,7 +19,7 @@ _081224DA: ldr r2, =0x00002e6c adds r1, r2 strh r0, [r1] - bl GenerateRandomNumber + bl Random movs r1, 0x1 ands r1, r0 cmp r1, 0 @@ -41,7 +41,7 @@ _08122514: adds r1, r2 _08122522: strh r0, [r1] - bl GenerateRandomNumber + bl Random ldr r3, [r5] adds r3, r4 movs r2, 0x1 @@ -801,7 +801,7 @@ _08122B16: movs r0, 0x1 b _08122B22 _08122B1A: - bl GenerateRandomNumber + bl Random movs r1, 0x1 ands r0, r1 _08122B22: @@ -814,7 +814,7 @@ _08122B22: sub_8122B28: @ 8122B28 push {r4,r5,lr} adds r5, r0, 0 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x62 @@ -823,7 +823,7 @@ sub_8122B28: @ 8122B28 lsrs r4, r0, 16 cmp r4, 0x32 bls _08122B6A - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x62 @@ -832,7 +832,7 @@ sub_8122B28: @ 8122B28 lsrs r4, r0, 16 cmp r4, 0x50 bls _08122B6A - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x62 @@ -850,7 +850,7 @@ _08122B6A: ands r0, r2 orrs r0, r1 strh r0, [r5] - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 adds r1, r4, 0x1 @@ -864,7 +864,7 @@ _08122B6A: ands r1, r2 orrs r1, r0 strb r1, [r5] - bl GenerateRandomNumber + bl Random strh r0, [r5, 0x2] pop {r4,r5} pop {r0} diff --git a/asm/easy_chat.s b/asm/easy_chat.s index 345c9a80f..026791117 100644 --- a/asm/easy_chat.s +++ b/asm/easy_chat.s @@ -9777,7 +9777,7 @@ sub_811EE38: @ 811EE38 push {r4,lr} lsls r0, 16 lsrs r4, r0, 16 - bl GenerateRandomNumber + bl Random ldr r2, =gEasyChatGroups lsls r1, r4, 3 adds r1, r2 @@ -9925,7 +9925,7 @@ _0811EF58: thumb_func_start sub_811EF6C sub_811EF6C: @ 811EF6C push {lr} - bl GenerateRandomNumber + bl Random movs r1, 0x1 ands r1, r0 movs r0, 0xC @@ -10039,7 +10039,7 @@ _0811F02C: b _0811F084 .pool _0811F048: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x21 @@ -10096,7 +10096,7 @@ _0811F0A0: b _0811F0EC .pool _0811F0B4: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 adds r1, r5, 0 @@ -10158,7 +10158,7 @@ _0811F11A: b _0811F174 .pool _0811F128: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 adds r1, r4, 0 diff --git a/asm/egg_hatch.s b/asm/egg_hatch.s index a815aa489..8b198e78f 100644 --- a/asm/egg_hatch.s +++ b/asm/egg_hatch.s @@ -1205,7 +1205,7 @@ _08071E54: movs r1, 0x30 ldrsh r0, [r4, r1] movs r1, 0x1 - bl sine + bl Sin strh r0, [r4, 0x24] movs r1, 0x2E ldrsh r0, [r4, r1] @@ -1257,7 +1257,7 @@ _08071EBC: movs r1, 0x30 ldrsh r0, [r4, r1] movs r1, 0x2 - bl sine + bl Sin strh r0, [r4, 0x24] movs r1, 0x2E ldrsh r0, [r4, r1] @@ -1330,7 +1330,7 @@ _08071F5C: movs r1, 0x30 ldrsh r0, [r4, r1] movs r1, 0x2 - bl sine + bl Sin strh r0, [r4, 0x24] movs r1, 0x2E ldrsh r0, [r4, r1] @@ -1584,7 +1584,7 @@ sub_8072140: @ 8072140 ldrh r4, [r0] adds r3, 0x1 strb r3, [r6, 0x7] - bl GenerateRandomNumber + bl Random lsls r0, 16 movs r1, 0xC0 lsls r1, 10 diff --git a/asm/evolution_scene.s b/asm/evolution_scene.s index 4b2261edd..b44a06c73 100644 --- a/asm/evolution_scene.s +++ b/asm/evolution_scene.s @@ -3888,27 +3888,27 @@ _0813FF2C: movs r1, 0x8 ldrsh r0, [r4, r1] movs r1, 0x4 - bl cosine + bl Cos adds r0, 0x8 mov r2, r8 strh r0, [r2] movs r1, 0x8 ldrsh r0, [r4, r1] movs r1, 0x4 - bl sine + bl Sin adds r0, 0x10 mov r2, r9 strh r0, [r2] movs r1, 0xA ldrsh r0, [r4, r1] movs r1, 0x4 - bl cosine + bl Cos adds r0, 0x8 strh r0, [r7] movs r2, 0xA ldrsh r0, [r4, r2] movs r1, 0x4 - bl sine + bl Sin adds r0, 0x10 strh r0, [r6] ldr r0, =sub_813FDEC diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 6edae1a41..39e22e076 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -4414,7 +4414,7 @@ sub_808F48C: @ 808F48C cmp r0, 0 beq _0808F4C0 ldr r5, =gUnknown_0850D6DC - bl GenerateRandomNumber + bl Random movs r4, 0x3 adds r1, r4, 0 ands r1, r0 @@ -4467,7 +4467,7 @@ sub_808F4E8: @ 808F4E8 mov r0, sp movs r2, 0x4 bl memcpy - bl GenerateRandomNumber + bl Random movs r1, 0x3 ands r1, r0 mov r2, sp @@ -5158,7 +5158,7 @@ sub_808F9C8: @ 808F9C8 cmp r0, 0 beq _0808F9FE ldr r4, =gUnknown_0850D6DC - bl GenerateRandomNumber + bl Random movs r5, 0x3 adds r1, r5, 0 ands r1, r0 @@ -5229,7 +5229,7 @@ sub_808FA3C: @ 808FA3C lsrs r1, r0, 24 cmp r1, 0 bne _0808FA6C - bl GenerateRandomNumber + bl Random movs r1, 0x3 ands r1, r0 mov r2, sp @@ -5328,7 +5328,7 @@ sub_808FB08: @ 808FB08 cmp r0, 0 beq _0808FB3C ldr r5, =gUnknown_0850D6DC - bl GenerateRandomNumber + bl Random movs r4, 0x3 adds r1, r4, 0 ands r1, r0 @@ -5383,7 +5383,7 @@ sub_808FB64: @ 808FB64 mov r0, sp movs r2, 0x2 bl memcpy - bl GenerateRandomNumber + bl Random movs r7, 0x1 adds r1, r7, 0 ands r1, r0 @@ -5540,7 +5540,7 @@ sub_808FC8C: @ 808FC8C cmp r0, 0 beq _0808FCC0 ldr r5, =gUnknown_0850D6DC - bl GenerateRandomNumber + bl Random movs r4, 0x3 adds r1, r4, 0 ands r1, r0 @@ -5593,7 +5593,7 @@ sub_808FCE8: @ 808FCE8 mov r0, sp movs r2, 0x2 bl memcpy - bl GenerateRandomNumber + bl Random movs r7, 0x1 adds r1, r7, 0 ands r1, r0 @@ -6143,7 +6143,7 @@ sub_80900D4: @ 80900D4 cmp r0, 0 beq _0809010A ldr r4, =gUnknown_0850D6DC - bl GenerateRandomNumber + bl Random movs r5, 0x3 adds r1, r5, 0 ands r1, r0 @@ -6212,7 +6212,7 @@ sub_8090148: @ 8090148 lsrs r1, r0, 24 cmp r1, 0 bne _08090178 - bl GenerateRandomNumber + bl Random movs r1, 0x1 ands r1, r0 mov r2, sp @@ -6311,7 +6311,7 @@ sub_8090214: @ 8090214 cmp r0, 0 beq _0809024A ldr r4, =gUnknown_0850D6DC - bl GenerateRandomNumber + bl Random movs r5, 0x3 adds r1, r5, 0 ands r1, r0 @@ -6380,7 +6380,7 @@ sub_8090288: @ 8090288 lsrs r1, r0, 24 cmp r1, 0 bne _080902B8 - bl GenerateRandomNumber + bl Random movs r1, 0x1 ands r1, r0 mov r2, sp @@ -6479,7 +6479,7 @@ sub_8090354: @ 8090354 cmp r0, 0 beq _0809038A ldr r4, =gUnknown_0850D6EC - bl GenerateRandomNumber + bl Random movs r5, 0x3 adds r1, r5, 0 ands r1, r0 @@ -6548,7 +6548,7 @@ sub_80903C8: @ 80903C8 lsrs r1, r0, 24 cmp r1, 0 bne _080903F8 - bl GenerateRandomNumber + bl Random movs r1, 0x1 ands r1, r0 mov r2, sp @@ -6647,7 +6647,7 @@ sub_8090494: @ 8090494 cmp r0, 0 beq _080904CA ldr r4, =gUnknown_0850D6EC - bl GenerateRandomNumber + bl Random movs r5, 0x3 adds r1, r5, 0 ands r1, r0 @@ -6716,7 +6716,7 @@ sub_8090508: @ 8090508 lsrs r1, r0, 24 cmp r1, 0 bne _08090538 - bl GenerateRandomNumber + bl Random movs r1, 0x1 ands r1, r0 mov r2, sp @@ -6815,7 +6815,7 @@ sub_80905D4: @ 80905D4 cmp r0, 0 beq _0809060A ldr r4, =gUnknown_0850D6EC - bl GenerateRandomNumber + bl Random movs r5, 0x3 adds r1, r5, 0 ands r1, r0 @@ -6884,7 +6884,7 @@ sub_8090648: @ 8090648 lsrs r1, r0, 24 cmp r1, 0 bne _08090678 - bl GenerateRandomNumber + bl Random movs r1, 0x1 ands r1, r0 mov r2, sp @@ -6983,7 +6983,7 @@ sub_8090714: @ 8090714 cmp r0, 0 beq _0809074A ldr r4, =gUnknown_0850D6EC - bl GenerateRandomNumber + bl Random movs r5, 0x3 adds r1, r5, 0 ands r1, r0 @@ -7052,7 +7052,7 @@ sub_8090788: @ 8090788 lsrs r1, r0, 24 cmp r1, 0 bne _080907B8 - bl GenerateRandomNumber + bl Random movs r1, 0x1 ands r1, r0 mov r2, sp @@ -7151,7 +7151,7 @@ sub_8090854: @ 8090854 cmp r0, 0 beq _0809088A ldr r4, =gUnknown_0850D6EC - bl GenerateRandomNumber + bl Random movs r5, 0x3 adds r1, r5, 0 ands r1, r0 @@ -7220,7 +7220,7 @@ sub_80908C8: @ 80908C8 lsrs r1, r0, 24 cmp r1, 0 bne _080908F8 - bl GenerateRandomNumber + bl Random movs r1, 0x3 ands r1, r0 mov r2, sp @@ -7319,7 +7319,7 @@ sub_8090994: @ 8090994 cmp r0, 0 beq _080909CA ldr r4, =gUnknown_0850D6EC - bl GenerateRandomNumber + bl Random movs r5, 0x3 adds r1, r5, 0 ands r1, r0 @@ -7388,7 +7388,7 @@ sub_8090A08: @ 8090A08 lsrs r1, r0, 24 cmp r1, 0 bne _08090A38 - bl GenerateRandomNumber + bl Random movs r1, 0x3 ands r1, r0 mov r2, sp @@ -7487,7 +7487,7 @@ sub_8090AD4: @ 8090AD4 cmp r0, 0 beq _08090B0A ldr r4, =gUnknown_0850D6EC - bl GenerateRandomNumber + bl Random movs r5, 0x3 adds r1, r5, 0 ands r1, r0 @@ -7556,7 +7556,7 @@ sub_8090B48: @ 8090B48 lsrs r1, r0, 24 cmp r1, 0 bne _08090B78 - bl GenerateRandomNumber + bl Random movs r1, 0x3 ands r1, r0 mov r2, sp @@ -7655,7 +7655,7 @@ sub_8090C14: @ 8090C14 cmp r0, 0 beq _08090C4A ldr r4, =gUnknown_0850D6EC - bl GenerateRandomNumber + bl Random movs r5, 0x3 adds r1, r5, 0 ands r1, r0 @@ -7724,7 +7724,7 @@ sub_8090C88: @ 8090C88 lsrs r1, r0, 24 cmp r1, 0 bne _08090CB8 - bl GenerateRandomNumber + bl Random movs r1, 0x3 ands r1, r0 mov r2, sp diff --git a/asm/field_player_avatar.s b/asm/field_player_avatar.s index 3a722da43..9f3e78cd4 100644 --- a/asm/field_player_avatar.s +++ b/asm/field_player_avatar.s @@ -4112,7 +4112,7 @@ fish1: @ 808C918 bl memcpy movs r0, 0 strh r0, [r5, 0x20] - bl GenerateRandomNumber + bl Random movs r2, 0x26 ldrsh r1, [r5, r2] lsls r1, 1 @@ -4197,7 +4197,7 @@ fish3: @ 808C9D4 strh r0, [r4, 0x8] strh r1, [r4, 0xA] strh r1, [r4, 0xC] - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0xA @@ -4339,7 +4339,7 @@ _0808CADC: cmp r0, 0x3C bne _0808CB14 _0808CAFC: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x64 @@ -4352,7 +4352,7 @@ _0808CAFC: _0808CB14: cmp r6, 0 bne _0808CB32 - bl GenerateRandomNumber + bl Random movs r1, 0x1 ands r1, r0 cmp r1, 0 @@ -4485,7 +4485,7 @@ fish8: @ 808CBFC blt _0808CC52 cmp r1, 0x1 bgt _0808CC56 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x64 diff --git a/asm/front_pic_anim.s b/asm/front_pic_anim.s index 46616bad0..0a5296853 100644 --- a/asm/front_pic_anim.s +++ b/asm/front_pic_anim.s @@ -497,7 +497,7 @@ _0817F854: asrs r4, 16 adds r0, r4, 0 movs r1, 0x20 - bl sine + bl Sin movs r1, 0x80 lsls r1, 1 adds r5, r1, 0 @@ -505,7 +505,7 @@ _0817F854: strh r0, [r6, 0x36] adds r0, r4, 0 movs r1, 0x20 - bl cosine + bl Cos adds r0, r5 strh r0, [r6, 0x38] movs r0, 0x36 @@ -562,7 +562,7 @@ _0817F8D4: lsls r0, 16 asrs r0, 16 movs r1, 0x6 - bl sine + bl Sin lsls r1, r5, 24 asrs r1, 24 adds r2, r0, 0 @@ -614,7 +614,7 @@ _0817F936: lsls r0, 16 asrs r0, 16 movs r1, 0x6 - bl sine + bl Sin _0817F946: strh r0, [r4, 0x24] ldrh r0, [r4, 0x32] @@ -679,7 +679,7 @@ _0817F9B2: lsls r0, 16 asrs r0, 16 movs r1, 0x6 - bl sine + bl Sin negs r0, r0 _0817F9C4: strh r0, [r4, 0x26] @@ -761,7 +761,7 @@ _0817FA48: lsls r1, 17 _0817FA56: asrs r1, 16 - bl sine + bl Sin negs r0, r0 _0817FA5E: strh r0, [r4, 0x26] @@ -900,7 +900,7 @@ _0817FB44: lsls r0, 16 asrs r0, 16 movs r1, 0x8 - bl sine + bl Sin negs r0, r0 _0817FB56: strh r0, [r4, 0x26] @@ -964,7 +964,7 @@ _0817FBB0: asrs r4, 16 adds r0, r4, 0 movs r1, 0x20 - bl sine + bl Sin movs r1, 0x80 lsls r1, 1 adds r5, r1, 0 @@ -978,7 +978,7 @@ _0817FBE0: asrs r4, 16 adds r0, r4, 0 movs r1, 0x8 - bl sine + bl Sin movs r1, 0x80 lsls r1, 1 adds r5, r1, 0 @@ -987,7 +987,7 @@ _0817FBE0: adds r0, r4, 0 movs r1, 0x8 _0817FBFA: - bl sine + bl Sin adds r0, r5 strh r0, [r6, 0x38] movs r0, 0x36 @@ -1131,7 +1131,7 @@ _0817FD00: asrs r0, 16 movs r2, 0x3C ldrsh r1, [r4, r2] - bl sine + bl Sin _0817FD12: strh r0, [r4, 0x24] ldrh r0, [r4, 0x2E] @@ -1188,7 +1188,7 @@ _0817FD68: lsls r0, 16 asrs r0, 16 movs r1, 0x3 - bl sine + bl Sin _0817FD78: strh r0, [r4, 0x26] ldrh r0, [r4, 0x2E] @@ -1250,7 +1250,7 @@ _0817FDD4: _0817FDDE: asrs r0, 2 movs r1, 0x8 - bl sine + bl Sin lsls r0, 16 asrs r6, r0, 16 movs r0, 0x32 @@ -1267,7 +1267,7 @@ _0817FDF6: asrs r4, 16 adds r0, r4, 0 adds r1, r6, 0 - bl sine + bl Sin lsls r5, 24 asrs r5, 24 adds r1, r0, 0 @@ -1276,7 +1276,7 @@ _0817FDF6: strh r0, [r7, 0x26] adds r0, r4, 0 adds r1, r6, 0 - bl cosine + bl Cos adds r1, r0, 0 muls r1, r5 adds r0, r1, 0 @@ -1378,7 +1378,7 @@ _0817FED0: asrs r0, 16 movs r1, 0x80 lsls r1, 5 - bl sine + bl Sin strh r0, [r4, 0x3A] movs r2, 0x80 lsls r2, 1 @@ -1558,13 +1558,13 @@ _0818003E: lsls r1, 17 asrs r1, 16 adds r0, r4, 0 - bl cosine + bl Cos negs r0, r0 strh r0, [r5, 0x24] movs r2, 0x8 ldrsh r1, [r6, r2] adds r0, r4, 0 - bl sine + bl Sin ldrh r1, [r6, 0x8] adds r0, r1 strh r0, [r5, 0x26] @@ -1641,7 +1641,7 @@ _081800EC: movs r1, 0x10 movs r2, 0 movs r3, 0 - bl pal_fade_1 + bl BlendPalette ldr r0, =sub_8184D88 str r0, [r4, 0x1C] b _08180128 @@ -1650,7 +1650,7 @@ _0818010C: movs r2, 0x32 ldrsh r0, [r4, r2] movs r1, 0x10 - bl sine + bl Sin adds r2, r0, 0 strh r2, [r4, 0x3A] ldrh r0, [r4, 0x3C] @@ -1658,7 +1658,7 @@ _0818010C: lsrs r2, 24 movs r1, 0x10 movs r3, 0 - bl pal_fade_1 + bl BlendPalette _08180128: ldrh r0, [r4, 0x32] adds r0, 0x1 @@ -1724,11 +1724,11 @@ _08180196: lsls r5, r4, 16 asrs r0, r5, 16 movs r1, 0x28 - bl sine + bl Sin adds r4, r0, 0 adds r0, r7, 0 movs r1, 0x10 - bl sine + bl Sin ldr r1, =0xffffff00 adds r0, r1 adds r4, r0 @@ -1739,12 +1739,12 @@ _08180196: _081801C4: adds r0, r7, 0 movs r1, 0x10 - bl sine + bl Sin adds r5, r0, 0 lsls r4, 16 asrs r0, r4, 16 movs r1, 0x28 - bl sine + bl Sin movs r2, 0x80 lsls r2, 1 adds r1, r2, 0 @@ -1754,7 +1754,7 @@ _081801C4: _081801E4: asrs r0, r4, 16 movs r1, 0x10 - bl sine + bl Sin movs r1, 0x80 lsls r1, 1 adds r0, r1 @@ -1837,7 +1837,7 @@ _0818027E: lsls r4, 16 asrs r0, r4, 16 movs r1, 0x10 - bl sine + bl Sin ldr r2, =0xffffff00 adds r1, r2, 0 subs r1, r0 @@ -1848,7 +1848,7 @@ _081802A0: lsls r4, 16 asrs r0, r4, 16 movs r1, 0x10 - bl sine + bl Sin movs r1, 0x80 lsls r1, 1 adds r0, r1 @@ -1857,11 +1857,11 @@ _081802B2: adds r6, r4, 0 adds r0, r7, 0 movs r1, 0x8 - bl sine + bl Sin adds r4, r0, 0 asrs r0, r6, 16 movs r1, 0x28 - bl sine + bl Sin movs r2, 0x80 lsls r2, 1 adds r1, r2, 0 @@ -1950,7 +1950,7 @@ _08180358: .pool _08180370: mov r0, r8 - bl sine + bl Sin strh r0, [r4, 0x26] cmp r7, r6 bne _08180386 @@ -2052,7 +2052,7 @@ _0818042A: lsls r0, r1, 16 asrs r0, 16 movs r1, 0x5 - bl sine + bl Sin negs r0, r0 strh r0, [r4, 0x24] b _0818045E @@ -2123,13 +2123,13 @@ _081804B0: asrs r4, 16 adds r0, r4, 0 movs r1, 0xA - bl sine + bl Sin strh r0, [r6, 0x26] movs r5, 0x80 lsls r5, 1 ldr r1, =0x00000ccc adds r0, r4, 0 - bl sine + bl Sin adds r3, r0, 0 lsls r3, 16 lsrs r3, 16 @@ -2197,13 +2197,13 @@ _08180534: movs r0, 0x2E ldrsh r1, [r6, r0] adds r0, r4, 0 - bl sine + bl Sin strh r0, [r6, 0x26] movs r4, 0x80 lsls r4, 1 adds r0, r5, 0 ldr r1, =0x00000ccc - bl sine + bl Sin adds r3, r0, 0 lsls r3, 16 lsrs r3, 16 @@ -2291,14 +2291,14 @@ _081805EC: ldrsh r1, [r6, r2] lsls r1, 17 asrs r1, 16 - bl sine + bl Sin negs r0, r0 strh r0, [r6, 0x26] movs r4, 0x80 lsls r4, 1 adds r0, r5, 0 ldr r1, =0x00000ccc - bl sine + bl Sin adds r3, r0, 0 lsls r3, 16 lsrs r3, 16 @@ -2382,13 +2382,13 @@ _081806B0: asrs r4, 16 adds r0, r4, 0 movs r1, 0x8 - bl sine + bl Sin strh r0, [r6, 0x24] movs r4, 0x80 lsls r4, 1 adds r0, r5, 0 ldr r1, =0x00000ccc - bl sine + bl Sin adds r3, r0, 0 lsls r3, 16 lsrs r3, 16 @@ -2448,7 +2448,7 @@ _08180760: movs r1, 0x36 ldrsh r0, [r4, r1] movs r1, 0x20 - bl sine + bl Sin movs r2, 0x80 lsls r2, 1 adds r0, r2 @@ -2489,7 +2489,7 @@ _081807B0: movs r1, 0x34 ldrsh r0, [r4, r1] movs r1, 0xA - bl sine + bl Sin negs r0, r0 lsls r1, r6, 16 asrs r1, 16 @@ -2498,7 +2498,7 @@ _081807B0: movs r2, 0x36 ldrsh r0, [r4, r2] movs r1, 0x20 - bl sine + bl Sin movs r2, 0x80 lsls r2, 1 adds r1, r2, 0 @@ -2578,7 +2578,7 @@ _08180868: movs r1, 0x36 ldrsh r0, [r5, r1] movs r1, 0x20 - bl sine + bl Sin movs r2, 0x80 lsls r2, 1 adds r1, r2, 0 @@ -2605,7 +2605,7 @@ _08180894: movs r1, 0x36 ldrsh r0, [r5, r1] movs r1, 0x30 - bl sine + bl Sin adds r1, r0, 0 movs r2, 0x80 lsls r2, 1 @@ -2746,7 +2746,7 @@ _081809B0: lsls r0, 16 asrs r0, 16 movs r1, 0xA - bl sine + bl Sin negs r0, r0 strh r0, [r4, 0x26] mov r3, r10 @@ -2870,7 +2870,7 @@ _08180AA8: ldr r3, =0x000002df movs r1, 0x10 movs r2, 0 - bl pal_fade_1 + bl BlendPalette ldr r0, =sub_8184D88 str r0, [r4, 0x1C] b _08180AE8 @@ -2879,7 +2879,7 @@ _08180ACC: movs r2, 0x32 ldrsh r0, [r4, r2] movs r1, 0xC - bl sine + bl Sin adds r2, r0, 0 strh r2, [r4, 0x3A] ldrh r0, [r4, 0x3C] @@ -2887,7 +2887,7 @@ _08180ACC: lsrs r2, 24 ldr r3, =0x000002df movs r1, 0x10 - bl pal_fade_1 + bl BlendPalette _08180AE8: ldrh r0, [r4, 0x32] adds r0, 0x2 @@ -2923,7 +2923,7 @@ _08180B14: movs r1, 0x10 movs r2, 0 movs r3, 0x1F - bl pal_fade_1 + bl BlendPalette ldr r0, =sub_8184D88 str r0, [r4, 0x1C] b _08180B50 @@ -2932,7 +2932,7 @@ _08180B34: movs r2, 0x32 ldrsh r0, [r4, r2] movs r1, 0xC - bl sine + bl Sin adds r2, r0, 0 strh r2, [r4, 0x3A] ldrh r0, [r4, 0x3C] @@ -2940,7 +2940,7 @@ _08180B34: lsrs r2, 24 movs r1, 0x10 movs r3, 0x1F - bl pal_fade_1 + bl BlendPalette _08180B50: ldrh r0, [r4, 0x32] adds r0, 0x2 @@ -2976,7 +2976,7 @@ _08180B78: lsls r3, 7 movs r1, 0x10 movs r2, 0 - bl pal_fade_1 + bl BlendPalette ldr r0, =sub_8184D88 str r0, [r4, 0x1C] b _08180BB6 @@ -2985,7 +2985,7 @@ _08180B98: movs r2, 0x32 ldrsh r0, [r4, r2] movs r1, 0xC - bl sine + bl Sin adds r2, r0, 0 strh r2, [r4, 0x3A] ldrh r0, [r4, 0x3C] @@ -2994,7 +2994,7 @@ _08180B98: movs r3, 0xF8 lsls r3, 7 movs r1, 0x10 - bl pal_fade_1 + bl BlendPalette _08180BB6: ldrh r0, [r4, 0x32] adds r0, 0x2 @@ -3029,7 +3029,7 @@ _08180BE0: ldr r3, =0x000003ff movs r1, 0x10 movs r2, 0 - bl pal_fade_1 + bl BlendPalette ldr r0, =sub_8184D88 str r0, [r4, 0x1C] b _08180C20 @@ -3038,7 +3038,7 @@ _08180C04: movs r2, 0x32 ldrsh r0, [r4, r2] movs r1, 0xC - bl sine + bl Sin adds r2, r0, 0 strh r2, [r4, 0x3A] ldrh r0, [r4, 0x3C] @@ -3046,7 +3046,7 @@ _08180C04: lsrs r2, 24 ldr r3, =0x000003ff movs r1, 0x10 - bl pal_fade_1 + bl BlendPalette _08180C20: ldrh r0, [r4, 0x32] adds r0, 0x2 @@ -3082,7 +3082,7 @@ _08180C4C: ldr r3, =0x00006018 movs r1, 0x10 movs r2, 0 - bl pal_fade_1 + bl BlendPalette ldr r0, =sub_8184D88 str r0, [r4, 0x1C] b _08180C8C @@ -3091,7 +3091,7 @@ _08180C70: movs r2, 0x32 ldrsh r0, [r4, r2] movs r1, 0xC - bl sine + bl Sin adds r2, r0, 0 strh r2, [r4, 0x3A] ldrh r0, [r4, 0x3C] @@ -3099,7 +3099,7 @@ _08180C70: lsrs r2, 24 ldr r3, =0x00006018 movs r1, 0x10 - bl pal_fade_1 + bl BlendPalette _08180C8C: ldrh r0, [r4, 0x32] adds r0, 0x2 @@ -3407,13 +3407,13 @@ sub_8180ED0: @ 8180ED0 movs r1, 0x36 ldrsh r0, [r4, r1] movs r1, 0x10 - bl cosine + bl Cos subs r0, 0x8 strh r0, [r4, 0x24] movs r1, 0x36 ldrsh r0, [r4, r1] movs r1, 0x10 - bl sine + bl Sin subs r0, 0x8 strh r0, [r4, 0x26] movs r1, 0x36 @@ -3462,14 +3462,14 @@ _08180F44: movs r1, 0x32 ldrsh r0, [r4, r1] movs r1, 0x5 - bl cosine + bl Cos subs r0, 0x4 movs r5, 0 strh r0, [r4, 0x24] movs r2, 0x32 ldrsh r0, [r4, r2] movs r1, 0x5 - bl sine + bl Sin negs r0, r0 adds r0, 0x4 strh r0, [r4, 0x26] @@ -3619,12 +3619,12 @@ sub_8181068: @ 8181068 movs r1, 0x32 ldrsh r0, [r4, r1] movs r1, 0x16 - bl cosine + bl Cos strh r0, [r4, 0x24] movs r1, 0x32 ldrsh r0, [r4, r1] movs r1, 0x16 - bl sine + bl Sin negs r0, r0 strh r0, [r4, 0x26] movs r0, 0x32 @@ -4010,7 +4010,7 @@ sub_8181370: @ 8181370 movs r1, 0x3A ldrsh r0, [r4, r1] movs r1, 0x10 - bl sine + bl Sin negs r0, r0 strh r0, [r4, 0x24] movs r1, 0x3A @@ -4019,7 +4019,7 @@ sub_8181370: @ 8181370 movs r1, 0xFF ands r0, r1 movs r1, 0x8 - bl sine + bl Sin negs r0, r0 strh r0, [r4, 0x26] movs r1, 0x3A @@ -4131,7 +4131,7 @@ _08181464: ldr r3, =0x000003ff movs r1, 0x10 movs r2, 0x10 - bl pal_fade_1 + bl BlendPalette b _08181494 .pool _08181488: @@ -4139,7 +4139,7 @@ _08181488: ldr r3, =0x000003ff movs r1, 0x10 movs r2, 0 - bl pal_fade_1 + bl BlendPalette _08181494: movs r0, 0 strh r0, [r4, 0x36] @@ -4243,14 +4243,14 @@ _0818154C: asrs r4, 16 adds r0, r4, 0 movs r1, 0xA - bl sine + bl Sin negs r0, r0 strh r0, [r6, 0x24] movs r5, 0x80 lsls r5, 1 ldr r1, =0x00000ccc adds r0, r4, 0 - bl sine + bl Sin adds r3, r0, 0 lsls r3, 16 lsrs r3, 16 @@ -4364,14 +4364,14 @@ _0818164C: asrs r4, 16 adds r0, r4, 0 movs r1, 0xA - bl sine + bl Sin negs r0, r0 strh r0, [r6, 0x24] movs r5, 0x80 lsls r5, 1 ldr r1, =0x00000ccc adds r0, r4, 0 - bl sine + bl Sin adds r3, r0, 0 negs r3, r3 lsls r3, 16 @@ -4455,7 +4455,7 @@ sub_8181708: @ 8181708 ldrsh r0, [r4, r1] movs r2, 0x3A ldrsh r1, [r4, r2] - bl cosine + bl Cos ldrh r1, [r4, 0x3A] adds r0, r1 strh r0, [r4, 0x24] @@ -4463,7 +4463,7 @@ sub_8181708: @ 8181708 ldrsh r0, [r4, r2] movs r2, 0x3A ldrsh r1, [r4, r2] - bl sine + bl Sin negs r0, r0 strh r0, [r4, 0x26] movs r2, 0x80 @@ -4528,7 +4528,7 @@ sub_8181794: @ 8181794 ldrsh r0, [r4, r1] movs r2, 0x3A ldrsh r1, [r4, r2] - bl cosine + bl Cos ldrh r1, [r4, 0x3A] adds r0, r1 strh r0, [r4, 0x24] @@ -4536,7 +4536,7 @@ sub_8181794: @ 8181794 ldrsh r0, [r4, r2] movs r2, 0x3A ldrsh r1, [r4, r2] - bl sine + bl Sin negs r0, r0 strh r0, [r4, 0x26] movs r5, 0x80 @@ -4614,17 +4614,17 @@ _0818184A: movs r4, 0x80 lsls r4, 1 adds r1, r4, 0 - bl sine + bl Sin strh r0, [r5, 0x3C] movs r3, 0x36 ldrsh r0, [r5, r3] movs r1, 0x10 - bl sine + bl Sin strh r0, [r5, 0x26] movs r1, 0x36 ldrsh r0, [r5, r1] movs r1, 0x20 - bl sine + bl Sin adds r1, r0, 0 strh r1, [r5, 0x3A] subs r1, r4, r1 @@ -4651,18 +4651,18 @@ _081818A2: movs r1, 0x36 ldrsh r0, [r5, r1] movs r1, 0x20 - bl sine + bl Sin strh r0, [r5, 0x3C] movs r3, 0x36 ldrsh r0, [r5, r3] movs r1, 0x8 - bl sine + bl Sin negs r0, r0 strh r0, [r5, 0x26] movs r1, 0x36 ldrsh r0, [r5, r1] movs r1, 0x80 - bl sine + bl Sin adds r1, r0, 0 strh r1, [r5, 0x3A] movs r3, 0x80 @@ -4879,7 +4879,7 @@ _08181A50: lsls r0, 16 asrs r0, 16 movs r1, 0x8 - bl sine + bl Sin negs r0, r0 _08181A62: strh r0, [r5, 0x26] @@ -4983,7 +4983,7 @@ _08181B26: lsls r0, r1, 16 asrs r0, 16 movs r1, 0x8 - bl sine + bl Sin negs r0, r0 strh r0, [r4, 0x26] ldrh r0, [r4, 0x32] @@ -5024,7 +5024,7 @@ _08181B7C: movs r2, 0x36 ldrsh r0, [r4, r2] movs r1, 0x40 - bl sine + bl Sin movs r1, 0x80 lsls r1, 1 adds r6, r1, 0 @@ -5071,7 +5071,7 @@ _08181BD6: movs r1, 0x34 ldrsh r0, [r4, r1] movs r1, 0x14 - bl sine + bl Sin negs r0, r0 lsls r1, r5, 16 asrs r1, 16 @@ -5080,7 +5080,7 @@ _08181BD6: movs r2, 0x36 ldrsh r0, [r4, r2] movs r1, 0x20 - bl sine + bl Sin movs r2, 0x80 lsls r2, 1 adds r1, r2, 0 @@ -5188,7 +5188,7 @@ _08181CBC: lsls r0, r2, 16 asrs r0, 16 movs r1, 0x8 - bl sine + bl Sin negs r0, r0 _08181CD0: strh r0, [r4, 0x26] @@ -5264,13 +5264,13 @@ _08181D60: movs r1, 0x3C ldrsh r0, [r4, r1] movs r1, 0x10 - bl sine + bl Sin negs r0, r0 strh r0, [r4, 0x24] movs r3, 0x3C ldrsh r0, [r4, r3] movs r1, 0x20 - bl sine + bl Sin adds r3, r0, 0 movs r2, 0x80 lsls r2, 1 @@ -5365,7 +5365,7 @@ _08181E34: movs r1, 0x3C ldrsh r0, [r4, r1] movs r1, 0x10 - bl sine + bl Sin negs r0, r0 strh r0, [r4, 0x24] movs r0, 0x3C @@ -5381,13 +5381,13 @@ _08181E4E: lsls r0, 16 asrs r0, 16 movs r1, 0x10 - bl sine + bl Sin negs r0, r0 strh r0, [r4, 0x26] movs r1, 0x3C ldrsh r0, [r4, r1] movs r1, 0x20 - bl sine + bl Sin adds r3, r0, 0 movs r2, 0x80 lsls r2, 1 @@ -5557,7 +5557,7 @@ _08181F94: lsls r0, 16 asrs r0, 16 movs r1, 0x4 - bl sine + bl Sin negs r0, r0 strh r0, [r4, 0x26] ldrh r0, [r4, 0x32] @@ -5598,7 +5598,7 @@ _08181FEC: lsls r0, 17 asrs r0, 16 movs r1, 0x10 - bl sine + bl Sin negs r0, r0 strh r0, [r4, 0x24] _08181FFE: @@ -5666,7 +5666,7 @@ _08182072: lsls r0, 16 asrs r0, 16 movs r1, 0x8 - bl sine + bl Sin negs r0, r0 strh r0, [r4, 0x24] movs r2, 0x3C @@ -5682,7 +5682,7 @@ _08182092: lsls r0, 16 asrs r0, 16 movs r1, 0x8 - bl sine + bl Sin negs r0, r0 strh r0, [r4, 0x26] _081820A6: @@ -5699,7 +5699,7 @@ _081820B2: lsls r0, 16 asrs r0, 16 movs r1, 0x10 - bl sine + bl Sin adds r3, r0, 0 movs r2, 0x80 lsls r2, 1 @@ -5760,12 +5760,12 @@ _0818212C: movs r1, 0x3C ldrsh r0, [r4, r1] movs r1, 0x8 - bl sine + bl Sin strh r0, [r4, 0x24] movs r2, 0x3C ldrsh r0, [r4, r2] movs r1, 0x8 - bl sine + bl Sin negs r0, r0 strh r0, [r4, 0x26] _0818214A: @@ -5807,12 +5807,12 @@ _0818218C: movs r1, 0x3C ldrsh r0, [r4, r1] movs r1, 0x8 - bl sine + bl Sin strh r0, [r4, 0x24] movs r2, 0x3C ldrsh r0, [r4, r2] movs r1, 0x8 - bl sine + bl Sin negs r0, r0 strh r0, [r4, 0x26] _081821AA: @@ -5855,12 +5855,12 @@ _081821F0: movs r1, 0x3C ldrsh r0, [r4, r1] movs r1, 0x8 - bl sine + bl Sin strh r0, [r4, 0x24] movs r1, 0x3C ldrsh r0, [r4, r1] movs r1, 0x8 - bl sine + bl Sin negs r0, r0 strh r0, [r4, 0x26] ldrh r0, [r4, 0x3C] @@ -5918,12 +5918,12 @@ _08182270: movs r1, 0x3C ldrsh r0, [r4, r1] movs r1, 0x8 - bl sine + bl Sin strh r0, [r4, 0x24] movs r2, 0x3C ldrsh r0, [r4, r2] movs r1, 0x8 - bl sine + bl Sin negs r0, r0 strh r0, [r4, 0x26] _0818228E: @@ -5998,7 +5998,7 @@ _0818230C: lsls r0, 16 asrs r0, 16 movs r1, 0x10 - bl sine + bl Sin lsls r1, r5, 24 asrs r1, 24 adds r2, r0, 0 @@ -6022,7 +6022,7 @@ _0818233C: lsls r0, 16 asrs r0, 16 movs r1, 0x10 - bl sine + bl Sin lsls r0, 16 asrs r0, 16 negs r0, r0 @@ -6085,7 +6085,7 @@ _08182392: lsls r0, 16 asrs r0, 16 movs r1, 0x40 - bl sine + bl Sin movs r1, 0x80 lsls r1, 1 adds r2, r1, 0 @@ -6124,7 +6124,7 @@ _08182410: movs r2, 0x3C ldrsh r0, [r4, r2] movs r1, 0x40 - bl cosine + bl Cos lsls r0, 16 lsrs r3, r0, 16 b _08182474 @@ -6133,7 +6133,7 @@ _08182424: movs r1, 0x3C ldrsh r0, [r4, r1] movs r1, 0x40 - bl sine + bl Sin lsls r0, 16 lsrs r3, r0, 16 movs r2, 0x3C @@ -6245,7 +6245,7 @@ _081824F4: lsls r0, 16 asrs r0, 16 movs r1, 0x8 - bl sine + bl Sin strh r0, [r4, 0x26] ldrh r0, [r4, 0x3C] adds r0, 0x8 @@ -6263,7 +6263,7 @@ _08182518: lsls r0, 16 asrs r0, 16 movs r1, 0x60 - bl sine + bl Sin adds r2, r0, 0 movs r1, 0x80 lsls r1, 1 @@ -6319,7 +6319,7 @@ _08182590: movs r1, 0x3C ldrsh r0, [r4, r1] movs r1, 0x10 - bl sine + bl Sin strh r0, [r4, 0x26] ldrh r0, [r4, 0x3C] adds r0, 0x4 @@ -6337,7 +6337,7 @@ _081825AE: lsls r0, 17 asrs r0, 16 movs r1, 0x80 - bl sine + bl Sin adds r2, r0, 0 lsls r2, 16 asrs r2, 16 @@ -6393,7 +6393,7 @@ _0818261C: ldrsh r0, [r4, r1] _08182620: movs r1, 0x80 - bl sine + bl Sin lsls r0, 16 lsrs r0, 16 movs r1, 0x80 @@ -6424,7 +6424,7 @@ sub_8182648: @ 8182648 ble _08182672 movs r0, 0 movs r1, 0x80 - bl cosine + bl Cos lsls r0, 16 lsrs r2, r0, 16 movs r0, 0 @@ -6437,7 +6437,7 @@ _08182672: movs r1, 0x3C ldrsh r0, [r4, r1] movs r1, 0x8 - bl sine + bl Sin movs r2, 0x3A ldrsh r1, [r4, r2] lsls r1, 2 @@ -6467,7 +6467,7 @@ _081826A8: lsls r0, 16 asrs r0, 16 movs r1, 0x80 - bl cosine + bl Cos lsls r1, r5, 16 asrs r1, 16 adds r2, r1, 0 @@ -6511,13 +6511,13 @@ sub_81826F8: @ 81826F8 movs r1, 0x3C ldrsh r0, [r4, r1] movs r1, 0x80 - bl cosine + bl Cos lsls r0, 16 lsrs r5, r0, 16 movs r1, 0x3C ldrsh r0, [r4, r1] movs r1, 0xC - bl cosine + bl Cos negs r0, r0 strh r0, [r4, 0x26] movs r1, 0x3C @@ -6592,7 +6592,7 @@ _081827A4: asrs r0, 16 movs r2, 0x36 ldrsh r1, [r4, r2] - bl sine + bl Sin strh r0, [r4, 0x24] ldrh r0, [r4, 0x3A] ldrh r1, [r4, 0x3C] @@ -6611,7 +6611,7 @@ _081827CC: lsls r0, 16 asrs r0, 16 movs r1, 0x60 - bl sine + bl Sin adds r1, r0, 0 lsls r1, 16 movs r0, 0x80 @@ -6696,7 +6696,7 @@ _08182870: asrs r0, 16 movs r2, 0x36 ldrsh r1, [r4, r2] - bl sine + bl Sin strh r0, [r4, 0x24] ldrh r0, [r4, 0x3A] ldrh r1, [r4, 0x3C] @@ -6715,7 +6715,7 @@ _08182898: lsls r0, 17 asrs r0, 16 movs r1, 0x80 - bl sine + bl Sin adds r1, r0, 0 lsls r1, 16 movs r0, 0x80 @@ -6811,7 +6811,7 @@ _08182954: lsls r0, 16 asrs r0, 16 movs r1, 0x8 - bl sine + bl Sin strh r0, [r4, 0x24] ldrh r0, [r4, 0x3C] adds r0, 0x8 @@ -6829,7 +6829,7 @@ _08182978: lsls r0, 16 asrs r0, 16 movs r1, 0x60 - bl sine + bl Sin adds r2, r0, 0 lsls r2, 16 movs r0, 0x80 @@ -6901,7 +6901,7 @@ _08182A04: adds r0, r1 asrs r0, 1 movs r1, 0x10 - bl sine + bl Sin negs r0, r0 strh r0, [r4, 0x24] ldrh r0, [r4, 0x3C] @@ -6923,7 +6923,7 @@ _08182A30: adds r0, r1 asrs r0, 1 movs r1, 0x40 - bl sine + bl Sin adds r2, r0, 0 negs r2, r2 lsls r2, 16 @@ -6993,7 +6993,7 @@ _08182AC4: lsls r0, 16 asrs r0, 16 movs r1, 0x8 - bl sine + bl Sin negs r0, r0 strh r0, [r4, 0x24] ldrh r0, [r4, 0x3C] @@ -7015,7 +7015,7 @@ _08182AEA: adds r0, r1 asrs r0, 1 movs r1, 0x60 - bl sine + bl Sin adds r2, r0, 0 lsls r2, 16 movs r0, 0x80 @@ -7152,7 +7152,7 @@ _08182BEE: lsls r0, 16 asrs r0, 16 movs r1, 0x4 - bl sine + bl Sin negs r0, r0 strh r0, [r4, 0x26] ldrh r0, [r4, 0x32] @@ -7229,13 +7229,13 @@ _08182C8C: movs r2, 0x3C ldrsh r0, [r4, r2] movs r1, 0x8 - bl cosine + bl Cos negs r0, r0 strh r0, [r4, 0x24] movs r5, 0x3C ldrsh r0, [r4, r5] movs r1, 0x8 - bl sine + bl Sin subs r0, 0x8 strh r0, [r4, 0x26] b _08182D12 @@ -7245,13 +7245,13 @@ _08182CAA: lsls r0, 16 asrs r0, 16 movs r1, 0x8 - bl sine + bl Sin adds r0, 0x8 strh r0, [r4, 0x24] movs r1, 0x3C ldrsh r0, [r4, r1] movs r1, 0x8 - bl cosine + bl Cos negs r0, r0 strh r0, [r4, 0x26] b _08182D12 @@ -7259,14 +7259,14 @@ _08182CCC: movs r2, 0x3C ldrsh r0, [r4, r2] movs r1, 0x8 - bl cosine + bl Cos strh r0, [r4, 0x24] ldrh r0, [r4, 0x3C] adds r0, 0x80 lsls r0, 16 asrs r0, 16 movs r1, 0x8 - bl sine + bl Sin adds r0, 0x8 strh r0, [r4, 0x26] b _08182D12 @@ -7274,13 +7274,13 @@ _08182CEC: movs r5, 0x3C ldrsh r0, [r4, r5] movs r1, 0x8 - bl sine + bl Sin subs r0, 0x8 strh r0, [r4, 0x24] movs r1, 0x3C ldrsh r0, [r4, r1] movs r1, 0x8 - bl cosine + bl Cos strh r0, [r4, 0x26] b _08182D12 _08182D08: @@ -7863,7 +7863,7 @@ _0818316A: asrs r0, 16 movs r2, 0x3C ldrsh r1, [r4, r2] - bl sine + bl Sin ldrh r1, [r4, 0x3C] adds r0, r1 _08183180: @@ -8033,7 +8033,7 @@ _081832A4: lsls r0, 16 asrs r0, 16 movs r1, 0x4 - bl sine + bl Sin strh r0, [r4, 0x26] ldrh r0, [r4, 0x32] adds r0, 0x18 @@ -8127,7 +8127,7 @@ _08183358: lsls r4, r2, 16 asrs r0, r4, 16 movs r1, 0x10 - bl sine + bl Sin ldr r2, =0xffffff00 adds r1, r2, 0 subs r1, r0 @@ -8140,7 +8140,7 @@ _0818337C: lsls r4, r2, 16 asrs r0, r4, 16 movs r1, 0x10 - bl sine + bl Sin movs r1, 0x80 lsls r1, 1 adds r0, r1 @@ -8160,11 +8160,11 @@ _08183392: lsls r1, 24 lsrs r1, 24 adds r0, r5, 0 - bl sine + bl Sin adds r5, r0, 0 asrs r0, r7, 16 adds r1, r4, 0 - bl sine + bl Sin movs r1, 0x80 lsls r1, 1 adds r2, r1, 0 @@ -8302,7 +8302,7 @@ _081834AC: lsls r0, r2, 16 asrs r0, 16 adds r1, r7, 0 - bl sine + bl Sin adds r4, r0, 0 mov r5, r8 adds r0, r7, 0 @@ -8312,7 +8312,7 @@ _081834AC: lsls r1, 24 lsrs r1, 23 adds r0, r5, 0 - bl sine + bl Sin ldr r1, =0xffffff00 adds r0, r1 adds r4, r0 @@ -8329,13 +8329,13 @@ _081834F0: lsls r1, 24 lsrs r1, 23 adds r0, r4, 0 - bl sine + bl Sin adds r4, r0, 0 mov r2, r9 lsls r0, r2, 16 asrs r0, 16 adds r1, r7, 0 - bl sine + bl Sin movs r2, 0x80 lsls r2, 1 adds r1, r2, 0 @@ -8447,7 +8447,7 @@ _081835D8: lsls r0, 8 subs r0, r1, r0 adds r1, r7, 0 - bl sine + bl Sin adds r0, r7 strh r0, [r4, 0x26] cmp r9, r6 @@ -8565,7 +8565,7 @@ _081836B0: lsls r0, 16 asrs r0, 16 movs r1, 0x9 - bl sine + bl Sin lsls r1, r5, 24 asrs r1, 24 adds r2, r0, 0 @@ -8619,7 +8619,7 @@ _08183714: lsls r0, 16 asrs r0, 16 movs r1, 0xC - bl sine + bl Sin lsls r1, r5, 24 asrs r1, 24 adds r2, r0, 0 @@ -8801,7 +8801,7 @@ _08183866: mov r8, r2 asrs r0, r2, 16 mov r1, r9 - bl sine + bl Sin adds r4, r0, 0 lsls r6, r5, 16 asrs r5, r6, 16 @@ -8812,7 +8812,7 @@ _08183866: lsls r1, 24 lsrs r1, 23 adds r0, r5, 0 - bl sine + bl Sin ldr r2, =0xffffff00 adds r4, r2 adds r0, r4 @@ -8827,7 +8827,7 @@ _081838B0: mov r8, r2 asrs r0, r2, 16 mov r1, r9 - bl sine + bl Sin adds r6, r0, 0 lsls r5, 16 asrs r4, r5, 16 @@ -8838,7 +8838,7 @@ _081838B0: lsls r1, 24 lsrs r1, 23 adds r0, r4, 0 - bl sine + bl Sin movs r2, 0x80 lsls r2, 1 adds r1, r2, 0 @@ -8852,7 +8852,7 @@ _081838B0: _081838EA: asrs r0, 16 mov r1, r9 - bl sine + bl Sin adds r5, r0, 0 asrs r4, r6, 16 mov r0, r9 @@ -8862,7 +8862,7 @@ _081838EA: lsls r1, 24 lsrs r1, 24 adds r0, r4, 0 - bl sine + bl Sin movs r1, 0x80 lsls r1, 1 adds r2, r1, 0 @@ -9034,7 +9034,7 @@ _08183A3C: lsls r0, 16 asrs r0, 16 movs r1, 0x4 - bl sine + bl Sin strh r0, [r4, 0x26] ldrh r0, [r4, 0x32] adds r0, 0x30 @@ -9160,7 +9160,7 @@ _08183B24: lsls r0, 16 asrs r0, 16 movs r1, 0x4 - bl sine + bl Sin strh r0, [r4, 0x26] ldrh r0, [r4, 0x32] adds r0, 0x40 @@ -9372,7 +9372,7 @@ _08183CC2: adds r0, r1 asrs r0, 1 movs r1, 0x40 - bl sine + bl Sin adds r2, r0, 0 lsls r2, 16 asrs r2, 16 @@ -9808,7 +9808,7 @@ _08183FEA: ldrsh r0, [r4, r1] movs r2, 0x38 ldrsh r1, [r4, r2] - bl sine + bl Sin negs r0, r0 strh r0, [r4, 0x24] movs r3, 0x3C @@ -9828,7 +9828,7 @@ _0818400C: asrs r0, 16 movs r2, 0x36 ldrsh r1, [r4, r2] - bl sine + bl Sin strh r0, [r4, 0x26] lsls r0, 16 cmp r0, 0 @@ -9977,7 +9977,7 @@ _08184112: lsls r0, 16 asrs r0, 16 movs r1, 0x8 - bl sine + bl Sin negs r0, r0 b _08184154 _08184126: @@ -9985,7 +9985,7 @@ _08184126: ble _0818414A movs r0, 0x60 movs r1, 0x6 - bl sine + bl Sin adds r4, r0, 0 movs r1, 0x3C ldrsh r0, [r5, r1] @@ -9993,7 +9993,7 @@ _08184126: lsls r0, 17 asrs r0, 16 movs r1, 0x4 - bl sine + bl Sin subs r4, r0 strh r4, [r5, 0x26] b _08184156 @@ -10001,7 +10001,7 @@ _0818414A: movs r2, 0x3C ldrsh r0, [r5, r2] movs r1, 0x6 - bl sine + bl Sin _08184154: strh r0, [r5, 0x26] _08184156: @@ -10012,7 +10012,7 @@ _08184156: asrs r0, 1 movs r2, 0x38 ldrsh r1, [r5, r2] - bl sine + bl Sin negs r0, r0 lsls r0, 16 lsrs r2, r0, 16 @@ -10199,7 +10199,7 @@ sub_8184290: @ 8184290 asrs r0, 16 movs r2, 0x38 ldrsh r1, [r4, r2] - bl sine + bl Sin adds r1, r0, 0 lsls r1, 16 lsrs r1, 16 @@ -10474,7 +10474,7 @@ _081844BC: asrs r4, 16 adds r0, r4, 0 movs r1, 0x20 - bl sine + bl Sin movs r1, 0x80 lsls r1, 1 adds r5, r1, 0 @@ -10482,7 +10482,7 @@ _081844BC: strh r0, [r6, 0x36] adds r0, r4, 0 movs r1, 0x20 - bl sine + bl Sin adds r0, r5 strh r0, [r6, 0x38] adds r0, r4, 0 @@ -10493,7 +10493,7 @@ _081844F8: asrs r4, 16 adds r0, r4, 0 movs r1, 0x8 - bl sine + bl Sin movs r2, 0x80 lsls r2, 1 adds r5, r2, 0 @@ -10501,13 +10501,13 @@ _081844F8: strh r0, [r6, 0x36] adds r0, r4, 0 movs r1, 0x8 - bl sine + bl Sin adds r0, r5 strh r0, [r6, 0x38] adds r0, r4, 0 movs r1, 0x8 _0818451E: - bl sine + bl Sin lsls r0, 24 lsrs r0, 24 lsls r0, 24 @@ -10887,7 +10887,7 @@ _081847D0: ldr r3, =0x000003ff movs r1, 0x10 movs r2, 0x10 - bl pal_fade_1 + bl BlendPalette b _081847FC .pool _081847F0: @@ -10895,7 +10895,7 @@ _081847F0: ldr r3, =0x000003ff movs r1, 0x10 movs r2, 0 - bl pal_fade_1 + bl BlendPalette _081847FC: movs r0, 0 strh r0, [r4, 0x36] @@ -11037,7 +11037,7 @@ sub_81848E0: @ 81848E0 movs r1, 0x10 movs r2, 0 movs r3, 0x1F - bl pal_fade_1 + bl BlendPalette ldr r0, =sub_8184D88 str r0, [r4, 0x1C] b _0818492A @@ -11046,7 +11046,7 @@ _08184904: movs r5, 0x32 ldrsh r0, [r4, r5] movs r1, 0xC - bl sine + bl Sin adds r2, r0, 0 strh r2, [r4, 0x3A] ldrh r0, [r4, 0x3C] @@ -11059,7 +11059,7 @@ _08184904: adds r1, r3 ldrh r3, [r1] movs r1, 0x10 - bl pal_fade_1 + bl BlendPalette _0818492A: pop {r4,r5} pop {r0} @@ -11132,7 +11132,7 @@ _081849A4: lsls r0, 16 asrs r0, 16 movs r1, 0x6 - bl sine + bl Sin lsls r1, r5, 24 asrs r1, 24 adds r2, r1, 0 diff --git a/asm/intro.s b/asm/intro.s index 4e3e3f882..f56b179a6 100644 --- a/asm/intro.s +++ b/asm/intro.s @@ -359,7 +359,7 @@ task_intro_1: @ 816CF18 movs r0, 0 bl SetVBlankCallback ldr r4, =gUnknown_0203BCC8 - bl GenerateRandomNumber + bl Random movs r1, 0x1 ands r1, r0 strh r1, [r4] @@ -1258,7 +1258,7 @@ _0816D774: movs r1, 0x7F ands r0, r1 movs r1, 0x30 - bl sine + bl Sin ldr r1, =gUnknown_0203BCCC strh r0, [r1] ldrh r2, [r4, 0xE] @@ -1433,13 +1433,13 @@ _0816D912: lsls r0, 24 lsrs r0, 24 movs r1, 0x3C - bl sine + bl Sin strh r0, [r4, 0x24] ldrh r0, [r4, 0x38] lsls r0, 24 lsrs r0, 24 movs r1, 0x14 - bl sine + bl Sin strh r0, [r4, 0x26] ldrh r1, [r4, 0x36] adds r1, 0x2 @@ -1481,7 +1481,7 @@ _0816D96E: lsls r0, 24 lsrs r0, 24 movs r1, 0x14 - bl sine + bl Sin strh r0, [r4, 0x26] ldrh r0, [r4, 0x38] adds r0, 0x4 @@ -1500,7 +1500,7 @@ _0816D99C: lsls r0, 24 lsrs r0, 24 movs r1, 0x2 - bl cosine + bl Cos strh r0, [r4, 0x26] ldrh r0, [r4, 0x30] subs r0, 0x1 @@ -1751,7 +1751,7 @@ _0816DB7C: lsrs r0, 24 movs r1, 0x40 _0816DB84: - bl sine + bl Sin strh r0, [r4, 0x24] ldrh r0, [r4, 0x30] adds r0, 0x1 @@ -1760,7 +1760,7 @@ _0816DB84: lsls r0, 24 lsrs r0, 24 movs r1, 0xC - bl cosine + bl Cos strh r0, [r4, 0x26] ldrh r0, [r4, 0x32] adds r0, 0x1 @@ -2359,7 +2359,7 @@ _0816E0DE: ands r0, r1 lsrs r0, 8 movs r1, 0x40 - bl sine + bl Sin movs r1, 0x80 lsls r1, 1 adds r5, r1, 0 @@ -2695,7 +2695,7 @@ _0816E3E0: ldrsh r0, [r5, r2] movs r1, 0x80 lsls r1, 1 - bl sine + bl Sin ldr r1, =gTasks lsls r4, r6, 2 adds r4, r6 @@ -2709,7 +2709,7 @@ _0816E3E0: movs r1, 0xC ldrsh r0, [r5, r1] movs r1, 0x40 - bl cosine + bl Cos movs r1, 0x54 subs r1, r0 strh r1, [r4, 0xC] @@ -2974,7 +2974,7 @@ _0816E61A: movs r1, 0xC ldrsh r0, [r5, r1] movs r1, 0x3C - bl sine + bl Sin ldr r2, =gTasks lsls r1, r6, 2 adds r1, r6 @@ -3006,7 +3006,7 @@ _0816E664: movs r1, 0xC ldrsh r0, [r5, r1] movs r1, 0x14 - bl sine + bl Sin ldr r2, =gTasks lsls r1, r6, 2 adds r1, r6 @@ -3183,7 +3183,7 @@ _0816E7C6: movs r1, 0x30 ldrsh r0, [r4, r1] movs r1, 0x4 - bl sine + bl Sin strh r0, [r4, 0x24] ldrh r0, [r4, 0x32] adds r0, 0x30 @@ -4147,7 +4147,7 @@ _0816F00A: ldr r3, =0x00002949 movs r0, 0x50 movs r1, 0x10 - bl pal_fade_1 + bl BlendPalette ldr r4, =gUnknown_08D85E7C ldr r5, =gUnknown_02037BD0 adds r0, r4, 0 diff --git a/asm/link.s b/asm/link.s index 1871900d6..66aad0f34 100644 --- a/asm/link.s +++ b/asm/link.s @@ -216,7 +216,7 @@ sub_8009570: @ 8009570 bl SeedRng movs r4, 0 _080095A0: - bl GenerateRandomNumber + bl Random ldr r1, =gSaveBlock2Ptr ldr r1, [r1] adds r1, 0xA @@ -8971,7 +8971,7 @@ _0800DC3C: _0800DC56: movs r4, 0 _0800DC58: - bl GenerateRandomNumber + bl Random lsls r0, 24 lsrs r0, 24 adds r1, r6, r4 @@ -15085,7 +15085,7 @@ sub_8010EC0: @ 8010EC0 ldr r1, =0x00000ccd adds r0, r4, r1 strb r5, [r0] - bl GenerateRandomNumber2 + bl Random2 lsls r0, 16 lsrs r0, 16 bl sub_800C54C @@ -16619,7 +16619,7 @@ sub_8011AFC: @ 8011AFC bl SeedRng movs r4, 0 _08011B38: - bl GenerateRandomNumber + bl Random ldr r1, =gSaveBlock2Ptr ldr r1, [r1] adds r1, 0xA @@ -27389,7 +27389,7 @@ _08017A80: _08017A8A: ldr r5, =gStringVar4 ldr r4, =gUnknown_082EEEAC - bl GenerateRandomNumber + bl Random lsls r0, 16 movs r1, 0xC0 lsls r1, 10 @@ -27404,7 +27404,7 @@ _08017A8A: _08017AB0: ldr r5, =gStringVar4 ldr r4, =gUnknown_082EF1CC - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x1 @@ -27416,7 +27416,7 @@ _08017AB0: _08017AD0: ldr r5, =gStringVar4 ldr r4, =gUnknown_082EF010 - bl GenerateRandomNumber + bl Random lsls r0, 16 movs r1, 0xC0 lsls r1, 10 @@ -27431,7 +27431,7 @@ _08017AD0: _08017AF4: ldr r5, =gStringVar4 ldr r4, =gUnknown_082EF100 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x1 @@ -33979,7 +33979,7 @@ sub_801B078: @ 801B078 ldr r0, [r4] adds r0, r5 adds r1, r6, 0 - bl sub_806F928 + bl CalcCRC16WithTable ldr r1, [r4] ldr r2, =0x0000322c adds r1, r2 @@ -34006,7 +34006,7 @@ sub_801B0CC: @ 801B0CC adds r0, r1 movs r1, 0xDE lsls r1, 1 - bl sub_806F928 + bl CalcCRC16WithTable lsls r0, 16 lsrs r0, 16 ldr r4, [r4] @@ -34182,7 +34182,7 @@ sub_801B21C: @ 801B21C ldr r0, [r4] adds r0, r5 adds r1, r6, 0 - bl sub_806F928 + bl CalcCRC16WithTable ldr r1, [r4] ldr r3, =0x000033ec adds r2, r1, r3 @@ -34217,7 +34217,7 @@ sub_801B27C: @ 801B27C adds r0, r1 movs r1, 0xA6 lsls r1, 1 - bl sub_806F928 + bl CalcCRC16WithTable lsls r0, 16 lsrs r0, 16 ldr r1, [r4] @@ -39205,7 +39205,7 @@ _0801DA30: _0801DA38: ldr r0, [r5, 0x18] ldrh r1, [r5, 0xC] - bl sub_806F928 + bl CalcCRC16WithTable lsls r0, 16 lsrs r0, 16 ldrh r1, [r5, 0xA] @@ -39260,7 +39260,7 @@ _0801DA7C: orrs r0, r1 str r0, [sp, 0x4] ldr r0, [r4, 0x1C] - bl sub_806F928 + bl CalcCRC16WithTable lsls r0, 16 ldr r2, =0x0000ffff ldr r1, [sp] @@ -39322,7 +39322,7 @@ _0801DB1C: beq _0801DB5E ldr r0, [r4, 0x1C] ldrh r1, [r4, 0x14] - bl sub_806F928 + bl CalcCRC16WithTable lsls r0, 16 lsrs r0, 16 ldrh r1, [r4, 0x12] @@ -39380,7 +39380,7 @@ _0801DB8E: beq _0801DBA6 b _0801DBB8 _0801DB94: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0xF @@ -39388,7 +39388,7 @@ _0801DB94: adds r0, 0x10 b _0801DBB6 _0801DBA6: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0xF @@ -46632,7 +46632,7 @@ sub_8021608: @ 8021608 asrs r0, 23 movs r2, 0xC ldrsh r1, [r4, r2] - bl sine + bl Sin strh r0, [r5, 0x24] movs r1, 0xE ldrsh r0, [r4, r1] @@ -49093,7 +49093,7 @@ sub_8022A94: @ 8022A94 asrs r0, 23 movs r2, 0xC ldrsh r1, [r4, r2] - bl sine + bl Sin strh r0, [r5, 0x24] movs r1, 0xE ldrsh r0, [r4, r1] @@ -51565,7 +51565,7 @@ _08023DA0: adds r4, r0, 0 asrs r0, r4, 8 str r0, [r7, 0x68] - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x3 @@ -56425,7 +56425,7 @@ _08026528: adds r1, 0xF5 add r1, r8 ldrb r6, [r1] - bl GenerateRandomNumber + bl Random movs r1, 0x1 ands r1, r0 cmp r1, 0 @@ -58342,7 +58342,7 @@ _0802740C: _08027410: movs r4, 0x2 _08027412: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0xA @@ -66352,7 +66352,7 @@ _0802B5F2: beq _0802B61E adds r0, r1, 0 bl sub_802AA94 - bl GenerateRandomNumber + bl Random ldr r1, [r4] lsls r0, 16 lsrs r0, 16 @@ -68693,7 +68693,7 @@ sub_802C808: @ 802C808 thumb_func_start sub_802C818 sub_802C818: @ 802C818 push {lr} - bl GenerateRandomNumber + bl Random lsls r0, 16 movs r1, 0xE0 lsls r1, 11 diff --git a/asm/load_save.s b/asm/load_save.s index b7f5aa79f..7d1ea5efa 100644 --- a/asm/load_save.s +++ b/asm/load_save.s @@ -71,7 +71,7 @@ InitSaveBlockPointersWithRandomOffset: @ 8076BDC lsls r4, 16 lsrs r4, 16 ldr r5, =gSaveBlock1Ptr - bl GenerateRandomNumber + bl Random adds r4, r0 movs r0, 0x7C ands r4, r0 @@ -165,9 +165,9 @@ saveblock_randomize_and_relocate: @ 8076C2C str r0, [r5, 0x10] ldr r1, [sp] str r1, [r5, 0xC] - bl GenerateRandomNumber + bl Random adds r4, r0, 0 - bl GenerateRandomNumber + bl Random lsls r4, 16 lsls r0, 16 lsrs r0, 16 diff --git a/asm/lottery_corner.s b/asm/lottery_corner.s index cebd1fd78..b9fc1cc51 100644 --- a/asm/lottery_corner.s +++ b/asm/lottery_corner.s @@ -8,11 +8,11 @@ thumb_func_start sub_8177558 sub_8177558: @ 8177558 push {r4,lr} - bl GenerateRandomNumber + bl Random adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 - bl GenerateRandomNumber + bl Random lsls r0, 16 orrs r0, r4 bl sub_8177814 @@ -30,7 +30,7 @@ sub_8177584: @ 8177584 push {r4,r5,lr} lsls r0, 16 lsrs r4, r0, 16 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r1, r0, 16 subs r0, r4, 0x1 diff --git a/asm/main.s b/asm/main.s index 85f41f137..6c07103d1 100644 --- a/asm/main.s +++ b/asm/main.s @@ -496,7 +496,7 @@ _08000782: cmp r0, 0 bne _080007BE _080007BA: - bl GenerateRandomNumber + bl Random _080007BE: bl sub_800E174 ldr r2, =gUnknown_03007FF8 diff --git a/asm/main_menu.s b/asm/main_menu.s index acda4d133..dd7bb3d41 100644 --- a/asm/main_menu.s +++ b/asm/main_menu.s @@ -2933,7 +2933,7 @@ task_new_game_prof_birch_speech_17: @ 8031090 adds r0, r1 ldrh r0, [r0, 0x1A] bl sub_818D820 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x14 diff --git a/asm/map_obj_8097404.s b/asm/map_obj_8097404.s index b997ec15a..b8e2f98f7 100644 --- a/asm/map_obj_8097404.s +++ b/asm/map_obj_8097404.s @@ -1665,7 +1665,7 @@ sub_8097FA4: @ 8097FA4 adds r0, r4, 0 adds r0, 0x8 adds r1, r6, 0 - bl sub_806F67C + bl StoreWordInTwoHalfwords strb r5, [r6, 0x1B] ldr r0, =0x0000ffff strh r0, [r4, 0xE] @@ -1689,7 +1689,7 @@ sub_8097FE4: @ 8097FE4 adds r0, r4, 0 adds r0, 0x8 mov r1, sp - bl sub_806F684 + bl LoadWordFromTwoHalfwords ldr r0, [sp] ldrb r1, [r0, 0x4] lsls r0, r1, 4 @@ -1739,7 +1739,7 @@ sub_8098044: @ 8098044 adds r0, r1 adds r0, 0x8 mov r1, sp - bl sub_806F684 + bl LoadWordFromTwoHalfwords adds r0, r4, 0 bl DestroyTask add sp, 0x4 diff --git a/asm/mauville_old_man.s b/asm/mauville_old_man.s index 5c9af76ac..b943c2e13 100644 --- a/asm/mauville_old_man.s +++ b/asm/mauville_old_man.s @@ -442,7 +442,7 @@ _08120410: ldr r0, =0x0000ffff cmp r1, r0 beq _08120480 - bl GenerateRandomNumber + bl Random adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -487,7 +487,7 @@ _08120480: ldr r1, [r1] bl StringCopy _081204A2: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0xA @@ -551,7 +551,7 @@ _0812050C: mov r9, r3 adds r6, r1, 0 _08120524: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 adds r4, r5, 0x1 @@ -595,7 +595,7 @@ _08120552: movs r7, 0 movs r5, 0 _0812057E: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0xA @@ -617,7 +617,7 @@ _0812057E: b _0812060E .pool _081205BC: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 mov r1, r10 @@ -2047,13 +2047,13 @@ _0812107A: ble _081210B0 adds r5, r6, 0 _08121080: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 adds r1, r6, 0 bl __modsi3 adds r4, r0, 0 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 adds r1, r6, 0 diff --git a/asm/mystery_event_script.s b/asm/mystery_event_script.s index 94a42060d..4b97d6ae8 100644 --- a/asm/mystery_event_script.s +++ b/asm/mystery_event_script.s @@ -815,7 +815,7 @@ sub_8153E40: @ 8153E40 adds r1, r0 subs r1, r4 adds r0, r4, 0 - bl sub_806F96C + bl CalcByteArraySum cmp r5, r0 beq _08153E7E movs r0, 0 @@ -851,7 +851,7 @@ sub_8153E88: @ 8153E88 adds r1, r0 subs r1, r4 adds r0, r4, 0 - bl sub_806F8D0 + bl CalcCRC16 lsls r0, 16 lsrs r0, 16 cmp r5, r0 diff --git a/asm/naming_screen.s b/asm/naming_screen.s index e329d8d09..c5cd6fa7b 100644 --- a/asm/naming_screen.s +++ b/asm/naming_screen.s @@ -1173,7 +1173,7 @@ sub_80E37DC: @ 80E37DC movs r2, 0xA ldrsh r0, [r4, r2] movs r1, 0x28 - bl sine + bl Sin ldr r1, [r5] movs r2, 0xF1 lsls r2, 5 @@ -1188,7 +1188,7 @@ sub_80E37DC: @ 80E37DC movs r1, 0xFF ands r0, r1 movs r1, 0x28 - bl sine + bl Sin ldr r1, [r5] ldr r2, =0x00001e21 adds r1, r2 @@ -1241,7 +1241,7 @@ sub_80E3870: @ 80E3870 movs r1, 0xA ldrsh r0, [r4, r1] movs r1, 0x28 - bl sine + bl Sin ldr r1, [r5] movs r2, 0xF1 lsls r2, 5 @@ -1256,7 +1256,7 @@ sub_80E3870: @ 80E3870 movs r1, 0xFF ands r0, r1 movs r1, 0x28 - bl sine + bl Sin ldr r1, [r5] ldr r3, =0x00001e21 adds r1, r3 diff --git a/asm/new_game.s b/asm/new_game.s index 4fa24eef0..36b09aaf6 100644 --- a/asm/new_game.s +++ b/asm/new_game.s @@ -56,7 +56,7 @@ _080842FC: thumb_func_start set_player_trainer_id set_player_trainer_id: @ 8084310 push {r4,lr} - bl GenerateRandomNumber + bl Random adds r4, r0, 0 bl GetTrainerId lsls r4, 16 diff --git a/asm/palette.s b/asm/palette.s index 4392bca49..7eba06862 100644 --- a/asm/palette.s +++ b/asm/palette.s @@ -28,7 +28,7 @@ sub_80A1818: @ 80A1818 lsrs r3, 17 movs r0, 0x80 movs r1, 0x10 - bl pal_fade_1 + bl BlendPalette ldr r0, =sub_8149DFC bl FindTaskIdByFunc lsls r0, 24 @@ -76,7 +76,7 @@ sub_80A1884: @ 80A1884 lsrs r3, 17 movs r0, 0x80 movs r1, 0x10 - bl pal_fade_1 + bl BlendPalette ldr r1, =gUnknown_03000F3C ldrh r0, [r1] subs r0, 0x1 @@ -798,7 +798,7 @@ sub_80A1E40: @ 80A1E40 ldrh r3, [r3, 0x6] lsls r3, 17 lsrs r3, 17 - bl pal_fade_1 + bl BlendPalette b _080A1EF4 .pool _080A1E9C: @@ -1177,7 +1177,7 @@ _080A215A: lsrs r3, 17 adds r0, r5, 0 movs r1, 0x10 - bl pal_fade_1 + bl BlendPalette _080A2176: lsrs r4, 1 adds r0, r5, 0 @@ -2341,7 +2341,7 @@ _080A2A32: movs r1, 0x10 adds r2, r7, 0 adds r3, r6, 0 - bl pal_fade_1 + bl BlendPalette _080A2A46: lsrs r4, 1 adds r0, r5, 0 diff --git a/asm/pokemon_1.s b/asm/pokemon_1.s index d3f54a415..fb16b623e 100644 --- a/asm/pokemon_1.s +++ b/asm/pokemon_1.s @@ -207,9 +207,9 @@ create_pokemon: @ 8067BBC str r0, [sp, 0x14] b _08067C0C _08067BF8: - bl GenerateRandomNumber + bl Random adds r4, r0, 0 - bl GenerateRandomNumber + bl Random lsls r4, 16 lsrs r4, 16 lsls r0, 16 @@ -230,9 +230,9 @@ _08067C0C: mov r8, r2 ldr r6, =0x0000ffff _08067C28: - bl GenerateRandomNumber + bl Random adds r4, r0, 0 - bl GenerateRandomNumber + bl Random lsls r4, 16 lsrs r4, 16 lsls r0, 16 @@ -405,7 +405,7 @@ _08067C8A: b _08067E50 .pool _08067DC8: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 str r0, [sp, 0x18] @@ -438,7 +438,7 @@ _08067DC8: movs r1, 0x29 adds r2, r4, 0 bl pokemon_setattr_encrypted - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 str r0, [sp, 0x18] @@ -517,9 +517,9 @@ pokemon_make_with_nature: @ 8067E90 lsls r0, 24 lsrs r5, r0, 24 _08067EB0: - bl GenerateRandomNumber + bl Random adds r4, r0, 0 - bl GenerateRandomNumber + bl Random lsls r4, 16 lsrs r4, 16 lsls r0, 16 @@ -585,9 +585,9 @@ sub_8067EF8: @ 8067EF8 cmp r0, 0x1B bhi _08067F9E _08067F38: - bl GenerateRandomNumber + bl Random adds r4, r0, 0 - bl GenerateRandomNumber + bl Random lsls r4, 16 lsrs r4, 16 lsls r0, 16 @@ -632,9 +632,9 @@ _08067F38: bne _08067F38 b _08067FCE _08067F9E: - bl GenerateRandomNumber + bl Random adds r4, r0, 0 - bl GenerateRandomNumber + bl Random lsls r4, 16 lsrs r4, 16 lsls r0, 16 @@ -686,16 +686,16 @@ sub_8067FF8: @ 8067FF8 lsls r2, 24 lsrs r7, r2, 24 _0806800A: - bl GenerateRandomNumber + bl Random adds r4, r0, 0 - bl GenerateRandomNumber + bl Random lsls r4, 16 lsrs r5, r4, 16 lsls r0, 16 orrs r5, r0 - bl GenerateRandomNumber + bl Random adds r4, r0, 0 - bl GenerateRandomNumber + bl Random lsls r4, 16 lsrs r4, 16 lsls r0, 16 @@ -1454,9 +1454,9 @@ sub_8068634: @ 8068634 mov r8, r4 movs r6, 0 _08068664: - bl GenerateRandomNumber + bl Random adds r4, r0, 0 - bl GenerateRandomNumber + bl Random lsls r4, 16 lsrs r4, 16 lsls r0, 16 diff --git a/asm/pokemon_2.s b/asm/pokemon_2.s index 72a4a9d71..74560a1e2 100644 --- a/asm/pokemon_2.s +++ b/asm/pokemon_2.s @@ -191,7 +191,7 @@ _08069F5C: lsrs r0, 24 cmp r0, 0x1 bls _08069F80 - bl GenerateRandomNumber + bl Random adds r1, r6, 0 ands r1, r0 cmp r1, 0 diff --git a/asm/record_mixing.s b/asm/record_mixing.s index 7cfd9f401..352066d57 100644 --- a/asm/record_mixing.s +++ b/asm/record_mixing.s @@ -1731,7 +1731,7 @@ sub_80E7B60: @ 80E7B60 lsls r2, 24 lsrs r2, 24 mov r9, r2 - bl GenerateRandomNumber2 + bl Random2 lsls r0, 16 lsrs r0, 16 str r0, [sp, 0x38] @@ -2094,7 +2094,7 @@ _080E7E30: cmp r1, 0 beq _080E7E48 _080E7E34: - bl GenerateRandomNumber2 + bl Random2 mov r1, r9 adds r2, r1, r5 lsls r0, 16 @@ -2538,7 +2538,7 @@ _080E81E0: add r1, r10 b _080E820E _080E81EC: - bl GenerateRandomNumber2 + bl Random2 lsls r0, 16 ldr r1, =0x33330000 cmp r0, r1 diff --git a/asm/rng.s b/asm/rng.s index ff9f2657f..a408b139c 100644 --- a/asm/rng.s +++ b/asm/rng.s @@ -5,9 +5,9 @@ .text - thumb_func_start GenerateRandomNumber + thumb_func_start Random @ u16 GenerateRandomNumber() -GenerateRandomNumber: @ 806F5CC +Random: @ 806F5CC ldr r2, =gUnknown_03005D80 ldr r1, [r2] ldr r0, =0x41c64e6d @@ -22,7 +22,7 @@ GenerateRandomNumber: @ 806F5CC lsrs r0, 16 bx lr .pool - thumb_func_end GenerateRandomNumber + thumb_func_end Random thumb_func_start SeedRng @ void SeedRng(u16 seed) @@ -48,8 +48,8 @@ SeedRng2: @ 806F610 .pool thumb_func_end SeedRng2 - thumb_func_start GenerateRandomNumber2 -GenerateRandomNumber2: @ 806F620 + thumb_func_start Random2 +Random2: @ 806F620 ldr r2, =gUnknown_03005D84 ldr r1, [r2] ldr r0, =0x41c64e6d @@ -60,6 +60,6 @@ GenerateRandomNumber2: @ 806F620 lsrs r0, 16 bx lr .pool - thumb_func_end GenerateRandomNumber2 + thumb_func_end Random2 .align 2, 0 @ Don't pad with nop. diff --git a/asm/rom4.s b/asm/rom4.s index 5797c194b..1b4829c12 100644 --- a/asm/rom4.s +++ b/asm/rom4.s @@ -2507,7 +2507,7 @@ sub_80859BC: @ 80859BC cmp r0, 0 beq _08085A2C _080859F0: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x58 @@ -2516,7 +2516,7 @@ _080859F0: adds r4, 0xD4 lsls r4, 24 lsrs r4, 24 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x1E @@ -2577,7 +2577,7 @@ _08085A84: movs r0, 0x1 b _08085B1E _08085A88: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x96 @@ -2622,7 +2622,7 @@ _08085ABC: movs r1, 0x2 mov r9, r1 _08085AE4: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r4, 0x96 diff --git a/asm/rom5.s b/asm/rom5.s index 603898d30..345cfe573 100644 --- a/asm/rom5.s +++ b/asm/rom5.s @@ -1214,7 +1214,7 @@ sub_80A9DB4: @ 80A9DB4 ldrb r2, [r4, 0x10] ldrh r3, [r4, 0xA] movs r1, 0x10 - bl pal_fade_1 + bl BlendPalette ldrh r2, [r4, 0x12] movs r1, 0x12 ldrsh r0, [r4, r1] @@ -1299,12 +1299,12 @@ sub_80A9E78: @ 80A9E78 movs r1, 0x2E ldrsh r0, [r4, r1] movs r1, 0x20 - bl cosine + bl Cos strh r0, [r4, 0x24] movs r1, 0x2E ldrsh r0, [r4, r1] movs r1, 0x8 - bl sine + bl Sin strh r0, [r4, 0x26] movs r1, 0x2E ldrsh r0, [r4, r1] diff --git a/asm/rom6.s b/asm/rom6.s index 2baf99297..042887b18 100644 --- a/asm/rom6.s +++ b/asm/rom6.s @@ -4230,9 +4230,9 @@ sub_81378BC: @ 81378BC thumb_func_start sub_81378E4 sub_81378E4: @ 81378E4 push {r4,lr} - bl GenerateRandomNumber + bl Random adds r4, r0, 0 - bl GenerateRandomNumber + bl Random lsls r4, 16 lsls r0, 16 lsrs r0, 16 @@ -8851,7 +8851,7 @@ _08139E28: _08139E54: cmp r1, r0 bne _08139E6E - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x1 @@ -11272,7 +11272,7 @@ _0813B2DC: thumb_func_start sub_813B2E4 sub_813B2E4: @ 813B2E4 push {r4,lr} - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r4, r0, 16 ldr r0, =0x00004038 @@ -11304,7 +11304,7 @@ _0813B330: ands r4, r0 cmp r4, 0 bne _0813B354 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r4, r0, 16 _0813B340: @@ -11316,7 +11316,7 @@ _0813B340: b _0813B36A .pool _0813B354: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r4, r0, 16 ldr r0, =0x00004037 @@ -12296,7 +12296,7 @@ _0813BB82: adds r3, r5, 0 str r2, [sp] str r3, [sp, 0x4] - bl GenerateRandomNumber + bl Random adds r1, r6, 0 ands r1, r0 ldr r2, [sp] @@ -12384,7 +12384,7 @@ _0813BC3A: cmp r1, 0 beq _0813BC5E mov r10, r5 - bl GenerateRandomNumber + bl Random adds r1, r4, 0 ands r1, r0 cmp r1, 0 diff --git a/asm/rom_8034C54.s b/asm/rom_8034C54.s index 8d2519f9d..71b69787b 100644 --- a/asm/rom_8034C54.s +++ b/asm/rom_8034C54.s @@ -2238,7 +2238,7 @@ _08035F64: beq _08035FCC ldr r4, =gUnknown_02022E18 ldrh r0, [r5, 0xA] - bl sine2 + bl Sin2 lsls r0, 16 asrs r0, 16 cmp r0, 0 @@ -2253,7 +2253,7 @@ _08035F7E: strh r0, [r4] ldr r4, =gUnknown_02022E1C ldrh r0, [r5, 0xC] - bl sine2 + bl Sin2 lsls r0, 16 asrs r0, 16 cmp r0, 0 @@ -2277,7 +2277,7 @@ _08035F9C: _08035FCC: ldr r4, =gUnknown_02022E18 ldrh r0, [r5, 0xA] - bl sine2 + bl Sin2 lsls r0, 16 asrs r0, 16 cmp r0, 0 @@ -2292,7 +2292,7 @@ _08035FDE: strh r0, [r4] ldr r4, =gUnknown_02022E1A ldrh r0, [r5, 0xA] - bl cosine2 + bl Cos2 lsls r0, 16 asrs r0, 16 cmp r0, 0 @@ -2304,7 +2304,7 @@ _08035FFC: strh r0, [r4] ldr r4, =gUnknown_02022E1C ldrh r0, [r5, 0xC] - bl sine2 + bl Sin2 lsls r0, 16 asrs r0, 16 cmp r0, 0 @@ -2319,7 +2319,7 @@ _08036014: strh r0, [r4] ldr r4, =gUnknown_02022E1E ldrh r0, [r5, 0xC] - bl cosine2 + bl Cos2 lsls r0, 16 asrs r0, 16 cmp r0, 0 @@ -6971,7 +6971,7 @@ vblank_cb_08078BB4: @ 8038A28 ands r0, r1 cmp r0, 0 bne _08038A3A - bl GenerateRandomNumber + bl Random _08038A3A: ldr r0, =gUnknown_02022E14 ldrh r1, [r0] @@ -9039,7 +9039,7 @@ _08039C76: cmp r0, 0 bne _08039D2C ldr r0, =objc_dp11b_pingpong - bl object_new_hidden_with_callback + bl CreateInvisibleSpriteWithCallback lsls r0, 24 lsrs r5, r0, 24 mov r0, r8 @@ -9235,7 +9235,7 @@ _08039E10: _08039E14: movs r2, 0x32 ldrsh r1, [r4, r2] - bl sine + bl Sin ldr r2, =gUnknown_02020630 lsls r1, r5, 4 adds r1, r5 @@ -9689,7 +9689,7 @@ _0803A1BA: ldr r0, [r6] adds r0, 0x92 strb r1, [r0] - bl GenerateRandomNumber + bl Random ldr r1, =gUnknown_02024330 strh r0, [r1] ldr r1, =gUnknown_03005D10 @@ -12351,7 +12351,7 @@ _0803B866: ldr r0, [r2] strb r1, [r0, 0x3] strb r1, [r7] - bl GenerateRandomNumber + bl Random ldr r1, =gUnknown_02024330 strh r0, [r1] ldr r0, =gUnknown_02022FEC @@ -12606,7 +12606,7 @@ _0803BAE6: ldr r1, =gUnknown_03005D04 ldr r0, =sub_803BE74 str r0, [r1] - bl GenerateRandomNumber + bl Random ldr r1, =gUnknown_02024330 strh r0, [r1] ldr r0, =gUnknown_02022FEC @@ -15192,7 +15192,7 @@ _0803D27A: bne _0803D2AE cmp r8, r7 bne _0803D2A4 - bl GenerateRandomNumber + bl Random movs r1, 0x1 ands r1, r0 cmp r1, 0 @@ -15215,7 +15215,7 @@ _0803D2AE: _0803D2B8: cmp r8, r7 bne _0803D2CE - bl GenerateRandomNumber + bl Random movs r1, 0x1 ands r1, r0 cmp r1, 0 @@ -17158,7 +17158,7 @@ _0803E4E8: lsls r0, 24 cmp r0, 0 bne _0803E548 - bl GenerateRandomNumber + bl Random movs r1, 0x1 ands r1, r0 cmp r1, 0 @@ -17170,7 +17170,7 @@ _0803E544: movs r0, 0x3 b _0803E55A _0803E548: - bl GenerateRandomNumber + bl Random movs r1, 0x1 ands r1, r0 cmp r1, 0 @@ -17291,7 +17291,7 @@ _0803E630: lsls r0, 24 cmp r0, 0 bne _0803E684 - bl GenerateRandomNumber + bl Random adds r1, r4, 0 ands r1, r0 cmp r1, 0 @@ -17303,7 +17303,7 @@ _0803E680: movs r0, 0x3 b _0803E696 _0803E684: - bl GenerateRandomNumber + bl Random adds r1, r4, 0 ands r1, r0 cmp r1, 0 @@ -17980,7 +17980,7 @@ _0803EC9C: adds r0, r1 lsls r0, 24 lsrs r4, r0, 24 - bl GenerateRandomNumber + bl Random movs r1, 0xFF ands r1, r0 cmp r4, r1 @@ -18089,7 +18089,7 @@ _0803EDDA: adds r0, r1 lsls r0, 24 lsrs r4, r0, 24 - bl GenerateRandomNumber + bl Random movs r1, 0xFF ands r1, r0 cmp r4, r1 @@ -22253,7 +22253,7 @@ _08041238: bne _080412DE ldrb r0, [r6] bl b_cancel_multi_turn_move_maybe - bl GenerateRandomNumber + bl Random ldrb r1, [r6] adds r2, r1, 0 muls r2, r5 @@ -23388,7 +23388,7 @@ _08041C90: ands r0, r1 cmp r0, 0 beq _08041D30 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x5 @@ -23738,7 +23738,7 @@ _08042028: ands r0, r3 cmp r0, 0 beq _080420E8 - bl GenerateRandomNumber + bl Random movs r1, 0x1 movs r2, 0x1 ands r2, r0 @@ -23822,7 +23822,7 @@ _08042114: ands r0, r1 cmp r0, 0 beq _08042162 - bl GenerateRandomNumber + bl Random lsls r0, 16 movs r1, 0xC0 lsls r1, 10 @@ -23876,10 +23876,10 @@ _08042194: cmp r1, 0 beq _0804220E lsrs r0, r1, 16 - bl sub_806F8A8 + bl CountTrailingZeroBits ldr r1, =gUnknown_02024474 strb r0, [r1, 0x17] - bl GenerateRandomNumber + bl Random movs r1, 0x1 ands r1, r0 cmp r1, 0 @@ -25237,7 +25237,7 @@ _08042DA0: bne _08042DB0 bl _0804441E _08042DB0: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x3 @@ -25939,7 +25939,7 @@ _08043470: bne _08043488 bl _0804441E _08043488: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0xA @@ -25952,7 +25952,7 @@ _080434A0: ldr r5, =gUnknown_02024332 movs r4, 0x3 _080434A4: - bl GenerateRandomNumber + bl Random ands r0, r4 strb r0, [r5, 0x3] cmp r0, 0 @@ -26040,7 +26040,7 @@ _08043568: bne _08043580 bl _0804441E _08043580: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x3 @@ -26126,7 +26126,7 @@ _08043644: bne _0804365C bl _0804441E _0804365C: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x3 @@ -26212,7 +26212,7 @@ _08043710: bne _08043738 bl _0804441E _08043738: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x3 @@ -26308,7 +26308,7 @@ _08043818: bne _08043828 bl _0804441E _08043828: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x3 @@ -26992,7 +26992,7 @@ _08043E74: cmp r0, 0 beq _08043EFC str r2, [sp, 0x24] - bl GenerateRandomNumber + bl Random ldr r2, [sp, 0x24] adds r1, r2, 0 ands r1, r0 @@ -28851,7 +28851,7 @@ _08044EB4: adds r4, r0, 0x1 ldr r5, =gUnknown_0202409C _08044EBC: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x5 @@ -29759,7 +29759,7 @@ _080456FA: bne _08045720 b _0804582A _08045720: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x64 @@ -30076,7 +30076,7 @@ _08045A5A: lsls r0, r7, 1 mov r8, r0 _08045A6A: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 ldr r1, =gUnknown_0202406C @@ -30210,7 +30210,7 @@ _08045B80: lsls r0, 24 cmp r0, 0 bne _08045BC0 - bl GenerateRandomNumber + bl Random adds r1, r4, 0 ands r1, r0 cmp r1, 0 @@ -30222,7 +30222,7 @@ _08045BBC: movs r0, 0x3 b _08045BD2 _08045BC0: - bl GenerateRandomNumber + bl Random adds r1, r4, 0 ands r1, r0 cmp r1, 0 @@ -30440,7 +30440,7 @@ _08045D76: ldrb r0, [r0] cmp r0, r6 bls _08045DAC - bl GenerateRandomNumber + bl Random movs r1, 0xFF ands r1, r0 mov r2, r8 @@ -30494,7 +30494,7 @@ _08045E0A: b _08045F7A .pool _08045E20: - bl GenerateRandomNumber + bl Random movs r5, 0xFF adds r1, r5, 0 ands r1, r0 @@ -30533,7 +30533,7 @@ _08045E68: mov r8, r1 movs r7, 0x3 _08045E6E: - bl GenerateRandomNumber + bl Random ands r0, r7 mov r2, r8 strb r0, [r2] @@ -30577,7 +30577,7 @@ _08045EE8: subs r0, r2, r6 lsls r0, 24 lsrs r6, r0, 24 - bl GenerateRandomNumber + bl Random adds r4, r5, 0 ands r4, r0 cmp r4, r6 @@ -30637,7 +30637,7 @@ _08045F64: cmp r4, r6 blt _08045F8C _08045F6A: - bl GenerateRandomNumber + bl Random ldr r2, =gUnknown_02024332 movs r1, 0x3 ands r1, r0 @@ -31743,7 +31743,7 @@ _08046944: lsls r0, 16 lsrs r4, r0, 16 _08046960: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x64 @@ -32196,7 +32196,7 @@ _08046D00: ands r0, r1 cmp r0, 0 bne _08046D70 - bl GenerateRandomNumber + bl Random ldr r2, =gUnknown_0831C128 lsls r1, r5, 1 adds r1, r2 @@ -33584,7 +33584,7 @@ _080478A0: thumb_func_start sub_80478B8 sub_80478B8: @ 80478B8 push {r4,lr} - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0xF @@ -33616,7 +33616,7 @@ _080478EA: thumb_func_start atk07_cmd7 atk07_cmd7: @ 80478F4 push {r4-r7,lr} - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0xF @@ -33677,7 +33677,7 @@ _08047976: strb r0, [r1] cmp r4, 0x27 bne _080479B4 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x64 @@ -33803,7 +33803,7 @@ _08047A84: thumb_func_start atk08_cmd8 atk08_cmd8: @ 8047AA4 push {r4-r7,lr} - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0xF @@ -33864,7 +33864,7 @@ _08047B26: strb r0, [r1] cmp r4, 0x27 bne _08047B64 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x64 @@ -36047,7 +36047,7 @@ _08048DFC: ldr r3, [r0] cmp r3, 0x7 bne _08048E50 - bl GenerateRandomNumber + bl Random ldr r2, =gUnknown_02024084 ldr r1, =gUnknown_0202420E ldrb r3, [r1] @@ -36267,7 +36267,7 @@ _08049076: beq _0804908A bl _08049994 _0804908A: - bl GenerateRandomNumber + bl Random mov r3, r9 ldrb r1, [r3] adds r2, r1, 0 @@ -36377,7 +36377,7 @@ _08049178: ldr r1, =gUnknown_020241EA ldrh r1, [r1] strh r1, [r0] - bl GenerateRandomNumber + bl Random mov r2, r9 ldrb r1, [r2] adds r2, r1, 0 @@ -36456,7 +36456,7 @@ _08049244: beq _0804925A b _08049994 _0804925A: - bl GenerateRandomNumber + bl Random ldr r4, =gUnknown_02024332 lsls r0, 16 lsrs r0, 16 @@ -36517,7 +36517,7 @@ _080492C4: beq _080492E0 b _08049994 _080492E0: - bl GenerateRandomNumber + bl Random mov r2, r9 ldrb r1, [r2] adds r2, r1, 0 @@ -37127,7 +37127,7 @@ _08049880: ldr r1, =gUnknown_020241EA ldrh r1, [r1] strh r1, [r0] - bl GenerateRandomNumber + bl Random mov r3, r9 ldrb r1, [r3] adds r2, r1, 0 @@ -37311,7 +37311,7 @@ _08049A20: b _08049A7E .pool _08049A50: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x64 @@ -46921,7 +46921,7 @@ _0804ED2A: strb r0, [r1] cmp r4, 0x27 bne _0804ED68 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x64 @@ -48788,7 +48788,7 @@ _0804FDCC: ldrb r4, [r0, 0x8] lsls r4, 1 adds r4, r2 - bl GenerateRandomNumber + bl Random ldrh r1, [r4] lsls r0, 16 lsrs r0, 16 @@ -49277,7 +49277,7 @@ _08050220: ldr r1, =0xfffffbff ands r0, r1 str r0, [r2] - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 mov r1, r8 @@ -50889,13 +50889,13 @@ atk8D_setloopcounter: @ 8050FF0 .pool _0805100C: ldr r4, =gUnknown_02024212 - bl GenerateRandomNumber + bl Random movs r5, 0x3 ands r0, r5 strb r0, [r4] cmp r0, 0x1 bls _08051022 - bl GenerateRandomNumber + bl Random ands r0, r5 _08051022: adds r0, 0x2 @@ -50962,7 +50962,7 @@ sub_8051064: @ 8051064 b _08051108 .pool _080510AC: - bl GenerateRandomNumber + bl Random movs r3, 0xFF ands r3, r0 ldrb r0, [r7] @@ -51275,7 +51275,7 @@ _08051328: cmp r0, 0 beq _08051378 _08051332: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 mov r1, r10 @@ -51507,7 +51507,7 @@ _0805150C: ldr r5, =gBattleMoves mov r9, r5 _08051512: - bl GenerateRandomNumber + bl Random adds r3, r0, 0 ands r3, r7 cmp r3, r6 @@ -51790,7 +51790,7 @@ _08051782: strb r0, [r1] cmp r4, 0x27 bne _080517C0 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x64 @@ -51873,7 +51873,7 @@ _0805181C: adds r0, r2 lsls r0, 16 lsrs r4, r0, 16 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x64 @@ -51951,7 +51951,7 @@ _080518CA: adds r1, r2 lsls r1, 16 lsrs r4, r1, 16 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x64 @@ -53303,7 +53303,7 @@ sub_80524DC: @ 80524DC ldr r0, =gUnknown_02024214 mov r8, r0 _080524EE: - bl GenerateRandomNumber + bl Random ldr r2, =0x000001ff adds r1, r2, 0 ands r0, r1 @@ -53387,7 +53387,7 @@ atkA0_psywavedamageeffect: @ 80525B4 push {r4,lr} movs r4, 0xF _080525B8: - bl GenerateRandomNumber + bl Random adds r3, r4, 0 ands r3, r0 cmp r3, 0xA @@ -53728,7 +53728,7 @@ _0805284C: adds r2, r3 ldrh r1, [r2] strh r1, [r0, 0x4] - bl GenerateRandomNumber + bl Random ldrb r2, [r6] lsls r1, r2, 3 subs r1, r2 @@ -53880,7 +53880,7 @@ _080529AC: lsls r0, 2 add r0, r9 strb r5, [r0, 0xC] - bl GenerateRandomNumber + bl Random ldrb r2, [r4] lsls r1, r2, 3 subs r1, r2 @@ -54134,7 +54134,7 @@ _08052C1C: movs r7, 0x7F mov r9, r7 _08052C24: - bl GenerateRandomNumber + bl Random mov r4, r9 ands r4, r0 cmp r4, 0x70 @@ -54710,7 +54710,7 @@ _080530B8: movs r7, 0x3 ldr r4, =gUnknown_0832A328 _080530BC: - bl GenerateRandomNumber + bl Random adds r5, r7, 0 ands r5, r0 lsls r0, r5, 2 @@ -54968,7 +54968,7 @@ _080532C6: bhi _080532E6 b _08053408 _080532E6: - bl GenerateRandomNumber + bl Random movs r1, 0x3 ands r1, r0 adds r6, r1, 0x2 @@ -56029,7 +56029,7 @@ _08053C02: thumb_func_start atkB7_presentdamagecalculation atkB7_presentdamagecalculation: @ 8053C30 push {r4,lr} - bl GenerateRandomNumber + bl Random movs r4, 0xFF ands r4, r0 cmp r4, 0x65 @@ -56189,7 +56189,7 @@ atkB9_magnitudedamagecalculation: @ 8053DA4 push {r4-r7,lr} mov r7, r8 push {r7} - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x64 @@ -59265,7 +59265,7 @@ _080557F4: ands r0, r1 str r0, [r2] ldr r4, =gUnknown_020241EE - bl GenerateRandomNumber + bl Random movs r1, 0xFF ands r1, r0 mov r0, r10 @@ -59763,7 +59763,7 @@ _08055C76: ldrh r0, [r7] cmp r0, 0 bne _08055CB6 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0xA @@ -59855,7 +59855,7 @@ _08055D3C: ldrh r0, [r1] cmp r0, 0 bne _08055DD0 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0xA @@ -59863,7 +59863,7 @@ _08055D3C: lsls r0, 16 cmp r0, 0 bne _08055DD0 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x64 @@ -60820,7 +60820,7 @@ _080565F4: _080565FA: cmp r4, 0x3 bhi _0805660A - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 cmp r0, r6 @@ -62342,7 +62342,7 @@ _08057390: ands r0, r1 cmp r0, 0 beq _080573F4 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x5 @@ -69396,7 +69396,7 @@ sub_805B258: @ 805B258 lsrs r0, 16 mov r8, r0 ldr r0, =sub_805D714 - bl object_new_hidden_with_callback + bl CreateInvisibleSpriteWithCallback ldr r1, =gUnknown_03005D7C mov r9, r1 add r9, r6 @@ -72912,7 +72912,7 @@ sub_805D19C: @ 805D19C lsls r0, 24 lsrs r0, 24 mov r8, r0 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x64 @@ -73108,7 +73108,7 @@ _0805D33E: _0805D346: ldr r5, =gUnknown_0832A328 _0805D348: - bl GenerateRandomNumber + bl Random lsls r0, 16 movs r1, 0xC0 lsls r1, 10 @@ -73142,7 +73142,7 @@ _0805D394: ble _0805D39A movs r6, 0x2 _0805D39A: - bl GenerateRandomNumber + bl Random lsls r0, 16 movs r1, 0xC0 lsls r1, 10 @@ -73171,7 +73171,7 @@ _0805D3CC: cmp r9, r0 beq _0805D39A _0805D3D4: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x64 @@ -73432,7 +73432,7 @@ _0805D63E: ldrh r3, [r6, 0x28] cmp r0, r3 bne _0805D680 - bl GenerateRandomNumber + bl Random adds r3, r0, 0 ldr r0, =gUnknown_02024064 ldrb r1, [r0] @@ -73494,7 +73494,7 @@ _0805D6DA: lsls r0, r7, 8 b _0805D704 _0805D6DE: - bl GenerateRandomNumber + bl Random adds r3, r0, 0 mov r0, r9 ldrb r1, [r0] @@ -74279,7 +74279,7 @@ _0805DD1A: adds r0, r7, 0 movs r1, 0x10 movs r2, 0x6 - bl pal_fade_1 + bl BlendPalette lsls r1, r7, 1 ldr r0, =gUnknown_02037B14 adds r0, r1, r0 @@ -74463,7 +74463,7 @@ _0805DED2: adds r0, r7, 0 movs r1, 0x10 movs r2, 0x6 - bl pal_fade_1 + bl BlendPalette lsls r1, r7, 1 ldr r0, =gUnknown_02037B14 adds r0, r1, r0 @@ -75148,7 +75148,7 @@ sub_805E448: @ 805E448 adds r0, r6, 0 movs r1, 0x10 movs r2, 0x6 - bl pal_fade_1 + bl BlendPalette lsls r1, r6, 1 ldr r0, =gUnknown_02037B14 adds r0, r1, r0 @@ -75393,7 +75393,7 @@ _0805E70A: adds r0, r6, 0 movs r1, 0x10 movs r2, 0x6 - bl pal_fade_1 + bl BlendPalette lsls r1, r6, 1 ldr r0, =gUnknown_02037B14 adds r0, r1, r0 @@ -80551,7 +80551,7 @@ sub_80613DC: @ 80613DC lsrs r0, 16 mov r8, r0 ldr r0, =sub_805D714 - bl object_new_hidden_with_callback + bl CreateInvisibleSpriteWithCallback ldr r1, =gUnknown_03005D7C mov r10, r1 add r10, r6 @@ -81982,7 +81982,7 @@ _0806209C: _080620C4: movs r6, 0x3 _080620C6: - bl GenerateRandomNumber + bl Random adds r4, r0, 0 ands r4, r6 lsls r0, r4, 1 @@ -82017,7 +82017,7 @@ _08062108: ands r0, r1 cmp r0, 0 beq _0806213C - bl GenerateRandomNumber + bl Random movs r1, 0x2 ands r1, r0 lsls r1, 24 @@ -83549,7 +83549,7 @@ _08062DE0: ands r1, r0 cmp r1, 0 beq _08062E1E - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x3 @@ -83594,7 +83594,7 @@ sub_8062E54: @ 8062E54 lsls r0, 24 cmp r0, 0 beq _08062E82 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x3 @@ -83845,7 +83845,7 @@ _08063092: ldr r1, [sp] cmp r1, r0 bne _080630A6 - bl GenerateRandomNumber + bl Random movs r1, 0x1 ands r1, r0 cmp r1, 0 @@ -83906,7 +83906,7 @@ ai_switchout_natural_cure: @ 80630C0 cmp r1, r0 bne _08063128 _08063106: - bl GenerateRandomNumber + bl Random movs r1, 0x1 ands r1, r0 cmp r1, 0 @@ -83929,7 +83929,7 @@ _08063128: ldrb r0, [r0, 0x1] cmp r0, 0 bne _08063160 - bl GenerateRandomNumber + bl Random movs r1, 0x1 ands r1, r0 cmp r1, 0 @@ -83950,7 +83950,7 @@ _08063160: lsls r0, 24 cmp r0, 0 bne _080631AA - bl GenerateRandomNumber + bl Random movs r1, 0x1 ands r1, r0 cmp r1, 0 @@ -84047,7 +84047,7 @@ _0806320A: mov r0, r9 cmp r0, 0 bne _08063278 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0xA @@ -84121,7 +84121,7 @@ _080632AE: mov r0, r9 cmp r0, 0 bne _08063278 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0xA @@ -84464,7 +84464,7 @@ _080635A2: ands r1, r0 cmp r1, 0 beq _080635DE - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 ldr r1, [sp, 0x4] @@ -85111,7 +85111,7 @@ _08063B20: lsrs r0, 24 str r0, [sp, 0x14] _08063B36: - bl GenerateRandomNumber + bl Random movs r3, 0x2 ands r0, r3 lsls r0, 24 @@ -89894,7 +89894,7 @@ sub_8066494: @ 8066494 lsrs r0, 16 mov r8, r0 ldr r0, =sub_805D714 - bl object_new_hidden_with_callback + bl CreateInvisibleSpriteWithCallback ldr r1, =gUnknown_03005D7C mov r10, r1 add r10, r6 diff --git a/asm/rom_806BD04.s b/asm/rom_806BD04.s index 21e6f6c32..1ba5d25d5 100644 --- a/asm/rom_806BD04.s +++ b/asm/rom_806BD04.s @@ -3599,7 +3599,7 @@ _0806D9D6: _0806D9E0: cmp r5, 0x5 bne _0806D9F0 - bl GenerateRandomNumber + bl Random movs r1, 0x1 ands r1, r0 cmp r1, 0 @@ -3961,7 +3961,7 @@ sub_806DCB4: @ 806DCB4 push {r4-r6,lr} sub sp, 0x4 adds r6, r0, 0 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r5, r0, 16 movs r0, 0x80 @@ -3977,7 +3977,7 @@ sub_806DCB4: @ 806DCB4 cmp r5, r0 bne _0806DD70 _0806DCDA: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x6 @@ -4010,7 +4010,7 @@ _0806DCDA: bne _0806DD70 movs r4, 0x7 _0806DD24: - bl GenerateRandomNumber + bl Random lsls r0, 24 lsrs r0, 24 mov r1, sp @@ -4239,7 +4239,7 @@ sub_806DEC4: @ 806DEC4 push {r4-r7,lr} sub sp, 0x4 adds r7, r0, 0 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x3 @@ -5700,7 +5700,7 @@ sub_806EA68: @ 806EA68 beq _0806EA7C b _0806EB90 _0806EA7C: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x64 diff --git a/asm/rom_806F640.s b/asm/rom_806F640.s index a15f33334..865e98937 100644 --- a/asm/rom_806F640.s +++ b/asm/rom_806F640.s @@ -5,8 +5,8 @@ .text - thumb_func_start object_new_hidden_with_callback -object_new_hidden_with_callback: @ 806F640 + thumb_func_start CreateInvisibleSpriteWithCallback +CreateInvisibleSpriteWithCallback: @ 806F640 push {r4-r6,lr} adds r6, r0, 0 ldr r0, =gUnknown_0832A3A8 @@ -33,18 +33,18 @@ object_new_hidden_with_callback: @ 806F640 pop {r1} bx r1 .pool - thumb_func_end object_new_hidden_with_callback + thumb_func_end CreateInvisibleSpriteWithCallback - thumb_func_start sub_806F67C -sub_806F67C: @ 806F67C + thumb_func_start StoreWordInTwoHalfwords +StoreWordInTwoHalfwords: @ 806F67C strh r1, [r0] lsrs r1, 16 strh r1, [r0, 0x2] bx lr - thumb_func_end sub_806F67C + thumb_func_end StoreWordInTwoHalfwords - thumb_func_start sub_806F684 -sub_806F684: @ 806F684 + thumb_func_start LoadWordFromTwoHalfwords +LoadWordFromTwoHalfwords: @ 806F684 ldrh r2, [r0] movs r3, 0x2 ldrsh r0, [r0, r3] @@ -52,10 +52,10 @@ sub_806F684: @ 806F684 orrs r2, r0 str r2, [r1] bx lr - thumb_func_end sub_806F684 + thumb_func_end LoadWordFromTwoHalfwords - thumb_func_start sub_806F694 -sub_806F694: @ 806F694 + thumb_func_start SetBgAffineStruct +SetBgAffineStruct: @ 806F694 push {r4-r7,lr} mov r7, r8 push {r7} @@ -77,10 +77,10 @@ sub_806F694: @ 806F694 pop {r4-r7} pop {r0} bx r0 - thumb_func_end sub_806F694 + thumb_func_end SetBgAffineStruct - thumb_func_start sub_806F6C0 -sub_806F6C0: @ 806F6C0 + thumb_func_start DoBgAffineSet +DoBgAffineSet: @ 806F6C0 push {r4-r6,lr} mov r6, r8 push {r6} @@ -105,7 +105,7 @@ sub_806F6C0: @ 806F6C0 str r5, [sp, 0x8] str r6, [sp, 0xC] add r0, sp, 0x10 - bl sub_806F694 + bl SetBgAffineStruct add r0, sp, 0x10 mov r1, r8 movs r2, 0x1 @@ -116,10 +116,10 @@ sub_806F6C0: @ 806F6C0 pop {r4-r6} pop {r0} bx r0 - thumb_func_end sub_806F6C0 + thumb_func_end DoBgAffineSet - thumb_func_start rfu_MBOOT_CHILD_inheritanceLinkStatus -rfu_MBOOT_CHILD_inheritanceLinkStatus: @ 806F70C + thumb_func_start CopySpriteTiles +CopySpriteTiles: @ 806F70C push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -327,10 +327,10 @@ _0806F894: pop {r0} bx r0 .pool - thumb_func_end rfu_MBOOT_CHILD_inheritanceLinkStatus + thumb_func_end CopySpriteTiles - thumb_func_start sub_806F8A8 -sub_806F8A8: @ 806F8A8 + thumb_func_start CountTrailingZeroBits +CountTrailingZeroBits: @ 806F8A8 push {lr} adds r2, r0, 0 movs r1, 0 @@ -353,10 +353,10 @@ _0806F8BC: _0806F8CA: pop {r1} bx r1 - thumb_func_end sub_806F8A8 + thumb_func_end CountTrailingZeroBits - thumb_func_start sub_806F8D0 -sub_806F8D0: @ 806F8D0 + thumb_func_start CalcCRC16 +CalcCRC16: @ 806F8D0 push {r4-r7,lr} adds r7, r0, 0 adds r4, r1, 0 @@ -403,10 +403,10 @@ _0806F91C: pop {r4-r7} pop {r1} bx r1 - thumb_func_end sub_806F8D0 + thumb_func_end CalcCRC16 - thumb_func_start sub_806F928 -sub_806F928: @ 806F928 + thumb_func_start CalcCRC16WithTable +CalcCRC16WithTable: @ 806F928 push {r4-r6,lr} adds r5, r0, 0 adds r4, r1, 0 @@ -439,10 +439,10 @@ _0806F956: pop {r1} bx r1 .pool - thumb_func_end sub_806F928 + thumb_func_end CalcCRC16WithTable - thumb_func_start sub_806F96C -sub_806F96C: @ 806F96C + thumb_func_start CalcByteArraySum +CalcByteArraySum: @ 806F96C push {r4,lr} adds r4, r0, 0 movs r3, 0 @@ -461,6 +461,6 @@ _0806F984: pop {r4} pop {r1} bx r1 - thumb_func_end sub_806F96C + thumb_func_end CalcByteArraySum .align 2, 0 @ Don't pad with nop. diff --git a/asm/rom_8072304.s b/asm/rom_8072304.s index 243a89e24..1794b040e 100644 --- a/asm/rom_8072304.s +++ b/asm/rom_8072304.s @@ -5757,7 +5757,7 @@ sub_807521C: @ 807521C bl LoadCompressedObjectPaletteUsingHeap _0807524E: ldr r0, =sub_8075370 - bl object_new_hidden_with_callback + bl CreateInvisibleSpriteWithCallback mov r8, r0 mov r0, r8 lsls r0, 24 @@ -6428,14 +6428,14 @@ sub_80757E4: @ 80757E4 strh r1, [r4, 0x38] movs r0, 0 movs r1, 0x20 - bl cosine + bl Cos ldrh r1, [r4, 0x22] adds r0, r1 strh r0, [r4, 0x22] movs r0, 0x36 ldrsh r1, [r4, r0] movs r0, 0 - bl cosine + bl Cos negs r0, r0 strh r0, [r4, 0x26] ldr r0, =sub_8075838 @@ -6465,7 +6465,7 @@ _0807584E: ldrsh r0, [r4, r1] movs r2, 0x36 ldrsh r1, [r4, r2] - bl cosine + bl Cos negs r0, r0 strh r0, [r4, 0x26] ldrh r1, [r4, 0x38] @@ -6524,7 +6524,7 @@ _080758C2: ldrsh r0, [r4, r2] movs r2, 0x36 ldrsh r1, [r4, r2] - bl cosine + bl Cos negs r0, r0 strh r0, [r4, 0x26] ldrh r1, [r4, 0x38] @@ -6548,7 +6548,7 @@ _080758EE: strh r5, [r4, 0x34] movs r0, 0x40 movs r1, 0x20 - bl cosine + bl Cos ldrh r1, [r4, 0x22] adds r0, r1 strh r0, [r4, 0x22] @@ -7673,7 +7673,7 @@ _08076266: ands r0, r2 movs r2, 0x38 ldrsh r1, [r5, r2] - bl sine + bl Sin ldrh r1, [r5, 0x26] adds r0, r1 strh r0, [r5, 0x26] @@ -8625,7 +8625,7 @@ sub_80769F4: @ 80769F4 lsrs r4, 24 ldr r5, =oamc_804BEB4 adds r0, r5, 0 - bl object_new_hidden_with_callback + bl CreateInvisibleSpriteWithCallback lsls r0, 24 lsrs r0, 24 ldr r2, =gUnknown_02020630 diff --git a/asm/rom_80A3934.s b/asm/rom_80A3934.s index 252688e01..f150be3ea 100644 --- a/asm/rom_80A3934.s +++ b/asm/rom_80A3934.s @@ -5015,13 +5015,13 @@ sub_80A62EC: @ 80A62EC ldrsh r0, [r4, r2] movs r2, 0x30 ldrsh r1, [r4, r2] - bl sine + bl Sin strh r0, [r4, 0x24] movs r1, 0x2E ldrsh r0, [r4, r1] movs r2, 0x30 ldrsh r1, [r4, r2] - bl cosine + bl Cos strh r0, [r4, 0x26] ldrh r0, [r4, 0x32] ldrh r2, [r4, 0x2E] @@ -5073,7 +5073,7 @@ sub_80A634C: @ 80A634C adds r1, r2 lsls r1, 16 asrs r1, 16 - bl sine + bl Sin strh r0, [r4, 0x24] movs r1, 0x2E ldrsh r0, [r4, r1] @@ -5084,7 +5084,7 @@ sub_80A634C: @ 80A634C adds r1, r2 lsls r1, 16 asrs r1, 16 - bl cosine + bl Cos strh r0, [r4, 0x26] ldrh r0, [r4, 0x32] ldrh r2, [r4, 0x2E] @@ -5135,13 +5135,13 @@ sub_80A63C8: @ 80A63C8 ldrsh r0, [r4, r2] movs r2, 0x30 ldrsh r1, [r4, r2] - bl sine + bl Sin strh r0, [r4, 0x24] movs r1, 0x36 ldrsh r0, [r4, r1] movs r2, 0x30 ldrsh r1, [r4, r2] - bl cosine + bl Cos strh r0, [r4, 0x26] ldrh r0, [r4, 0x32] ldrh r2, [r4, 0x2E] @@ -5209,13 +5209,13 @@ sub_80A6450: @ 80A6450 ldrsh r0, [r4, r2] movs r2, 0x30 ldrsh r1, [r4, r2] - bl sine + bl Sin strh r0, [r4, 0x24] movs r1, 0x2E ldrsh r0, [r4, r1] movs r2, 0x36 ldrsh r1, [r4, r2] - bl cosine + bl Cos strh r0, [r4, 0x26] ldrh r0, [r4, 0x32] ldrh r2, [r4, 0x2E] @@ -5859,7 +5859,7 @@ sub_80A6900: @ 80A6900 lsrs r0, 24 movs r2, 0x38 ldrsh r1, [r4, r2] - bl sine + bl Sin ldrh r1, [r4, 0x26] adds r0, r1 strh r0, [r4, 0x26] @@ -5889,7 +5889,7 @@ sub_80A6934: @ 80A6934 lsrs r0, 24 movs r2, 0x38 ldrsh r1, [r4, r2] - bl sine + bl Sin ldrh r1, [r4, 0x24] adds r0, r1 strh r0, [r4, 0x24] @@ -8371,7 +8371,7 @@ sub_80A7C1C: @ 80A7C1C lsrs r2, 24 ldrh r3, [r4, 0xA] movs r1, 0xF - bl pal_fade_1 + bl BlendPalette movs r2, 0xC ldrsh r1, [r4, r2] movs r2, 0xE @@ -8391,7 +8391,7 @@ _080A7C78: lsrs r2, 24 ldrh r3, [r4, 0xA] movs r1, 0xF - bl pal_fade_1 + bl BlendPalette movs r0, 0xC ldrsh r1, [r4, r0] cmp r1, 0 @@ -10067,7 +10067,7 @@ sub_80A89C8: @ 80A89C8 lsrs r6, 24 ldr r0, =DummyObjectCallback mov r10, r0 - bl object_new_hidden_with_callback + bl CreateInvisibleSpriteWithCallback mov r8, r0 mov r0, r8 lsls r0, 24 @@ -10379,7 +10379,7 @@ _080A8C6A: ldrh r3, [r0] adds r0, r6, 0 movs r1, 0x10 - bl pal_fade_1 + bl BlendPalette ldr r0, =sub_80A8CAC str r0, [r5] pop {r4-r7} diff --git a/asm/rom_80B5E6C.s b/asm/rom_80B5E6C.s index 23282ebfc..daed4324a 100644 --- a/asm/rom_80B5E6C.s +++ b/asm/rom_80B5E6C.s @@ -2181,12 +2181,12 @@ sub_80B6FB8: @ 80B6FB8 movs r0, 0xC ldrsh r1, [r5, r0] movs r0, 0x84 - bl cosine + bl Cos strh r0, [r4, 0x24] movs r0, 0xC ldrsh r1, [r5, r0] movs r0, 0x94 - bl sine + bl Sin strh r0, [r4, 0x26] ldrh r0, [r5, 0xE] adds r0, 0x1 @@ -2219,12 +2219,12 @@ sub_80B7004: @ 80B7004 movs r0, 0xC ldrsh r1, [r5, r0] movs r0, 0x7C - bl cosine + bl Cos strh r0, [r4, 0x24] movs r0, 0xC ldrsh r1, [r5, r0] movs r0, 0x76 - bl sine + bl Sin strh r0, [r4, 0x26] ldrh r0, [r5, 0xE] adds r0, 0x1 @@ -2400,12 +2400,12 @@ sub_80B7190: @ 80B7190 movs r0, 0xA ldrsh r1, [r5, r0] movs r0, 0x84 - bl cosine + bl Cos strh r0, [r4, 0x24] movs r0, 0xA ldrsh r1, [r5, r0] movs r0, 0x94 - bl sine + bl Sin strh r0, [r4, 0x26] ldrh r0, [r5, 0x8] adds r0, 0x1 @@ -2431,12 +2431,12 @@ sub_80B71D0: @ 80B71D0 movs r0, 0xA ldrsh r1, [r4, r0] movs r0, 0x84 - bl cosine + bl Cos strh r0, [r5, 0x24] movs r0, 0xA ldrsh r1, [r4, r0] movs r0, 0x94 - bl sine + bl Sin strh r0, [r5, 0x26] ldrh r0, [r4, 0xC] adds r0, 0x1 @@ -2479,12 +2479,12 @@ sub_80B7230: @ 80B7230 movs r0, 0xA ldrsh r1, [r5, r0] movs r0, 0x7C - bl cosine + bl Cos strh r0, [r4, 0x24] movs r0, 0xA ldrsh r1, [r5, r0] movs r0, 0x76 - bl sine + bl Sin strh r0, [r4, 0x26] ldrh r0, [r5, 0x8] adds r0, 0x1 @@ -2510,12 +2510,12 @@ sub_80B7270: @ 80B7270 movs r0, 0xA ldrsh r1, [r4, r0] movs r0, 0x7C - bl cosine + bl Cos strh r0, [r5, 0x24] movs r0, 0xA ldrsh r1, [r4, r0] movs r0, 0x76 - bl sine + bl Sin strh r0, [r5, 0x26] ldrh r0, [r4, 0xC] adds r0, 0x1 @@ -4834,7 +4834,7 @@ sub_80B8584: @ 80B8584 adds r0, 0x22 ldr r1, =gUnknown_030022C0 ldr r1, [r1, 0xC] - bl sub_806F67C + bl StoreWordInTwoHalfwords ldr r1, =0x0000f0f1 strh r1, [r4, 0xA] ldr r0, =0x00005051 @@ -5102,7 +5102,7 @@ overworld_bg_setup_2: @ 80B87B8 adds r4, r0, 0 adds r0, 0x22 mov r1, sp - bl sub_806F684 + bl LoadWordFromTwoHalfwords ldr r0, [sp] bl SetVBlankCallback bl sub_8197200 @@ -5147,7 +5147,7 @@ sub_80B880C: @ 80B880C adds r0, r4, 0 adds r0, 0x22 mov r1, sp - bl sub_806F684 + bl LoadWordFromTwoHalfwords ldr r0, [sp] bl _call_via_r0 ldrh r1, [r4, 0xA] @@ -5243,7 +5243,7 @@ sub_80B88E4: @ 80B88E4 adds r0, 0x22 ldr r1, =gUnknown_030022C0 ldr r1, [r1, 0xC] - bl sub_806F67C + bl StoreWordInTwoHalfwords ldr r0, =sub_80B8AE0 bl SetVBlankCallback ldrh r0, [r4, 0x8] @@ -5432,7 +5432,7 @@ sub_80B8A64: @ 80B8A64 adds r0, r4, 0 adds r0, 0x22 add r1, sp, 0x4 - bl sub_806F684 + bl LoadWordFromTwoHalfwords ldr r0, [sp, 0x4] bl SetVBlankCallback bl sub_8197200 @@ -5477,7 +5477,7 @@ sub_80B8AE0: @ 80B8AE0 adds r0, r4, 0 adds r0, 0x22 mov r1, sp - bl sub_806F684 + bl LoadWordFromTwoHalfwords ldr r0, [sp] bl _call_via_r0 ldrh r1, [r4, 0xA] @@ -6230,13 +6230,13 @@ sub_80B9128: @ 80B9128 movs r1, 0x32 ldrsh r0, [r4, r1] movs r1, 0x8C - bl cosine + bl Cos movs r5, 0 strh r0, [r4, 0x24] movs r2, 0x32 ldrsh r0, [r4, r2] movs r1, 0x48 - bl sine + bl Sin strh r0, [r4, 0x26] ldrh r0, [r4, 0x32] adds r0, 0x4 @@ -6806,12 +6806,12 @@ _080B95C0: movs r1, 0x30 ldrsh r0, [r4, r1] movs r1, 0x78 - bl cosine + bl Cos strh r0, [r4, 0x24] movs r1, 0x30 ldrsh r0, [r4, r1] movs r1, 0x78 - bl sine + bl Sin strh r0, [r4, 0x26] ldrh r2, [r4, 0x32] movs r0, 0x32 @@ -6860,13 +6860,13 @@ sub_80B963C: @ 80B963C movs r1, 0x32 ldrsh r0, [r4, r1] movs r1, 0x8C - bl cosine + bl Cos movs r5, 0 strh r0, [r4, 0x24] movs r2, 0x32 ldrsh r0, [r4, r2] movs r1, 0x48 - bl sine + bl Sin strh r0, [r4, 0x26] ldrh r0, [r4, 0x32] adds r0, 0x4 @@ -6966,12 +6966,12 @@ _080B96FA: movs r3, 0x30 ldrsh r0, [r4, r3] movs r1, 0x20 - bl cosine + bl Cos strh r0, [r4, 0x24] movs r1, 0x30 ldrsh r0, [r4, r1] movs r1, 0x78 - bl sine + bl Sin strh r0, [r4, 0x26] ldrh r1, [r4, 0x32] movs r2, 0x32 diff --git a/asm/rom_80C6FA0.s b/asm/rom_80C6FA0.s index 8c72e15cf..d6bc13e20 100644 --- a/asm/rom_80C6FA0.s +++ b/asm/rom_80C6FA0.s @@ -25303,13 +25303,13 @@ objc_8097BBC: @ 80D4174 ldrsh r0, [r4, r1] movs r2, 0x2E ldrsh r1, [r4, r2] - bl sine + bl Sin strh r0, [r4, 0x24] movs r1, 0x32 ldrsh r0, [r4, r1] movs r2, 0x2E ldrsh r1, [r4, r2] - bl cosine + bl Cos strh r0, [r4, 0x26] ldrh r0, [r4, 0x32] adds r0, 0x8 @@ -28102,7 +28102,7 @@ sub_80D57B8: @ 80D57B8 ldrsh r0, [r5, r1] movs r2, 0xA ldrsh r1, [r5, r2] - bl sine + bl Sin ldr r2, =gUnknown_02020630 lsls r1, r4, 4 adds r1, r4 @@ -28113,7 +28113,7 @@ sub_80D57B8: @ 80D57B8 ldrsh r0, [r5, r1] movs r2, 0xC ldrsh r1, [r5, r2] - bl cosine + bl Cos negs r0, r0 strh r0, [r4, 0x26] ldrh r1, [r5, 0xC] @@ -28728,7 +28728,7 @@ sub_80D5CE4: @ 80D5CE4 lsrs r0, 8 movs r2, 0xC ldrsh r1, [r5, r2] - bl sine + bl Sin strh r0, [r4, 0x26] ldrh r0, [r5, 0x16] ldrh r1, [r5, 0x1C] @@ -29011,7 +29011,7 @@ sub_80D5F3C: @ 80D5F3C mov r0, r8 movs r2, 0xA ldrsh r1, [r4, r2] - bl sine + bl Sin lsls r0, 16 lsrs r5, r0, 16 mov r9, r5 diff --git a/asm/rom_8158B30.s b/asm/rom_8158B30.s index 38b3653bc..351a7b149 100644 --- a/asm/rom_8158B30.s +++ b/asm/rom_8158B30.s @@ -3583,7 +3583,7 @@ _0815A84C: strh r1, [r4, 0x24] ands r0, r3 movs r1, 0x5 - bl sine + bl Sin movs r2, 0x36 ldrsh r1, [r4, r2] lsrs r2, r1, 31 @@ -5201,7 +5201,7 @@ _0815B566: sub_815B570: @ 815B570 push {r4,lr} adds r4, r0, 0 - bl GenerateRandomNumber2 + bl Random2 movs r1, 0x3 ands r0, r1 cmp r0, 0 @@ -5224,7 +5224,7 @@ _0815B592: ands r0, r2 orrs r0, r1 strh r0, [r4, 0x4] - bl GenerateRandomNumber2 + bl Random2 movs r1, 0x7 ands r0, r1 adds r1, r0, 0 @@ -6218,7 +6218,7 @@ sub_815BE04: @ 815BE04 push {r5-r7} sub sp, 0x4 adds r7, r0, 0 - bl GenerateRandomNumber2 + bl Random2 lsls r0, 16 movs r1, 0xFC lsls r1, 14 @@ -7317,7 +7317,7 @@ _0815C732: movs r0, 0xFF ands r0, r1 movs r1, 0x10 - bl sine + bl Sin b _0815C768 .pool _0815C744: @@ -7337,7 +7337,7 @@ _0815C75C: movs r0, 0xFF ands r0, r1 movs r1, 0x10 - bl cosine + bl Cos _0815C768: strh r0, [r4, 0x26] pop {r4} @@ -7864,7 +7864,7 @@ _0815CB78: sub_815CB88: @ 815CB88 push {r4,r5,lr} adds r4, r0, 0 - bl GenerateRandomNumber2 + bl Random2 lsls r0, 16 lsrs r0, 16 movs r1, 0xC @@ -7882,10 +7882,10 @@ sub_815CB88: @ 815CB88 ands r0, r2 orrs r0, r1 strh r0, [r4, 0x4] - bl GenerateRandomNumber2 + bl Random2 ldr r5, =0x000001ff ands r5, r0 - bl GenerateRandomNumber2 + bl Random2 movs r1, 0xFF ands r1, r0 movs r0, 0x1 @@ -8176,14 +8176,14 @@ sub_815CDFC: @ 815CDFC ldrh r1, [r4, 0x32] lsls r1, 16 asrs r1, 24 - bl sine + bl Sin strh r0, [r4, 0x24] movs r2, 0x30 ldrsh r0, [r4, r2] ldrh r1, [r4, 0x34] lsls r1, 16 asrs r1, 24 - bl cosine + bl Cos strh r0, [r4, 0x26] ldrh r0, [r4, 0x30] adds r0, 0x9 @@ -9388,7 +9388,7 @@ sub_815D804: @ 815D804 bl sub_815D794 adds r0, r4, 0 movs r1, 0x8 - bl sine + bl Sin strh r0, [r5, 0x26] movs r1, 0x2E ldrsh r0, [r5, r1] @@ -10319,7 +10319,7 @@ sub_815DF64: @ 815DF64 ldrh r3, [r1] movs r1, 0x10 movs r2, 0x8 - bl pal_fade_1 + bl BlendPalette ldrh r0, [r4, 0x8] adds r0, 0x1 strh r0, [r4, 0x8] @@ -10340,7 +10340,7 @@ _0815DFB4: movs r1, 0x10 movs r2, 0 movs r3, 0 - bl pal_fade_1 + bl BlendPalette adds r0, r5, 0 bl move_anim_task_del _0815DFC6: @@ -13411,7 +13411,7 @@ _0815F80E: ldrsh r0, [r4, r2] movs r2, 0x38 ldrsh r1, [r4, r2] - bl cosine + bl Cos strh r0, [r4, 0x24] movs r1, 0x2E ldrsh r0, [r4, r1] @@ -13837,7 +13837,7 @@ _0815FB50: ldr r3, =0x00007fff movs r1, 0x10 movs r2, 0x6 - bl pal_fade_1 + bl BlendPalette _0815FBBA: ldr r0, =gTasks mov r3, r8 @@ -14235,7 +14235,7 @@ _0815FF3A: ldrsh r0, [r4, r1] movs r2, 0x2E ldrsh r1, [r4, r2] - bl sine + bl Sin strh r0, [r4, 0x26] ldrh r2, [r4, 0x30] adds r0, r2, 0x5 @@ -14696,12 +14696,12 @@ sub_81602E0: @ 81602E0 movs r1, 0x30 ldrsh r0, [r4, r1] movs r1, 0x14 - bl cosine + bl Cos strh r0, [r4, 0x24] movs r1, 0x30 ldrsh r0, [r4, r1] movs r1, 0x14 - bl sine + bl Sin strh r0, [r4, 0x26] adds r0, r4, 0 adds r0, 0x3F @@ -17666,7 +17666,7 @@ _08161BC8: ldr r4, =gUnknown_0203BC86 mov r0, r8 strb r0, [r4] - bl GenerateRandomNumber + bl Random ldr r5, =gUnknown_085CEC30 lsls r0, 16 lsrs r0, 16 @@ -17739,7 +17739,7 @@ sub_8161D00: @ 8161D00 ldr r5, =gUnknown_085CEC30 adds r4, r0, 0 _08161D1A: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x14 @@ -17766,7 +17766,7 @@ _08161D3E: sub_8161D54: @ 8161D54 push {r4-r7,lr} movs r4, 0 - bl GenerateRandomNumber + bl Random lsls r0, 16 movs r1, 0xF0 lsls r1, 12 @@ -17798,7 +17798,7 @@ _08161D80: adds r5, r2, 0x1 ldr r4, =gUnknown_0203BC80 _08161D96: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x5 @@ -17941,7 +17941,7 @@ sub_8161EDC: @ 8161EDC lsrs r0, 24 cmp r0, 0x1 bne _08161F10 - bl GenerateRandomNumber + bl Random lsls r0, 16 movs r1, 0xC0 lsls r1, 10 @@ -18502,7 +18502,7 @@ _0816239C: .pool _081623C0: ldr r4, =gUnknown_02038BCA - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 ldr r1, [sp, 0x24] @@ -18711,7 +18711,7 @@ _0816258A: adds r0, 0x1 lsls r0, 16 lsrs r5, r0, 16 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 adds r1, r5, 0 @@ -19297,7 +19297,7 @@ _08162A54: adds r5, r7, 0 cmp r5, 0x4 ble _081629E4 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 mov r1, r8 @@ -20207,9 +20207,9 @@ _08163260: bne _08163260 _08163278: movs r7, 0 - bl GenerateRandomNumber + bl Random adds r4, r0, 0 - bl GenerateRandomNumber + bl Random lsls r4, 16 lsrs r4, 16 lsls r0, 16 @@ -20220,7 +20220,7 @@ _08163278: bne _08163296 b _08163426 _08163296: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 ldr r1, [sp, 0x28] @@ -20577,7 +20577,7 @@ _08163558: cmp r1, r0 bne _0816354C _0816355E: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 adds r1, r4, 0 @@ -21879,7 +21879,7 @@ _08164130: adds r2, 0x1 cmp r2, 0x2 ble _08164122 - bl GenerateRandomNumber + bl Random ldr r4, =gUnknown_03006298 lsls r0, 16 lsrs r0, 16 @@ -21890,7 +21890,7 @@ _08164130: ldr r0, [r0] strh r0, [r4] _08164150: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 adds r1, r6, 0 @@ -22004,7 +22004,7 @@ _0816423A: adds r7, 0x1 cmp r7, 0x3 ble _081641E6 - bl GenerateRandomNumber + bl Random ldr r4, =gUnknown_03006298 lsls r0, 16 lsrs r0, 16 @@ -22015,7 +22015,7 @@ _0816423A: ldr r0, [r0] strh r0, [r4, 0x4] _08164258: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 mov r1, r8 @@ -22344,7 +22344,7 @@ _081644E0: mov r4, r10 cmp r4, 0 beq _08164532 - bl GenerateRandomNumber + bl Random ldr r6, =gSaveBlock2Ptr ldr r4, [r6] lsls r0, 16 @@ -22507,7 +22507,7 @@ _08164660: mov r1, r10 cmp r1, 0 beq _081646A0 - bl GenerateRandomNumber + bl Random ldr r6, =gSaveBlock2Ptr ldr r4, [r6] lsls r0, 16 @@ -24098,9 +24098,9 @@ _0816542A: ldr r6, =gUnknown_085DD6D0 adds r5, r0, r6 _08165440: - bl GenerateRandomNumber + bl Random adds r4, r0, 0 - bl GenerateRandomNumber + bl Random lsls r4, 16 lsrs r4, 16 lsls r0, 16 @@ -24238,9 +24238,9 @@ _0816556C: lsls r0, 24 lsrs r0, 24 str r0, [sp, 0x4C] - bl GenerateRandomNumber + bl Random adds r4, r0, 0 - bl GenerateRandomNumber + bl Random lsls r4, 16 lsrs r4, 16 lsls r0, 16 @@ -25231,7 +25231,7 @@ sub_8165D40: @ 8165D40 cmp r0, 0x4 bne _08165D70 _08165D58: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x1E @@ -25420,9 +25420,9 @@ _08165EFE: bne _08165EEC movs r0, 0 mov r8, r0 - bl GenerateRandomNumber + bl Random adds r4, r0, 0 - bl GenerateRandomNumber + bl Random lsls r4, 16 lsrs r4, 16 lsls r0, 16 @@ -25431,7 +25431,7 @@ _08165EFE: b _08166092 .pool _08165F24: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 ldr r1, [sp, 0x24] @@ -33981,7 +33981,7 @@ sub_816AA80: @ 816AA80 lsrs r0, 16 mov r8, r0 ldr r0, =sub_805D714 - bl object_new_hidden_with_callback + bl CreateInvisibleSpriteWithCallback ldr r1, =gUnknown_03005D7C mov r9, r1 add r9, r6 diff --git a/asm/rom_816F318.s b/asm/rom_816F318.s index 36366b900..516d2673e 100644 --- a/asm/rom_816F318.s +++ b/asm/rom_816F318.s @@ -958,7 +958,7 @@ _0816FA6E: b _0816FAAA .pool _0816FA80: - bl GenerateRandomNumber + bl Random movs r1, 0x3 ands r1, r0 cmp r1, 0x1 @@ -1047,7 +1047,7 @@ _0816FB12: lsls r0, 24 lsrs r0, 24 movs r1, 0x8 - bl sine + bl Sin ldr r1, =gUnknown_0203BCCC ldrh r1, [r1] subs r0, r1 @@ -1611,14 +1611,14 @@ _0816FF9C: lsls r0, 24 lsrs r0, 24 movs r1, 0x8C - bl sine + bl Sin negs r0, r0 strh r0, [r4, 0x24] ldrh r0, [r4, 0x34] lsls r0, 24 lsrs r0, 24 movs r1, 0x78 - bl sine + bl Sin negs r0, r0 strh r0, [r4, 0x26] ldrh r0, [r4, 0x30] @@ -1659,13 +1659,13 @@ _0816FFFE: lsls r0, 24 lsrs r0, 24 movs r1, 0x22 - bl sine + bl Sin strh r0, [r4, 0x24] ldrh r0, [r4, 0x34] lsls r0, 24 lsrs r0, 24 movs r1, 0x3C - bl cosine + bl Cos negs r0, r0 strh r0, [r4, 0x26] ldrh r0, [r4, 0x30] @@ -2223,12 +2223,12 @@ sub_8170478: @ 8170478 lsls r6, 24 lsrs r6, 24 ldr r0, =DummyObjectCallback - bl object_new_hidden_with_callback + bl CreateInvisibleSpriteWithCallback lsls r0, 24 lsrs r0, 24 str r0, [sp, 0x14] ldr r0, =DummyObjectCallback - bl object_new_hidden_with_callback + bl CreateInvisibleSpriteWithCallback mov r10, r0 mov r2, r10 lsls r2, 24 @@ -2872,7 +2872,7 @@ _08170A9E: ldrb r2, [r4, 0xC] ldr r3, =0x00007f74 movs r1, 0x1 - bl pal_fade_1 + bl BlendPalette movs r3, 0xC ldrsh r0, [r4, r3] cmp r0, 0x10 @@ -2899,7 +2899,7 @@ _08170AD6: ldrb r2, [r4, 0xC] ldr r3, =0x00007f74 movs r1, 0x1 - bl pal_fade_1 + bl BlendPalette movs r3, 0xC ldrsh r0, [r4, r3] cmp r0, 0 @@ -3922,14 +3922,14 @@ sub_817138C: @ 817138C strh r1, [r4, 0x38] movs r0, 0 movs r1, 0x28 - bl cosine + bl Cos ldrh r1, [r4, 0x22] adds r0, r1 strh r0, [r4, 0x22] movs r0, 0x36 ldrsh r1, [r4, r0] movs r0, 0 - bl cosine + bl Cos negs r0, r0 strh r0, [r4, 0x26] ldr r0, =sub_81713D0 @@ -3959,7 +3959,7 @@ _081713E6: ldrsh r0, [r4, r1] movs r2, 0x36 ldrsh r1, [r4, r2] - bl cosine + bl Cos negs r0, r0 strh r0, [r4, 0x26] ldrh r1, [r4, 0x38] @@ -4018,7 +4018,7 @@ _0817145A: ldrsh r0, [r4, r2] movs r2, 0x36 ldrsh r1, [r4, r2] - bl cosine + bl Cos negs r0, r0 strh r0, [r4, 0x26] ldrh r1, [r4, 0x38] @@ -4042,7 +4042,7 @@ _08171486: strh r5, [r4, 0x34] movs r0, 0x40 movs r1, 0x28 - bl cosine + bl Cos ldrh r1, [r4, 0x22] adds r0, r1 strh r0, [r4, 0x22] @@ -5408,13 +5408,13 @@ sub_8171F88: @ 8171F88 ldrsh r0, [r4, r1] movs r2, 0x30 ldrsh r1, [r4, r2] - bl sine + bl Sin strh r0, [r4, 0x24] movs r1, 0x2E ldrsh r0, [r4, r1] movs r2, 0x30 ldrsh r1, [r4, r2] - bl cosine + bl Cos strh r0, [r4, 0x26] ldrh r0, [r4, 0x30] adds r0, 0x2 @@ -6053,13 +6053,13 @@ sub_8172508: @ 8172508 ldrsh r0, [r4, r1] movs r2, 0x30 ldrsh r1, [r4, r2] - bl sine + bl Sin strh r0, [r4, 0x24] movs r1, 0x2E ldrsh r0, [r4, r1] movs r2, 0x32 ldrsh r1, [r4, r2] - bl cosine + bl Cos strh r0, [r4, 0x26] ldrh r0, [r4, 0x36] ldrh r1, [r4, 0x2E] @@ -6212,19 +6212,19 @@ sub_817265C: @ 817265C ldrsh r0, [r5, r1] movs r2, 0x30 ldrsh r1, [r5, r2] - bl sine + bl Sin strh r0, [r5, 0x24] movs r0, 0x2E ldrsh r4, [r5, r0] movs r2, 0x32 ldrsh r1, [r5, r2] adds r0, r4, 0 - bl sine + bl Sin adds r1, r0, 0 lsls r1, 16 asrs r1, 16 adds r0, r4, 0 - bl cosine + bl Cos strh r0, [r5, 0x26] ldrh r0, [r5, 0x2E] adds r0, 0x6 @@ -6509,7 +6509,7 @@ sub_81728E0: @ 81728E0 ldrsh r0, [r5, r1] movs r2, 0x30 ldrsh r1, [r5, r2] - bl sine + bl Sin strh r0, [r5, 0x24] movs r0, 0x2E ldrsh r4, [r5, r0] @@ -6518,12 +6518,12 @@ sub_81728E0: @ 81728E0 ands r0, r1 movs r2, 0x32 ldrsh r1, [r5, r2] - bl sine + bl Sin adds r1, r0, 0 lsls r1, 16 asrs r1, 16 adds r0, r4, 0 - bl cosine + bl Cos strh r0, [r5, 0x26] ldrh r0, [r5, 0x2E] adds r0, 0xA @@ -6675,7 +6675,7 @@ sub_81729E8: @ 81729E8 ldrh r3, [r1] movs r1, 0x10 movs r2, 0 - bl pal_fade_1 + bl BlendPalette movs r0, 0x1 strh r0, [r5, 0xA] b _08172A7E @@ -6692,7 +6692,7 @@ _08172A58: ldrh r3, [r1] movs r1, 0x10 movs r2, 0x10 - bl pal_fade_1 + bl BlendPalette movs r0, 0x10 strh r0, [r5, 0x8] ldr r0, =0x0000ffff @@ -6750,7 +6750,7 @@ sub_8172AB0: @ 8172AB0 adds r1, r3 ldrh r3, [r1] movs r1, 0x10 - bl pal_fade_1 + bl BlendPalette ldrh r0, [r4, 0xA] ldrh r1, [r4, 0x8] adds r0, r1 @@ -6854,7 +6854,7 @@ sub_8172B90: @ 8172B90 adds r1, r3 ldrh r3, [r1] movs r1, 0x10 - bl pal_fade_1 + bl BlendPalette ldrh r0, [r4, 0xA] ldrh r1, [r4, 0x8] adds r0, r1 @@ -7594,12 +7594,12 @@ sub_81731FC: @ 81731FC movs r1, 0x30 ldrsh r0, [r4, r1] movs r1, 0x18 - bl sine + bl Sin strh r0, [r4, 0x24] movs r1, 0x30 ldrsh r0, [r4, r1] movs r1, 0x18 - bl cosine + bl Cos strh r0, [r4, 0x26] ldrh r0, [r4, 0x30] adds r0, 0xC @@ -11225,7 +11225,7 @@ _081751BA: ldrh r4, [r5, 0x2E] lsls r4, 24 lsrs r4, 24 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x3 @@ -11256,7 +11256,7 @@ _081751F2: thumb_func_start sub_81751FC sub_81751FC: @ 81751FC push {r4,lr} - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0xF0 @@ -11264,7 +11264,7 @@ sub_81751FC: @ 81751FC adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 - bl GenerateRandomNumber + bl Random adds r2, r0, 0 lsls r2, 16 lsrs r2, 16 @@ -11286,7 +11286,7 @@ sub_81751FC: @ 81751FC lsls r1, 2 ldr r0, =gUnknown_02020630 adds r4, r1, r0 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x11 @@ -11296,7 +11296,7 @@ sub_81751FC: @ 81751FC lsrs r1, 24 adds r0, r4, 0 bl StartObjectImageAnim - bl GenerateRandomNumber + bl Random movs r1, 0x3 ands r1, r0 cmp r1, 0 @@ -11395,7 +11395,7 @@ _08175324: adds r0, r1 strh r0, [r5, 0xE] ldrb r4, [r5, 0x1A] - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x3 @@ -11485,7 +11485,7 @@ _081753E0: lsls r0, 16 cmp r0, 0 bne _08175478 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0xF0 @@ -11493,7 +11493,7 @@ _081753E0: adds r5, r0, 0 lsls r5, 16 asrs r5, 16 - bl GenerateRandomNumber + bl Random adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -11502,7 +11502,7 @@ _081753E0: negs r4, r4 lsls r4, 16 asrs r4, 16 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x11 @@ -11526,7 +11526,7 @@ _081753E0: ldr r1, =sub_81752F4 adds r0, r4, 0 bl sub_8152438 - bl GenerateRandomNumber + bl Random movs r1, 0x3 ands r1, r0 cmp r1, 0 @@ -13244,7 +13244,7 @@ _08176348: movs r1, 0x7F ands r0, r1 movs r1, 0xC - bl sine + bl Sin ldr r1, =gUnknown_0203BD26 strh r0, [r1] b _08176390 @@ -13265,7 +13265,7 @@ _0817636C: movs r1, 0x7F ands r0, r1 movs r1, 0xC - bl sine + bl Sin strh r0, [r7] _08176390: ldrh r0, [r4, 0x12] @@ -13369,7 +13369,7 @@ _0817644E: movs r1, 0x7F ands r0, r1 movs r1, 0x14 - bl sine + bl Sin ldr r1, =gUnknown_0203BD26 strh r0, [r1] b _08176514 @@ -15331,7 +15331,7 @@ _0817744C: cmp r6, 0x46 bhi _081774AC _08177450: - bl GenerateRandomNumber + bl Random mov r2, r9 ldr r4, [r2] mov r1, r8 diff --git a/asm/rom_81795E8.s b/asm/rom_81795E8.s index 0c8408d34..297741afd 100644 --- a/asm/rom_81795E8.s +++ b/asm/rom_81795E8.s @@ -2092,7 +2092,7 @@ _0817A932: adds r1, r5, r2 movs r2, 0 ldrsh r1, [r1, r2] - bl sine + bl Sin ldr r2, =0x00001074 adds r1, r5, r2 strh r0, [r1] @@ -2102,7 +2102,7 @@ _0817A932: adds r1, r5, r2 movs r2, 0 ldrsh r1, [r1, r2] - bl cosine + bl Cos ldr r2, =0x00001076 adds r1, r5, r2 strh r0, [r1] @@ -2414,7 +2414,7 @@ _0817ABE2: adds r1, r2, r4 lsls r1, 16 asrs r1, 16 - bl sine + bl Sin lsls r5, 1 movs r2, 0x85 lsls r2, 4 @@ -2438,7 +2438,7 @@ _0817AC54: subs r1, r2, r4 lsls r1, 16 asrs r1, 16 - bl sine + bl Sin lsls r5, 1 movs r2, 0x85 lsls r2, 4 @@ -2455,7 +2455,7 @@ _0817AC54: _0817AC80: lsls r1, 16 asrs r1, 16 - bl cosine + bl Cos movs r3, 0xC5 lsls r3, 4 adds r1, r6, r3 diff --git a/asm/rom_817B064.s b/asm/rom_817B064.s index 1f22b8043..362d35c30 100644 --- a/asm/rom_817B064.s +++ b/asm/rom_817B064.s @@ -1132,7 +1132,7 @@ sub_817BA7C: @ 817BA7C lsrs r0, 24 movs r2, 0x38 ldrsh r1, [r4, r2] - bl sine + bl Sin lsls r0, 16 asrs r0, 16 cmp r0, 0 @@ -1146,7 +1146,7 @@ _0817BAB6: lsrs r0, 24 movs r2, 0x38 ldrsh r1, [r4, r2] - bl cosine + bl Cos strh r0, [r4, 0x24] ldrh r0, [r4, 0x3A] adds r0, 0x4 @@ -1277,7 +1277,7 @@ sub_817BB94: @ 817BB94 lsrs r0, 24 movs r2, 0x38 ldrsh r1, [r4, r2] - bl sine + bl Sin lsls r0, 16 asrs r0, 16 cmp r0, 0 @@ -1291,14 +1291,14 @@ _0817BBCC: lsrs r0, 24 movs r2, 0x38 ldrsh r1, [r4, r2] - bl cosine + bl Cos strh r0, [r4, 0x24] movs r1, 0x3C ldrsh r0, [r4, r1] lsls r0, 26 lsrs r0, 24 movs r1, 0x28 - bl sine + bl Sin adds r0, 0x8 strh r0, [r4, 0x38] ldrh r0, [r4, 0x3C] @@ -1378,14 +1378,14 @@ sub_817BC70: @ 817BC70 lsrs r0, 24 movs r2, 0x38 ldrsh r1, [r4, r2] - bl sine + bl Sin strh r0, [r4, 0x26] ldrh r0, [r4, 0x3A] lsls r0, 24 lsrs r0, 24 movs r2, 0x38 ldrsh r1, [r4, r2] - bl cosine + bl Cos strh r0, [r4, 0x24] ldrh r0, [r4, 0x38] ldrh r1, [r4, 0x34] @@ -1477,7 +1477,7 @@ _0817BD34: lsrs r0, 24 movs r5, 0x38 ldrsh r1, [r4, r5] - bl sine + bl Sin negs r0, r0 strh r0, [r4, 0x26] movs r0, 0x34 @@ -1581,7 +1581,7 @@ sub_817BDF0: @ 817BDF0 lsrs r4, r0, 24 cmp r4, 0x40 beq _0817BE60 - bl GenerateRandomNumber + bl Random ldr r6, =gUnknown_02020630 lsls r5, r4, 4 adds r5, r4 @@ -1596,7 +1596,7 @@ sub_817BDF0: @ 817BDF0 movs r0, 0 mov r8, r0 strh r1, [r4, 0x34] - bl GenerateRandomNumber + bl Random movs r1, 0x3F ands r1, r0 adds r1, 0x30 @@ -2079,7 +2079,7 @@ sub_817C1D4: @ 817C1D4 beq _0817C224 cmp r2, 0x31 bgt _0817C234 - bl GenerateRandomNumber + bl Random movs r1, 0x7 ands r0, r1 bl sub_817BDF0 @@ -2226,7 +2226,7 @@ sub_817C310: @ 817C310 beq _0817C360 cmp r2, 0x31 bgt _0817C370 - bl GenerateRandomNumber + bl Random movs r1, 0x7 ands r0, r1 bl sub_817BDF0 @@ -7925,24 +7925,24 @@ sub_817F3F0: @ 817F3F0 mov r8, r0 asrs r5, 16 adds r1, r5, 0 - bl cosine + bl Cos adds r6, r0, 0 lsls r4, 16 asrs r4, 16 mov r0, r8 adds r1, r4, 0 - bl sine + bl Sin subs r6, r0 lsls r6, 16 lsrs r6, 16 mov r0, r8 adds r1, r4, 0 - bl cosine + bl Cos adds r2, r0, 0 mov r0, r8 adds r1, r5, 0 str r2, [sp] - bl sine + bl Sin ldr r2, [sp] adds r2, r0 negs r5, r5 diff --git a/asm/rom_8184DA4.s b/asm/rom_8184DA4.s index ce764a145..999c83c0b 100644 --- a/asm/rom_8184DA4.s +++ b/asm/rom_8184DA4.s @@ -628,7 +628,7 @@ sub_81852B0: @ 81852B0 ldr r4, =0x00000f7c adds r0, r5, 0 adds r1, r4, 0 - bl sub_806F96C + bl CalcByteArraySum adds r4, r5, r4 ldr r1, [r4] cmp r0, r1 @@ -662,7 +662,7 @@ sub_81852F0: @ 81852F0 ldr r4, =0x00000f7c adds r0, r5, 0 adds r1, r4, 0 - bl sub_806F96C + bl CalcByteArraySum adds r4, r5, r4 str r0, [r4] movs r0, 0x1F @@ -6482,7 +6482,7 @@ sub_81885D8: @ 81885D8 lsrs r0, 16 mov r8, r0 ldr r0, =sub_805D714 - bl object_new_hidden_with_callback + bl CreateInvisibleSpriteWithCallback ldr r1, =gUnknown_03005D7C mov r10, r1 add r10, r6 @@ -12413,7 +12413,7 @@ sub_818BA6C: @ 818BA6C lsrs r0, 16 mov r8, r0 ldr r0, =sub_805D714 - bl object_new_hidden_with_callback + bl CreateInvisibleSpriteWithCallback ldr r1, =gUnknown_03005D7C mov r9, r1 add r9, r6 @@ -16239,7 +16239,7 @@ _0818DAA6: thumb_func_start sub_818DAAC sub_818DAAC: @ 818DAAC push {lr} - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x3 @@ -16308,7 +16308,7 @@ _0818DB14: thumb_func_start sub_818DB20 sub_818DB20: @ 818DB20 push {r4-r6,lr} - bl GenerateRandomNumber + bl Random ldr r5, =gUnknown_0203CD64 ldr r4, [r5] lsls r0, 16 @@ -16326,7 +16326,7 @@ sub_818DB20: @ 818DB20 adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 adds r1, r4, 0 @@ -16767,7 +16767,7 @@ sub_818DEF4: @ 818DEF4 thumb_func_start sub_818DF00 sub_818DF00: @ 818DF00 push {r4-r7,lr} - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r4, r0, 16 movs r0, 0xF @@ -17553,7 +17553,7 @@ sub_818E570: @ 818E570 bne _0818E5E4 adds r4, r7, 0 _0818E59E: - bl GenerateRandomNumber + bl Random ldr r2, [r4] lsls r0, 16 lsrs r0, 16 @@ -17614,7 +17614,7 @@ sub_818E604: @ 818E604 strb r1, [r0, 0x3] ldr r0, [r4] strb r1, [r0, 0xC] - bl GenerateRandomNumber + bl Random ldr r4, [r4] lsls r0, 16 lsrs r0, 16 @@ -20087,14 +20087,14 @@ sub_818FBDC: @ 818FBDC mov r0, r8 bl sub_818FC78 adds r5, r0, 0 - bl GenerateRandomNumber + bl Random adds r4, r0, 0 - bl GenerateRandomNumber + bl Random lsls r4, 16 lsrs r7, r4, 16 lsls r0, 16 orrs r7, r0 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0xA @@ -20159,7 +20159,7 @@ sub_818FC78: @ 818FC78 lsls r0, 16 lsrs r4, r0, 16 adds r5, r4, 0 - bl GenerateRandomNumber + bl Random movs r1, 0x1 ands r1, r0 cmp r1, 0 @@ -20463,7 +20463,7 @@ _0818FECE: ldr r4, =gUnknown_0832A328 _0818FEF0: str r3, [sp, 0x14] - bl GenerateRandomNumber + bl Random movs r1, 0x3 ands r1, r0 ldr r3, [sp, 0x14] @@ -20518,7 +20518,7 @@ _0818FF4E: bne _0818FF7A str r2, [sp, 0x10] str r3, [sp, 0x14] - bl GenerateRandomNumber + bl Random movs r1, 0x1 ands r1, r0 ldr r2, [sp, 0x10] @@ -28074,9 +28074,9 @@ _08193FE2: adds r3, r7 mov r8, r3 _08193FEE: - bl GenerateRandomNumber + bl Random adds r4, r0, 0 - bl GenerateRandomNumber + bl Random lsls r4, 16 lsrs r5, r4, 16 lsls r0, 16 @@ -29859,7 +29859,7 @@ _08194FCC: mov r0, r10 cmp r0, 0x4 bgt _08194FFC - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0xA @@ -29872,7 +29872,7 @@ _08194FFC: mov r1, r10 cmp r1, 0xE bgt _0819501A - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x14 @@ -29883,7 +29883,7 @@ _08194FFC: adds r4, 0xA b _08195030 _0819501A: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0xA @@ -30653,7 +30653,7 @@ _081955B0: mov r2, r10 cmp r2, 0x2 ble _081955A4 - bl GenerateRandomNumber + bl Random movs r1, 0x1F ands r1, r0 adds r5, r1 @@ -30758,7 +30758,7 @@ _08195682: mov r5, r10 cmp r5, 0x2 ble _08195668 - bl GenerateRandomNumber + bl Random movs r1, 0x1F ands r1, r0 ldr r0, [sp, 0x10] @@ -31315,7 +31315,7 @@ sub_8195BB0: @ 8195BB0 cmp r0, 0x31 bhi _08195C00 ldr r4, =gUnknown_020375F0 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x3 @@ -31346,7 +31346,7 @@ _08195C16: sub_8195C20: @ 8195C20 push {r4,lr} ldr r4, =gUnknown_02038BCA - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0xFF @@ -31484,7 +31484,7 @@ sub_8195D28: @ 8195D28 ldrh r0, [r2] cmp r0, 0x29 bls _08195D88 - bl GenerateRandomNumber + bl Random ldr r4, [r4] ldr r5, =gUnknown_0860DE84 lsls r0, 16 @@ -31500,7 +31500,7 @@ sub_8195D28: @ 8195D28 b _08195DA6 .pool _08195D88: - bl GenerateRandomNumber + bl Random ldr r4, [r4] ldr r5, =gUnknown_0860DE78 lsls r0, 16 @@ -31643,7 +31643,7 @@ sub_8195E8C: @ 8195E8C bne _08195EAE movs r5, 0x2 _08195EAE: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0xA @@ -31749,7 +31749,7 @@ sub_8195F68: @ 8195F68 adds r4, r0, 0 cmp r4, 0 beq _08195FB8 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 adds r1, r4, 0 @@ -32798,7 +32798,7 @@ _081967EC: bl sub_80B1E94 b _08196832 _0819680A: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x3 @@ -32897,7 +32897,7 @@ sub_8196890: @ 8196890 sub_81968BC: @ 81968BC push {r4,lr} adds r4, r0, 0 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x3 @@ -32939,7 +32939,7 @@ sub_8196910: @ 8196910 push {r4-r7,lr} sub sp, 0x4 adds r6, r0, 0 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x1 @@ -32965,7 +32965,7 @@ _08196940: ble _0819692C cmp r5, 0 beq _081969AC - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 adds r1, r5, 0 @@ -33157,7 +33157,7 @@ sub_8196A9C: @ 8196A9C thumb_func_start sub_8196AB8 sub_8196AB8: @ 8196AB8 push {lr} - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x64 @@ -33246,7 +33246,7 @@ _08196B4A: thumb_func_start sub_8196B50 sub_8196B50: @ 8196B50 push {lr} - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x64 @@ -33363,7 +33363,7 @@ _08196C02: _08196C26: cmp r6, 0 beq _08196C5C - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 adds r1, r6, 0 @@ -33413,7 +33413,7 @@ sub_8196C70: @ 8196C70 adds r0, 0x24 adds r0, r4, r0 ldr r6, [r0] - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 adds r4, r5 @@ -40673,7 +40673,7 @@ sub_819A44C: @ 819A44C strh r0, [r5, 0x2E] b _0819A4C2 _0819A484: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x5 @@ -50954,7 +50954,7 @@ sub_819FBC8: @ 819FBC8 adds r4, r2, 0 ldr r5, =gUnknown_08611548 _0819FBDA: - bl GenerateRandomNumber + bl Random ldr r2, [r4] lsls r0, 16 movs r1, 0xE0 @@ -50980,7 +50980,7 @@ _0819FBDA: _0819FC10: adds r4, r2, 0 _0819FC12: - bl GenerateRandomNumber + bl Random ldr r2, [r4] lsls r0, 16 lsrs r0, 16 @@ -51038,7 +51038,7 @@ _0819FC66: bls _0819FC66 movs r5, 0 _0819FC78: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0xA @@ -51046,7 +51046,7 @@ _0819FC78: adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0xA @@ -51109,7 +51109,7 @@ sub_819FCF8: @ 819FCF8 bne _0819FD4C ldr r6, =gUnknown_030062EC _0819FD06: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x3 @@ -51185,14 +51185,14 @@ _0819FD80: movs r5, 0 ldr r6, [sp, 0x14] _0819FD92: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x3 bl __umodsi3 lsls r0, 24 lsrs r4, r0, 24 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x3 @@ -51225,14 +51225,14 @@ _0819FDD0: bls _0819FDD0 movs r5, 0 _0819FDE6: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0xA bl __umodsi3 lsls r0, 24 lsrs r4, r0, 24 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0xA @@ -51341,7 +51341,7 @@ _0819FE60: ldr r0, =gUnknown_030062EC mov r9, r0 _0819FED2: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r4, r0, 16 movs r1, 0x3 @@ -51537,7 +51537,7 @@ _081A004C: movs r3, 0 str r3, [sp, 0x4] _081A0052: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x1 @@ -51551,7 +51551,7 @@ _081A0068: ldr r1, =0x000001ff mov r8, r1 _081A006C: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x3A @@ -51612,7 +51612,7 @@ _081A00EA: lsls r0, r4, 24 mov r9, r0 _081A00F6: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 adds r1, r4, 0 @@ -60735,9 +60735,9 @@ _081A4E70: lsls r0, 2 mov r8, r0 _081A4E96: - bl GenerateRandomNumber + bl Random adds r4, r0, 0 - bl GenerateRandomNumber + bl Random lsls r4, 16 lsrs r7, r4, 16 lsls r0, 16 @@ -62190,7 +62190,7 @@ sub_81A5B08: @ 81A5B08 ldrh r0, [r1] cmp r0, 0x29 bls _081A5B58 - bl GenerateRandomNumber + bl Random ldr r4, [r4] ldr r5, =gUnknown_08611FAC lsls r0, 16 @@ -62206,7 +62206,7 @@ sub_81A5B08: @ 81A5B08 b _081A5B76 .pool _081A5B58: - bl GenerateRandomNumber + bl Random ldr r4, [r4] ldr r5, =gUnknown_08611FA0 lsls r0, 16 @@ -64612,7 +64612,7 @@ _081A6F38: adds r0, 0x1 lsls r0, 16 lsrs r5, r0, 16 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 adds r1, r5, 0 @@ -65273,7 +65273,7 @@ sub_81A74CC: @ 81A74CC thumb_func_start sub_81A74E0 sub_81A74E0: @ 81A74E0 push {r4,lr} - bl GenerateRandomNumber + bl Random adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -65586,14 +65586,14 @@ _081A7736: movs r4, 0 mov r8, r4 _081A774A: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x3 bl __umodsi3 lsls r0, 24 lsrs r6, r0, 24 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x3 @@ -65636,7 +65636,7 @@ _081A77A8: _081A77AE: movs r4, 0 mov r9, r4 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x64 @@ -65751,7 +65751,7 @@ _081A7898: b _081A78D4 .pool _081A78A4: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r1, r0, 16 movs r2, 0x1 @@ -66077,7 +66077,7 @@ _081A7B1C: lsrs r2, r0, 24 cmp r2, 0x7 bls _081A7B06 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 adds r1, r4, 0 @@ -66103,7 +66103,7 @@ _081A7B48: sub_81A7B58: @ 81A7B58 push {r4,lr} ldr r4, =gUnknown_03001294 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x19 @@ -66255,7 +66255,7 @@ _081A7C4A: mov r7, r9 cmp r0, 0 beq _081A7CA8 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x1 @@ -66625,7 +66625,7 @@ _081A7F54: bls _081A7F54 movs r5, 0 _081A7F6C: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x3 @@ -66633,7 +66633,7 @@ _081A7F6C: lsls r0, 24 lsrs r0, 24 mov r8, r0 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x3 @@ -66822,7 +66822,7 @@ sub_81A80DC: @ 81A80DC beq _081A8138 movs r0, 0x1 strh r0, [r4] - bl GenerateRandomNumber + bl Random ldr r5, =gSaveBlock2Ptr ldr r4, [r5] lsls r0, 16 @@ -66850,7 +66850,7 @@ sub_81A80DC: @ 81A80DC b _081A8248 .pool _081A8138: - bl GenerateRandomNumber + bl Random ldr r7, =gSaveBlock2Ptr ldr r4, [r7] lsls r0, 16 @@ -66918,7 +66918,7 @@ _081A81B4: cmp r2, r6 bcc _081A8184 _081A81BE: - bl GenerateRandomNumber + bl Random ldr r7, =gSaveBlock2Ptr ldr r4, [r7] lsls r0, 16 @@ -67772,7 +67772,7 @@ _081A88D6: subs r0, 0x5 cmp r5, r0 bgt _081A8904 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x1 @@ -68851,7 +68851,7 @@ sub_81A917C: @ 81A917C ldrh r0, [r1] cmp r0, 0x29 bls _081A91CC - bl GenerateRandomNumber + bl Random ldr r4, [r4] ldr r5, =gUnknown_08613F34 lsls r0, 16 @@ -68867,7 +68867,7 @@ sub_81A917C: @ 81A917C b _081A91EA .pool _081A91CC: - bl GenerateRandomNumber + bl Random ldr r4, [r4] ldr r5, =gUnknown_08613F28 lsls r0, 16 @@ -68934,7 +68934,7 @@ sub_81A9254: @ 81A9254 movs r4, 0 ldr r5, =gSaveBlock2Ptr _081A925A: - bl GenerateRandomNumber + bl Random ldr r1, [r5] lsls r2, r4, 1 ldr r3, =0x00000e22 @@ -69024,7 +69024,7 @@ _081A92DE: cmp r5, r4 bge _081A9332 _081A9318: - bl GenerateRandomNumber2 + bl Random2 lsls r0, 16 lsrs r0, 16 movs r1, 0x64 @@ -70165,7 +70165,7 @@ _081A9C56: adds r0, r6 ldrb r0, [r0, 0x2] subs r5, r0 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0xB @@ -70177,7 +70177,7 @@ _081A9C56: b _081A9CF6 .pool _081A9CD4: - bl GenerateRandomNumber + bl Random ldr r2, [sp, 0x10] lsls r1, r2, 1 adds r1, r2 @@ -70299,7 +70299,7 @@ _081A9DA4: ldrh r0, [r0] cmp r0, 0x8B bls _081A9E0C - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x11 @@ -71988,7 +71988,7 @@ CalculateBattlePyramidPickupItemId: @ 81AAAE0 ble _081AAB0A movs r4, 0x13 _081AAB0A: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x64 @@ -100196,7 +100196,7 @@ sub_81B9A44: @ 81B9A44 sub_81B9A60: @ 81B9A60 push {r4,lr} ldr r4, =gUnknown_02038BCA - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0xFF @@ -100271,7 +100271,7 @@ sub_81B9B00: @ 81B9B00 ldr r0, =gSaveBlock2Ptr ldr r4, [r0] ldr r5, =gUnknown_086160D4 - bl GenerateRandomNumber + bl Random ldrh r0, [r5] ldr r1, =0x00000e6a adds r4, r1 @@ -100432,7 +100432,7 @@ sub_81B9C70: @ 81B9C70 ldr r0, =gSaveBlock2Ptr ldr r4, [r0] ldr r5, =gUnknown_086160F4 - bl GenerateRandomNumber + bl Random ldrh r0, [r5] ldr r1, =0x00000e6c adds r4, r1 @@ -100605,7 +100605,7 @@ sub_81B9DF8: @ 81B9DF8 ldr r0, =gSaveBlock2Ptr ldr r4, [r0] ldr r5, =gUnknown_08616120 - bl GenerateRandomNumber + bl Random ldrh r0, [r5] ldr r1, =0x00000e6e adds r4, r1 @@ -100748,7 +100748,7 @@ _081B9EEC: add r6, r9 str r6, [sp, 0x28] _081B9F1E: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x46 @@ -100909,7 +100909,7 @@ _081BA062: mov r2, r10 lsls r6, r2, 1 _081BA066: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x1E @@ -101004,7 +101004,7 @@ _081BA12A: ldr r7, =gUnknown_03001298 mov r8, sp _081BA13E: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 mov r1, r10 diff --git a/asm/rom_81BAD84.s b/asm/rom_81BAD84.s index e463fb30e..8b43f7252 100644 --- a/asm/rom_81BAD84.s +++ b/asm/rom_81BAD84.s @@ -3958,7 +3958,7 @@ sub_81BD0E4: @ 81BD0E4 lsrs r0, 16 mov r8, r0 ldr r0, =sub_805D714 - bl object_new_hidden_with_callback + bl CreateInvisibleSpriteWithCallback ldr r1, =gUnknown_03005D7C mov r9, r1 add r9, r6 @@ -6551,7 +6551,7 @@ sub_81BE79C: @ 81BE79C b _081BE7EE .pool _081BE7B8: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r4, r0, 16 movs r0, 0x1 @@ -7324,7 +7324,7 @@ _081BEDFA: ldr r7, =gUnknown_0203CF10 adds r6, r2, 0 _081BEE14: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x30 @@ -7332,7 +7332,7 @@ _081BEE14: adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x30 @@ -7720,10 +7720,10 @@ _081BF170: ldr r0, =0x000001ff mov r8, r0 _081BF178: - bl GenerateRandomNumber + bl Random adds r4, r6, 0 ands r4, r0 - bl GenerateRandomNumber + bl Random adds r1, r6, 0 ands r1, r0 ldr r0, =gUnknown_0203CF0C @@ -47914,7 +47914,7 @@ sub_81D38FC: @ 81D38FC movs r5, 0x9C lsls r5, 2 adds r1, r5, 0 - bl sub_806F96C + bl CalcByteArraySum adds r4, r5 ldr r1, [r4] cmp r0, r1 @@ -47959,7 +47959,7 @@ _081D394C: movs r1, 0x9D lsls r1, 2 muls r1, r6 - bl sub_806F96C + bl CalcByteArraySum ldr r1, [r7, 0x4] cmp r0, r1 bne _081D3964 @@ -47985,7 +47985,7 @@ sub_81D396C: @ 81D396C adds r0, 0x8 movs r1, 0xEE lsls r1, 4 - bl sub_806F96C + bl CalcByteArraySum ldr r1, [r4, 0x4] cmp r0, r1 bne _081D398E @@ -48119,7 +48119,7 @@ _081D3A7E: adds r0, 0x8 movs r1, 0xEE lsls r1, 4 - bl sub_806F96C + bl CalcByteArraySum mov r2, r8 str r0, [r2, 0x4] movs r0, 0x1E @@ -57684,7 +57684,7 @@ sub_81D8AD8: @ 81D8AD8 ands r0, r1 cmp r0, 0 bne _081D8B1C - bl GenerateRandomNumber + bl Random movs r4, 0x7 adds r1, r4, 0 ands r1, r0 @@ -57693,7 +57693,7 @@ sub_81D8AD8: @ 81D8AD8 movs r0, 0x1 movs r2, 0 bl ChangeBgX - bl GenerateRandomNumber + bl Random ands r4, r0 subs r4, 0x4 lsls r4, 8 @@ -60905,7 +60905,7 @@ sub_81DA57C: @ 81DA57C lsls r0, 24 cmp r0, 0 beq _081DA5CA - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x64 @@ -61009,7 +61009,7 @@ _081DA64C: _081DA654: cmp r6, 0 beq _081DA6BA - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 adds r1, r6, 0 @@ -61444,7 +61444,7 @@ sub_81DA9BC: @ 81DA9BC push {r4,lr} adds r4, r0, 0 ldrh r0, [r4, 0x32] - bl sine2 + bl Sin2 lsls r0, 16 asrs r0, 16 movs r2, 0x36 @@ -61453,7 +61453,7 @@ sub_81DA9BC: @ 81DA9BC asrs r0, 12 strh r0, [r4, 0x24] ldrh r0, [r4, 0x32] - bl cosine2 + bl Cos2 lsls r0, 16 asrs r0, 16 movs r3, 0x36 diff --git a/asm/roulette.s b/asm/roulette.s index 369ed9221..56370f750 100644 --- a/asm/roulette.s +++ b/asm/roulette.s @@ -649,12 +649,12 @@ _0814085A: adds r4, r6, 0 ldr r0, [r4] ldrh r0, [r0, 0x24] - bl sine2 + bl Sin2 lsls r0, 16 lsrs r5, r0, 16 ldr r0, [r4] ldrh r0, [r0, 0x24] - bl cosine2 + bl Cos2 lsls r0, 16 lsrs r1, r0, 16 lsls r0, r5, 16 @@ -1981,7 +1981,7 @@ sub_8141344: @ 8141344 mov r0, sp movs r2, 0x8 bl memcpy - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r7, r0, 16 adds r0, r7, 0 @@ -5640,11 +5640,11 @@ sub_8143280: @ 8143280 lsrs r4, r0, 16 _081432A2: adds r0, r4, 0 - bl sine2 + bl Sin2 lsls r0, 16 lsrs r5, r0, 16 adds r0, r4, 0 - bl cosine2 + bl Cos2 lsls r2, r5, 16 asrs r2, 16 movs r3, 0x30 @@ -6790,12 +6790,12 @@ _08143BEA: bl __fixsfsi strh r0, [r7, 0x36] ldrh r0, [r7, 0x34] - bl sine2 + bl Sin2 adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 ldrh r0, [r7, 0x34] - bl cosine2 + bl Cos2 lsls r4, 16 asrs r4, 16 movs r2, 0x36 @@ -6856,12 +6856,12 @@ sub_8143C90: @ 8143C90 strh r0, [r5, 0x34] _08143CAE: ldrh r0, [r5, 0x34] - bl sine2 + bl Sin2 adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 ldrh r0, [r5, 0x34] - bl cosine2 + bl Cos2 lsls r4, 16 asrs r4, 16 movs r2, 0x36 @@ -7591,7 +7591,7 @@ sub_8144264: @ 8144264 _081442FC: movs r0, 0x38 bl m4aSongNumStart - bl GenerateRandomNumber + bl Random movs r1, 0x1 mov r8, r1 ands r1, r0 @@ -8438,7 +8438,7 @@ sub_8144A24: @ 8144A24 movs r1, 0 movs r2, 0xA bl memset - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 str r0, [sp, 0x10] diff --git a/asm/roulette_util.s b/asm/roulette_util.s index 10f420997..b14dd9902 100644 --- a/asm/roulette_util.s +++ b/asm/roulette_util.s @@ -1164,7 +1164,7 @@ _08151EB8: lsls r2, 28 lsrs r2, 28 ldrh r3, [r4, 0x4] - bl pal_fade_1 + bl BlendPalette ldrb r5, [r4, 0xB] lsls r0, r5, 26 asrs r0, 30 diff --git a/asm/scrcmd.s b/asm/scrcmd.s index 64e5c8684..b0dfcf1e2 100644 --- a/asm/scrcmd.s +++ b/asm/scrcmd.s @@ -936,7 +936,7 @@ s8F_get_random_val: @ 809996C lsls r4, 16 lsrs r4, 16 ldr r5, =gUnknown_020375F0 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 adds r1, r4, 0 diff --git a/asm/script.s b/asm/script.s index a898942b0..be0a0ff8c 100644 --- a/asm/script.s +++ b/asm/script.s @@ -631,7 +631,7 @@ sub_80990AC: @ 80990AC adds r0, r1 movs r1, 0xFA lsls r1, 2 - bl sub_806F928 + bl CalcCRC16WithTable lsls r0, 16 lsrs r0, 16 pop {r1} diff --git a/asm/script_pokemon_util_80F87D8.s b/asm/script_pokemon_util_80F87D8.s index d7dced430..7f0e21a66 100644 --- a/asm/script_pokemon_util_80F87D8.s +++ b/asm/script_pokemon_util_80F87D8.s @@ -992,7 +992,7 @@ sub_80F8FE8: @ 80F8FE8 .pool _080F9020: ldr r4, =gUnknown_020375F0 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 _080F902A: diff --git a/asm/slot_machine.s b/asm/slot_machine.s index 9f5946b2a..76020684f 100644 --- a/asm/slot_machine.s +++ b/asm/slot_machine.s @@ -252,7 +252,7 @@ sub_812A6D4: @ 812A6D4 strh r4, [r0, 0x8] adds r0, 0xA adds r1, r5, 0 - bl sub_806F67C + bl StoreWordInTwoHalfwords pop {r4,r5} pop {r0} bx r0 @@ -279,7 +279,7 @@ sub_812A710: @ 812A710 ldr r1, [r3] adds r1, 0x64 adds r0, r2, 0 - bl sub_806F684 + bl LoadWordFromTwoHalfwords pop {r0} bx r0 .pool @@ -467,7 +467,7 @@ sub_812A8C4: @ 812A8C4 strb r4, [r0] ldr r0, [r5] strb r4, [r0, 0x2] - bl GenerateRandomNumber + bl Random ldr r2, [r5] movs r1, 0x1 ands r1, r0 @@ -2019,7 +2019,7 @@ _0812B5AA: thumb_func_start sub_812B5B0 sub_812B5B0: @ 812B5B0 push {r4,lr} - bl GenerateRandomNumber + bl Random lsls r0, 24 lsrs r0, 24 ldr r4, =gUnknown_085A76C0 @@ -2053,7 +2053,7 @@ sub_812B5EC: @ 812B5EC movs r5, 0 ldr r6, =gUnknown_085A76D2 _0812B5F2: - bl GenerateRandomNumber + bl Random movs r2, 0xFF ldr r1, =gUnknown_0203AB34 ldr r3, [r1] @@ -2095,7 +2095,7 @@ sub_812B634: @ 812B634 movs r7, 0x80 lsls r7, 17 _0812B644: - bl GenerateRandomNumber + bl Random movs r5, 0xFF ands r5, r0 ldr r0, =gUnknown_0203AB34 @@ -2194,7 +2194,7 @@ sub_812B700: @ 812B700 ldr r1, [r0] movs r0, 0 strb r0, [r1, 0x5] - bl GenerateRandomNumber + bl Random lsls r0, 24 lsrs r4, r0, 24 movs r0, 0 @@ -2215,7 +2215,7 @@ _0812B72E: asrs r5, r0, 16 cmp r5, 0 ble _0812B74E - bl GenerateRandomNumber + bl Random lsls r0, 24 lsrs r4, r0, 24 lsls r0, r6, 24 @@ -2242,7 +2242,7 @@ sub_812B760: @ 812B760 adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 - bl GenerateRandomNumber + bl Random movs r1, 0xFF ands r1, r0 ldr r0, =gUnknown_085A77CE @@ -2291,7 +2291,7 @@ _0812B7BC: ble _0812B7C2 movs r4, 0x1 _0812B7C2: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x64 @@ -2308,7 +2308,7 @@ _0812B7C2: b _0812B822 .pool _0812B7E8: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x64 @@ -9139,12 +9139,12 @@ sub_812ED20: @ 812ED20 movs r1, 0x2E ldrsh r0, [r5, r1] movs r1, 0x14 - bl cosine + bl Cos strh r0, [r5, 0x24] movs r2, 0x2E ldrsh r0, [r5, r2] movs r1, 0x6 - bl sine + bl Sin strh r0, [r5, 0x26] adds r1, r5, 0 adds r1, 0x43 @@ -10330,7 +10330,7 @@ _0812F602: ldrsh r0, [r0, r2] movs r2, 0x30 ldrsh r1, [r4, r2] - bl cosine + bl Cos strh r0, [r4, 0x24] movs r1, 0x3A ldrsh r0, [r4, r1] @@ -10340,7 +10340,7 @@ _0812F602: ldrsh r0, [r0, r2] movs r2, 0x30 ldrsh r1, [r4, r2] - bl sine + bl Sin strh r0, [r4, 0x26] ldrh r1, [r4, 0x30] movs r2, 0x30 diff --git a/asm/starter_choose.s b/asm/starter_choose.s index abc4bca71..cff1dd438 100644 --- a/asm/starter_choose.s +++ b/asm/starter_choose.s @@ -898,7 +898,7 @@ sub_81346DC: @ 81346DC movs r1, 0x30 ldrsh r0, [r4, r1] movs r1, 0x8 - bl sine + bl Sin strh r0, [r4, 0x26] ldrh r0, [r4, 0x30] lsls r0, 24 diff --git a/asm/title_screen.s b/asm/title_screen.s index ef95185b6..bbeb2e2b1 100644 --- a/asm/title_screen.s +++ b/asm/title_screen.s @@ -1280,7 +1280,7 @@ title_screen_update_rayquaza_ring_palette: @ 80AAF48 bne _080AAF9C adds r0, r1, 0 movs r1, 0x80 - bl cosine + bl Cos lsls r0, 16 asrs r0, 16 adds r2, r0, 0 diff --git a/asm/trade.s b/asm/trade.s index 07f16d8e3..a3d37e494 100644 --- a/asm/trade.s +++ b/asm/trade.s @@ -6872,7 +6872,7 @@ sub_807AB28: @ 807AB28 ldrh r0, [r0] str r0, [sp, 0xC] add r0, sp, 0x10 - bl sub_806F6C0 + bl DoBgAffineSet add r0, sp, 0x10 ldrh r1, [r0] movs r0, 0x20 @@ -13934,7 +13934,7 @@ _0807EEAC: lsls r0, 24 cmp r0, 0 bne _0807EED4 - bl GenerateRandomNumber + bl Random ldr r4, [r4] lsls r0, 16 lsrs r0, 16 @@ -14755,7 +14755,7 @@ _0807F5E0: lsls r0, 24 cmp r0, 0 bne _0807F608 - bl GenerateRandomNumber + bl Random ldr r4, [r4] lsls r0, 16 lsrs r0, 16 diff --git a/asm/trainer_see.s b/asm/trainer_see.s index 3efae71aa..71941b44f 100644 --- a/asm/trainer_see.s +++ b/asm/trainer_see.s @@ -1175,7 +1175,7 @@ sub_80B44C8: @ 80B44C8 adds r0, r4, 0 adds r0, 0xA mov r1, sp - bl sub_806F684 + bl LoadWordFromTwoHalfwords movs r1, 0x16 ldrsh r0, [r4, r1] cmp r0, 0 @@ -1259,7 +1259,7 @@ sub_80B4578: @ 80B4578 adds r0, r1 adds r0, 0x2 adds r1, r4, 0 - bl sub_806F67C + bl StoreWordInTwoHalfwords pop {r4} pop {r0} bx r0 diff --git a/asm/trig.s b/asm/trig.s index b20fa3fb2..2eb9c4e88 100644 --- a/asm/trig.s +++ b/asm/trig.s @@ -5,9 +5,9 @@ .text - thumb_func_start sine + thumb_func_start Sin @ s16 sine(s16 t, s16 amplitude) -sine: @ 806F534 +Sin: @ 806F534 lsls r1, 16 asrs r1, 16 ldr r2, =gUnknown_08329F40 @@ -21,11 +21,11 @@ sine: @ 806F534 asrs r0, 16 bx lr .pool - thumb_func_end sine + thumb_func_end Sin - thumb_func_start cosine + thumb_func_start Cos @ s16 cosine(s16 t, s16 amplitude) -cosine: @ 806F550 +Cos: @ 806F550 lsls r1, 16 asrs r1, 16 ldr r2, =gUnknown_08329F40 @@ -40,11 +40,11 @@ cosine: @ 806F550 asrs r0, 16 bx lr .pool - thumb_func_end cosine + thumb_func_end Cos - thumb_func_start sine2 + thumb_func_start Sin2 @ s16 sine2(u16 angle) -sine2: @ 806F570 +Sin2: @ 806F570 push {r4,r5,lr} adds r5, r0, 0 lsls r5, 16 @@ -77,22 +77,22 @@ _0806F5AC: pop {r4,r5} pop {r1} bx r1 - thumb_func_end sine2 + thumb_func_end Sin2 - thumb_func_start cosine2 + thumb_func_start Cos2 @ s16 cosine2(u16 angle) -cosine2: @ 806F5B4 +Cos2: @ 806F5B4 push {lr} lsls r0, 16 movs r1, 0xB4 lsls r1, 15 adds r0, r1 lsrs r0, 16 - bl sine2 + bl Sin2 lsls r0, 16 asrs r0, 16 pop {r1} bx r1 - thumb_func_end cosine2 + thumb_func_end Cos2 .align 2, 0 @ Don't pad with nop. diff --git a/asm/tv.s b/asm/tv.s index ca3784449..47910d966 100644 --- a/asm/tv.s +++ b/asm/tv.s @@ -81,7 +81,7 @@ _080EBF54: cmp r0, 0 bne _080EBF54 _080EBF70: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 adds r1, r4, 0 @@ -2413,13 +2413,13 @@ sub_80ED320: @ 80ED320 movs r2, 0 bl pokemon_getattr strh r0, [r4, 0x2] - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x3 bl __umodsi3 strb r0, [r4, 0x1A] - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 ands r0, r5 @@ -2827,7 +2827,7 @@ _080ED72E: negs r1, r1 cmp r0, r1 beq _080ED7E4 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x5 @@ -3736,14 +3736,14 @@ _080EDF34: ldr r0, =gUnknown_030060D0 mov r9, r0 _080EDF42: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 adds r1, r5, 0 bl __modsi3 lsls r0, 24 lsrs r4, r0, 24 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 adds r1, r5, 0 @@ -3888,7 +3888,7 @@ _080EE058: lsls r0, 24 lsrs r5, r0, 24 _080EE074: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 adds r1, r5, 0 @@ -3931,7 +3931,7 @@ _080EE0BE: bl __divsi3 mov r1, r10 strb r0, [r1, 0x2] - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 mov r1, r9 @@ -5439,7 +5439,7 @@ sub_80EED88: @ 80EED88 lsrs r0, 24 cmp r0, 0x1 beq _080EEE0C - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x3 @@ -6956,7 +6956,7 @@ sub_80EFA24: @ 80EFA24 push {r4-r6,lr} lsls r0, 16 lsrs r5, r0, 16 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 ldr r1, =0x0000019b @@ -7103,7 +7103,7 @@ sub_80EFB38: @ 80EFB38 adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 cmp r0, r4 @@ -7122,7 +7122,7 @@ _080EFB52: sub_80EFB58: @ 80EFB58 push {r4-r6,lr} adds r4, r0, 0 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x6 @@ -7870,7 +7870,7 @@ _080F0158: b _080F01A8 .pool _080F016C: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x1 @@ -11049,7 +11049,7 @@ _080F1CC8: movs r0, 0x2 bl sub_80EF340 ldr r4, =gUnknown_0203A030 - bl GenerateRandomNumber + bl Random ldrb r2, [r4] adds r2, 0x1 lsls r0, 16 @@ -11655,7 +11655,7 @@ _080F22A0: ldrb r2, [r5, 0x3] bl sub_81DB5E8 ldr r4, =gUnknown_0203A030 - bl GenerateRandomNumber + bl Random ldrb r2, [r4] adds r2, 0x1 lsls r0, 16 @@ -11809,7 +11809,7 @@ _080F245C: ldrb r1, [r4, 0x10] movs r0, 0x1 bl sub_80EF340 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x3 @@ -11955,7 +11955,7 @@ _080F25F4: b _080F26F0 .pool _080F2628: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x3 @@ -11979,7 +11979,7 @@ _080F2654: strb r0, [r6] b _080F26F0 _080F265A: - bl GenerateRandomNumber + bl Random ldrb r4, [r6] adds r4, 0x1 lsls r0, 16 @@ -11998,7 +11998,7 @@ _080F2672: b _080F26F0 .pool _080F2684: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x1F @@ -12148,7 +12148,7 @@ _080F2820: b _080F288C .pool _080F2844: - bl GenerateRandomNumber + bl Random ldrb r4, [r7] adds r4, 0x1 lsls r0, 16 @@ -16423,7 +16423,7 @@ _080F52F0: _080F5328: movs r0, 0x1 strb r0, [r5, 0x12] - bl GenerateRandomNumber + bl Random ldr r4, =gUnknown_0203A031 lsls r0, 16 lsrs r0, 16 @@ -16465,7 +16465,7 @@ _080F5384: movs r1, 0 b _080F542C _080F538A: - bl GenerateRandomNumber + bl Random ldr r7, =gUnknown_0203A031 lsls r0, 16 lsrs r0, 16 @@ -16513,7 +16513,7 @@ _080F53F0: ldr r2, =0x0000fffe mov r8, r2 _080F53F8: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 adds r1, r6, 0 diff --git a/asm/wallclock.s b/asm/wallclock.s index 7065194ed..af331dcce 100644 --- a/asm/wallclock.s +++ b/asm/wallclock.s @@ -1197,7 +1197,7 @@ sub_81351AC: @ 81351AC ldrh r4, [r0, 0x8] adds r7, r4, 0 adds r0, r4, 0 - bl sine2 + bl Sin2 lsls r0, 16 asrs r0, 16 cmp r0, 0 @@ -1207,7 +1207,7 @@ _081351D4: lsls r0, 12 lsrs r5, r0, 16 adds r0, r4, 0 - bl cosine2 + bl Cos2 lsls r0, 16 asrs r0, 16 cmp r0, 0 @@ -1275,7 +1275,7 @@ sub_8135244: @ 8135244 ldrh r4, [r0, 0xA] adds r7, r4, 0 adds r0, r4, 0 - bl sine2 + bl Sin2 lsls r0, 16 asrs r0, 16 cmp r0, 0 @@ -1285,7 +1285,7 @@ _0813526C: lsls r0, 12 lsrs r5, r0, 16 adds r0, r4, 0 - bl cosine2 + bl Cos2 lsls r0, 16 asrs r0, 16 cmp r0, 0 @@ -1392,7 +1392,7 @@ _0813533A: strh r0, [r4, 0x30] _0813533C: ldrh r0, [r4, 0x30] - bl cosine2 + bl Cos2 lsls r0, 16 asrs r0, 16 lsls r1, r0, 4 @@ -1406,7 +1406,7 @@ _08135354: asrs r0, 12 strh r0, [r4, 0x24] ldrh r0, [r4, 0x30] - bl sine2 + bl Sin2 lsls r0, 16 asrs r0, 16 lsls r1, r0, 4 @@ -1479,7 +1479,7 @@ _081353DE: strh r0, [r4, 0x30] _081353E0: ldrh r0, [r4, 0x30] - bl cosine2 + bl Cos2 lsls r0, 16 asrs r0, 16 lsls r1, r0, 4 @@ -1493,7 +1493,7 @@ _081353F8: asrs r0, 12 strh r0, [r4, 0x24] ldrh r0, [r4, 0x30] - bl sine2 + bl Sin2 lsls r0, 16 asrs r0, 16 lsls r1, r0, 4 diff --git a/asm/weather.s b/asm/weather.s index 9602e3af8..f8966a5e5 100644 --- a/asm/weather.s +++ b/asm/weather.s @@ -1099,7 +1099,7 @@ _080AB8A0: adds r0, r6, 0 movs r1, 0x10 mov r2, r8 - bl pal_fade_1 + bl BlendPalette adds r0, r6, 0 adds r0, 0x10 lsls r0, 16 @@ -1249,7 +1249,7 @@ _080AB9C8: adds r0, r5, 0 movs r1, 0x10 adds r2, r6, 0 - bl pal_fade_1 + bl BlendPalette adds r0, r5, 0 adds r0, 0x10 lsls r0, 16 @@ -1371,7 +1371,7 @@ sub_80ABAB0: @ 80ABAB0 lsls r1, 1 movs r0, 0 adds r2, r7, 0 - bl pal_fade_1 + bl BlendPalette ldr r0, [sp] lsls r1, r0, 27 lsrs r1, 27 @@ -1476,7 +1476,7 @@ _080ABB9C: ldrh r3, [r1] movs r1, 0x10 adds r2, r7, 0 - bl pal_fade_1 + bl BlendPalette adds r4, 0x1 mov r9, r4 _080ABBB0: @@ -1866,7 +1866,7 @@ _080ABEAC: lsrs r3, 17 adds r0, r4, 0 movs r1, 0x10 - bl pal_fade_1 + bl BlendPalette b _080ABEF4 .pool _080ABEE4: @@ -1876,7 +1876,7 @@ _080ABEE4: adds r0, r4, 0 movs r1, 0x10 movs r2, 0xC - bl pal_fade_1 + bl BlendPalette _080ABEF4: pop {r4-r6} pop {r0} @@ -4221,7 +4221,7 @@ _080AD200: sub_80AD204: @ 80AD204 push {r4-r7,lr} adds r5, r0, 0 - bl GenerateRandomNumber + bl Random movs r1, 0x36 ldrsh r2, [r5, r1] lsls r1, r2, 2 @@ -4267,7 +4267,7 @@ sub_80AD204: @ 80AD204 lsls r0, 7 strh r0, [r5, 0x2E] strh r7, [r5, 0x24] - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 adds r6, r0, 0 @@ -4742,7 +4742,7 @@ _080AD680: adds r1, r4, r2 movs r0, 0x1 strb r0, [r1] - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r5, 0xB4 @@ -4784,7 +4784,7 @@ _080AD6E0: adds r0, r4, r1 movs r5, 0x1 strb r5, [r0] - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 ands r0, r5 @@ -4794,7 +4794,7 @@ _080AD6E0: b _080AD768 .pool _080AD70C: - bl GenerateRandomNumber + bl Random ldr r1, =gUnknown_0854C14C ldr r2, [r1] movs r1, 0x1 @@ -4826,7 +4826,7 @@ _080AD72A: movs r0, 0x14 bl sub_80AD9BC _080AD74E: - bl GenerateRandomNumber + bl Random ldr r1, =gUnknown_0854C14C ldr r4, [r1] lsls r0, 16 @@ -4872,7 +4872,7 @@ _080AD79E: lsls r0, 24 cmp r0, 0 beq _080AD7E8 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0xF @@ -4917,7 +4917,7 @@ _080AD80C: b _080AD8F8 .pool _080AD834: - bl GenerateRandomNumber + bl Random ldr r1, =gUnknown_0854C14C ldr r2, [r1] lsls r0, 16 @@ -4950,7 +4950,7 @@ _080AD864: bl sub_80AD9BC movs r0, 0x13 bl sub_80ABC48 - bl GenerateRandomNumber + bl Random movs r1, 0xF ands r1, r0 adds r1, 0x1E @@ -5100,7 +5100,7 @@ sub_80AD9BC: @ 80AD9BC ldrb r0, [r5] cmp r0, 0 bne _080AD9EA - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 adds r1, r6, 0 @@ -5138,7 +5138,7 @@ sub_80AD9F8: @ 80AD9F8 lsls r0, 24 cmp r0, 0 bne _080ADA58 - bl GenerateRandomNumber + bl Random ands r4, r0 cmp r4, 0 beq _080ADA38 diff --git a/asm/wild_encounter.s b/asm/wild_encounter.s index 3763743c9..e246350da 100644 --- a/asm/wild_encounter.s +++ b/asm/wild_encounter.s @@ -164,7 +164,7 @@ _080B49D0: bgt _080B49E4 movs r7, 0x2 _080B49E4: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x64 @@ -276,7 +276,7 @@ sub_80B4AB8: @ 80B4AB8 thumb_func_start wild_pokemon_rand_grass wild_pokemon_rand_grass: @ 80B4AC8 push {lr} - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x64 @@ -383,7 +383,7 @@ _080B4B7E: thumb_func_start wild_pokemon_rand_water wild_pokemon_rand_water: @ 80B4B84 push {lr} - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x64 @@ -436,7 +436,7 @@ sub_80B4BD8: @ 80B4BD8 lsrs r4, r0, 24 adds r6, r4, 0 movs r5, 0 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x64 @@ -539,7 +539,7 @@ _080B4C8A: adds r4, 0x1 lsls r4, 24 lsrs r4, 24 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 adds r1, r4, 0 @@ -563,7 +563,7 @@ _080B4C8A: cmp r0, 0x2E bne _080B4CEA _080B4CC8: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x1 @@ -661,7 +661,7 @@ sub_80B4D78: @ 80B4D78 bl GetSafariZoneFlag cmp r0, 0x1 bne _080B4E0E - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x64 @@ -694,7 +694,7 @@ _080B4DB8: bhi _080B4DE8 add r5, sp _080B4DC6: - bl GenerateRandomNumber + bl Random movs r1, 0x1 ands r1, r0 cmp r1, 0 @@ -744,7 +744,7 @@ _080B4E0E: lsrs r0, 24 cmp r0, 0x1C bne _080B4E4C - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x1 @@ -760,7 +760,7 @@ _080B4E48: ldrb r0, [r4] b _080B4E5E _080B4E4C: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 _080B4E54: @@ -816,7 +816,7 @@ _080B4E98: lsrs r0, 24 cmp r0, 0x38 bne _080B4F28 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x3 @@ -1101,7 +1101,7 @@ DoMassOutbreakEncounterTest: @ 80B50DC ldrb r0, [r0] cmp r1, r0 bne _080B513C - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x64 @@ -1131,7 +1131,7 @@ DoWildEncounterRateDiceRoll: @ 80B5144 adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0xB4 @@ -1254,7 +1254,7 @@ _080B5222: thumb_func_start DoGlobalWildEncounterDiceRoll DoGlobalWildEncounterDiceRoll: @ 80B523C push {lr} - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x64 @@ -1934,7 +1934,7 @@ _080B57E6: ldr r1, [r4, 0x4] b _080B5820 _080B57F4: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x64 @@ -2122,7 +2122,7 @@ _080B595A: subs r0, 0x5 cmp r5, r0 bgt _080B5988 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x1 @@ -2223,7 +2223,7 @@ _080B5A1A: b _080B5A3C .pool _080B5A24: - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 adds r1, r4, 0 @@ -2269,7 +2269,7 @@ TryGetAbilityInfluencedWildMonIndex: @ 80B5A50 lsrs r0, 24 cmp r0, r5 bne _080B5AA4 - bl GenerateRandomNumber + bl Random lsls r0, 16 lsrs r0, 16 movs r1, 0x1