Skip to content

Commit

Permalink
Initial :: commit
Browse files Browse the repository at this point in the history
  • Loading branch information
LuniumLuk committed Jan 27, 2023
0 parents commit 2a0cadd
Show file tree
Hide file tree
Showing 21 changed files with 2,584 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
32 changes: 32 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Prerequisites
*.d

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app
91 changes: 91 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
"files.associations": {
"\"*.vue\"": "\"html\"",
"*.vue": "html",
"*.cjson": "jsonc",
"*.wxss": "css",
"*.wxs": "javascript",
"iosfwd": "cpp",
"algorithm": "cpp",
"vector": "cpp",
"queue": "cpp",
"ios": "cpp",
"*.tcc": "cpp",
"list": "cpp",
"__node_handle": "cpp",
"__bit_reference": "cpp",
"__bits": "cpp",
"__config": "cpp",
"__debug": "cpp",
"__errc": "cpp",
"__hash_table": "cpp",
"__locale": "cpp",
"__mutex_base": "cpp",
"__nullptr": "cpp",
"__split_buffer": "cpp",
"__string": "cpp",
"__threading_support": "cpp",
"__tree": "cpp",
"__tuple": "cpp",
"array": "cpp",
"atomic": "cpp",
"bit": "cpp",
"bitset": "cpp",
"cctype": "cpp",
"chrono": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"compare": "cpp",
"complex": "cpp",
"concepts": "cpp",
"condition_variable": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"deque": "cpp",
"exception": "cpp",
"initializer_list": "cpp",
"iostream": "cpp",
"istream": "cpp",
"limits": "cpp",
"locale": "cpp",
"map": "cpp",
"memory": "cpp",
"mutex": "cpp",
"new": "cpp",
"numbers": "cpp",
"numeric": "cpp",
"optional": "cpp",
"ostream": "cpp",
"random": "cpp",
"ratio": "cpp",
"semaphore": "cpp",
"set": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"string": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"typeinfo": "cpp",
"unordered_map": "cpp",
"unordered_set": "cpp",
"variant": "cpp",
"functional": "cpp",
"iterator": "cpp",
"memory_resource": "cpp",
"utility": "cpp",
"stop_token": "cpp",
"thread": "cpp",
"cinttypes": "cpp"
},
"C_Cpp.default.configurationProvider": "ms-vscode.makefile-tools"
}
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) 2023 LuniumLuk

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 @@
# Bricks
A bricks game
Binary file added bricks
Binary file not shown.
56 changes: 56 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#### MAKEFILE
#### Generated by myself.

#### Currently support two platforms:
#### - MacOS
#### - Windows

## Compiler settings.
CC := g++
CLANG := clang++
CFLAGS := -std=c++17 -O3 # -Og -Wall -Wextra
## Basic settings.
TARGET := bricks
BUILDDIR := build
ICDDIR := src
SRCDIR := src
## Add your *.cpp file here, make sure they are under SRCDIR folder.
SOURCES := $(wildcard $(addprefix $(SRCDIR)/, *.cpp))
INCLUDES := $(wildcard $(addprefix $(ICDDIR)/, *.h))
OBJECTS := $(addprefix $(BUILDDIR)/, $(notdir $(SOURCES:.cpp=.o)))

ifeq ($(OS),Windows_NT)
MKDIR := if not exist $(BUILDDIR) mkdir $(BUILDDIR)
RUN :=
PLATFORM := win32
CLEAN := if exist $(BUILDDIR) rmdir /s /q $(BUILDDIR)
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
MKDIR := mkdir -p $(BUILDDIR)
RUN := ./
PLATFORM := macos
CLEAN := rm -rf $(BUILDDIR)
endif
endif

all: $(PLATFORM)

prepare:
@$(MKDIR)

macos: prepare $(OBJECTS)
@$(CLANG) -o $(TARGET) -framework Cocoa $(CFLAGS) platform/macos.mm $(OBJECTS)

win32: prepare $(OBJECTS)
@$(CC) -o $(TARGET).exe $(CFLAGS) platform/win32.cpp $(OBJECTS) -lgdi32

$(BUILDDIR)/%.o: $(SRCDIR)/%.cpp $(INCLUDES)
@$(CC) $(CFLAGS) -I$(ICDDIR) -o $@ -c $<

clean:
@$(CLEAN)

run: $(PLATFORM)
@$(RUN)$(TARGET)

Loading

0 comments on commit 2a0cadd

Please sign in to comment.