Skip to content

Commit 92c68b2

Browse files
committed
Ignore util folder
1 parent e1471b0 commit 92c68b2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+26
-9540
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
source/util/
12
temp/
23
*.ppm

source/main.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -57,20 +57,6 @@ int main(int argc, const char *argv[]) {
5757
DgSleep(sleeptime);
5858
}
5959

60-
DgBitmap bitmap;
61-
62-
if ((err = DgBitmapInit(&bitmap, (DgVec2I) {1280, 720}, 4))) {
63-
DgLog(DG_LOG_ERROR, "Failed to initialise bitmap.");
64-
}
65-
66-
if ((err = RoGetFrameData(&roc, bitmap.chan * bitmap.width * bitmap.height, bitmap.src, true))) {
67-
DgLog(DG_LOG_ERROR, "Error while getting frame data: %s.", DgErrorString(err));
68-
}
69-
70-
DgBitmapWritePPM(&bitmap, "file://test.ppm");
71-
72-
DgBitmapFree(&bitmap);
73-
7460
RoContextDestroy(&roc);
7561
DgWindowFree(&window);
7662

source/rendroar/ro_default_shader.glsl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ void main() {
1414
#endif
1515

1616
#ifdef FRAGMENT
17+
uniform sampler2D gTexture;
18+
1719
void main() {
18-
gl_FragColor = fColour;
20+
gl_FragColor = fColour * texture(gTexture, fTextureCoords);
1921
}
2022
#endif

source/scene.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

source/scene.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#pragma once
2+
3+
/**
4+
* In the engine, an entity is really just a script. Attributes are stored in
5+
* the script as script-local variables, and behaviour is implemented in the
6+
* script as functions.
7+
*
8+
* Note that an entity can also be something like a
9+
*/
10+
typedef struct {
11+
12+
} TrEntity;
13+
14+
/**
15+
* A scene contains a collection of entities. It should also probably contain
16+
* some kind of resource manager for *.script resources, honestly.
17+
*/
18+
typedef struct {
19+
TrEntity entities;
20+
size_t entity_count;
21+
} TrScene;

source/util/alloc.c

Lines changed: 0 additions & 124 deletions
This file was deleted.

source/util/alloc.h

Lines changed: 0 additions & 32 deletions
This file was deleted.

source/util/args.c

Lines changed: 0 additions & 176 deletions
This file was deleted.

0 commit comments

Comments
 (0)