Skip to content

Commit

Permalink
feature(docs): update readme & year (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
xensik authored Jan 14, 2024
1 parent 9b885e3 commit bef0355
Show file tree
Hide file tree
Showing 204 changed files with 226 additions and 223 deletions.
7 changes: 0 additions & 7 deletions .github/dependabot.yml

This file was deleted.

38 changes: 24 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,27 @@ A utility to compile & decompile IW engine game scripts.
- **T9** *(Call of Duty: Black Ops Cold War)* ***\*WIP\****

## Usage
``./gsc-tool.exe <mode> <game> <system> <path>``
``gsc-tool [OPTIONS..] <path>``

**mode**: `asm`, `disasm`, `comp`, `decomp`, `parse`
- *note:* zonetool files (*.cgsc*, *.cgsc.stack*) use: `zasm`, `zdisasm`, `zcomp`, `zdecomp` modes
- **path**: file or directory to process

**game**: `iw5`, `iw6`, `iw7`, `iw8`, `iw9`, `s1`, `s2`, `s4`, `h1`, `h2`, `t6` `t7` `t8` `t9`
- **options:**

**system**: `pc`, `ps3`, `ps4`, `ps5`, `xb2` (*360*), `xb3` (*One*), `xb4` (*Series X|S*), `wiiu`
``-m, --mode <mode>`` [REQUIRED] one of: `asm`, `disasm`, `comp`, `decomp`, `parse`

**path**: `file` or `directory` (recursive process all files inside the directory)
``-g, --game <game>`` [REQUIRED] one of: `iw5`, `iw6`, `iw7`, `iw8`, `iw9`, `s1`, `s2`, `s4`, `h1`, `h2`, `t6` `t7` `t8` `t9`

Example: ``./gsc-tool.exe comp iw5 pc ./data/iw5/my_fancy_script.gsc``
``-s, --system <system>`` [REQUIRED] one of: `pc`, `ps3`, `ps4`, `ps5`, `xb2` (*360*), `xb3` (*One*), `xb4` (*Series X|S*), `wiiu`

``-d, --dev`` Enable developer mode (generate bytecode map).

``-z, --zonetool`` Enable zonetool mode (use .cgsc files).

``-h, --help`` Display help.

``-v, --version`` Display version.

Example: ``gsc-tool -m comp -g iw5 -s pc ./data/iw5/my_fancy_script.gsc``

| Mode |Description | Output |
|:---------|:--------------------------|:------------|
Expand All @@ -48,13 +57,14 @@ Example: ``./gsc-tool.exe comp iw5 pc ./data/iw5/my_fancy_script.gsc``
## File Format
If you need to extract scripts from fastfiles or game memory, use [Zonetool](https://github.com/ZoneTool/zonetool) or [Jekyll](https://github.com/EthanC/Jekyll).

- gsc-tool `.gscbin` format is a serialized ScriptFile struct: <br/>
***name***: null-terminated string <br/>
***compressedLen***: 4 byte uint <br/>
***len***: 4 byte uint <br/>
***bytecodeLen***: 4 byte uint <br/>
***buffer***: byte array[compressedLen] <br/>
***bytecode***: byte array[bytecodeLen] <br/>
- gsc-tool `.gscbin` binary format is a serialized ScriptFile struct: <br/>

- ***magic***: `"GSC\0"` 4 byte <br/>
- ***compressedLen***: 4 byte usigned integer <br/>
- ***len***: 4 byte usigned integer <br/>
- ***bytecodeLen***: 4 byte usigned integer <br/>
- ***buffer***: byte array[compressedLen] <br/>
- ***bytecode***: byte array[bytecodeLen] <br/>

note: for PS3 & Xbox 360 `.gscbin` files *(compressedLen, len, bytecodeLen)* are saved as little-endian!!

Expand Down
2 changes: 1 addition & 1 deletion gen/arc/parser.ypp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2023 xensik. All rights reserved.
/* Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion gen/gsc/parser.ypp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2023 xensik. All rights reserved.
/* Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/arc/assembler.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/arc/common/assembly.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/arc/common/asset.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/arc/common/ast.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/arc/common/buffer.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/arc/common/define.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/arc/common/directive.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/arc/common/exception.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/arc/common/location.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/arc/common/lookahead.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/arc/common/scope.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/arc/common/space.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/arc/common/token.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/arc/common/types.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/arc/compiler.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/arc/context.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/arc/decompiler.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/arc/disassembler.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/arc/engine/t6.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/arc/engine/t6_pc.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/arc/engine/t6_ps3.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/arc/engine/t6_wiiu.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/arc/engine/t6_xb2.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/arc/engine/t7.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/arc/engine/t8.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/arc/engine/t9.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/arc/lexer.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/arc/preprocessor.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/arc/source.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/gsc/assembler.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/gsc/common/assembly.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/gsc/common/asset.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/gsc/common/ast.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/gsc/common/buffer.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/gsc/common/define.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/gsc/common/directive.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/gsc/common/exception.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/gsc/common/location.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/gsc/common/lookahead.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/gsc/common/scope.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/gsc/common/space.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/gsc/common/token.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/gsc/common/types.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/gsc/compiler.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/gsc/context.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/gsc/decompiler.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/gsc/disassembler.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/gsc/engine/h1.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/gsc/engine/h2.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/gsc/engine/iw5_pc.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/gsc/engine/iw5_ps.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/gsc/engine/iw5_xb.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion include/xsk/gsc/engine/iw6_pc.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 xensik. All rights reserved.
// Copyright 2024 xensik. All rights reserved.
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
Expand Down
Loading

0 comments on commit bef0355

Please sign in to comment.