Project cleanup

Standard shaders and fonts now belong to the source directory
This commit is contained in:
John Alanbrook 2022-08-05 21:16:04 +00:00
parent 9b0901eaf8
commit e745acad3e
44 changed files with 3 additions and 70 deletions

View file

@ -1,24 +0,0 @@
#!/usr/bin/perl
# Use with tags created with 'ctags -x'; give it a symbol
use strict;
use warnings;
my $pat = $ARGV[0] or die("Need a tag to find");
print "Found for the tag $pat: \n";
sub main
{
my $t = 'tags';
open(FH, $t) or die("File $t not found.");
while (my $line = <FH>) {
if ($line =~ /^$pat/) {
my @l = split(' ', $line);
#print "$l[3]:$l[2] \n";
exec 'echo $l[3]:$l[2] > /dev/null'
}
}
}
main();

Binary file not shown.

View file

View file

@ -1,25 +0,0 @@
#include "pinball.h"
#include "gameobject.h"
#include "input.h"
struct flipper *pinball_flipper_make(struct mGameObject *go)
{
struct flipper *new = calloc(1, sizeof(struct flipper));
pinball_flipper_init(new, go);
return new;
}
void pinball_flipper_init(struct flipper *flip, struct mGameObject *go)
{
cpBodySetAngle(go->body, flip->angle1);
}
void pinball_flipper_update(struct flipper *flip, struct mGameObject *go)
{
if ((flip->left && currentKeystates[SDL_SCANCODE_LSHIFT])
|| currentKeystates[SDL_SCANCODE_RSHIFT]) {
cpBodySetAngle(go->body, flip->angle2);
} else
cpBodySetAngle(go->body, flip->angle1);
}

View file

@ -1,18 +0,0 @@
#ifndef PINBALL_H
#define PINBALL_H
struct mGameObject;
struct flipper {
float angle1;
float angle2;
float flipspeed;
int left;
};
struct flipper *pinball_flipper_make(struct mGameObject *go);
void pinball_flipper_init(struct flipper *flip, struct mGameObject *go);
void pinball_flipper_update(struct flipper *flip, struct mGameObject *go);
#endif

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

0
shaders/fragment.glsl → source/shaders/fragment.glsl Executable file → Normal file
View file

View file

View file

0
shaders/gridfrag.glsl → source/shaders/gridfrag.glsl Executable file → Normal file
View file

0
shaders/gridvert.glsl → source/shaders/gridvert.glsl Executable file → Normal file
View file

View file

View file

0
shaders/linefrag.glsl → source/shaders/linefrag.glsl Executable file → Normal file
View file

0
shaders/linevert.glsl → source/shaders/linevert.glsl Executable file → Normal file
View file

View file

View file

0
shaders/outline.glsl → source/shaders/outline.glsl Executable file → Normal file
View file

View file

0
shaders/postfrag.glsl → source/shaders/postfrag.glsl Executable file → Normal file
View file

0
shaders/postvert.glsl → source/shaders/postvert.glsl Executable file → Normal file
View file

View file

View file

View file

0
shaders/skyfrag.glsl → source/shaders/skyfrag.glsl Executable file → Normal file
View file

0
shaders/skyvert.glsl → source/shaders/skyvert.glsl Executable file → Normal file
View file

View file

View file

0
shaders/textfrag.glsl → source/shaders/textfrag.glsl Executable file → Normal file
View file

2
shaders/textvert.glsl → source/shaders/textvert.glsl Executable file → Normal file
View file

@ -7,5 +7,5 @@ uniform mat4 projection;
void main()
{
gl_Position = projection * vec4(vertex.xy, 0.0, 1.0);
TexCoords = vertex.zw;
TexCoords = vec2(vertex.z, 1.0 - vertex.w);
}

0
shaders/vertex.glsl → source/shaders/vertex.glsl Executable file → Normal file
View file

View file

@ -13,7 +13,7 @@ mat4 rec601 = mat4(
1.16438, 2.01723, 0.00000, -1.08139,
0, 0, 0, 1
);
void main() {
float y = texture2D(texture_y, TexCoords).r;
float cb = texture2D(texture_cb, TexCoords).r;

View file

@ -7,6 +7,6 @@ uniform mat4 model;
uniform mat4 projection;
void main() {
TexCoords = vertex.zw;
TexCoords = vec2(vertex.x, 1.0 - vertex.y);
gl_Position = projection * model * vec4(vertex.xy, 0.0, 1.0);
}