Godot Engine – Multi-platform 2D and 3D game engine
Go to file
Rémi Verschelde c5f830d6b9 Split thirdparty smaz.c out of compressed_translation.cpp
Code comes from 150e125cba/smaz.c

With a small modification to match Godot expectations:
```
diff --git a/thirdparty/core/smaz.c b/thirdparty/core/smaz.c
index 9b1ebc2..555dfea 100644
--- a/thirdparty/core/smaz.c
+++ b/thirdparty/core/smaz.c
@@ -14,7 +14,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 #include <string.h>

 /* Our compression codebook, used for compression */
-static char *Smaz_cb[241] = {
+static const char *Smaz_cb[241] = {
 "\002s,\266", "\003had\232\002leW", "\003on \216", "", "\001yS",
 "\002ma\255\002li\227", "\003or \260", "", "\002ll\230\003s t\277",
 "\004fromg\002mel", "", "\003its\332", "\001z\333", "\003ingF", "\001>\336",
@@ -89,7 +89,7 @@ static char *Smaz_rcb[254] = {
 "e, ", " it", "whi", " ma", "ge", "x", "e c", "men", ".com"
 };

-int smaz_compress(char *in, int inlen, char *out, int outlen) {
+int smaz_compress(const char *in, int inlen, char *out, int outlen) {
     unsigned int h1,h2,h3=0;
     int verblen = 0, _outlen = outlen;
     char verb[256], *_out = out;
@@ -167,7 +167,7 @@ out:
     return out-_out;
 }

-int smaz_decompress(char *in, int inlen, char *out, int outlen) {
+int smaz_decompress(const char *in, int inlen, char *out, int outlen) {
     unsigned char *c = (unsigned char*) in;
     char *_out = out;
     int _outlen = outlen;
@@ -192,7 +192,7 @@ int smaz_decompress(char *in, int inlen, char *out, int outlen) {
             inlen -= 2+len;
         } else {
             /* Codebook entry */
-            char *s = Smaz_rcb[*c];
+            const char *s = Smaz_rcb[*c];
             int len = strlen(s);

             if (outlen < len) return _outlen+1;
diff --git a/thirdparty/core/smaz.h b/thirdparty/core/smaz.h
index a547d89..a9d8a33 100644
--- a/thirdparty/core/smaz.h
+++ b/thirdparty/core/smaz.h
@@ -14,7 +14,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 #ifndef _SMAZ_H
 #define _SMAZ_H

-int smaz_compress(char *in, int inlen, char *out, int outlen);
-int smaz_decompress(char *in, int inlen, char *out, int outlen);
+int smaz_compress(const char *in, int inlen, char *out, int outlen);
+int smaz_decompress(const char *in, int inlen, char *out, int outlen);

 #endif
```
2017-04-28 21:19:24 +02:00
core Split thirdparty smaz.c out of compressed_translation.cpp 2017-04-28 21:19:24 +02:00
doc added documentation for SurfaceTool 2017-04-25 21:35:25 -06:00
drivers Fix property warnings and hide some debug prints 2017-04-23 11:17:32 +02:00
editor Move core thirdparty files to thirdparty/{minizip,misc} 2017-04-28 21:19:23 +02:00
main Merge pull request #8277 from tagcup/math_checks 2017-04-24 11:16:20 +02:00
misc Add new editor and default theme (WIP) 2017-04-27 08:04:57 +02:00
modules Add new editor and default theme (WIP) 2017-04-27 08:04:57 +02:00
platform Move core thirdparty files to thirdparty/{minizip,misc} 2017-04-28 21:19:23 +02:00
scene Move core thirdparty files to thirdparty/{minizip,misc} 2017-04-28 21:19:23 +02:00
servers AudioServer: Set singleton to NULL when destructed 2017-04-27 21:36:35 +02:00
thirdparty Split thirdparty smaz.c out of compressed_translation.cpp 2017-04-28 21:19:24 +02:00
.clang-format Style: Add .clang-format based on LLVM style 2017-02-11 23:48:56 +01:00
.editorconfig Add .editorconfig 2015-06-22 14:07:26 -03:00
.gitattributes Formatting of mm files 2017-04-09 21:22:40 +10:00
.gitignore gitignore: Add version_generated.h 2017-04-20 02:00:24 +02:00
.travis.yml Travis: Run clang-format static check 2017-03-19 15:26:29 +01:00
AUTHORS.md AUTHORS: Prevent bad Markdown formatting 2017-04-08 00:16:50 +02:00
CONTRIBUTING.md Changed a link from http to https 2017-04-13 17:54:16 -04:00
ISSUE_TEMPLATE.md Issue template: Stop discouraging bug reporting on master 2017-03-24 22:01:59 +01:00
LICENSE.md Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
LOGO_LICENSE.md logo in svg curves & license 2015-06-08 01:33:46 -03:00
README.md Fix URLs to moved docs pages 2017-04-05 07:34:27 +02:00
SConstruct -Fix eternal black screen on Windows 2017-04-09 17:59:17 -03:00
icon.png Fixed iCCp chunk in pngs 2016-06-22 21:13:29 +02:00
icon.svg Remove grey capsule on official logo 2016-02-28 16:52:45 +01:00
logo.png Fixed iCCp chunk in pngs 2016-06-22 21:13:29 +02:00
logo.svg Remove grey capsule on official logo 2016-02-28 16:52:45 +01:00
methods.py Move VERSION_MKSTRING logic to version.h 2017-04-20 12:14:34 +02:00
signal_renames.txt Added a list of signals to rename, this should become a header eventually 2017-01-12 00:54:21 -03:00
version.py Bump version to 3.0-alpha 2017-01-02 23:02:25 +01:00

README.md

GODOT

Godot Engine

Homepage: https://godotengine.org

2D and 3D cross-platform game engine

Godot Engine is a feature-packed, cross-platform game engine to create 2D and 3D games from a unified interface. It provides a comprehensive set of common tools, so that users can focus on making games without having to reinvent the wheel. Games can be exported in one click to a number of platforms, including the major desktop platforms (Linux, Mac OSX, Windows) as well as mobile (Android, iOS) and web-based (HTML5) platforms.

Free, open source and community-driven

Godot is completely free and open source under the very permissive MIT license. No strings attached, no royalties, nothing. The users' games are theirs, down to the last line of engine code. Godot's development is fully independent and community-driven, empowering users to help shape their engine to match their expectations. It is supported by the Software Freedom Conservancy not-for-profit.

Before being open sourced in February 2014, Godot had been developed by Juan Linietsky and Ariel Manzur (both still maintaining the project) for several years as an in-house engine, used to publish several work-for-hire titles.

Getting the engine

Binary downloads

Official binaries for the Godot editor and the export templates can be found on the homepage.

Compiling from source

See the official docs for compilation instructions for every supported platform.

Community

Godot is not only an engine but an ever-growing community of users and engine developers. The main community channels are listed on the homepage.

To get in touch with the developers, the best way is to join the #godotengine IRC channel on Freenode.

Documentation and demos

The official documentation is hosted on ReadTheDocs. It is maintained by the Godot community in its own GitHub repository.

The class reference is also accessible from within the engine.

The official demos are maintained in their own GitHub repository as well.

There are also a number of other learning resources provided by the community, such as text and video tutorials, demos, etc. Consult the community channels for more info.

Build Status Code Triagers Badge