Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

German Build #285

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
43 changes: 37 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
roms := pokered.gbc pokeblue.gbc pokeblue_debug.gbc
roms := pokered.gbc pokeblue.gbc pokeblue_debug.gbc pokerot.gbc pokeblau.gbc
roms_en := pokered.gbc pokeblue.gbc
roms_de := pokerot.gbc pokeblau.gbc

rom_obj := \
audio.o \
Expand All @@ -11,9 +13,22 @@ gfx/pics.o \
gfx/sprites.o \
gfx/tilesets.o

rom_obj_de := \
audio.o \
home.o \
main.o \
maps.o \
version/pokerot/text.o \
wram.o \
gfx/pics.o \
gfx/sprites.o \
gfx/tilesets.o

pokered_obj := $(rom_obj:.o=_red.o)
pokeblue_obj := $(rom_obj:.o=_blue.o)
pokeblue_debug_obj := $(rom_obj:.o=_blue_debug.o)
pokerot_obj := $(rom_obj_de:.o=_rot.o)
pokeblau_obj := $(rom_obj_de:.o=_blau.o)


### Build tools
Expand All @@ -37,18 +52,23 @@ RGBLINK ?= $(RGBDS)rgblink
.SECONDEXPANSION:
.PRECIOUS:
.SECONDARY:
.PHONY: all red blue blue_debug clean tidy compare tools
.PHONY: all english german red blue rot blau blue_debug clean tidy compare tools

all: $(roms)
english: $(roms_en)
german: $(roms_de)
red: pokered.gbc
blue: pokeblue.gbc
blue_debug: pokeblue_debug.gbc
rot: pokerot.gbc
blau: pokeblau.gbc

clean: tidy
find gfx \( -iname '*.1bpp' -o -iname '*.2bpp' -o -iname '*.pic' \) -delete
find version/pokerot/gfx \( -iname '*.1bpp' -o -iname '*.2bpp' -o -iname '*.pic' \) -delete

tidy:
rm -f $(roms) $(pokered_obj) $(pokeblue_obj) $(pokeblue_debug_obj) $(roms:.gbc=.map) $(roms:.gbc=.sym) rgbdscheck.o
rm -f $(roms) $(pokered_obj) $(pokeblue_obj) $(pokeblue_debug_obj) $(pokerot_obj) $(pokeblau_obj) $(roms:.gbc=.map) $(roms:.gbc=.sym) rgbdscheck.o
$(MAKE) clean -C tools/

compare: $(roms)
Expand All @@ -64,9 +84,11 @@ ifeq ($(DEBUG),1)
RGBASMFLAGS += -E
endif

$(pokered_obj): RGBASMFLAGS += -D _RED
$(pokeblue_obj): RGBASMFLAGS += -D _BLUE
$(pokeblue_debug_obj): RGBASMFLAGS += -D _BLUE -D _DEBUG
$(pokered_obj): RGBASMFLAGS += -D _RED -D _ENGLISH
$(pokeblue_obj): RGBASMFLAGS += -D _BLUE -D _ENGLISH
$(pokeblue_debug_obj): RGBASMFLAGS += -D _BLUE -D _ENGLISH -D _DEBUG
$(pokerot_obj): RGBASMFLAGS += -D _RED -D _GERMAN
$(pokeblau_obj): RGBASMFLAGS += -D _BLUE -D _GERMAN

rgbdscheck.o: rgbdscheck.asm
$(RGBASM) -o $@ $<
Expand All @@ -89,6 +111,8 @@ $(info $(shell $(MAKE) -C tools))
$(foreach obj, $(pokered_obj), $(eval $(call DEP,$(obj),$(obj:_red.o=.asm))))
$(foreach obj, $(pokeblue_obj), $(eval $(call DEP,$(obj),$(obj:_blue.o=.asm))))
$(foreach obj, $(pokeblue_debug_obj), $(eval $(call DEP,$(obj),$(obj:_blue_debug.o=.asm))))
$(foreach obj, $(pokerot_obj), $(eval $(call DEP,$(obj),$(obj:_rot.o=.asm))))
$(foreach obj, $(pokeblau_obj), $(eval $(call DEP,$(obj),$(obj:_blau.o=.asm))))

