nice refactors, now way cleaner to work with!
This commit is contained in:
9
.vscode/settings.json
vendored
Normal file
9
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"makefile.launchConfigurations": [
|
||||
{
|
||||
"cwd": "/home/sebastian/Documents/e36",
|
||||
"binaryPath": "/home/sebastian/Documents/e36/e36",
|
||||
"binaryArgs": []
|
||||
}
|
||||
]
|
||||
}
|
||||
33
Makefile
33
Makefile
@@ -1,16 +1,35 @@
|
||||
# Makefile
|
||||
CC = gcc
|
||||
CFLAGS = -Wall -O2
|
||||
CFLAGS = -Wall -O2 -Iinclude -Ithird_party
|
||||
LDFLAGS = -lm
|
||||
SRCDIR = src
|
||||
BUILDDIR = build
|
||||
TARGET = e36
|
||||
|
||||
TARGET = e36
|
||||
SRCS = main.c sstv.c robot36.c image.c wav.c martin.c scottie.c
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
SRCS = \
|
||||
$(SRCDIR)/main.c \
|
||||
$(SRCDIR)/encoder/image.c \
|
||||
$(SRCDIR)/encoder/sstv.c \
|
||||
$(SRCDIR)/encoder/modes/martin.c \
|
||||
$(SRCDIR)/encoder/modes/robot36.c \
|
||||
$(SRCDIR)/encoder/modes/scottie.c \
|
||||
$(SRCDIR)/sound/wav.c
|
||||
|
||||
OBJS = $(patsubst $(SRCDIR)/%.c,$(BUILDDIR)/%.o,$(SRCS))
|
||||
|
||||
.PHONY: all clean dirs
|
||||
|
||||
all: dirs $(TARGET)
|
||||
|
||||
dirs:
|
||||
mkdir -p $(BUILDDIR)/encoder/modes $(BUILDDIR)/sound
|
||||
|
||||
$(TARGET): $(OBJS)
|
||||
$(CC) $(OBJS) -o $(TARGET) $(LDFLAGS)
|
||||
$(CC) $(OBJS) -o $@ $(LDFLAGS)
|
||||
|
||||
%.o: %.c
|
||||
$(BUILDDIR)/%.o: $(SRCDIR)/%.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
clean:
|
||||
rm -f $(TARGET) $(OBJS)
|
||||
rm -rf $(BUILDDIR) $(TARGET)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef MARTIN_H
|
||||
#define MARTIN_H
|
||||
|
||||
#include "wav.h"
|
||||
#include "sound/wav.h"
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct {
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef ROBOT36_H
|
||||
#define ROBOT36_H
|
||||
|
||||
#include "wav.h"
|
||||
#include "sound/wav.h"
|
||||
#include <stdint.h>
|
||||
|
||||
#define ROBOT36_WIDTH 320
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef SCOTTIE_H
|
||||
#define SCOTTIE_H
|
||||
|
||||
#include "wav.h"
|
||||
#include "sound/wav.h"
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct {
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef SSTV_H
|
||||
#define SSTV_H
|
||||
|
||||
#include "wav.h"
|
||||
#include "sound/wav.h"
|
||||
#include <stdint.h>
|
||||
|
||||
void sstv_tone(wav_t *wav, double freq, double duration_ms);
|
||||
@@ -1,6 +1,6 @@
|
||||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#include "stb_image.h"
|
||||
#include "image.h"
|
||||
#include "../../third_party/stb_image.h"
|
||||
#include "../../include/encoder/image.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
int image_load(image_t *img, const char *filename) {
|
||||
@@ -1,7 +1,8 @@
|
||||
#include "martin.h"
|
||||
#include "image.h"
|
||||
#include "sstv.h"
|
||||
#include "wav.h"
|
||||
// martin.c - includes look shit, but this has to be like this
|
||||
#include "encoder/modes/martin.h"
|
||||
#include "encoder/image.h"
|
||||
#include "encoder/sstv.h"
|
||||
#include "sound/wav.h"
|
||||
#include <stdint.h>
|
||||
|
||||
const martin_mode_t MARTIN_M1 = {
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "robot36.h"
|
||||
#include "sstv.h"
|
||||
#include "encoder/modes/robot36.h"
|
||||
#include "encoder/sstv.h"
|
||||
#include <stdint.h>
|
||||
|
||||
// From Dayton Paper Appendix B - ITU BT.601
|
||||
@@ -1,7 +1,8 @@
|
||||
#include "scottie.h"
|
||||
#include "image.h"
|
||||
#include "sstv.h"
|
||||
#include "wav.h"
|
||||
#include "encoder/modes/scottie.h"
|
||||
#include "encoder/image.h"
|
||||
#include "encoder/sstv.h"
|
||||
#include "sound/wav.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
const scottie_mode_t SCOTTIE_S1 = {
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "sstv.h"
|
||||
#include "image.h"
|
||||
#include "robot36.h"
|
||||
#include "wav.h"
|
||||
#include "sound/wav.h"
|
||||
#include "encoder/sstv.h"
|
||||
#include "encoder/image.h"
|
||||
#include "encoder/modes/robot36.h"
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "sstv.h"
|
||||
#include "martin.h"
|
||||
#include "scottie.h"
|
||||
#include "encoder/modes/martin.h"
|
||||
#include "encoder/modes/scottie.h"
|
||||
#include "encoder/sstv.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "wav.h"
|
||||
#include "sound/wav.h"
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
0
stb_image.h → third_party/stb_image.h
vendored
0
stb_image.h → third_party/stb_image.h
vendored
Reference in New Issue
Block a user