Skip to content

Commit

Permalink
JP readme, finish hppgen to remove python dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
andwn committed Oct 11, 2023
1 parent a7a6b81 commit 6180f39
Show file tree
Hide file tree
Showing 8 changed files with 1,261 additions and 88 deletions.
14 changes: 10 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ MDTILER := bin/mdtiler
SLZ := bin/slz
UFTC := bin/uftc
# Cave Story Tools
AIGEN := python3 tools/aigen.py
HPPGEN := bin/hppgen
PATCHROM := bin/patchrom
TSCOMP := bin/tscomp

MEGALOADER := bin/megaloader

INCS = -Isrc -Ires
CCFLAGS = -m68000 -mshort -std=c2x -ffreestanding -fshort-enums -ffunction-sections -fdata-sections
OPTIONS = -O3 -g3 -frename-registers -fconserve-stack
OPTIONS = -O2 -frename-registers -fconserve-stack
WARNINGS = -Wall -Wextra -Wshadow -Wundef -Wno-unused-function
ASFLAGS = -m68000 -Isrc/md --register-prefix-optional --bitwise-or
LDFLAGS = -T md.ld -nostdlib -Wl,--gc-sections
Expand Down Expand Up @@ -142,7 +142,7 @@ translate: $(TARGET)-es.bin $(TARGET)-fr.bin $(TARGET)-de.bin $(TARGET)-it.bin
translate: $(TARGET)-pt.bin $(TARGET)-br.bin $(TARGET)-ja.bin $(TARGET)-zh.bin
translate: $(TARGET)-ko.bin

prereq: $(ASMZ80) $(MDTILER) $(SLZ) $(UFTC)
prereq: $(ASMZ80) $(MDTILER) $(SLZ) $(UFTC) $(HPPGEN)
prereq: $(BINTOS) $(RESCOMP) $(XGMTOOL) $(WAVTORAW) $(TSCOMP)
prereq: $(CPXMS) $(XGCS) $(PCMS) $(ZOBJ) $(TSBS)
prereq: $(TSETO) $(CTSETP) $(CTSETO) $(SPRO) $(CSPRP) $(CSPRO)
Expand Down Expand Up @@ -211,6 +211,9 @@ $(PATCHROM): bin
$(MEGALOADER): bin
cc tools/megaloader.c -o $@

$(HPPGEN): bin
cc tools/hppgen.c -o $@

# For asm target
asm-dir:
mkdir -p asmout/src/{ai,db,xgm,md}
Expand Down Expand Up @@ -292,9 +295,12 @@ $(TARGET)-ko.bin: res/patches/$(TARGET)-ko.patch
$(PATCHROM) $(TARGET)-en.bin "$<" "$@"

.PHONY: head-gen flash clean

