Skip to content

Commit 474a2ca

Browse files
committed
And then I started glorping
1 parent 893126a commit 474a2ca

3 files changed

Lines changed: 152 additions & 2 deletions

File tree

worlds/cv_ooe/archipelago.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{"game": "Castlevania: Order of Ecclesia",
22
"authors": ["Pink Switch"],
33
"minimum_ap_version": "0.6.7",
4-
"world_version": "1.1.1"}
4+
"world_version": "1.2"}

worlds/cv_ooe/src/ooe_ap_main.asm

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@
121121
.org 0x020379B4
122122
bl @OneScreen_DontResetTopType
123123

124+
.org 0x02088174
125+
bl @CheckIfEnemGlyphObtained ; Used for the Top Screen enemy status
126+
124127
.close
125128
;;;;;;;;;;;;;;;;;;;;;;;;;;;
126129
.open "ftc/overlay9_0", 0x021DD280
@@ -188,6 +191,9 @@
188191

189192
.org 0x0221D6B4
190193
b @CheckAreaDelay
194+
195+
.org 0x0220576C
196+
mov r2, 0x04 ; Bone Archer glyph flag
191197
.close
192198
;;;;;;;;;;;;;;;;;;;;;
193199
.open "ftc/overlay9_20", 0x021FFFC0
@@ -375,8 +381,32 @@
375381
.org 0x02231B74
376382
b 0x02231B88 ; The check for Anna's cat. This just crashes if we're out of the room...
377383

384+
.org 0x02231EF4
385+
b 0x02231F04 ; The same, for when we're deleting the object
386+
378387
.org 0x02230048
379388
bl @ClampVillagerGlyphPos
389+
390+
.org 0x02293074
391+
mov r3, 0x01 ; Bone Scimitar glyph flag
392+
393+
.org 0x022629EC
394+
mov r0, 0x02 ; Axe knight glyph flag
395+
396+
.org 0x0224E8B4
397+
b @SetNecromancerGlyph
398+
399+
.org 0x0222B09C
400+
bl @CheckIfEnemGlyphObtained ; Used for the Guide menu
401+
402+
.org 0x0222D260
403+
bl @CheckIfEnemGlyphObtained_BestMain ; Used on the Bestiary's top menu
404+
405+
.org 0x0227508C
406+
bl @SetSpearGuardGlyph
407+
408+
.org 0x0228A464
409+
mov r0,
380410
381411
.close
382412
;;;;;;;;;;;;;;;;;;;;;;
@@ -670,6 +700,74 @@
670700
.dh 0xE2
671701
.dh 0xE3
672702
.dh 0xE4
703+
@ROMTable_EnemyGlyphIndex: ; Indexed list of enemies which have Glyphs attached to them
704+
.db 0x05
705+
.db 0x08
706+
.db 0x0B
707+
.db 0x0C
708+
.db 0x0D
709+
.db 0x18
710+
.db 0x1A
711+
.db 0x1E
712+
.db 0x22
713+
.db 0x23
714+
.db 0x28
715+
.db 0x33
716+
.db 0x38
717+
.db 0x3B
718+
.db 0x3C
719+
.db 0x45
720+
.db 0x4C
721+
.db 0x50
722+
.db 0x51
723+
.db 0x55
724+
.db 0x5A
725+
.db 0x5E
726+
.db 0x5F
727+
.db 0x61
728+
.db 0x63
729+
.db 0x65
730+
.db 0x67
731+
.db 0x68
732+
.db 0x72
733+
.db 0x73
734+
.db 0x74
735+
.align 4
736+
@ROMTable_EnemyGlyphFlags: ; Index of which flag each enemy uses for its Glyph.
737+
; TODO! Set flags for these. Up to Sea Demon...
738+
.dh 0x01 ; Bone Scimitar
739+
.dh 0x02 ; Axe Knight
740+
.dh 0x03 ; Necromancer
741+
.dh 0x04 ; Bone Archer
742+
.dh 0x08 ; Spear Guard
743+
.dh 0x09 ; Skull Spider
744+
745+
.dh 0x1A ; Sea Demon
746+
.dh 0x1E ; Fire Demon
747+
.dh 0x22 ; Werebat
748+
.dh 0x23 ; Black Formor
749+
.dh 0x28 ; Dullahan
750+
.dh 0x33 ; Miss Murder
751+
.dh 0x38 ; Lizardman
752+
.dh 0x3B ; Thunder Demon
753+
.dh 0x3C ; Owl
754+
.dh 0x45 ; White Formor
755+
.dh 0x4C ; Black Panther
756+
.dh 0x50 ; Polkir
757+
.dh 0x51 ; Nova Skeleton
758+
.dh 0x55 ; Red Smasher
759+
.dh 0x5A ; Hammer Shaker
760+
.dh 0x5E ; Spectral Sword
761+
.dh 0x5F ; Automaton ZX27
762+
.dh 0x61 ; Gorgon Head
763+
.dh 0x63 ; Great Knight
764+
.dh 0x65 ; Winged Skeleton
765+
.dh 0x67 ; Jiang Shi
766+
.dh 0x68 ; Demon Lord
767+
.dh 0x72 ; Albus
768+
.dh 0x73 ; Barlowe TODO! Portals for Albus and Barlowe if you miss their Glyphs.
769+
.dh 0x06 ; Wallman
770+
@EnemGlyphIndex_len equ @ROMTable_EnemyGlyphFlags - @ROMTable_EnemyGlyphIndex
673771

