-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,692 changed files
with
169,473 additions
and
525,569 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include <string.h> | ||
|
||
int main(int argc, char ** argv) { | ||
char path[128]; | ||
if (argc < 2) { | ||
printf("usage: embed filename\n"); | ||
return 0; | ||
} | ||
FILE *fp; | ||
fp = fopen(argv[1], "rb"); | ||
size_t size; | ||
fseek(fp, 0, SEEK_END); | ||
size = ftell(fp); | ||
fseek(fp, 0, SEEK_SET); | ||
unsigned char buffer[size]; | ||
int sread = fread(buffer, 1, size, fp); | ||
if (sread != size) { | ||
printf("failed to read '%s'\n", argv[1]); | ||
fclose(fp); | ||
return 0; | ||
} | ||
|
||
size_t ssize = size * 20 + 512; | ||
char out[ssize]; | ||
memset(out, 0, ssize); | ||
sprintf(out, "static const char data[] = {\n"); | ||
for (int i = 0; i < size; i++) { | ||
if (buffer[i] == EOF) break; | ||
char c[10]; | ||
sprintf(c, "%d,", buffer[i]); | ||
sprintf(out, "%s%s", out, c); | ||
if (i != 0 && i % 20 == 0) sprintf(out, "%s\n", out); | ||
} | ||
sprintf(out, "%s0\n};", out); | ||
fp = fopen("out.h", "wb"); | ||
int swrite = fwrite(out, sizeof(out), 1, fp); | ||
fclose(fp); | ||
|
||
|
||
|
||
return 0; | ||
} |
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
local Concord = require "libs.concord" | ||
|
||
local camera = require "libs.camera" | ||
|
||
local Camera = Concord.component(function(c, x, y, w, h) | ||
c.camera = camera(x, y, w, h) | ||
c.camera:offset("center", "center") | ||
c.camera:setLimits(0, 0, 640, 105) | ||
c.camera:setDeadzone("off") | ||
end) | ||
|
||
return Camera |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
local Concord = require "libs.concord" | ||
local GoblinAI = Concord.component(function(c) | ||
c.idle = true | ||
c.moving = false | ||
c.attack = false | ||
end) | ||
|
||
return GoblinAI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
local Concord = require "libs.concord" | ||
local Gravity = Concord.component(function(c, gravity) | ||
c.gravity = gravity or 100 | ||
end) | ||
|
||
return Gravity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
local Concord = require "libs.concord" | ||
|
||
local Hitbox = Concord.component(function(c, x, y, w, h) | ||
c.x = x or 0 | ||
c.y = y or 0 | ||
c.w = w or 16 | ||
c.h = h or 16 | ||
end) | ||
|
||
return Hitbox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
local Concord = require "libs.concord" | ||
local Input = Concord.component() | ||
|
||
return Input |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
local Concord = require "libs.concord" | ||
local Kinematic = Concord.component(function(c) | ||
c.isOnFloor = false | ||
c.cols = {} | ||
c.isColliding = false | ||
end) | ||
|
||
return Kinematic |
Oops, something went wrong.