AICS = $(wildcard src/ai/*.c)

head-gen:
rm -f src/ai_gen.h
$(AIGEN) src/ai/ src/ai_gen.h
$(HPPGEN) src/ai_gen.h $(AICS)

flash: $(MEGALOADER)
sudo $(MEGALOADER) md $(TARGET)-en.bin /dev/ttyUSB0 2> /dev/null
Expand Down
94 changes: 94 additions & 0 deletions README-ja.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# 洞窟物語MD
![Comparison Shot](doc/screen01.png)
[Video](http://www.youtube.com/watch?v=aZU133ekDVk)

[English README](README.md)

これは洞窟物語というただなPCゲームのメガドライブに移植したものです。
エンジンはC言語とM68Kアセンブリ言語でゼロから作りました。
どんなコンソールやエミュレーターでも動くはずだ。
まだ開発中けど、すべてのステージとエンディングがクリアできる。

## ダウンロード
安定版リリースは[Releases](https://github.com/andwn/cave-story-md/releases)タブで入手できます。

まだあまりテストされていない最新のビルドは[こちら](https://tenshi.skychase.zone/cs/)で入手できます。

## プレイ方
もしも6ボタンコントローラーを持っています:

- Cボタン ⇒ ジャンプ、確認
- Bボタン ⇒ ショット、キャンセル
- Aボタン ⇒ ゲームを急がせる(テストの機能性)
- Zボタン ⇒ 武器を変更(右側)
- Yボタン ⇒ 武器を変更(左側)
- Xボタン ⇒ 地図を発表(マップシステムが必要)
- スタート ⇒ メニューを発表

注意:NPCと話したり、ドアに入ったりするには、下を押してください。

3ボタンコントローラーの場合は、Aボタンが武器を変更のボタンになります。

### チート
- ステージ選択: 上、下、左、右、A+スタート
- 無敵: 上、上、下、下、左、右、左、右、A+スタート

無敵中でも、溺れ死んだり、埒外死んだりできます。

コードを入力した際は、セーブができません。ご注意ください。

## ビルド方
1. 依存なソフトウェア: `build-essential libpng-dev python3`
2. GCCツールチェインも必要、例えば [Marsdev](http://github.com/andwn/marsdev)
3. `git clone https://github.com/andwn/cave-story-md`
4. `cd cave-story-md``make`
- 翻訳ため: `make translate`

## 一瞬FAQ
もっと詳しいFAQ(英語): [FAQ.md](doc/FAQ.md)

### これは正式なものですか?
いいえ、ファン作品です。

### なぜ作ったのですか?
メガドライブ開発の勉強と自分の楽しみのため。

### なぜスーファミではないのですか?
スーファミに興味が少ないから。

### いつ完成しますか?
バグが少なくなって気にならなくなったら。

### 物理的なリリースがありますか?
無いです。

### カートは作れますか?
自分自身や友人のためにカートを作るのは自由ですが、*販売しないでください*

### カートを売っている人を見ました。
それは詐欺ですよ。お金を返すのを要すってください。

## License
- コード: MIT
- 音楽: CC-BY-NC
- その他全て: Copyright Studio Pixel

詳細はこちら(英語です、すみません): [LICENSE.md](doc/LICENSE.md).

基本的には、コードを好きなように使用することはできますが、ゲーム資産を販売したり、商用作品に使用したりしないでください。

## Thanks
めんどくさいな、英語のREADMEをチェックしてください。

## 翻訳版
Mostly taken from cavestory.org

- 英語: [Aeon Genesis Translations](http://agtp.romhack.net/)
- スペイン語: [Vagrant Traducciones](http://vagrant.romhackhispano.org)
- フランス語: [Max le Fou](http://cavestory.maxlefou.com/)
- ドイツ語: [Reality Dreamers](http://www.reality-dreamers.de/)
- イタリア語: [Simon M.](mailto:simonogatari@gmail.com)
- ポルトガル語: [Andre Silva](mailto:andreluis.g.silva@gmail.com)
- ブラジルのポルトガル語: [Alex "Foffano"](mailto:foffano@gmail.com)
- (単体字)中国語: Hydrowing
- 韓国語: Anonymous
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
![Comparison Shot](doc/screen01.png)
[Video](http://www.youtube.com/watch?v=aZU133ekDVk)

[日本語はこちら](README-ja.md)

This is a rewrite/port of the popular freeware game Cave Story for Sega Mega Drive/Genesis.
It should work on any console or emulator. The main story is "finished", only little things and bugfixes remain.

Expand All @@ -10,7 +12,7 @@ It should work on any console or emulator. The main story is "finished", only li

The latest builds that have not gone through as much testing are available [here](https://tenshi.skychase.zone/cs/).

## Control Defaults
## Default Controls
If you have a 6 button controller:

- `C` - Jump, confirm
Expand Down Expand Up @@ -41,7 +43,13 @@ Note that you can't load or save the game while cheating (including the counter)
- [VRAM Layout](doc/VRAM.md)

## License
Various, details [here](doc/LICENSE.md)
- Source Code: MIT
- Art and Story: Copyright Studio Pixel
- Music Covers: CC-BY-NC

Further details in [LICENSE.md](doc/LICENSE.md).

tl;dr - Use the code however you like, but the assets and game itself can not be sold or used in commercial works.

## Thanks
I did not know how to sort this list, so I did it alphabetically.
Expand Down
7 changes: 5 additions & 2 deletions doc/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,16 @@ When there are few enough bugs that it doesn't bother me anymore.
No.

### Can I make carts?
Feel free to make carts for yourself or friends, but don't sell them.
Feel free to make carts for yourself or friends, but *do not sell them*.

### But I saw someone else selling carts
It's a scam. Demand your money back.

### Is this moddable?
![you're gonna have a bad time.](badtime.png)

### Can I use your code in my commercial game?
Yes. Check the license.
Yes, just give credit. Check the [license](LICENSE.md).

### I have an idea for a Genesis game can you code it for free?
No.
12 changes: 6 additions & 6 deletions doc/LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# License & Copying

### CS Engine, SGDK modules & XGM Driver - [MIT](LICENSE-MIT)
### CS Engine, XGM Driver - [MIT](LICENSE-MIT)

All the source code not explicitly mentioned to be another license below are MIT.
The DMA queue (`src/dma.c`) and XGM driver (`src/xgm.c`, `src/xgm/*`) are from SGDK, which also uses the MIT license.
The XGM driver (in `src/xgm/`) is from SGDK, which also uses the MIT license.

### NXEngine-based AI routines - [GPLv3](LICENSE-GPL3)

Consider all the AI code under `src/ai/` to be GPLv3.
Consider all the code under `src/ai/` to be GPLv3.
Even in places where an AI function is entirely different, NXEngine's version was still used as a starting point.

### Graphics, Story, and Characters - Property of Studio Pixel
Expand All @@ -16,9 +16,9 @@ All created by Pixel, unless specified otherwise. I used them without permission

### Music Covers - [CC-BY-NC](https://creativecommons.org/licenses/by-nc/4.0/legalcode)

Most of [these](../res/bgm/) are created by me in Deflemask and are CC-BY-NC (give me credit, and don't use it in a commercial product).
All files in [this directory](../res/bgm/) were created by me using Deflemask and are CC-BY-NC (give me credit, and don't use it in a commercial product).

A few were remade or modified by DavisOlivier. No license was mentioned. Ask them if you want to use these in something:
In versions prior to 0.8.1, the following tracks were covered by DavisOlivier. No license was mentioned.
- Cave Story
- Eyes of Flame
- Gestation
Expand All @@ -27,7 +27,7 @@ A few were remade or modified by DavisOlivier. No license was mentioned. Ask the

### Fonts

The font used in the Title Screen menus, in-game dialogue, and crash messages was made by Sik. Ask him if you want to use them.
The font used in the Title Screen menus and in-game dialogue was made by Sik. Ask him if you want to use them.

Japanese, Chinese, Korean fonts are:

Expand Down
16 changes: 9 additions & 7 deletions src/ai/item.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ void onspawn_energy(Entity *e) {
}

static uint8_t collide_player(Entity *e) {
uint16_t px = player.x >> CSF;
uint16_t py = player.y >> CSF;
uint16_t ex = e->x >> CSF;
uint16_t ey = e->y >> CSF;
uint16_t box = 7 + e->display_box.left;
return px > ex - box && px < ex + box && py > ey - box && py < ey + box;
//uint16_t px = player.x >> CSF;
//uint16_t py = player.y >> CSF;
//uint16_t ex = e->x >> CSF;
//uint16_t ey = e->y >> CSF;
int32_t box = 7 + e->display_box.left;
box <<= CSF;
//return px > ex - box && px < ex + box && py > ey - box && py < ey + box;
return player.x > e->x - box && player.x < e->x + box && player.y > e->y - box && player.y < e->y + box;
}

void ai_energy(Entity *e) {
Expand Down Expand Up @@ -65,7 +67,7 @@ void ai_energy(Entity *e) {
e->x += e->x_speed;
e->y += e->y_speed;
if(e->left_gravity) {
e->x_speed -= SPEED_8(6);
e->x_speed -= SPEED_8(8);
if(blk(e->x, -4, e->y, 0) == 0x41) e->x_speed = SPEED_8(0xFF);
} else {
if(e->y_speed < SPEED_10(0x3E0)) e->y_speed += SPEED_8(0x40);
Expand Down
Loading

0 comments on commit 6180f39

Please sign in to comment.