674772
.align 4
675773

@@ -2864,6 +2962,50 @@
28642962
cmp r1, 0
28652963
movle r1, 0 ; If less than 0, clamp at 0
28662964
b 0x0206DDEC
2965+
;;;;;;;;;;;;;;;;;;;
2966+
; Necromancer needs to set r3 glyph flag here so it doesn't override other things
2967+
@SetNecromancerGlyph:
2968+
mov r3, 0x03
2969+
stmfa [r13], r0, r3
2970+
b 0x0224E8B8
2971+
;;;;;;;;;;;;;;;;;;;;
2972+
; Checks if we've set the Flag for an enemy's Glyph (obtained it). r6 Enemy ID. returns 1 in r0 if we have.
2973+
@CheckIfEnemGlyphObtained:
2974+
ldr r0, = @ROMTable_EnemyGlyphIndex
2975+
mov r1, 0
2976+
@@CheckIndexNext:
2977+
ldrb r2, [r0, r1]
2978+
cmp r2, r6 ; Check if the current Index == the current enemy ID
2979+
beq @@GotEnemyIndex
2980+
cmp r1, @EnemGlyphIndex_len ; If we've exhausted the whole table...
2981+
bge @@Exit_SetFail ; Count this as a fail...? Does this code even get run? delete if not
2982+
add r1, r1, 1
2983+
b @@CheckIndexNext
2984+
@@GotEnemyIndex:
2985+
ldr r0, = @ROMTable_EnemyGlyphFlags
2986+
mov r1, r1, lsl 1 ; Shift
2987+
ldrh r0, [r0, r1] ; use R1 counter value from the previous loop to look up which flag this is
2988+
push lr
2989+
bl @CheckLocFlag ; Check if this FLAG is set
2990+
pop lr ; 0 Is the result of the LOC flag, so we don't need anything else
2991+
bx lr
2992+
@@Exit_SetFail:
2993+
mov r0, 0 ; Force a failure
2994+
bx lr
2995+
2996+
; Used to determine if an enemie's drops have been 100% collected outside of its bestiary page
2997+
@CheckIfEnemGlyphObtained_BestMain:
2998+
push r6, lr
2999+
add r6, r10, r1
3000+
bl @CheckIfEnemGlyphObtained
3001+
pop r6, lr
3002+
bx lr
3003+
;;;;;;;;;;;;;;;;;;;;;;
3004+
; Set flag r3
3005+
@SetSpearGuardGlyph:
3006+
mov r0, r6
3007+
mov r3, 0x08
3008+
bx lr
28673009

28683010
.pool
28693011
.endarea

worlds/cv_ooe/static_location_data.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,30 @@ class LocationInformation(NamedTuple): # In-game information used to define eac
1111

1212

1313
location_ids = {
14-
14+
"Bone Scimitar Glyph": 0x01,
15+
"Axe Knight Glyph": 0x02,
16+
"Necromancer Glyph": 0x03,
17+
"Bone Archer Glyph": 0x04,
1518
"Library: Past Wallman": 0x05,
1619
"Wallman Glyph": 0x06,
1720
"Giant's Dwelling: Bottom Right Room Pickup": 0x07,
21+
"Spear Guard Glyph": 0x08,
22+
"Skull Spider Glyph": 0x09,
1823
"Tristis Pass: Second Hill Pickup": 0x0A,
1924
"Barracks: Basement Entrance Pickup": 0x0B,
2025
"Ruvas Forest: First Room Freestanding": 0x0C,
2126
"Misty Forest Road: Right Big Room Pickup": 0x0D,
27+
2228
"Somnus Reef: Left Big Room Freestanding": 0x10,
2329
"Misty Forest Road: Paries Room Pickup": 0x11,
2430

2531
"Somnus Reef: East Entrance Item": 0x13,
2632

2733
"Minera Prison Island: Shaft Near Exit": 0x15,
34+
2835
"Arms Depot: Second Hall Pickup": 0x17,
2936
"Monastery: Central Freestanding": 0x18,
37+
3038
"Arms Depot: Upper Hall Item": 0x1A,
3139
"Kalidus Channel: Depths Left Small Vertical Freestanding": 0x1B,
3240

0 commit comments

Comments
 (0)