├── .gitignore
├── Makefile
├── data
├── gfx
│ ├── bank_offer_menu_bg_map.bin
│ ├── bank_repay_menu_bg_map.bin
│ ├── budget_menu_bg_map.bin
│ ├── build_select_sprites.bin
│ ├── city_stats_bg_map.bin
│ ├── city_tiles.bin
│ ├── credits_bg_map.bin
│ ├── cursor_tiles.bin
│ ├── graphs_menu_map.bin
│ ├── graphs_menu_tiles.bin
│ ├── info_bar_game_map.bin
│ ├── main_menu_bg_map.bin
│ ├── map_gen_minimap_bg_map.bin
│ ├── map_scenario_select_bg_map.bin
│ ├── minimap_bg_map.bin
│ ├── minimap_menu_map.bin
│ ├── minimap_menu_tiles.bin
│ ├── minimap_tiles.bin
│ ├── only_for_gbc_bg_map.bin
│ ├── options_menu_bg_map.bin
│ ├── save_menu_error_map.bin
│ ├── save_menu_map.bin
│ ├── scenario_0_rock_river_attr.bin
│ ├── scenario_0_rock_river_map.bin
│ ├── scenario_1_boringtown_attr.bin
│ ├── scenario_1_boringtown_map.bin
│ ├── scenario_2_portville_attr.bin
│ ├── scenario_2_portville_map.bin
│ ├── scenario_3_newdale_attr.bin
│ ├── scenario_3_newdale_map.bin
│ ├── text_input_bg_map.bin
│ ├── text_tiles.bin
│ ├── tilte_screen_map.bin
│ └── title_screen_tiles.bin
└── music
│ ├── song_city.asm
│ ├── song_menu.asm
│ └── song_title.asm
├── docs
├── animated-graphics.rst
├── apa-graphics.rst
├── bcd.rst
├── compression.rst
├── engine.rst
├── game-rooms.rst
├── general.rst
├── index.rst
├── main-loop.rst
├── map-edition.rst
├── map-generation.rst
├── power-grid.rst
├── saved-data.rst
├── simulation-buildings.rst
├── simulation-disasters.rst
├── simulation-general.rst
├── text-management.rst
└── traffic.rst
├── gpl-3.0.txt
├── manual.rst
├── readme.rst
├── resources
├── gfx
│ ├── bank_offer_menu_bg.gbm
│ ├── bank_repay_menu_bg.gbm
│ ├── budget_menu_bg.gbm
│ ├── build_select_sprites.gbm
│ ├── build_select_sprites.gbr
│ ├── city_stats_menu_bg.gbm
│ ├── city_tiles.gbr
│ ├── credits_bg.gbm
│ ├── graphs_menu_tiles.gbm
│ ├── graphs_menu_tiles.gbr
│ ├── info_bar_room_game.gbm
│ ├── main_menu_bg.gbm
│ ├── map_gen_minimap_bg.gbm
│ ├── map_scenario_select_bg.gbm
│ ├── minimap_bg.gbm
│ ├── minimap_menu_tiles.gbm
│ ├── minimap_menu_tiles.gbr
│ ├── minimap_tiles.gbr
│ ├── only_for_gbc_bg.gbm
│ ├── options_menu_bg.gbm
│ ├── save_menu_bg.gbm
│ ├── save_menu_error_bg.gbm
│ ├── scenario_0_rock_river.gbm
│ ├── scenario_1_boringtown.gbm
│ ├── scenario_2_portville.gbm
│ ├── scenario_3_newdale.gbm
│ ├── test_gfx
│ │ └── test_city_map.gbm
│ ├── text_input_bg.gbm
│ ├── title_screen_map.gbm
│ ├── title_screen_tiles.gbr
│ └── txt.gbr
└── music
│ ├── city.mod
│ ├── convert_songs.sh
│ ├── menu.mod
│ └── title.mod
├── screenshot.png
├── source
├── apa.asm
├── apa.inc
├── bcd_math.asm
├── bg_handler.asm
├── bg_handler_main.asm
├── engine
│ ├── engine.inc
│ ├── gbt_player.asm
│ ├── gbt_player.inc
│ ├── gbt_player_bank1.asm
│ ├── hardware.inc
│ ├── init.asm
│ ├── rand.asm
│ ├── utils.asm
│ └── video.asm
├── main.asm
├── math.asm
├── money.asm
├── money.inc
├── rlediff.asm
├── room_bank
│ └── room_bank.asm
├── room_budget
│ └── room_budget.asm
├── room_city_stats
│ └── room_city_stats.asm
├── room_credits
│ └── room_credits.asm
├── room_game
│ ├── build_menu.asm
│ ├── building_info.asm
│ ├── building_info.inc
│ ├── cursor.asm
│ ├── date.asm
│ ├── draw_building.asm
│ ├── draw_common.asm
│ ├── draw_port.asm
│ ├── draw_power_lines.asm
│ ├── draw_road.asm
│ ├── draw_train.asm
│ ├── map_load.asm
│ ├── map_load.inc
│ ├── message_box.asm
│ ├── persistent_messages.asm
│ ├── room_game.asm
│ ├── room_game.inc
│ ├── sram_map_handle.asm
│ ├── status_bar_menu.asm
│ ├── text_messages.asm
│ ├── text_messages.inc
│ ├── tileset.asm
│ ├── tileset_info.asm
│ ├── tileset_info.inc
│ └── tileset_text.asm
├── room_gbc_only
│ └── room_gbc_only.asm
├── room_gen_map
│ ├── gen_map.asm
│ ├── gen_map_circle.inc
│ └── room_gen_map.asm
├── room_graphs
│ ├── graph_money.asm
│ ├── graph_population.asm
│ ├── graph_rci.asm
│ ├── graphs_handle.asm
│ ├── graphs_menu.asm
│ ├── room_graphs.asm
│ └── room_graphs.inc
├── room_menu
│ └── room_menu.asm
├── room_minimap
│ ├── minimap_disasters.asm
│ ├── minimap_happiness.asm
│ ├── minimap_menu.asm
│ ├── minimap_overview.asm
│ ├── minimap_pollution.asm
│ ├── minimap_population.asm
│ ├── minimap_power.asm
│ ├── minimap_services.asm
│ ├── minimap_traffic.asm
│ ├── minimap_transport_map.asm
│ ├── minimap_zone_map.asm
│ ├── room_minimap.asm
│ └── room_minimap.inc
├── room_options
│ └── room_options.asm
├── room_save_menu
│ └── room_save_menu.asm
├── room_scenarios
│ └── room_scenarios.asm
├── room_text_input
│ ├── room_text_input.asm
│ └── room_text_input.inc
├── room_title
│ └── room_title.asm
├── save_struct.asm
├── save_struct.inc
├── sfx.asm
├── simulation
│ ├── building_density.asm
│ ├── queue.asm
│ ├── simulation_anim_boats.inc
│ ├── simulation_anim_planes.inc
│ ├── simulation_anim_trains.inc
│ ├── simulation_building_count.asm
│ ├── simulation_calculate_stats.asm
│ ├── simulation_create_buildings.asm
│ ├── simulation_fire.asm
│ ├── simulation_meltdown.asm
│ ├── simulation_money.asm
│ ├── simulation_pollution.asm
│ ├── simulation_power.asm
│ ├── simulation_services.asm
│ ├── simulation_technology.asm
│ ├── simulation_traffic.asm
│ ├── simulation_traffic_trip.asm
│ ├── simulation_transport_anims.asm
│ └── simulation_water.asm
├── sram_utils.asm
├── text.asm
└── text.inc
└── tools
├── compress
├── compile.sh
├── convert-all.sh
├── convert.sh
├── extractbit3.c
├── filediff.c
├── license.txt
└── rle.c
├── gbmb-1.8
├── gbmb.cnt
├── gbmb.exe
├── gbmb.gid
├── gbmb.hlp
└── readme_mb.txt
├── gbtd-2.2
├── file_id.diz
├── gbtd.cnt
├── gbtd.exe
├── gbtd.gid
├── gbtd.hlp
└── readme.txt
├── lut_gens
├── gen_bin2bcd.c
├── gen_bit_count.c
├── gen_build_prob.c
├── gen_circle.c
├── gen_mask.c
└── gen_shift_table.c
├── mapgen
└── mapgen.c
└── mod2gbt
├── build.sh
├── mod2gbt.c
└── mod_instructions.txt
/.gitignore:
--------------------------------------------------------------------------------
1 | ucity.sav
2 | ucity.gbc
3 | ucity.sym
4 | ucity.map
5 | ucity_compat.sav
6 | ucity_compat.gbc
7 | *.obj
8 | tools/mod2gbt/mod2gbt
9 | tools/compress/extractbit3
10 | tools/compress/filediff
11 | tools/compress/rle
12 | tools/gbmb-1.8/gbmb.ini
13 | tools/gbtd-2.2/gbtd.ini
14 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | ################################################################################
2 | #
3 | # µCity - City building game for Game Boy Color.
4 | # Copyright (c) 2017-2019 Antonio Niño Díaz (AntonioND/SkyLyrac)
5 | #
6 | # This program is free software: you can redistribute it and/or modify
7 | # it under the terms of the GNU General Public License as published by
8 | # the Free Software Foundation, either version 3 of the License, or
9 | # (at your option) any later version.
10 | #
11 | # This program is distributed in the hope that it will be useful,
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | # GNU General Public License for more details.
15 | #
16 | # You should have received a copy of the GNU General Public License
17 | # along with this program. If not, see .
18 | #
19 | ################################################################################
20 | ## ROM name ##
21 |
22 | NAME := ucity
23 | EXT := gbc
24 |
25 | ################################################################################
26 | ## Command to run resulting ROM in an emulator ##
27 |
28 | EMULATOR := wine ./tools/bgb.exe
29 |
30 | ################################################################################
31 | ## Source, data and include folders - subfolders are included ##
32 |
33 | SOURCE := source data
34 |
35 | ################################################################################
36 |
37 | # RGBDS can be made to point at a specific folder with the binaries of RGBDS.
38 |
39 | RGBASM := $(RGBDS)rgbasm
40 | RGBLINK := $(RGBDS)rgblink
41 | RGBFIX := $(RGBDS)rgbfix
42 |
43 | BIN := $(NAME).$(EXT)
44 | COMPAT_BIN := $(NAME)_compat.$(EXT)
45 |
46 | # List of relative paths to all folders and subfolders with code or data.
47 | SOURCE_ALL_DIRS := $(sort $(shell find $(SOURCE) -type d -print))
48 |
49 | # All files with extension asm are assembled.
50 | ASMFILES := $(foreach dir,$(SOURCE_ALL_DIRS),$(sort $(wildcard $(dir)/*.asm)))
51 |
52 | # List of include directories: All source and data folders.
53 | # A '/' is appended to the path.
54 | INCLUDES := $(foreach dir,$(SOURCE_ALL_DIRS),-I$(dir)/)
55 |
56 | # Prepare object paths from source files.
57 | OBJ := $(ASMFILES:.asm=.obj)
58 |
59 | # Targets
60 | .PHONY : all rebuild clean run
61 |
62 | all: $(BIN) $(COMPAT_BIN)
63 |
64 | rebuild:
65 | @make -B
66 | @rm -f $(OBJ)
67 |
68 | run: $(BIN)
69 | $(EMULATOR) $(BIN)
70 |
71 | clean:
72 | @echo rm $(OBJ) $(BIN) $(COMPAT_BIN) $(NAME).sym $(NAME).map
73 | @rm -f $(OBJ) $(BIN) $(COMPAT_BIN) $(NAME).sym $(NAME).map
74 |
75 | %.obj : %.asm
76 | @echo rgbasm $<
77 | @$(RGBASM) $(INCLUDES) -E -o$@ $<
78 |
79 | $(BIN): $(OBJ)
80 | @echo rgblink $(BIN)
81 | @$(RGBLINK) -o $(BIN) -p 0xFF -m $(NAME).map -n $(NAME).sym $(OBJ)
82 | @echo rgbfix $(BIN)
83 | @$(RGBFIX) -p 0xFF -v $(BIN)
84 |
85 | $(COMPAT_BIN): $(BIN)
86 | @echo rgbfix $(COMPAT_BIN)
87 | @cp $(BIN) $(COMPAT_BIN)
88 | @$(RGBFIX) -v -O -r 3 $(COMPAT_BIN)
89 |
90 | ################################################################################
91 |
--------------------------------------------------------------------------------
/data/gfx/bank_offer_menu_bg_map.bin:
--------------------------------------------------------------------------------
1 | 5555555555555555555555555555Mfsp5555555555555555::::55555555555555555555555555555btzqi5~tz5qnpj5yt555ljy5f5qtfs?5555555555555555555555555555555555555555555555555=5Lrtzsy<555CBBBB55555[f~rjsyx<5555DC55555Pfhm<5555555GBB55555_tyfq<5555CBGBB5555555555555555555555555Lrtzsy<555DBBBB55555[f~rjsyx<5555DC55555Pfhm<555555CBBB55555_tyfq<5555DCBBB5555555555555555555555
--------------------------------------------------------------------------------
/data/gfx/bank_repay_menu_bg_map.bin:
--------------------------------------------------------------------------------
1 | 5555555555555555555555555555Mfsp5555555555555555::::55555555555555555555555555555dtz5hfs>y5ljy5f55555sj|5qtfs5zsynq5~tz55wjuf~5~tzw5qfxy55555tsj<555555555555555555555555555555555555555555555555555555555555555555555555555555[f~rjsyx<5555BB55555Pfhm<555555BBBB55555_tyfq<5555BBBBB5555555555555555555555555555555555555555555555555555555555555555555555555555555555
--------------------------------------------------------------------------------
/data/gfx/budget_menu_bg_map.bin:
--------------------------------------------------------------------------------
1 | 555555555555555555555555555Mziljy55555555555555::::::5555555555555555555555555555_f}jx55555555=DB'=555]NT55555555BBBBBB555Zymjw555555BBBBBB5555555555555555555555Ntxyx5555555555555555[tqnhj55555BBBBBB555Qnwjrjs5555BBBBBB555Sjfqymhfwj5BBBBBB555Pizhfynts55BBBBBB555_wfsxutwy55BBBBBB555Wtfsx555555BBBBBB5555555555555555555555_tyfq555BBBBBBBBBB555555555555555555555'
--------------------------------------------------------------------------------
/data/gfx/build_select_sprites.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AntonioND/ucity/83e5c697cbd9e10a0bc72b02bcb6146c35e2c328/data/gfx/build_select_sprites.bin
--------------------------------------------------------------------------------
/data/gfx/city_stats_bg_map.bin:
--------------------------------------------------------------------------------
1 | 5555555555555555555555Nny~5^yfynxynhx555555555555555555555555Yfrj<555555555555555[tuzq9<5BBBBBBBBBB55Nqfxx<55555anqqflj55Ofyj<55555Ufs5CKGB55Qzsix<55BBBBBBBBBB5555555555555555555555Mznqy5Wfsi<555BBB'555]jxnijsynfq<5BBB'555Ntrrjwhnfq<55BBB'555Tsizxywnfq<55BBB'5555555555555555555555Snlm5_wfkknh<5BBB'5555555555555555555555[tqqzyji<55555BBB'555555555555555555555
--------------------------------------------------------------------------------
/data/gfx/city_tiles.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AntonioND/ucity/83e5c697cbd9e10a0bc72b02bcb6146c35e2c328/data/gfx/city_tiles.bin
--------------------------------------------------------------------------------
/data/gfx/credits_bg_map.bin:
--------------------------------------------------------------------------------
1 | 555555555555555555555#Nny~575DBCI(DBCJ55555555555555555555555Lsytsnt5YnAt5Onf55555555555555555555555LsytsntYO6^p~W~wfh5555555555555555555555fsytsnt:si;5555555555555555tzyqttp9htr5555555555555555555555|||9xp~q~wfh9sjy555555555555555555555555[wtlwfr5qnhjsxji555555555555555555555555zsijw5ymj5yjwrx5tk5555555555555555555555ymj5RY`5R[W{E"9555555555555555555555555
--------------------------------------------------------------------------------
/data/gfx/cursor_tiles.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AntonioND/ucity/83e5c697cbd9e10a0bc72b02bcb6146c35e2c328/data/gfx/cursor_tiles.bin
--------------------------------------------------------------------------------
/data/gfx/graphs_menu_map.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AntonioND/ucity/83e5c697cbd9e10a0bc72b02bcb6146c35e2c328/data/gfx/graphs_menu_map.bin
--------------------------------------------------------------------------------
/data/gfx/graphs_menu_tiles.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AntonioND/ucity/83e5c697cbd9e10a0bc72b02bcb6146c35e2c328/data/gfx/graphs_menu_tiles.bin
--------------------------------------------------------------------------------
/data/gfx/info_bar_game_map.bin:
--------------------------------------------------------------------------------
1 | Qzsix