Skip to content

Commit

Permalink
Merge pull request #12 from jtothebell/pngCart
Browse files Browse the repository at this point in the history
Add support for Png Carts
  • Loading branch information
jtothebell authored Jun 19, 2020
2 parents 4e8ca37 + 0fbac85 commit 7eccaf8
Show file tree
Hide file tree
Showing 21 changed files with 9,078 additions and 194 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ ROOT_SOURCES ?= source
ROOT_INCLUDES ?= include

#paths are relative to platform folder
export SOURCES = ../../source ../../libs/lua-5.3.2/src ../../libs/utf8-util
export INCLUDES = ../../include ../../libs/lua-5.3.2/src ../../libs/utf8-util
export SOURCES = ../../source ../../libs/lua-5.3.2/src ../../libs/utf8-util ../../libs/lodepng
export INCLUDES = ../../include ../../libs/lua-5.3.2/src ../../libs/utf8-util ../../libs/lodepng

.PHONY: all 3ds switch clean clean-3ds clean-switch

Expand Down
21 changes: 21 additions & 0 deletions libs/lodepng/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Copyright (c) 2005-2018 Lode Vandevenne

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.

2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.

3. This notice may not be removed or altered from any source
distribution.

75 changes: 75 additions & 0 deletions libs/lodepng/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
LodePNG
-------

PNG encoder and decoder in C and C++, without dependencies

Home page: http://lodev.org/lodepng/

### Documentation

Detailed documentation is included in a large comment in the second half of the
header file `lodepng.h`.

Source code examples using LodePNG can be found in the examples directory.

An FAQ can be found on http://lodev.org/lodepng/

### Building

Only two files are needed to encode and decode PNGs:

* `lodepng.cpp` (or renamed to `lodepng.c`)
* `lodepng.h`

All other files are just source code examples, tests, misc utilities, etc...,
which are normally not needed in projects using this.

You can include the files directly in your project's source tree and its
makefile, IDE project file, or other build system. No library is necessary.

In addition to C++, LodePNG also supports ANSI C (C89), with all the same
functionality: C++ only adds extra convenience API.

For C, rename `lodepng.cpp` to `lodepng.c`.

Consider using git submodules to include LodePNG in your project.

### Compiling in C++

If you have a hypothetical `your_program.cpp` that #includes and uses `lodepng.h`,
you can build as follows:

`g++ your_program.cpp lodepng.cpp -Wall -Wextra -pedantic -ansi -O3`

or:

`clang++ your_program.cpp lodepng.cpp -Wall -Wextra -pedantic -ansi -O3`

This shows compiler flags it was designed for, but normally one would use the
compiler or build system of their project instead of those commands, and other
C++ compilers are supported.

### Compiling in C

Rename `lodepng.cpp` to `lodepng.c` for this.

If you have a hypothetical your_program.c that #includes and uses lodepng.h,
you can build as follows:

`gcc your_program.c lodepng.c -ansi -pedantic -Wall -Wextra -O3`

or

`clang your_program.c lodepng.c -ansi -pedantic -Wall -Wextra -O3`

This shows compiler flags it was designed for, but normally one would use the
compiler or build system of their project instead of those commands, and other
C compilers are supported.

### Makefile

There is a Makefile, but this is not intended for using LodePNG itself since the
way to use that one is to include its source files in your program. The Makefile
only builds development and testing utilities. It can be used as follows:

`make -j`
Loading

0 comments on commit 7eccaf8

Please sign in to comment.