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

Mega Man X2: Implement New Game #3843

Draft
wants to merge 39 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
e25f31e
initial mmx2 files (does not work)
TheLX5 May 31, 2024
2058544
Merge branch 'ArchipelagoMW:main' into mmx2
TheLX5 Jun 1, 2024
337dc7a
Merge branch 'ArchipelagoMW:main' into mmx2
TheLX5 Jun 16, 2024
a39d271
not playable, but it can generate games just fine
TheLX5 Jun 25, 2024
513d189
modernize the client
TheLX5 Jun 26, 2024
87f15b3
asm
TheLX5 Jun 26, 2024
b610b01
update access codes offsets for each boss
TheLX5 Jun 26, 2024
d529a58
fix bubble crab collectibles' rules
TheLX5 Jun 26, 2024
fb625fb
changes that mean that world may be finished, qol pending tho
TheLX5 Jun 30, 2024
a2d26ec
Merge branch 'ArchipelagoMW:main' into mmx2
TheLX5 Jul 1, 2024
8194505
better 0.5.0 compat
TheLX5 Jul 2, 2024
a588db5
Fix location groups
TheLX5 Jul 2, 2024
c198482
Fix location names of X-Hunters
TheLX5 Jul 2, 2024
52e9866
Enable option groups
TheLX5 Jul 2, 2024
e59cc8c
Fix & adjust serges tank
TheLX5 Jul 2, 2024
5d49b02
more serges
TheLX5 Jul 2, 2024
09f680e
Add Silk shot variation and exclude speed burner (underwater)
TheLX5 Jul 2, 2024
4dee89e
edit base patch with fixes
TheLX5 Jul 2, 2024
14e46b5
getting any silk shot variarion as a weakness removes every other pos…
TheLX5 Jul 2, 2024
845a442
adds support for the LC ROM
TheLX5 Jul 6, 2024
af4658e
Adds an option to swap Shoryuken's input with Hadouken's input
TheLX5 Jul 6, 2024
e9bcfef
fix some logic issues related to two pickups
TheLX5 Jul 6, 2024
c5ad65a
Make the game beatable again
TheLX5 Jul 8, 2024
df2fa3b
Merge branch 'ArchipelagoMW:main' into mmx2
TheLX5 Aug 7, 2024
5ba8d0f
final v1.0.0 files
TheLX5 Aug 7, 2024
a678217
lower amount of items required for x-hunter base
TheLX5 Aug 7, 2024
5d6abe6
update exclusion list
TheLX5 Aug 7, 2024
7ab5941
fix chaotic set not expecting buster upgrades
TheLX5 Aug 7, 2024
8e25d86
make collect only write to RAM once per game_watcher run
TheLX5 Aug 8, 2024
f10c5ba
changes for 1.0.1
TheLX5 Aug 9, 2024
9b65f14
v1.1.0
TheLX5 Aug 23, 2024
7d7d035
option tweaks
TheLX5 Aug 23, 2024
881b10c
less spanish
TheLX5 Aug 23, 2024
5542d99
oops, forgot to write something
TheLX5 Aug 23, 2024
e417ab3
Merge branch 'ArchipelagoMW:main' into mmx2
TheLX5 Aug 24, 2024
acfe59c
remove text boxes
TheLX5 Sep 17, 2024
0164506
better UT support
TheLX5 Sep 19, 2024
d8caa61
fix itracer and gcrush not being saved
TheLX5 Sep 19, 2024
a27a918
misc rom adjustments
TheLX5 Sep 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 134 additions & 0 deletions worlds/mmx2/Aesthetics.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
import struct

from typing import Dict, List

