Skip to content

Commit

Permalink
v2.2.1 支持CartagraHD脚本(未测试)
Browse files Browse the repository at this point in the history
  • Loading branch information
wetor committed Dec 4, 2023
1 parent 3a8baa8 commit df504dc
Show file tree
Hide file tree
Showing 4 changed files with 213 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ LucaSystem 引擎解析工具
#### CZ2

- 导出完成 8位
- 导入完成 8位

#### CZ3

Expand Down Expand Up @@ -111,6 +112,15 @@ LucaSystem 引擎解析工具

## 更新日志

### 2.2.1 (2023.12.4)
- 支持[CartagraHD](https://vndb.org/r78712)脚本导入导出(未测试)

### 2.2.0 (2023.12.3)
- 支持CZ2的导入(未实际测试)

### 2.1.0 (2023.11.28)
- 支持CZ2的导出

### 2023.10.7
- 支持LOOPERS导入和导出(已测试)
- 支持Plugin扩展以支持任意游戏
Expand Down
41 changes: 41 additions & 0 deletions data/CartagraHD.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import core
from base.cartagrahd import *

def Init():
# core.Charset_UTF8
# core.Charset_Unicode
# core.Charset_SJIS
core.set_config(expr_charset=core.Charset_UTF8, # 表达式编码, core.expr
text_charset=core.Charset_Unicode, # 文本编码, core.text
default_export=True) # 未定义指令的参数是否全部导出

def MESSAGE():
core.read_uint16(True)
core.read_len_str(core.text)
core.read_uint8()
core.read(False)
core.end()

def SELECT():
core.read_uint16()
core.read_uint16()
core.read_uint16()
core.read_uint16()
core.read_len_str(core.text)
core.read(True)
core.end()

def DIALOG():
core.read_uint16(False)
core.read_uint16(False)
core.read_len_str(core.text)
core.read(False)
core.end()

def LOG_BEGIN():
core.read_uint8(False)
core.read_uint8(False)
core.read_uint8(False)
core.read_len_str(core.text)
core.read(False)
core.end()
134 changes: 134 additions & 0 deletions data/CartagraHD.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
EQU
EQUN
EQUV
ADD
SUB
MUL
DIV
MOD
AND
OR
RANDOM
VARSTR
VARSTR_ADD
SET
FLAGCLR
GOTO
ONGOTO
GOSUB
IFY
IFN
RETURN
JUMP
FARCALL
FARRETURN
JUMPPOINT
END
STARTUP_BETGIN
STARTUP_END
TASKSCRVAR
VARSTR_SET
VARSTR_ALLOC
ARFLAGSET
COLORBG_SET
SPLINE_SET
SHAKELIST_SET
SCISSOR_TRIANGLELIST_SET
MESSAGE
MESSAGE_CLEAR
MESSAGE_WAIT
MESSAGE_AR_SET
SELECT
CLOSE_WINDOW
FADE_WINDOW
LOG_BEGIN
LOG_PAUSE
LOG_END
VOICE
VOICE_STOP
WAIT_COUNT
WAIT_TIME
WAIT_TEXTFEED
FFSTOP
INIT
STOP
IMAGELOAD
IMAGEUPDATE
ARC
MOVE
MOVE_SKIP
ROT
PEND
FADE
SCALE
SHAKE
SHAKELIST
BASE
MCMOVE
MCARC
MCROT
MCSHAKE
MCFADE
WAIT
WAIT_BSKIP
DRAW
WIPE
FRAMEON
FRAMEOFF
FW
SCISSOR
DELAY
RASTER
TONE
SCALECOSSIN
BMODE
SIZE
SPLINE
DISP
MASK
FACE
SEPIA
SEPIA_COLOR
CUSTOMMOVE
SWAP
ADDCOLOR
SUBCOLOR
SATURATION
CONTRAST
PRIORITY
UVWH
EVSCROLL
COLORLEVEL
NEGA
TONECURVE
SKIP_SCOPE_BEGIN
SKIP_SCOPE_END
QUAKE
BGM
BGM_WAIT_START
BGM_WAIT_FADE
BGM_PUSH
BGM_POP
SE
SE_STOP
SE_WAIT
SE_WAIT_COUNT
SE_WAIT_FADE
VOLUME
MOVIE
SETCGFLAG
EX
TROPHY
SETBGMFLAG
TASK
PRINTF
DIALOG
VIB_PLAY
VIB_FILE
VIB_STOP
CHAR_VOLUME
SCENE_REPLAY_END
SAVE_THUMBNAIL
MANPU
SCENARIO
UNKNOWN
28 changes: 28 additions & 0 deletions data/base/cartagrahd.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import core

def IFN():
# IFN (int, expr_str, {jump})
core.read_uint16(True)
core.read_str(core.expr)
core.read_jump()
core.end()

def IFY():
# IFY (int, expr_str, {jump})
core.read_uint16(True)
core.read_str(core.expr)
core.read_jump()
core.end()

def GOTO():
# GOTO ({jump})
core.read_jump()
core.end()

def JUMP():
# JUMP (int, file_str, {jump})
core.read_uint16(True)
file = core.read_str(core.expr)
if core.can_read():
core.read_jump(file)
core.end()

0 comments on commit df504dc

Please sign in to comment.