endif

Expand All @@ -99,10 +123,14 @@ endif
pokered_pad = 0x00
pokeblue_pad = 0x00
pokeblue_debug_pad = 0xff
pokerot_pad = 0x00
pokeblau_pad = 0x00

pokered_opt = -jsv -n 0 -k 01 -l 0x33 -m 0x13 -r 03 -t "POKEMON RED"
pokeblue_opt = -jsv -n 0 -k 01 -l 0x33 -m 0x13 -r 03 -t "POKEMON BLUE"
pokeblue_debug_opt = -jsv -n 0 -k 01 -l 0x33 -m 0x13 -r 03 -t "POKEMON BLUE"
pokerot_opt = -jsv -n 0 -k 01 -l 0x33 -m 0x1B -r 03 -t "POKEMON RED"
pokeblau_opt = -jsv -n 0 -k 01 -l 0x33 -m 0x1B -r 03 -t "POKEMON BLUE"

%.gbc: $$(%_obj) layout.link
$(RGBLINK) -p $($*_pad) -d -m $*.map -n $*.sym -l layout.link -o $@ $(filter %.o,$^)
Expand All @@ -127,8 +155,11 @@ gfx/intro_credits/the_end.2bpp: tools/gfx += --interleave --png=$<

gfx/slots/red_slots_1.2bpp: tools/gfx += --trim-whitespace
gfx/slots/blue_slots_1.2bpp: tools/gfx += --trim-whitespace
version/pokerot/gfx/slots/red_slots_1.2bpp: tools/gfx += --trim-whitespace
version/pokerot/gfx/slots/blue_slots_1.2bpp: tools/gfx += --trim-whitespace

gfx/tilesets/%.2bpp: tools/gfx += --trim-whitespace
version/pokerot/gfx/tilesets/%.2bpp: tools/gfx += --trim-whitespace
gfx/tilesets/reds_house.2bpp: tools/gfx += --preserve=0x48

gfx/trade/game_boy.2bpp: tools/gfx += --remove-duplicates
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ It builds the following ROMs:
- Pokemon Red (UE) [S][!].gb `sha1: ea9bcae617fdf159b045185467ae58b2e4a48b9a`
- Pokemon Blue (UE) [S][!].gb `sha1: d7037c83e1ae5b39bde3c30787637ba1d4c48ce2`
- BLUEMONS.GB (debug build) `sha1: 5b1456177671b79b263c614ea0e7cc9ac542e9c4`
- Pokemon Rote Edition (G) [S][!].gb `sha1: 87d523fe1a0c548db7c5477b451ddec1eb083c06`
- Pokemon Blaue Edition (G) [S][!].gb `sha1: 20e72dc6f41493eee1fdd0cef54214e6c3389688`

To set up the repository, see [**INSTALL.md**](INSTALL.md).

Expand Down
6 changes: 6 additions & 0 deletions audio/engine_2.asm
Original file line number Diff line number Diff line change
Expand Up @@ -1065,8 +1065,14 @@ Audio2_IsCry:
jr z, .no
jr c, .yes
.no
IF DEF(_ENGLISH)
scf
ccf
ENDC
IF DEF(_GERMAN)
ld a, [wLowHealthAlarm]
rla
ENDC
ret
.yes
scf
Expand Down
10 changes: 10 additions & 0 deletions constants.asm
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
IF DEF(_ENGLISH)
INCLUDE "charmap.asm"
ENDC
IF DEF(_GERMAN)
INCLUDE "version/pokerot/charmap.asm"
ENDC

INCLUDE "macros.asm"

