-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1279d71
Showing
111 changed files
with
43,396 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*~ | ||
build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
ISC License | ||
|
||
Copyright (c) 2022, Antonio SJ Musumeci <trapexit@spawn.link> | ||
|
||
Permission to use, copy, modify, and/or distribute this software for any | ||
purpose with or without fee is hereby granted, provided that the above | ||
copyright notice and this permission notice appear in all copies. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
COMPILER_PREFIX = | ||
PLATFORM = unix | ||
EXE = 3it | ||
|
||
OUTPUT = build/$(EXE) | ||
|
||
CC = $(COMPILER_PREFIX)-gcc | ||
CXX = $(COMPILER_PREFIX)-g++ | ||
STRIP = $(COMPILER_PREFIX)-strip | ||
|
||
OPT = -Os -static | ||
#OPT = -O0 -g -fsanitize=address -ggdb -fno-omit-frame-pointer | ||
CFLAGS = $(OPT) -Wall -MMD -MP | ||
CXXFLAGS = $(OPT) -Wall -std=c++17 -MMD -MP | ||
|
||
SRC_C = $(wildcard src/*.c) | ||
SRC_CXX = $(wildcard src/*.cpp) | ||
|
||
BUILDDIR = build/$(PLATFORM) | ||
OBJ = $(SRC_C:src/%.c=$(BUILDDIR)/%.c.o) | ||
OBJ += $(SRC_CXX:src/%.cpp=$(BUILDDIR)/%.cpp.o) | ||
DEP = $(SRC_CXX:src/%.cpp=$(BUILDDIR)/%.cpp.d) | ||
|
||
all: $(OUTPUT) | ||
|
||
$(OUTPUT): builddir $(OBJ) | ||
$(CXX) $(CXXFLAGS) -o $(OUTPUT) $(OBJ) | ||
|
||
strip: $(OUTPUT) | ||
$(STRIP) --strip-all $(OUTPUT) | ||
|
||
builddir: | ||
mkdir -p $(BUILDDIR) | ||
|
||
$(BUILDDIR)/%.c.o: src/%.c | ||
$(CC) $(CFLAGS) -c $< -o $@ | ||
|
||
$(BUILDDIR)/%.cpp.o: src/%.cpp | ||
$(CXX) $(CXXFLAGS) -c $< -o $@ | ||
|
||
clean: | ||
rm -rfv build/ | ||
|
||
.PHONY: clean builddir | ||
|
||
-include $(DEP) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
COMPILER_PREFIX = i686-w64-mingw32 | ||
PLATFORM = win32 | ||
EXE = 3it_win32.exe | ||
|
||
OUTPUT = build/$(EXE) | ||
|
||
CC = $(COMPILER_PREFIX)-gcc | ||
CXX = $(COMPILER_PREFIX)-g++ | ||
STRIP = $(COMPILER_PREFIX)-strip | ||
|
||
OPT = -Os -static | ||
CFLAGS = $(OPT) -MMD -MP | ||
CXXFLAGS = $(OPT) -std=c++17 -MMD -MP | ||
|
||
SRC_C = $(wildcard src/*.c) | ||
SRC_CXX = $(wildcard src/*.cpp) | ||
|
||
OBJ += $(SRC_C:src/%.c=build/$(PLATFORM)/%.c.o) | ||
OBJ += $(SRC_CXX:src/%.cpp=build/$(PLATFORM)/%.cpp.o) | ||
|
||
DEPS = $(OBJS:.o=.d) | ||
|
||
all: $(OUTPUT) | ||
|
||
$(OUTPUT): builddir $(OBJ) | ||
$(CXX) $(CXXFLAGS) -o $(OUTPUT) $(OBJ) | ||
|
||
strip: $(OUTPUT) | ||
$(STRIP) --strip-all $(OUTPUT) | ||
|
||
builddir: | ||
mkdir -p build/$(PLATFORM)/ | ||
|
||
build/$(PLATFORM)/%.c.o: src/%.c | ||
$(CC) $(CFLAGS) -c $< -o $@ | ||
|
||
build/$(PLATFORM)/%.cpp.o: src/%.cpp | ||
$(CXX) $(CXXFLAGS) -c $< -o $@ | ||
|
||
clean: | ||
rm -rfv build/ | ||
|
||
-include $(DEPS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
COMPILER_PREFIX = x86_64-w64-mingw32 | ||
PLATFORM = win64 | ||
EXE = 3it_win64.exe | ||
|
||
OUTPUT = build/$(EXE) | ||
|
||
CC = $(COMPILER_PREFIX)-gcc | ||
CXX = $(COMPILER_PREFIX)-g++ | ||
STRIP = $(COMPILER_PREFIX)-strip | ||
|
||
OPT = -Os -static | ||
CFLAGS = $(OPT) -MMD -MP | ||
CXXFLAGS = $(OPT) -std=c++17 -MMD -MP | ||
|
||
SRC_C = $(wildcard src/*.c) | ||
SRC_CXX = $(wildcard src/*.cpp) | ||
|
||
OBJ += $(SRC_C:src/%.c=build/$(PLATFORM)/%.c.o) | ||
OBJ += $(SRC_CXX:src/%.cpp=build/$(PLATFORM)/%.cpp.o) | ||
|
||
DEPS = $(OBJS:.o=.d) | ||
|
||
all: $(OUTPUT) | ||
|
||
$(OUTPUT): builddir $(OBJ) | ||
$(CXX) $(CXXFLAGS) -o $(OUTPUT) $(OBJ) | ||
|
||
strip: $(OUTPUT) | ||
$(STRIP) --strip-all $(OUTPUT) | ||
|
||
builddir: | ||
mkdir -p build/$(PLATFORM)/ | ||
|
||
build/$(PLATFORM)/%.c.o: src/%.c | ||
$(CC) $(CFLAGS) -c $< -o $@ | ||
|
||
build/$(PLATFORM)/%.cpp.o: src/%.cpp | ||
$(CXX) $(CXXFLAGS) -c $< -o $@ | ||
|
||
clean: | ||
rm -rfv build/ | ||
|
||
-include $(DEPS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# 3it: 3DO Image Tool | ||
|
||
An all purpose 3DO image conversion tool. Can convert to and from JPEG, PNG, | ||
BMP, 3DO CEL, 3DO Banner, 3DO ANIM, and 3DO IMAG formats. Supports coded and | ||
uncoded, packed and unpacked, linear and lrform CELs. | ||
|
||
|
||
## Usage | ||
|
||
``` | ||
$ 3it --help | ||
3it: 3DO Image Tool | ||
Usage: 3it [OPTIONS] SUBCOMMAND | ||
Options: | ||
-h,--help Print this help message and exit | ||
--help-all | ||
Subcommands: | ||
version print 3it version | ||
docs print links to relevant documentation | ||
info prints info about the file | ||
list-chunks list 3DO file chunks | ||
to-cel convert image to CEL | ||
to-banner convert image to banner | ||
to-bmp convert image to BMP | ||
to-png convert image to PNG | ||
to-jpg convert image to JPG | ||
``` | ||
|
||
|
||
## TODO | ||
|
||
* dump APPSCRN from ISO | ||
* dump-chunks | ||
* concat-chunks | ||
* to IMAG | ||
* to ANIM | ||
* ability to write text chunks | ||
|
||
|
||
## Notes | ||
|
||
I wrote this over the course of a few months on and off. I was playing with some | ||
different ideas so the code is not entirely consistent. Will clean up as needed. | ||
|
||
|
||
## Documentation | ||
|
||
* https://3dodev.com/ext/3DO/Portfolio_2.5/OnLineDoc/DevDocs/ppgfldr/ggsfldr/gpgfldr/5gpg.html | ||
|
||
|
||
## External sites | ||
|
||
* https://3dodev.com | ||
* https://github.com/trapexit/3dt | ||
* https://github.com/trapexit/3do-devkit |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.