Code Monkey home page Code Monkey logo

computernerd / retro-graphics-toolkit Goto Github PK

View Code? Open in Web Editor NEW
116.0 14.0 9.0 25.91 MB

Retro Graphics Toolkit is a free software program that allows graphics to be created for a wide variety of platforms (geared primarily towards retro video game consoles). Retro Graphics Toolkit also provides amazing interoperability between different platforms making cross platform developing faster and easier.

License: Other

C++ 70.86% C 15.70% TeX 0.34% Python 0.67% Lua 10.33% Makefile 0.15% Shell 0.07% HTML 0.06% MATLAB 1.82%

retro-graphics-toolkit's Introduction

IMPORTANT:

Please run

git clone --recursive https://github.com/ComputerNerd/Retro-Graphics-Toolkit

to checkout the repository.

What is Retro Graphics Toolkit?

Retro Graphics Toolkit is a free software (open source) graphics converter, tilemap, blocks, chunks, sprites and level editor. The goal is to make the task of taking an image and converting it to tiles on a tilemap or sprite sheet into many sprites as easy as possible. Also easy chunk editing, block importing from an image. Retro Graphics Toolkit supports many advanced features that many popular graphics editing program support such as undoing and redoing and project files. Retro Graphics Toolkit is also extensible with Lua scripting support.

Compiling

The compiling instructions are in the file COMPILE.

Dependencies

Retro Graphics Toolkit only needs FLTK and Lua installed. GNU/Linux users may use their system package manager to install these depending on the distribution.

License

Retro Graphics Toolkit is licensed under the terms of GPL v3 or later. This can be found in the file called COPYING. Any example code that is part of the Retro Graphics Toolkit project is licensed under a one clause BSD style license. This means anything only in the folders called examples and luaExamples all other code is licensed under the terms of the GPLv3 license or later. If you unsure what is part of the Retro Graphics Toolkit project it is anything that the base url (as of writing) is: https://github.com/ComputerNerd/Retro-Graphics-Toolkit If you are still unsure just ask. Here is the license used by example code

Copyright (c) 2014-2015, Sega16 All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

In other words if you use the sample code in your project that is fine, but don't say I made your project. I would not object to and in fact I would encourage that you say something to the effect of this uses sample code from the Retro Graphics Toolkit project.

retro-graphics-toolkit's People

Contributors

computernerd avatar flamewing avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

retro-graphics-toolkit's Issues

export tile map

Hi,
is it possible to export the tile map in the Format of the used color patette? The Images are always saved in 24 bit rgb Format (png, bmp). But if I import an image based on the genesis palette with 16 Colors (4 bit indexed Color) in the way:

File -> Tile Map -> Import Images to Tile Map
Patete Actions -> Generate optimal Palette.. -> dont Change Anything ..
Tile Map Actions -> Toggle True Color Viewing) 24 bit are not nessesary.

the additional Tile Map Export supports only 24 bit rgb mode (png, bmp). Is it possible to Export images in 4 bit indexed Color mode, when 16 Colors are used?

The advantage is you can direct import the Images in sgdk and draw with the optimal color palette.

Maybe ist's easy for you to implement this.

imageConverter.lua returns error

I am trying to use the imageConverter.lua script in the headless examples folder. However, whenever I run the script I get an error "ImageConverter.lua:33: attempt to call a nil value (field 'loadImage')

(I realize this is a support question moreso than an issue, but I can find no other places to contact you about this project. My contact email is in my profile. Please let me know if you are still actively developing this project. Thank you!)

undeclared identifier 'htobe16' on macosx

Hi,
I'm getting the following issue when compiling on macosx high sierra:

classtilemap.cpp:498:12: error: use of undeclared identifier 'htobe16'
                                                tile=htobe16(tile);//needs to be big endian
                                                     ^
..
2 warnings and 1 error generated.
make: *** [Makefile:22: classtilemap.o] Error 1

More details about my system:

$ xcode-select -v    
xcode-select version 2349.
 
$ g++ --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.38)
Target: x86_64-apple-darwin17.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Best regards,

collect2: error: ld returned 1 exit status

Hello and first of all thanks for this project! I am really looking forward to try it out, however I have issues in compiling it.