Expand Down Expand Up @@ -28,7 +33,12 @@ INCLUDE "constants/map_constants.asm"
INCLUDE "constants/map_data_constants.asm"
INCLUDE "constants/map_object_constants.asm"
INCLUDE "constants/hide_show_constants.asm"
IF DEF(_ENGLISH)
INCLUDE "constants/credits_constants.asm"
ENDC
IF DEF(_GERMAN)
INCLUDE "version/pokerot/constants/credits_constants.asm"
ENDC
INCLUDE "constants/audio_constants.asm"
INCLUDE "constants/music_constants.asm"
INCLUDE "constants/tileset_constants.asm"
Expand Down
7 changes: 7 additions & 0 deletions data/events/prizes.asm
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,15 @@ PrizeDifferentMenuPtrs:
dw PrizeMenuMon2Entries, PrizeMenuMon2Cost
dw PrizeMenuTMsEntries, PrizeMenuTMsCost

IF DEF(_ENGLISH)
NoThanksText:
db "NO THANKS@"
ENDC

IF DEF(_GERMAN)
NoThanksText:
db "TSCHÜSS!@"
ENDC

PrizeMenuMon1Entries:
db ABRA
Expand Down
Empty file modified data/items/names.asm
100755 → 100644
Empty file.
Empty file modified data/maps/names.asm
100755 → 100644
Empty file.
Empty file modified data/pokemon/dex_entries.asm
100755 → 100644
Empty file.
Empty file modified data/pokemon/names.asm
100755 → 100644
Empty file.
24 changes: 24 additions & 0 deletions data/sgb/sgb_border.asm
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
IF DEF(_ENGLISH)
BorderPalettes:
IF DEF(_RED)
INCBIN "gfx/sgb/red_border.tilemap"
ENDC
IF DEF(_BLUE)
INCBIN "gfx/sgb/blue_border.tilemap"
ENDC
ENDC

IF DEF(_GERMAN)
BorderPalettes:
IF DEF(_RED)
INCBIN "version/pokerot/gfx/sgb/red_border.tilemap"
ENDC
IF DEF(_BLUE)
INCBIN "version/pokerot/gfx/sgb/blue_border.tilemap"
ENDC
ENDC

ds $100
Expand Down Expand Up @@ -53,10 +65,22 @@ ENDC

ds $18

IF DEF(_ENGLISH)
SGBBorderGraphics:
IF DEF(_RED)
INCBIN "gfx/sgb/red_border.2bpp"
ENDC
IF DEF(_BLUE)
INCBIN "gfx/sgb/blue_border.2bpp"
ENDC
ENDC

IF DEF(_GERMAN)
SGBBorderGraphics:
IF DEF(_RED)
INCBIN "version/pokerot/gfx/sgb/red_border.2bpp"
ENDC
IF DEF(_BLUE)
INCBIN "version/pokerot/gfx/sgb/blue_border.2bpp"
ENDC
ENDC
85 changes: 85 additions & 0 deletions engine/battle/core.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2030,20 +2030,39 @@ DisplayBattleMenu::
ld bc, NAME_LENGTH
call CopyData
; the following simulates the keystrokes by drawing menus on screen
IF DEF(_ENGLISH)
hlcoord 9, 14
ENDC
IF DEF(_GERMAN)
hlcoord 7, 14
ENDC
ld [hl], "▶"
ld c, 80
call DelayFrames
ld [hl], " "
IF DEF(_ENGLISH)
hlcoord 9, 16
ENDC
IF DEF(_GERMAN)
hlcoord 7, 16
ENDC
ld [hl], "▶"
ld c, 50
call DelayFrames
ld [hl], "▷"
ld a, $2 ; select the "ITEM" menu
jp .upperLeftMenuItemWasNotSelected

IF DEF(_ENGLISH)
.oldManName
db "OLD MAN@"
ENDC

IF DEF(_GERMAN)
.oldManName
db "GREIS@"
ENDC