player_palettes = {
"blue": [
"$35D0","$048E","$239D","$091E","$7B6F","$7A8A","$5963","$7E00",
"$7900","$40C4","$42DF","$2597","$1110","$739C","$4E73","$0C63",
],
"gold_armor": [
"$35D0","$048E","$239D","$091E","$7BFF","$1F9F","$09DF","$73DF",
"$0ADE","$055D","$42DF","$2597","$1110","$4FBF","$121D","$0C63",
],
"acid_burst": [
"$35D0","$048E","$239D","$091E","$1F1E","$11F8","$0132","$43F7",
"$1BAC","$1689","$42DF","$2597","$1110","$739C","$4E73","$0C63",
],
"parasitic_bomb": [
"$35D0","$048E","$239D","$091E","$6776","$424E","$2547","$03FF",
"$02D7","$018D","$42DF","$2597","$1110","$739C","$4E73","$0C63",
],
"triad_thunder": [
"$35D0","$048E","$239D","$091E","$4F9A","$274F","$222C","$7E14",
"$5D0E","$3C8C","$42DF","$2597","$1110","$739C","$4E73","$0C63",
],
"spinning_blade": [
"$35D0","$048E","$239D","$091E","$6318","$4210","$2108","$195F",
"$0098","$0010","$42DF","$2597","$1110","$739C","$4E73","$0C63",
],
"ray_splasher": [
"$35D0","$048E","$239D","$091E","$03FF","$02D7","$018D","$1EDE",
"$11B8","$00F2","$42DF","$2597","$1110","$739C","$4E73","$0C63",
],
"gravity_well": [
"$35D0","$048E","$239D","$091E","$531C","$3214","$110C","$7DFE",
"$6518","$5093","$42DF","$2597","$1110","$739C","$4E73","$0C63",
],
"frost_shield": [
"$35D0","$048E","$239D","$091E","$7E3A","$7174","$58EF","$7BAF",
"$6B29","$5264","$42DF","$2597","$1110","$739C","$4E73","$0C63",
],
"tornado_fang": [
"$35D0","$048E","$239D","$091E","$1EDE","$0976","$0050","$73D0",
"$5B08","$3A00","$42DF","$2597","$1110","$739C","$4E73","$0C63",
],
"crystal_hunter": [
"$35D0","$048E","$239D","$091E","$7F3E","$7256","$5DB1","$7B6F",
"$7A8A","$59A5","$42DF","$2597","$1110","$7BDE","$4E73","$0C63",
],
"bubble_splash": [
"$35D0","$048E","$239D","$091E","$773F","$5639","$3D16","$131F",
"$0657","$01B1","$42DF","$2597","$1110","$7BDE","$4E73","$0C63",
],
"silk_shot": [
"$35D0","$048E","$239D","$091E","$5FF4","$3F2C","$1E65","$1E1F",
"$011F","$00F6","$42DF","$2597","$1110","$7BDE","$4E73","$0C63",
],
"spin_wheel": [
"$35D0","$048E","$239D","$091E","$7F7F","$7E59","$75B5","$2B00",
"$2240","$1DC4","$42DF","$2597","$1110","$7BDE","$4E73","$0C63",
],
"sonic_slicer": [
"$35D0","$048E","$239D","$091E","$031F","$021F","$017B","$75AB",
"$590A","$28E8","$42DF","$2597","$1110","$7BDE","$4E73","$0C63",
],
"strike_chain": [
"$35D0","$048E","$239D","$091E","$779C","$62D6","$4E10","$7A7A",
"$75D2","$5CEF","$42DF","$2597","$1110","$7BDE","$4E73","$0C63",
],
"magnet_mine": [
"$35D0","$048E","$239D","$091E","$2FFF","$0F18","$0A52","$4E31",
"$398C","$2908","$42DF","$2597","$1110","$7BDE","$4E73","$0C63",
],
"speed_burner": [
"$35D0","$048E","$239D","$091E","$7F98","$7ACF","$6645","$10DF",
"$0CB7","$0452","$42DF","$2597","$1110","$7BDE","$4E73","$0C63",
],
"homing_torpedo": [
"$35D0","$048E","$22FF","$0059","$5B7F","$46DB","$3657","$4250",
"$35ED","$2168","$42DF","$2597","$1110","$7BDE","$4E73","$14A5",
],
"chameleon_sting": [
"$35D0","$048E","$22FF","$0059","$73D8","$574C","$3EE4","$2AC3",
"$2A44","$1541","$42DF","$2597","$1110","$7BDE","$4E73","$14A5",
],
"rolling_shield": [
"$35D0","$048E","$22FF","$0059","$6BB9","$5714","$46B0","$4E1E",
"$311C","$209A","$42DF","$2597","$1110","$7BDE","$4E73","$14A5",
],
"fire_wave": [
"$35D0","$048E","$22FF","$0059","$3F9F","$229F","$0D9E","$055E",
"$0CFA","$0074","$42DF","$2597","$1110","$7BDE","$4E73","$14A5",
],
"storm_tornado": [
"$35D0","$048E","$22FF","$0059","$731F","$625C","$5A1A","$4973",
"$4953","$3CCE","$42DF","$2597","$1110","$7BDE","$4E73","$14A5",
],
"electric_spark": [
"$35D0","$048E","$22FF","$0059","$6F7B","$5AD6","$5294","$06DF",
"$05F8","$014F","$42DF","$2597","$1110","$7BDE","$4E73","$14A5",
],
"boomerang_cutter": [
"$35D0","$048E","$22FF","$0059","$6BB9","$5714","$46B0","$49CE",
"$418C","$2908","$42DF","$2597","$1110","$7BDE","$4E73","$14A5",
],
"shotgun_ice": [
"$35D0","$048E","$239D","$091E","$2B9F","$1ABD","$11B5","$7F87",
"$766A","$79C7","$42DF","$2597","$1110","$7BDE","$4210","$0C63",
],
}

def get_palette_bytes(palette: Dict[str, List]) -> bytearray:
output_data = bytearray()
for hexcol in palette:
if hexcol.startswith("$"):
hexcol = hexcol.replace("$", "")
colint = int(hexcol, 16)
output_data.extend(bytearray(struct.pack("H", colint)))
else:
if hexcol.startswith("#"):
hexcol = hexcol.replace("#", "")
colint = int(hexcol, 16)
col = ((colint & 0xFF0000) >> 16, (colint & 0xFF00) >> 8, colint & 0xFF)
col = tuple(x for x in col)
byte_data = rgb888_to_bgr555(col[0], col[1], col[2])
output_data.extend(bytearray(byte_data))
return output_data

def rgb888_to_bgr555(red, green, blue) -> bytes:
red = red >> 3
green = green >> 3
blue = blue >> 3
outcol = (blue << 10) + (green << 5) + red
return struct.pack("H", outcol)
Loading
Loading