Skip to content

Commit e68f6c7

Browse files
committed
dont save cart in xplode
1 parent 0ad88ad commit e68f6c7

File tree

4 files changed

+65
-9
lines changed

4 files changed

+65
-9
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ message("BUILD_WITH_ALL: ${BUILD_WITH_ALL}")
8383
message("BUILD_PLAYER: ${BUILD_PLAYER}")
8484
message("BUILD_IPO: ${BUILD_IPO}")
8585
message("BUILD_SOKOL_WEBGPU: ${BUILD_SOKOL_WEBGPU}")
86+
message("BUILD_TOOLS: ${BUILD_TOOLS}")
8687

8788
if(UNIX AND NOT APPLE AND NOT EMSCRIPTEN AND NOT ANDROID AND NOT NINTENDO_3DS)
8889
set(LINUX TRUE)

GEMINI.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Project Overview: TIC-80 TINY COMPUTER
2+
3+
TIC-80 is a free and open-source fantasy computer designed for creating, playing, and sharing small games. It provides a complete development environment with built-in tools for code, sprites, maps, sound effects, and music editing, all accessible via a command line. The project emphasizes retro-style game development by imposing technical limitations such as a 240x136 pixel display and a 16-color palette.
4+
5+
**Key Features:**
6+
* **Multi-language Support:** Develop games using Lua, Moonscript, Javascript, Ruby, Wren, Fennel, Squirrel, Janet, and Python.
7+
* **Integrated Editors:** Built-in tools for code, sprites, world maps, sound effects, and music.
8+
* **Cartridge System:** Games are packaged into easily distributable cartridge files.
9+
* **Cross-Platform:** Works on various operating systems, allowing cartridges to be played on any device.
10+
* **Pro Version:** Offers additional features like saving/loading cartridges in text format and more memory banks.
11+
12+
# Building and Running
13+
14+
The project uses CMake as its primary build system. Detailed instructions for various platforms (Windows, Linux, Mac, FreeBSD) are available in the `README.md`.
15+
16+
**General Build Steps:**
17+
18+
1. **Clone the repository:**
19+
```bash
20+
git clone --recursive https://github.com/nesbox/TIC-80
21+
cd TIC-80/build
22+
```
23+
2. **Configure with CMake:**
24+
Run `cmake` with appropriate options for your platform and desired features. To ensure all tools (including `xplode`) are built, use the `-DBUILD_TOOLS=ON` flag. A common configuration to build with all supported scripts is:
25+
```bash
26+
cmake -DBUILD_WITH_ALL=On -DBUILD_TOOLS=ON ..
27+
```
28+
For specific platforms and advanced options (e.g., `BUILD_SDLGPU=On`, `BUILD_STATIC=On`), refer to the "Build instructions" section in the `README.md`.
29+
30+
3. **Build the project:**
31+
```bash
32+
cmake --build . --parallel
33+
# or for Make-based systems:
34+
# make -j$(nproc) # or make -j4 for Mac/FreeBSD
35+
```
36+
37+
**Running the Application:**
38+
39+
After a successful build, the executable `tic80` will typically be found in the `build/bin` directory.
40+
41+
* **If installed system-wide:**
42+
```bash
43+
tic80
44+
```
45+
* **From the build directory:**
46+
```bash
47+
./tic80
48+
```
49+
50+
# Development Conventions
51+
52+
* **Code of Conduct:** The project adheres to the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md), promoting an open and welcoming environment.
53+
* **Security Policy:** Only the latest releases receive security updates. Vulnerabilities should be reported via a [GitHub issue](https://github.com/nesbox/TIC-80/issues/new) or directly to `[email protected]`. Refer to `SECURITY.md` for more details.
54+
* **Code Formatting:** The project uses `.clang-format` for consistent code style, based on LLVM coding standards. Key formatting rules include:
55+
* 4-space indentation.
56+
* Allman style for braces (`BreakBeforeBraces: Allman`).
57+
* `AllowShortIfStatementsOnASingleLine: true`.
58+
* `PointerAlignment: Left`.
59+
* `NamespaceIndentation: None`.
60+
* `EmptyLineBeforeAccessModifier: LogicalBlock`.

build/tools/xplode.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -98,16 +98,7 @@ s32 main(s32 argc, char** argv)
9898
free(img.data);
9999
}
100100

101-
// save cart
102-
{
103-
FileBuffer buffer = {sizeof(tic_cartridge), malloc(buffer.size)};
104-
buffer.size = tic_cart_save(cart, buffer.data);
105-
106-
writeFile("cart.tic", buffer);
107-
printf("cart.tic successfully exported\n");
108101

109-
free(buffer.data);
110-
}
111102

112103
// save project
113104
{

tic80.sublime-project

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828
"name": "PRO=ON",
2929
"shell_cmd": "cmake -DBUILD_PRO=ON .."
3030
},
31+
{
32+
"name": "BUILD_TOOLS=ON",
33+
"shell_cmd": "cmake -DBUILD_TOOLS=ON .."
34+
},
3135
{
3236
"name": "IPO=ON",
3337
"shell_cmd": "cmake -DBUILD_IPO=ON .."

0 commit comments

Comments
 (0)