.handleBattleMenuInput
ld a, [wBattleAndStartSavedMenuItem]
ld [wCurrentMenuItem], a
Expand All @@ -2060,13 +2079,26 @@ DisplayBattleMenu::
ld a, " "
jr z, .safariLeftColumn
; put cursor in left column for normal battle menu (i.e. when it's not a Safari battle)
IF DEF(_ENGLISH)
ldcoord_a 15, 14 ; clear upper cursor position in right column
ldcoord_a 15, 16 ; clear lower cursor position in right column
ld b, $9 ; top menu item X
ENDC
IF DEF(_GERMAN)
ldcoord_a 12, 14 ; clear upper cursor position in right column
ldcoord_a 12, 16 ; clear lower cursor position in right column
ld b, $7 ; top menu item X
ENDC
jr .leftColumn_WaitForInput
.safariLeftColumn
IF DEF(_ENGLISH)
ldcoord_a 13, 14
ldcoord_a 13, 16
ENDC
IF DEF(_GERMAN)
ldcoord_a 12, 14
ldcoord_a 12, 16
ENDC
hlcoord 7, 14
ld de, wNumSafariBalls
lb bc, 1, 2
Expand All @@ -2093,9 +2125,16 @@ DisplayBattleMenu::
ld a, " "
jr z, .safariRightColumn
; put cursor in right column for normal battle menu (i.e. when it's not a Safari battle)
IF DEF(_ENGLISH)
ldcoord_a 9, 14 ; clear upper cursor position in left column
ldcoord_a 9, 16 ; clear lower cursor position in left column
ld b, $f ; top menu item X
ENDC
IF DEF(_GERMAN)
ldcoord_a 7, 14 ; clear upper cursor position in left column
ldcoord_a 7, 16 ; clear lower cursor position in left column
ld b, $c ; top menu item X
ENDC
jr .rightColumn_WaitForInput
.safariRightColumn
ldcoord_a 1, 14 ; clear upper cursor position in left column
Expand All @@ -2104,7 +2143,12 @@ DisplayBattleMenu::
ld de, wNumSafariBalls
lb bc, 1, 2
call PrintNumber
IF DEF(_ENGLISH)
ld b, $d ; top menu item X
ENDC
IF DEF(_GERMAN)
ld b, $c ; top menu item X
ENDC
.rightColumn_WaitForInput
ld hl, wTopMenuItemY
ld a, $e
Expand Down Expand Up @@ -2674,8 +2718,16 @@ MoveDisabledText:
text_far _MoveDisabledText
text_end

IF DEF(_ENGLISH)
WhichTechniqueString:
db "WHICH TECHNIQUE?@"
ENDC

IF DEF(_GERMAN)
WhichTechniqueString:
db "Welche attacke?"
next " @"
ENDC

SelectMenuItem_CursorUp:
ld a, [wCurrentMenuItem]
Expand Down Expand Up @@ -2876,7 +2928,12 @@ PrintMenuItem:
call PlaceString
hlcoord 7, 11
ld [hl], "/"
IF DEF(_ENGLISH)
hlcoord 5, 9
ENDC
IF DEF(_GERMAN)
hlcoord 4, 9
ENDC
ld [hl], "/"
hlcoord 5, 11
ld de, wcd6d
Expand All @@ -2894,11 +2951,21 @@ PrintMenuItem:
ldh [hAutoBGTransferEnabled], a
jp Delay3

IF DEF(_ENGLISH)
DisabledText:
db "disabled!@"

TypeText:
db "TYPE@"
ENDC

IF DEF(_GERMAN)
DisabledText:
db "BLOCKIERT@"

TypeText:
db "TYP@"
ENDC

SelectEnemyMove:
ld a, [wLinkState]
Expand Down Expand Up @@ -6797,6 +6864,8 @@ InitWildBattle:
ld [hli], a ; write front sprite pointer
ld [hl], b
ld hl, wEnemyMonNick ; set name to "GHOST"

IF DEF(_ENGLISH)
ld a, "G"
ld [hli], a
ld a, "H"
Expand All @@ -6808,6 +6877,22 @@ InitWildBattle:
ld a, "T"
ld [hli], a
ld [hl], "@"
ENDC

IF DEF(_GERMAN)
ld a, "G"
ld [hli], a
ld a, "E"
ld [hli], a
ld a, "I"
ld [hli], a
ld a, "S"
ld [hli], a
ld a, "T"
ld [hli], a
ld [hl], "@"
ENDC

ld a, [wcf91]
push af
ld a, MON_GHOST
Expand Down
Loading