From c1fd5317789f51cf4a0a3e0a3edd7fe5a14a9422 Mon Sep 17 00:00:00 2001 From: stochaztic <8549883+stochaztic@users.noreply.github.com> Date: Sun, 7 Mar 2021 19:37:05 -0500 Subject: [PATCH 1/4] Accurate tile numbers for engine support --- coilsnake/model/eb/graphics.py | 2 +- coilsnake/modules/eb/TitleScreenModule.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/coilsnake/model/eb/graphics.py b/coilsnake/model/eb/graphics.py index 362636ac..37820b6d 100644 --- a/coilsnake/model/eb/graphics.py +++ b/coilsnake/model/eb/graphics.py @@ -533,7 +533,7 @@ def __init__(self): class EbTownMap(EbCompressedGraphic): def __init__(self): super(EbTownMap, self).__init__( - num_tiles=512, + num_tiles=768, tile_width=8, tile_height=8, bpp=4, diff --git a/coilsnake/modules/eb/TitleScreenModule.py b/coilsnake/modules/eb/TitleScreenModule.py index 4c8b157a..bdd64bda 100644 --- a/coilsnake/modules/eb/TitleScreenModule.py +++ b/coilsnake/modules/eb/TitleScreenModule.py @@ -32,7 +32,7 @@ BG_ARRANGEMENT_HEIGHT = 32 BG_SUBPALETTE_LENGTH = 256 BG_NUM_ANIM_SUBPALETTES = 20 -BG_NUM_TILES = 256 +BG_NUM_TILES = 704 BG_TILESET_BPP = 8 # Characters data pointers From eada356a1dda10911f1c3320ac721606cae694e7 Mon Sep 17 00:00:00 2001 From: stochaztic <8549883+stochaztic@users.noreply.github.com> Date: Sun, 7 Mar 2021 19:40:38 -0500 Subject: [PATCH 2/4] Bugfix Cast palette corruption --- coilsnake/modules/eb/CastModule.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coilsnake/modules/eb/CastModule.py b/coilsnake/modules/eb/CastModule.py index a7cc656c..bb6c1292 100644 --- a/coilsnake/modules/eb/CastModule.py +++ b/coilsnake/modules/eb/CastModule.py @@ -27,7 +27,7 @@ CAST_NAME_GRAPHICS_ASM_POINTER_OFFSET = 0x4e446 FREE_CAST_GRAPHICS_BLOCK_BEGIN = 0x21d835 -FREE_CAST_GRAPHICS_BLOCK_END = 0x21e4e6 +FREE_CAST_GRAPHICS_BLOCK_END = 0x21e4e5 DYNAMIC_CAST_NAME_MODES = ['none', 'prefix', 'suffix'] From 52e135255fcecd93e1cc1fc71b40d32a6f25cb30 Mon Sep 17 00:00:00 2001 From: stochaztic <8549883+stochaztic@users.noreply.github.com> Date: Sun, 7 Mar 2021 20:09:33 -0500 Subject: [PATCH 3/4] Patch necessary for larger town map tile support --- coilsnake/modules/eb/TownMapIconModule.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/coilsnake/modules/eb/TownMapIconModule.py b/coilsnake/modules/eb/TownMapIconModule.py index 4ff1d8de..8f03b027 100644 --- a/coilsnake/modules/eb/TownMapIconModule.py +++ b/coilsnake/modules/eb/TownMapIconModule.py @@ -11,6 +11,7 @@ class TownMapIconModule(EbModule): POINTER_TABLE_DEFAULT_OFFSET = 0xE1F491 POINTER_TABLE_ASM_POINTER_OFFSET = 0x4D464 + TILE_COUNT_ADDRESS = 0x4d626 def __init__(self): super(TownMapIconModule, self).__init__() @@ -26,6 +27,7 @@ def write_to_rom(self, rom): pointer_table_offset = rom.allocate(size=self.table.size) self.table.to_block(rom, pointer_table_offset) write_asm_pointer(rom, self.POINTER_TABLE_ASM_POINTER_OFFSET, to_snes_address(pointer_table_offset)) + rom[self.TILE_COUNT_ADDRESS:self.TILE_COUNT_ADDRESS+2] = [0x00, 0x60] # Patch to support additional tiles def read_from_project(self, resource_open): with resource_open("TownMaps/icon_positions", "yml", True) as f: From f2e502b65488e6d3b3415a89c880b9ea6c54266d Mon Sep 17 00:00:00 2001 From: stochaztic <8549883+stochaztic@users.noreply.github.com> Date: Sun, 7 Mar 2021 21:18:48 -0500 Subject: [PATCH 4/4] Prepare for 4.1 release --- CoilSnake.spec | 12 ++++++++---- DEVELOPMENT.md | 8 ++------ coilsnake/ui/gui.py | 1 + coilsnake/ui/information.py | 5 +++-- coilsnake/util/common/project.py | 5 +++-- setup.py | 4 ++-- 6 files changed, 19 insertions(+), 16 deletions(-) diff --git a/CoilSnake.spec b/CoilSnake.spec index 8e7c4c96..f7d568ff 100644 --- a/CoilSnake.spec +++ b/CoilSnake.spec @@ -5,6 +5,7 @@ import glob import platform import shutil import sys +import sysconfig from setuptools.sandbox import run_setup @@ -12,6 +13,10 @@ run_setup('setup.py', ['build_ext']) debug = False +sys_platform = sys.platform +if sys_platform == 'win32': + sys_platform = sysconfig.get_platform() + if len(sys.argv) > 1 and sys.argv[1] == 'debug': debug = True @@ -30,10 +35,9 @@ with open(os.path.join("coilsnake", "assets", "modulelist.txt"), "r") as f: pyver = '{}.{}'.format(sys.version_info[0], sys.version_info[1]) binaries = [( - 'build/lib.{}*{}/coilsnake/util/eb/native_comp.cp*{}*'.format( - sys.platform if sys.platform != 'darwin' else 'macosx', - pyver, - sys.platform + 'build/lib.{}-{}/coilsnake/util/eb/native_comp.cp*'.format( + sys_platform if sys_platform != 'darwin' else 'macosx', + pyver ), 'coilsnake/util/eb' )] diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 45e3ff9a..23978650 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -98,12 +98,8 @@ python3 script/cli.py ### Creating a standalone executable 1. Follow the steps above to build CoilSnake for your system. -1. Using your favorite git client, clone this fork of [pyinstaller](https://github.com/jamsilva/pyinstaller) and build it: - 1. Go to the bootloader directory and build it: - `python3 ./waf distclean all` - 1. Go back up to the root folder of pyinstaller and run: - `python3 setup.py build` - `python3 setup.py install` +1. Install pyinstaller: + - `python3 -m pip install pyinstaller` 1. In the CoilSnake source directory, build the CoilSnake executable: - `python3 setup_exe.py` 1. Run the output file under the 'dist' directory. diff --git a/coilsnake/ui/gui.py b/coilsnake/ui/gui.py index 29320775..c4ab68ad 100644 --- a/coilsnake/ui/gui.py +++ b/coilsnake/ui/gui.py @@ -1,4 +1,5 @@ #! /usr/bin/env python +import sys import tkinter from functools import partial diff --git a/coilsnake/ui/information.py b/coilsnake/ui/information.py index 073c1aa9..e7973a21 100644 --- a/coilsnake/ui/information.py +++ b/coilsnake/ui/information.py @@ -1,13 +1,14 @@ from coilsnake.util.common import project VERSION = project.VERSION_NAMES[project.FORMAT_VERSION] -RELEASE_DATE = "August 27, 2019" +RELEASE_DATE = "March 8, 2021" WEBSITE = "http://pk-hack.github.io/CoilSnake" AUTHOR = "the PK Hack community" ADDITIONAL_CREDITS = """- Some portions based on JHack, created by AnyoneEB - Contributions by H.S, Michael1, John Soklaski, - João Silva and many others""" + João Silva, ShadowOne333, stochaztic, Catador, + and many others""" DEPENDENCIES = [ {"name": "CoilSnake logo and icon", "author": "Rydel"}, diff --git a/coilsnake/util/common/project.py b/coilsnake/util/common/project.py index cbaae1ea..89d7f2f2 100644 --- a/coilsnake/util/common/project.py +++ b/coilsnake/util/common/project.py @@ -12,7 +12,7 @@ # format. Version numbers are necessary because the format of data files may # change between versions of CoilSnake. -FORMAT_VERSION = 10 +FORMAT_VERSION = 11 # Names for each version, corresponding the the CS version VERSION_NAMES = { @@ -25,7 +25,8 @@ 7: "2.2", 8: "2.3.1", 9: "3.33", - 10: "4.0" + 10: "4.0", + 11: "4.1" } # The default project filename diff --git a/setup.py b/setup.py index 8176e691..aea34357 100755 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ setup( name="coilsnake", - version="4.0", + version="4.1", description="CoilSnake", url="https://pk-hack.github.io/CoilSnake", packages=find_packages(), @@ -30,7 +30,7 @@ install_requires=install_requires, dependency_links=[ "https://github.com/Lyrositor/CCScriptWriter/tarball/master#egg=CCScriptWriter-1.2", - "https://github.com/jamsilva/ccscript_legacy/tarball/master#egg=ccscript-1.339" + "https://github.com/stochaztic/ccscript_legacy/tarball/master#egg=ccscript-1.339" ], ext_modules=[ Extension(