-
Notifications
You must be signed in to change notification settings - Fork 0
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 e126a2e
Showing
171 changed files
with
24,729 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,6 @@ | ||
build | ||
.idea | ||
.gradle | ||
*.xml | ||
*.class | ||
*.iml |
Large diffs are not rendered by default.
Oops, something went wrong.
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 @@ | ||
Tile Monster | ||
============= | ||
|
||
Retro Console Tile Editor | ||
-------------------------- | ||
|
||
Tile Monster is a fork of Ken Hanson's original TM brought ever-so-slightly into the modern era. Much of its interface will feel feel familiar to users of YY-CHR, MSPaint or tile tools, but Tile Monster is a much more powerful animal! | ||
|
||
Tile Monster is a visual explorer of binary videogame data aimed at displaying and editing graphics content for editing and export. It supports many common platform formats out of the box but its design is platform-independant and employs relatively simple, XML-defined definitions for new graphics formats, file formats and palette formats. These "graphics codec" definitions can be linked to file extensions in order to automatically switch to the graphics mode associated with that extension. | ||
|
||
Detailed instructions on can be found in the [Manual](manual/Manual.md). | ||
|
||
Building & Running | ||
-------- | ||
|
||
While this has only been tested with `gradle 4.4` it should be simple enough to build on most versions of `gradle`. | ||
|
||
Simply running `gradle build` will build the `jar` in the `build/libs/` directory. | ||
|
||
It can then be run with `java -jar tilemonster-1.jar`. _Tile Monster requires Java Runtime Environment (JRE) version 1.4.0 or greater._ | ||
|
||
Features | ||
--------- | ||
|
||
Platform support: | ||
* Famicom/NES | ||
* SuFami/SNES | ||
* GameBoy | ||
* GameBoy Advance | ||
* Sega Master System | ||
* Sega Genesis/MegaDrive/32X | ||
* Nintendo 64 | ||
* WonderSwan | ||
* NeoGeo Pocket | ||
* and more...you can even add your own! | ||
|
||
Import/Export data in a variety of formats: | ||
* JPG | ||
* PNG | ||
* GIF | ||
* BMP | ||
* PCX | ||
|
||
Tons of useful features: | ||
* Simple, familiar interface | ||
* Automatic color reduction when pasting into low-res formats | ||
* Bookmark ROM locations | ||
* Create palettes or import them directly from ROM | ||
|
||
Format definitions have been moved into the `jar` itself for simpler portability but new definitions can still easily be added to the XML `tmspec.xml` file. The same is true for translation files. Please reach out if you would like to contribute new format definitions or translations to any other languages. | ||
|
||
Credits & License | ||
--------- | ||
|
||
This minor modernization of Ken Hanson's original Tile program is relesed under the same GNU GPLv2 as outlined in the [LICENSE](LICENSE). | ||
|
||
Some of the code included also comes from Kerry Shetline <[email protected]>, Matthias Burg <[email protected]>, Jef Poskanzer <[email protected]>, J. David Eisenberg <[email protected]>, Richard J.Osbaldeston, Kent Hansen and John Cristy. Where this is the case, the requisite notices and licenses are included. |
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,12 @@ | ||
apply plugin: 'java' | ||
|
||
sourceCompatibility = 1.7 | ||
version = '1' | ||
|
||
jar { | ||
manifest { | ||
attributes 'Main-Class': 'TileMonster', | ||
'Implementation-Title': 'Tile Monster', | ||
'Implementation-Version': version | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,50 @@ | ||
/* | ||
* | ||
* This file is part of Tile Monster. | ||
* | ||
* Tile Monster is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* Tile Monster is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
*/ | ||
|
||
import tm.ui.TMUI; | ||
|
||
/** | ||
* | ||
* Tile Monster main class. | ||
* A quite pointless class really. The application is very UI-centric, | ||
* so the TMUI class evolved into the real application backbone. | ||
* This class just gets the show started. | ||
* | ||
**/ | ||
|
||
public class TileMonster { | ||
|
||
/** | ||
* | ||
* Constructor. | ||
* | ||
**/ | ||
|
||
public TileMonster() { | ||
new TMUI(); | ||
} | ||
|
||
/** | ||
* | ||
* Starts up the program. | ||
* | ||
**/ | ||
|
||
public static void main(String[] args) { | ||
new TileMonster(); | ||
} | ||
|
||
} |
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,219 @@ | ||
/* | ||
* | ||
* This file is part of Tile Monster. | ||
* | ||
* Tile Monster is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* Tile Monster is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
*/ | ||
|
||
package tm; | ||
|
||
import tm.treenodes.*; | ||
import tm.ui.TMView; | ||
import java.io.File; | ||
import java.util.Vector; | ||
|
||
/** | ||
* | ||
* A FileImage object represents a file that has been loaded into the editor. | ||
* | ||
**/ | ||
|
||
public class FileImage { | ||
|
||
private byte[] contents; | ||
private File file; | ||
private Vector views = new Vector(); | ||
private static int fileNum=0; | ||
private boolean modified; | ||
private TMFileResources resources; | ||
|
||
/** | ||
* | ||
* Creates a FileImage from a file on disk. | ||
* | ||
* The contents of the file have already been read into buffer contents. | ||
* | ||
**/ | ||
|
||
public FileImage(File file, byte[] contents) { | ||
this.file = file; | ||
this.contents = contents; | ||
this.resources = null; | ||
setModified(false); | ||
} | ||
|
||
/** | ||
* | ||
* Creates a blank FileImage of the requested size. | ||
* | ||
**/ | ||
|
||
public FileImage(int size) throws OutOfMemoryError { | ||
file = new File(System.getProperty("user.dir") + (fileNum++)); | ||
this.resources = null; | ||
try { | ||
contents = new byte[size]; | ||
} | ||
catch (OutOfMemoryError e) { | ||
throw e; | ||
} | ||
// fill with zeroes | ||
for (int i=0; i<size; i++) { | ||
contents[i] = 0x00; | ||
} | ||
setModified(false); | ||
} | ||
|
||
/** | ||
* | ||
* Sets the file. | ||
* | ||
**/ | ||
|
||
public void setFile(File file) { | ||
this.file = file; | ||
} | ||
|
||
/** | ||
* | ||
* Gets the file. | ||
* | ||
**/ | ||
|
||
public File getFile() { | ||
return file; | ||
} | ||
|
||
/** | ||
* | ||
* Gets the binary contents of this FileImage. | ||
* | ||
**/ | ||
|
||
public byte[] getContents() { | ||
return contents; | ||
} | ||
|
||
/** | ||
* | ||
* Gets the size (in # of bytes) of the file contents. | ||
* | ||
**/ | ||
|
||
public int getSize() { | ||
return contents.length; | ||
} | ||
|
||
/** | ||
* | ||
* Gets the name of the file. | ||
* | ||
**/ | ||
|
||
public String getName() { | ||
return file.getName(); | ||
} | ||
|
||
/** | ||
* | ||
* Gets the TMViews associated with this FileImage. | ||
* | ||
**/ | ||
|
||
public TMView[] getViews() { | ||
TMView[] vs = new TMView[views.size()]; | ||
for (int i=0; i<vs.length; i++) { | ||
vs[i] = (TMView)views.get(i); | ||
} | ||
return vs; | ||
} | ||
|
||
/** | ||
* | ||
* Adds a TMView to this FileImage. | ||
* | ||
**/ | ||
|
||
public void addView(TMView view) { | ||
views.add(view); | ||
} | ||
|
||
/** | ||
* | ||
* Removes a TMView for this FileImage. | ||
* | ||
**/ | ||
|
||
public void removeView(TMView view) { | ||
views.remove(view); | ||
if (views.size() == 0) { | ||
contents = null; // kill the contents reference | ||
resources = null; | ||
file = null; | ||
} | ||
} | ||
|
||
/** | ||
* | ||
* Sets the modified flag. | ||
* | ||
**/ | ||
|
||
public void setModified(boolean modified) { | ||
this.modified = modified; | ||
// update view titles | ||
TMView[] views = getViews(); | ||
for (int i=0; i<views.length; i++) { | ||
TMView v = views[i]; | ||
String t = v.getTitle(); | ||
if (modified) { | ||
v.setTitle(getName()+"*"); | ||
v.getTMUI().setSaveButtonsEnabled(true); | ||
} | ||
else { | ||
v.setTitle(getName()); | ||
} | ||
} | ||
} | ||
|
||
/** | ||
* | ||
* Gets the modified flag. | ||
* | ||
**/ | ||
|
||
public boolean isModified() { | ||
return modified; | ||
} | ||
|
||
/** | ||
* | ||
* Sets the resources associated with this fileimage. | ||
* The resources contain bookmarks and palettes. | ||
* | ||
**/ | ||
|
||
public void setResources(TMFileResources resources) { | ||
this.resources = resources; | ||
} | ||
|
||
/** | ||
* | ||
* Gets the resources related to this fileimage. | ||
* | ||
**/ | ||
|
||
public TMFileResources getResources() { | ||
return resources; | ||
} | ||
|
||
} |
Oops, something went wrong.