Skip to content

Instantly share code, notes, and snippets.

View m0r13's full-sized avatar

Moritz Hilscher m0r13

View GitHub Profile
 moritz  /  media  mapcrafter-projects  mapcrafter_test  mapcrafter -c world1.4.conf -rf isometric_day isometric_day_jpeg isometric_day_indexed -j 4
2015-05-18 18:08:47 [INFO] [default] Scanning worlds...
2015-05-18 18:08:48 [INFO] [default] [1/3] Rendering map isometric_day ("isometric_day"):
2015-05-18 18:08:48 [INFO] [default] Last rendering was on 18 May 2015, 17:43:55.
[=====================================] 100.00% 14640/14640 47.69/s
2015-05-18 18:13:55 [INFO] [default] [1.1/1.1] Rendering rotation top-left took 307 seconds.
2015-05-18 18:13:55 [INFO] [default] [2/3] Rendering map isometric_day_jpeg ("isometric_day_jpeg"):
2015-05-18 18:13:55 [INFO] [default] Last rendering was on 18 May 2015, 17:43:55.
[=====================================] 100.00% 14640/14640 85.61/s
2015-05-18 18:16:46 [INFO] [default] [2.1/2.1] Rendering rotation top-left took 171 seconds.
@m0r13
m0r13 / sudoku.c
Last active August 29, 2015 14:14
#include <stdio.h>
int sudoku[9][9];
int read() {
for (int y = 0; y < 9; y++) {
for (int x = 0; x < 9; x++) {
scanf("%d", &sudoku[x][y]);
}
}
#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"
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 *-----------------------------------------------------------
@m0r13
m0r13 / config.js
Last active August 29, 2015 14:12
var CONFIG = {
"maps": {
"exmaple_day_isometric": {
"imageFormat": "png",
"lastRendered": [
1420150312,
1420150312,
1420150312,
1420150312
],
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 / 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
@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]
 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
#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;