I am trying to compile on Linux Mint 20.

I have installed the required dependencies, and at first I tried to run make but I had a fatal error: lua.hpp: No such file or directory error.

I tried modifying the Makefile.common as suggested here #11 (comment) like so (luajit-2.0 -> luajit-2.1):

CFLAGS := -isystem /usr/include/fltk/ -Imdcomp/include/ -IautogeneratedBindings/ -Iluaposix/ext/include -Iluaposix_headers -Iiqa/include -I. -I/usr/include/luajit-2.1 -Ilua-compat-53/c-api -DCOMPAT53_PREFIX=luacompat -c

However I am getting many (.text+0x0): multiple definition of `luaL_prepbuffsize_52'; luaposix/ext/posix/ctype.o (symbol from plugin):(.text+0x0): first defined here type of errors, which I guess ends up in the final collect2: error: ld returned 1 exit status error.

What could be the cause of the issue?

FLTK issues compiling on Ubuntu 14.04

After fixing up all files to use the system Lua 5.2 development files, compilation still fails with FLTK errors. Several enumeration constants are used in several files are not present in the respective files (here is an error log).

While this is likely a packaging issue in Ubuntu, it would be good to not have Retro Graphics Toolkit depend on those as it prevents successful builds.

Cannot find lua module compat53

After compiling successfully on Ubuntu 20.04 and trying to run the executable:

config.lua:35: module 'compat53' not found:
	no field package.preload['compat53']
	no file '/usr/local/share/lua/5.3/compat53.lua'
	no file '/usr/local/share/lua/5.3/compat53/init.lua'
	no file '/usr/local/lib/lua/5.3/compat53.lua'
	no file '/usr/local/lib/lua/5.3/compat53/init.lua'
	no file '/usr/share/lua/5.3/compat53.lua'
	no file '/usr/share/lua/5.3/compat53/init.lua'
	no file './compat53.lua'
	no file './compat53/init.lua'
	no file '/usr/local/lib/lua/5.3/compat53.so'
	no file '/usr/lib/x86_64-linux-gnu/lua/5.3/compat53.so'
	no file '/usr/lib/lua/5.3/compat53.so'
	no file '/usr/local/lib/lua/5.3/loadall.so'
	no file './compat53.so'Lua error while running script
throw was called and the exception is unknown
lua_tostring(): error: attempt to call a nil value
terminate called after throwing an instance of 'int'
Aborted (core dumped)

CFLAGS := -isystem /usr/include/fltk/ -Imdcomp/include/ -IautogeneratedBindings/ -Iluaposix/ext/include -Iluaposix_headers -Iiqa/include -I. -I/usr/include/lua5.3 -Ilua-compat-53/c-api -c

LDFLAGS := -flto=8 -O3 -march=native -fuse-linker-plugin -s -fno-rtti -std=gnu++14 -L/usr/lib/fltk/ -lfltk_images -lfltk -lpng -ljpeg -lXft -lXext -lXinerama -lX11 -lz -s -llua5.3 -ldl

dither = 1 leads to black/incorrect tiles

Hallo ComputerNerd,

  1. If you dissable the dither function in the Palette Generation Settings or you set the dither power to one the Image conversion leads to black pictures or other artifacts.
  2. If you lock a color in the Palette (force first one for transparency) then the same Color appers on a other Position again and the transparence mode of gens Emulator work not correct.
  3. Imported Images to use as Tilemap with transperency are not supported

Compile error - lua.hpp: No such file or directory

Trying to compile under Ubuntu 18.04

libfltk1.3:
  Installed: 1.3.4-6
  Candidate: 1.3.4-6
  Version table:
 *** 1.3.4-6 500
        500 http://ubuntu.mirrors.tds.net/pub/ubuntu bionic/universe amd64 Packages
        100 /var/lib/dpkg/status

libboost-all-dev:
  Installed: 1.65.1.0ubuntu1
  Candidate: 1.65.1.0ubuntu1
  Version table:
 *** 1.65.1.0ubuntu1 500
        500 http://ubuntu.mirrors.tds.net/pub/ubuntu bionic/universe amd64 Packages
        100 /var/lib/dpkg/status

liblua5.3-0:
  Installed: 5.3.3-1ubuntu0.18.04.1
  Candidate: 5.3.3-1ubuntu0.18.04.1
  Version table:
 *** 5.3.3-1ubuntu0.18.04.1 500
        500 http://ubuntu.mirrors.tds.net/pub/ubuntu bionic-security/main amd64 Packages
        500 http://ubuntu.mirrors.tds.net/pub/ubuntu bionic-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     5.3.3-1 500
        500 http://ubuntu.mirrors.tds.net/pub/ubuntu bionic/main amd64 Packages
$ make
g++  -DPACKAGE='"luaposix"' -DVERSION='"RGT"' -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -DHAVE_NET_IF_H=1 -D_DEFAULT_SOURCE -DUSE_IMAGES=1 -isystem /usr/include/fltk/ -Ilua/src -Imdcomp/include/ -IautogeneratedBindings/ -Iluaposix/ext/include -Iluaposix_headers -I. -c -march=native -flto -fuse-linker-plugin -s -O3 -pipe -march=native -fomit-frame-pointer -fno-rtti -std=gnu++14 project.cpp -o project.o
In file included from project.cpp:29:0:
luaconfig.h:18:10: fatal error: lua.hpp: No such file or directory
 #include "lua.hpp"
          ^~~~~~~~~
compilation terminated.
Makefile:22: recipe for target 'project.o' failed
make: *** [project.o] Error 1

Add "or later" to GPL version?

Are you sure you want the license to be GPL version 3, and not version 3 or later? Look what happened to Linux for not explicitly including the "or later" part, now it's stuck with version 2 since it's impossible to gather all the copyright holders to update it to version 3.

endian.h not found on macosx

Hi,
When compiling in macosx high sierra I got:

In file included from project.cpp:17:
./includes.h:25:10: fatal error: 'endian.h' file not found
#include <endian.h>
         ^~~~~~~~~~
1 error generated.
make: *** [Makefile:22: project.o] Error 1

This is solved by doing:

diff --git a/includes.h b/includes.h
index 875ae59..f26c8ab 100644
--- a/includes.h
+++ b/includes.h
@@ -22,7 +22,7 @@
 #include <inttypes.h>
 #include <cmath>
 #ifndef _WIN32
-#include <endian.h>
+#include <machine/endian.h>
 #endif
 #include <FL/Fl.H>
 #include <FL/Fl_Shared_Image.H>

Best regards,

Mac OSX compile attempt

First off, thank you for this program, even if it's not working for me yet. Most similar programs are closed-source Windows one-offs, that are not expandable or supportable; I can't even attempt to compile them or am forced to use a VM for a dinky pixel art program. I am new to development on a mac and I have no desire to use xcode (which may be an issue here?). I use a mac because of the battery life and they're pretty much the standard at my office, but I shy away from apple otherwise.

Trying to build on Mac OSX 10.11.6

  • copy lua 5.3.4 into lua directory
  • edit makefile src/lua for "CC=clang++" and "-DLUA_COMPAT_5_2" removal
  • fltk 1.3.4 is installed via homebrew

make

	clang: warning: optimization flag '-fuse-linker-plugin' is not supported
	clang: warning: argument unused during compilation: '-s'
	In file included from project.cpp:17:
	./includes.h:25:10: fatal error: 'endian.h' file not found

I found a portable endian.h file online that takes care of some errors, like htobe16 definition. It allows further compilation with many warnings...

main.cpp:59:24: error: use of undeclared identifier 'get_current_dir_name'
    const char*olddirname=get_current_dir_name();

I barely know what I'm doing here, just trying to get a successful compilation. After a few minutes research, I find that PATH_MAX & getcwd might work, but it is probably not really correct or at least not recommended.

edit main.cpp

	#ifdef _WIN32
		char olddirname[MAX_PATH];
		getcwd(olddirname,sizeof(olddirname));
	#elif __APPLE__
		char olddirname[PATH_MAX];
		getcwd(olddirname,sizeof(olddirname));
	#else
		const char*olddirname=get_current_dir_name();

Progress though.

runlua.cpp:80:10: fatal error: 'posix.h' file not found

Any suggestions? I feel like I could just be missing something fundamental...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.