Skip to content

Commit

Permalink
Merge pull request #242 from stochaztic/develop
Browse files Browse the repository at this point in the history
Bugfixes and compilation fixes for 4.1 release
  • Loading branch information
stochaztic authored Mar 8, 2021
2 parents d8b2922 + f2e502b commit 5946750
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 19 deletions.
12 changes: 8 additions & 4 deletions CoilSnake.spec
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,18 @@ import glob
import platform
import shutil
import sys
import sysconfig

from setuptools.sandbox import run_setup

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

Expand All @@ -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'
)]
Expand Down
8 changes: 2 additions & 6 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion coilsnake/model/eb/graphics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion coilsnake/modules/eb/CastModule.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']

Expand Down
2 changes: 1 addition & 1 deletion coilsnake/modules/eb/TitleScreenModule.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions coilsnake/modules/eb/TownMapIconModule.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__()
Expand All @@ -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:
Expand Down
1 change: 1 addition & 0 deletions coilsnake/ui/gui.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#! /usr/bin/env python
import sys

import tkinter
from functools import partial
Expand Down
5 changes: 3 additions & 2 deletions coilsnake/ui/information.py
Original file line number Diff line number Diff line change
@@ -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"},
Expand Down
5 changes: 3 additions & 2 deletions coilsnake/util/common/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -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(
Expand Down

0 comments on commit 5946750

Please sign in to comment.