Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Sammyueru committed Jan 7, 2024
0 parents commit f914e43
Show file tree
Hide file tree
Showing 165 changed files with 122,006 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.vscode
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Samm

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
21 changes: 21 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Samm

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# SammYT
Smaller projects that don't need their own repositories specificately shown on YouTube
20 changes: 20 additions & 0 deletions licenses/SDL2/COPYING.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

Simple DirectMedia Layer
Copyright (C) 1997-2020 Sam Lantinga <[email protected]>

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.

53 changes: 53 additions & 0 deletions licenses/SDL2/CREDITS.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@

Simple DirectMedia Layer CREDITS
Thanks to everyone who made this possible, including:

* Cliff Matthews, for giving me a reason to start this project. :)
-- Executor rocks! *grin*

* Ryan Gordon for helping everybody out and keeping the dream alive. :)

* Gabriel Jacobo for his work on the Android port and generally helping out all around.

* Philipp Wiesemann for his attention to detail reviewing the entire SDL code base and proposes patches.

* Andreas Schiffler for his dedication to unit tests, Visual Studio projects, and managing the Google Summer of Code.

* Mike Sartain for incorporating SDL into Team Fortress 2 and cheering me on at Valve.

* Alfred Reynolds for the game controller API and general (in)sanity

* Jørgen Tjernø for numerous magical Mac OS X fixes.

* Pierre-Loup Griffais for his deep knowledge of OpenGL drivers.

* Julian Winter for the SDL 2.0 website.

* Sheena Smith for many months of great work on the SDL wiki creating the API documentation and style guides.

* Paul Hunkin for his port of SDL to Android during the Google Summer of Code 2010.

* Eli Gottlieb for his work on shaped windows during the Google Summer of Code 2010.

* Jim Grandpre for his work on multi-touch and gesture recognition during
the Google Summer of Code 2010.

* Edgar "bobbens" Simo for his force feedback API development during the
Google Summer of Code 2008.

* Aaron Wishnick for his work on audio resampling and pitch shifting during
the Google Summer of Code 2008.

* Holmes Futrell for his port of SDL to the iPhone and iPod Touch during the
Google Summer of Code 2008.

* Jon Atkins for SDL_image, SDL_mixer and SDL_net documentation.

* Everybody at Loki Software, Inc. for their great contributions!

And a big hand to everyone else who has contributed over the years.

THANKS! :)

-- Sam Lantinga <[email protected]>

21 changes: 21 additions & 0 deletions licenses/imgui/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2014-2023 Omar Cornut

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
60 changes: 60 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# (c) Samm see License in LICENSE.txt FILE

CC := gcc
CXX := g++

PROJECT ?= float_compress
OS ?= WIN # WIN, LINUX, MACOS, UNIX, NONE
STATE ?= RELEASE # RELEASE, DEBUG
ARCH ?= x64 # x86, x64, ARM, ARM64
TYPE ?= SOFTWARE # SOFTWARE, OS

SRC := ./projects/$(PROJECT)/
BUILD := ./build/$(PROJECT)/
#OBJECTS := ./build/objects/$(PROJECT)/
INCS := -I./shared/inc/
LIBS := -L./shared/lib/$(ARCH)/

ifeq ($(ARCH),x86)
CFLAGS := -m32 -Wall
CXXFLAGS := -m32 -std=c++20 -Wall
ASFLAGS := -f elf
LDFLAGS := -m elf_i386 -T linker.ld
else ifeq ($(ARCH),x64)
CFLAGS := -m64 -Wall
CXXFLAGS := -m64 -std=c++20 -Wall
ASFLAGS := -f elf64
LDFLAGS := -m elf_x86_64 -T linker.ld
endif

ifeq ($(OS),WIN)
OUT := $(BUILD)$(PROJECT).exe
else ifeq ($(OS),LINUX)
OUT := $(BUILD)$(PROJECT).out
else ifeq ($(OS),MACOS)
OUT := $(BUILD)$(PROJECT).app
else
OUT := $(BUILD)$(PROJECT).bin
endif

ASM_SOURCES := $(wildcard $(shell find $(SRC) -name '*.asm'))
C_SOURCES := $(wildcard $(shell find $(SRC) -name '*.c'))
CXX_SOURCES := $(wildcard $(shell find $(SRC) -name '*.cpp'))

ASM_OBJS = $(ASM_SOURCES:.asm=.o)
C_OBJS = $(C_SOURCES:.c=.o)
CXX_OBJS = $(CXX_SOURCES:.cpp=.o)

$(OUT): $(ASM_OBJS)
$(CC) $(ASFLAGS) -o $@ $^

$(OUT): $(C_OBJS)
$(CC) $(CFLAGS) -o $@ $^

$(OUT): $(CXX_OBJS)
$(CXX) $(CXXFLAGS) -o $@ $^

rebuid: clean build
build: $(OUT)
clean:
rm build
1 change: 1 addition & 0 deletions projects/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.unfinished
37 changes: 37 additions & 0 deletions projects/float_compress/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// ==----------------------------------------==
// Useless float compression
// [PROJECT] START DATE: 1/6/2024
// (c) Samm, SEE LICENSE.txt FILE
// ==----------------------------------------==
#include <iostream>
#include <SDL2/SDL.h>

int main(int argc, char* argv[])
{
if(!SDL_Init(SDL_INIT_EVENTS | SDL_INIT_VIDEO | SDL_INIT_TIMER))
{
return -1;
}

SDL_Window* window = SDL_CreateWindow("Useless float compression", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1280, 720, SDL_WINDOW_ALLOW_HIGHDPI);
if(window == NULL)
{
return -1;
}

SDL_Renderer* renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED);
if(renderer == NULL)
{
return -1;
}

uint8_t running = 1;
while(running)
{


SDL_Delay(16);
}

return 0;
}
Loading

0 comments on commit f914e43

Please sign in to comment.