mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
give/takeitem *, 1: the 1 is optional
This commit is contained in:
parent
7fd20e6322
commit
3cadc7b012
@ -39,4 +39,8 @@ const_value SET 1
|
||||
const ANIM_GFX_WAVE
|
||||
const ANIM_GFX_AEROBLAST
|
||||
|
||||
|
||||
LEN_2BPP_TILE EQU 16
|
||||
LEN_1BPP_TILE EQU 8
|
||||
TILES_PER_FRAME EQU 6
|
||||
TILESIZE EQU $10
|
||||
|
@ -587,7 +587,10 @@ OW_RIGHT EQU RIGHT << 2
|
||||
const EMOTE_BOLT ; 5
|
||||
const EMOTE_SLEEP ; 6
|
||||
const EMOTE_FISH ; 7
|
||||
const EMOTE_ROD ; 8 - add directional constant
|
||||
const EMOTE_08 ; 8
|
||||
const EMOTE_09 ; 9
|
||||
const EMOTE_0A ; 10
|
||||
const EMOTE_0B ; 11
|
||||
EMOTE_MEM EQU -1
|
||||
|
||||
const_def
|
||||
|
@ -164,7 +164,3 @@ HMENURETURN_SCRIPT EQU %10000000
|
||||
HMENURETURN_ASM EQU %11111111
|
||||
|
||||
NUM_MON_SUBMENU_ITEMS EQU 8
|
||||
|
||||
LEN_2BPP_TILE EQU 16
|
||||
LEN_1BPP_TILE EQU 8
|
||||
TILES_PER_FRAME EQU 6
|
||||
|
@ -170,6 +170,16 @@ const_value SET 1
|
||||
const STANDING_SPRITE
|
||||
const STILL_SPRITE
|
||||
|
||||
; sprite header fields
|
||||
const_def
|
||||
const SPRITEHEADER_ADDR_LO
|
||||
const SPRITEHEADER_ADDR_HI
|
||||
const SPRITEHEADER_SIZE
|
||||
const SPRITEHEADER_BANK
|
||||
const SPRITEHEADER_TYPE
|
||||
const SPRITEHEADER_PALETTE
|
||||
NUM_SPRITEHEADER_FIELDS EQU const_value
|
||||
|
||||
; sprite palettes
|
||||
const_def
|
||||
const PAL_OW_RED
|
||||
@ -252,3 +262,5 @@ const_value SET 1
|
||||
const SPRITEMOVEFN_19
|
||||
const SPRITEMOVEFN_1A
|
||||
const SPRITEMOVEFN_1B
|
||||
|
||||
MAX_OUTDOOR_SPRITES EQU 23
|
||||
|
@ -15,7 +15,7 @@ FruitTreeScript:: ; 44000
|
||||
.fruit
|
||||
writetext HeyItsFruitText
|
||||
copybytetovar CurFruit
|
||||
giveitem ITEM_FROM_MEM, 1
|
||||
giveitem ITEM_FROM_MEM
|
||||
iffalse .packisfull
|
||||
keeptextopen
|
||||
writetext ObtainedFruitText
|
||||
|
@ -1197,9 +1197,9 @@ ApplyPersonFacing: ; 0x9728b
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
push bc
|
||||
call Function1836
|
||||
call DoesSpriteHaveFacings
|
||||
pop bc
|
||||
jr c, .not_visible ; 0x9729c $1b
|
||||
jr c, .not_visible ; STILL_SPRITE
|
||||
ld hl, OBJECT_FLAGS1
|
||||
add hl, bc
|
||||
bit 2, [hl]
|
||||
|
@ -178,7 +178,7 @@ SpecialsPointers:: ; c029
|
||||
add_special Function1037eb
|
||||
add_special Function10383c
|
||||
add_special Mobile_HealParty
|
||||
add_special Function14168
|
||||
add_special RefreshSprites
|
||||
add_special Function1037c2
|
||||
add_special Function10630f
|
||||
add_special Function103780
|
||||
|
1480
engine/sprites.asm
Executable file
1480
engine/sprites.asm
Executable file
File diff suppressed because it is too large
Load Diff
@ -328,7 +328,7 @@ BugContestResultsScript:
|
||||
farwritetext ContestResults_ConsolationPrizeText
|
||||
keeptextopen
|
||||
waitbutton
|
||||
verbosegiveitem BERRY, 1
|
||||
verbosegiveitem BERRY
|
||||
iffalse BugContestResults_NoRoomForBerry
|
||||
|
||||
BugContestResults_DidNotWin
|
||||
@ -387,7 +387,7 @@ BugContestResults_FirstPlace ; 0xbc31e
|
||||
itemtotext SUN_STONE, $1
|
||||
farwritetext ContestResults_PlayerWonAPrizeText
|
||||
closetext
|
||||
verbosegiveitem SUN_STONE, 1
|
||||
verbosegiveitem SUN_STONE
|
||||
iffalse BugContestResults_NoRoomForSunStone
|
||||
jump BugContestResults_ReturnAfterWinnersPrize
|
||||
; 0xbc332
|
||||
@ -396,7 +396,7 @@ BugContestResults_SecondPlace ; 0xbc332
|
||||
itemtotext EVERSTONE, $1
|
||||
farwritetext ContestResults_PlayerWonAPrizeText
|
||||
closetext
|
||||
verbosegiveitem EVERSTONE, 1
|
||||
verbosegiveitem EVERSTONE
|
||||
iffalse BugContestResults_NoRoomForEverstone
|
||||
jump BugContestResults_ReturnAfterWinnersPrize
|
||||
; 0xbc343
|
||||
@ -405,7 +405,7 @@ BugContestResults_ThirdPlace ; 0xbc343
|
||||
itemtotext GOLD_BERRY, $1
|
||||
farwritetext ContestResults_PlayerWonAPrizeText
|
||||
closetext
|
||||
verbosegiveitem GOLD_BERRY, 1
|
||||
verbosegiveitem GOLD_BERRY
|
||||
iffalse BugContestResults_NoRoomForGoldBerry
|
||||
jump BugContestResults_ReturnAfterWinnersPrize
|
||||
; 0xbc354
|
||||
|
@ -4,6 +4,7 @@
|
||||
; Type, Palette
|
||||
|
||||
sprite_header: MACRO
|
||||
; pointer, length, type, palette
|
||||
dw \1
|
||||
db \2 * 4 tiles, BANK(\1)
|
||||
db \3, \4
|
||||
|
@ -2021,7 +2021,7 @@ Function2b74:: ; 0x2b74
|
||||
Function2bae:: ; 2bae
|
||||
call DisableLCD
|
||||
call ClearSprites
|
||||
callba Function14168
|
||||
callba RefreshSprites
|
||||
call LoadStandardFont
|
||||
call LoadFontsExtra
|
||||
ld a, [hROMBank]
|
||||
|
@ -52,18 +52,18 @@ endr
|
||||
ret
|
||||
; 1836
|
||||
|
||||
Function1836:: ; 1836
|
||||
DoesSpriteHaveFacings:: ; 1836
|
||||
push de
|
||||
push hl
|
||||
|
||||
ld b, a
|
||||
ld a, [hROMBank]
|
||||
push af
|
||||
ld a, BANK(Function142a7)
|
||||
ld a, BANK(_DoesSpriteHaveFacings)
|
||||
rst Bankswitch
|
||||
|
||||
ld a, b
|
||||
call Function142a7
|
||||
call _DoesSpriteHaveFacings
|
||||
ld c, a
|
||||
|
||||
pop de
|
||||
|
@ -206,14 +206,22 @@ writecode: macro
|
||||
giveitem: macro
|
||||
db giveitem_command
|
||||
db \1 ; item
|
||||
if _NARG == 2
|
||||
db \2 ; quantity
|
||||
else
|
||||
db 1
|
||||
endc
|
||||
endm
|
||||
|
||||
enum takeitem_command
|
||||
takeitem: macro
|
||||
db takeitem_command
|
||||
db \1 ; item
|
||||
if _NARG == 2
|
||||
db \2 ; quantity
|
||||
else
|
||||
db 1
|
||||
endc
|
||||
endm
|
||||
|
||||
enum checkitem_command
|
||||
@ -986,7 +994,11 @@ checkphonecall: macro
|
||||
verbosegiveitem: macro
|
||||
db verbosegiveitem_command
|
||||
db \1 ; item
|
||||
if _NARG == 2
|
||||
db \2 ; quantity
|
||||
else
|
||||
db 1
|
||||
endc
|
||||
endm
|
||||
|
||||
enum verbosegiveitem2_command
|
||||
|
@ -34,7 +34,7 @@ BugsyScript:
|
||||
setevent EVENT_BEAT_BUG_CATCHER_JOSH
|
||||
writetext BugsyText_HiveBadgeSpeech
|
||||
keeptextopen
|
||||
verbosegiveitem TM_FURY_CUTTER, 1
|
||||
verbosegiveitem TM_FURY_CUTTER
|
||||
iffalse .NoRoomForFuryCutter
|
||||
setevent EVENT_GOT_TM49_FURY_CUTTER
|
||||
writetext BugsyText_FuryCutterSpeech
|
||||
|
@ -155,7 +155,7 @@ UnknownScript_0x1980e5:
|
||||
keeptextopen
|
||||
writetext UnknownText_0x198628
|
||||
closetext
|
||||
verbosegiveitem GS_BALL, 1
|
||||
verbosegiveitem GS_BALL
|
||||
spriteface $d, LEFT
|
||||
setflag ENGINE_HAVE_EXAMINED_GS_BALL
|
||||
clearevent EVENT_ILEX_FOREST_LASS
|
||||
|
@ -117,7 +117,7 @@ UnknownScript_0x18963b:
|
||||
checkevent EVENT_GOT_EVERSTONE_FROM_BILLS_GRANDPA
|
||||
iftrue UnknownScript_0x189592
|
||||
scall UnknownScript_0x1896b5
|
||||
verbosegiveitem EVERSTONE, 1
|
||||
verbosegiveitem EVERSTONE
|
||||
iffalse UnknownScript_0x1896cc
|
||||
setevent EVENT_GOT_EVERSTONE_FROM_BILLS_GRANDPA
|
||||
setevent EVENT_GAVE_KURT_APRICORNS
|
||||
@ -128,7 +128,7 @@ UnknownScript_0x189652:
|
||||
checkevent EVENT_GOT_LEAF_STONE_FROM_BILLS_GRANDPA
|
||||
iftrue UnknownScript_0x1895b3
|
||||
scall UnknownScript_0x1896b5
|
||||
verbosegiveitem LEAF_STONE, 1
|
||||
verbosegiveitem LEAF_STONE
|
||||
iffalse UnknownScript_0x1896cc
|
||||
setevent EVENT_GOT_LEAF_STONE_FROM_BILLS_GRANDPA
|
||||
setevent EVENT_GAVE_KURT_APRICORNS
|
||||
@ -139,7 +139,7 @@ UnknownScript_0x189669:
|
||||
checkevent EVENT_GOT_WATER_STONE_FROM_BILLS_GRANDPA
|
||||
iftrue UnknownScript_0x1895d4
|
||||
scall UnknownScript_0x1896b5
|
||||
verbosegiveitem WATER_STONE, 1
|
||||
verbosegiveitem WATER_STONE
|
||||
iffalse UnknownScript_0x1896cc
|
||||
setevent EVENT_GOT_WATER_STONE_FROM_BILLS_GRANDPA
|
||||
setevent EVENT_GAVE_KURT_APRICORNS
|
||||
@ -150,7 +150,7 @@ UnknownScript_0x189680:
|
||||
checkevent EVENT_GOT_FIRE_STONE_FROM_BILLS_GRANDPA
|
||||
iftrue UnknownScript_0x18961a
|
||||
scall UnknownScript_0x1896b5
|
||||
verbosegiveitem FIRE_STONE, 1
|
||||
verbosegiveitem FIRE_STONE
|
||||
iffalse UnknownScript_0x1896cc
|
||||
setevent EVENT_GOT_FIRE_STONE_FROM_BILLS_GRANDPA
|
||||
setevent EVENT_GAVE_KURT_APRICORNS
|
||||
@ -159,7 +159,7 @@ UnknownScript_0x189680:
|
||||
|
||||
UnknownScript_0x189697:
|
||||
scall UnknownScript_0x1896b5
|
||||
verbosegiveitem THUNDERSTONE, 1
|
||||
verbosegiveitem THUNDERSTONE
|
||||
iffalse UnknownScript_0x1896cc
|
||||
setevent EVENT_GOT_THUNDERSTONE_FROM_BILLS_GRANDPA
|
||||
loadmovesprites
|
||||
|
@ -93,7 +93,7 @@ SantosScript:
|
||||
.MetSantos
|
||||
writetext SantosGivesGiftText
|
||||
keeptextopen
|
||||
verbosegiveitem SPELL_TAG, 1
|
||||
verbosegiveitem SPELL_TAG
|
||||
iffalse SantosDoneScript
|
||||
setevent EVENT_GOT_SPELL_TAG_FROM_SANTOS
|
||||
writetext SantosGaveGiftText
|
||||
|
@ -62,7 +62,7 @@ UnknownScript_0x194e69:
|
||||
iftrue UnknownScript_0x194e94
|
||||
writetext UnknownText_0x195196
|
||||
keeptextopen
|
||||
giveitem TM_DRAGONBREATH, 1
|
||||
giveitem TM_DRAGONBREATH
|
||||
iffalse UnknownScript_0x194e8e
|
||||
itemtotext TM_DRAGONBREATH, $0
|
||||
writetext UnknownText_0x1951bf
|
||||
|
@ -86,7 +86,7 @@ EatathonContestPoster:
|
||||
CeladonCafeTrashcan:
|
||||
checkevent EVENT_FOUND_LEFTOVERS_IN_CELADON_CAFE
|
||||
iftrue .TrashEmpty
|
||||
giveitem LEFTOVERS, 1
|
||||
giveitem LEFTOVERS
|
||||
iffalse .PackFull
|
||||
loadfont
|
||||
itemtotext LEFTOVERS, $0
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user