Skip to content

Instantly share code, notes, and snippets.

View m0r13's full-sized avatar

Moritz Hilscher m0r13

View GitHub Profile
@m0r13
m0r13 / forum_thread
Created September 12, 2014 13:54
Mapcrafter forum thread page
[center][b][size=18px]Mapcrafter - High Performance Minecraft Map Renderer[/size][/b][/center]
[center][url=http://mapcrafter.org]Website[/url] | [url=http://docs.mapcrafter.org]Documentation[/url] | [url=https://github.com/m0r13/mapcrafter/wiki/Example-maps]Example Maps[/url] | [url=https://github.com/mapcrafter/mapcrafter]GitHub[/url][/center]
I want to present you my Minecraft map renderer written in C++.
The renderer provides you with an isometric 3D view and renders Minecraft worlds to images which are viewable in any webbrowser using Leaflet.js (similar to the Google Maps API).
[b]Features:[/b]
@m0r13
m0r13 / utf8.cpp
Last active August 29, 2015 14:06
#include <cctype>
#include <iostream>
#include <sstream>
std::string convertUnicodeLiteral(std::string literal) {
// if (!util::startswith(escape, "\\u") ...
literal = literal.substr(2);
std::stringstream ss;
ss << std::hex << literal/*.substr(0, 4)*/;
unsigned int ord;
#include <iostream>
#include <GL/gl.h>
#include <GL/glut.h>
#include <GL/glu.h>
bool fullscreen = false;
int windowX, windowY, windowWidth, windowHeight, cursor;
float angle = 0;
float color = 0;
 moritz  ~  mapcrafter  cloc .    master 
154 text files.
153 unique files.
15 files ignored.
http://cloc.sourceforge.net v 1.62 T=0.66 s (212.2 files/s, 37630.9 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
C++ 52 1979 2079 10221
@m0r13
m0r13 / output.txt
Last active August 29, 2015 14:09
Primes stuff.
M_1 = [4, 8, 9, 12, 16, 18, 20, 24, 25, 27]
M_2 = [60, 66, 90, 600, 606, 609, 666, 680, 696, 806]
M_3 = [4, 6, 8, 9, 12, 16, 18, 20, 24, 25]
M_a = [4, 8, 9, 12, 16]
M_b = [6, 60, 66, 69, 86]
M_c = [6, 60, 66, 69, 86]
@m0r13
m0r13 / ndame.c
Last active August 29, 2015 14:11
#include <stdio.h>
#include <stdlib.h>
int N;
int damen[100];
int columns[200], diag1[200], diag2[200];
#define DIAG1(row, column) (row)+(column)
#define DIAG2(row, column) (row)-(column)+N
RGBAPixel gaussBlur(const RGBAImage& image, int x, int y, int radius) {
int count = 0;
int r = 0, g = 0, b = 0, a = 0;
for (int dx = -radius; dx < radius; dx++)
for (int dy = -radius; dy < radius; dy++) {
int x2 = x + dx;
int y2 = y + dy;
if (x2 < 0 || y2 < 0 || x2 >= image.getWidth() || y2 >= image.getHeight())
continue;
count++;
@m0r13
m0r13 / config.js
Last active August 29, 2015 14:12
var CONFIG = {
"maps": {
"exmaple_day_isometric": {
"imageFormat": "png",
"lastRendered": [
1420150312,
1420150312,
1420150312,
1420150312
],
00001000 Starting Address
Assembler used: EASy68K Editor/Assembler v5.15.02
Created On: 1/8/2015 9:37:28 PM
00000000 1 *-----------------------------------------------------------
00000000 2 * Title :
00000000 3 * Written by :
00000000 4 * Date :
00000000 5 * Description:
00000000 6 *-----------------------------------------------------------
#include "../mapcraftercore/mc/world.h"
#include "../mapcraftercore/mc/worldcache.h"
#include "../mapcraftercore/renderer/blockimages.h"
#include "../mapcraftercore/renderer/image.h"
#include "../mapcraftercore/renderer/rendermode.h"
#include "../mapcraftercore/renderer/renderview.h"
#include "../mapcraftercore/renderer/tilerenderer.h"
#include "../mapcraftercore/renderer/tileset.h"
#include "../mapcraftercore/renderer/rendermodes/lighting.h"
#include "../mapcraftercore/util.h"