Page MenuHomePhabricator (Chris)

No OneTemporary

Authored By
Unknown
Size
6 KB
Referenced Files
None
Subscribers
None
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f3dfcb9..bff527b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,85 +1,85 @@
#Change this if you need to target a specific CMake version
cmake_minimum_required(VERSION 3.1)
set (CMAKE_CXX_STANDARD 11)
# To unify version handling
file (STRINGS "version.txt" DEERPORTAL_VERSION)
string(REGEX MATCH "^([0-9]+)" DEERPORTAL_VERSION_MAJOR ${DEERPORTAL_VERSION})
string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+).*" "\\2" DEERPORTAL_VERSION_MINOR ${DEERPORTAL_VERSION})
string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+.*)" "\\3" DEERPORTAL_VERSION_PATCH ${DEERPORTAL_VERSION})
MESSAGE( STATUS "DEERPORTAL_VERSION: " ${DEERPORTAL_VERSION} )
MESSAGE( STATUS "DEERPORTAL_VERSION_MAJOR: " ${DEERPORTAL_VERSION_MAJOR} )
MESSAGE( STATUS "DEERPORTAL_VERSION_MINOR: " ${DEERPORTAL_VERSION_MINOR} )
MESSAGE( STATUS "DEERPORTAL_VERSION_PATCH: " ${DEERPORTAL_VERSION_PATCH} )
# Enable debug symbols by default
# must be done before project() statement
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build (Debug or Release)" FORCE)
endif()
# (you can also set it on the command line: -D CMAKE_BUILD_TYPE=Release)
project(myproject)
#target_compile_definitions(DeerPortal PRIVATE FOO=1 BAR=1)
add_definitions(-DDEERPORTAL_VERSION="${DEERPORTAL_VERSION}.${CMAKE_BUILD_TYPE}")
# Set version information in a config.h file
# configure_file(
# "${PROJECT_SOURCE_DIR}/config.h.in"
# "${PROJECT_BINARY_DIR}/config.h"
# )
include_directories("${PROJECT_BINARY_DIR}")
include_directories(${YOUR_DIRECTORY})
# Define sources and executable
set(EXECUTABLE_NAME "DeerPortal")
file( GLOB SRCS src/*.cpp src/*.h )
add_executable(${EXECUTABLE_NAME} ${SRCS})
# Detect and add SFML
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules" ${CMAKE_MODULE_PATH})
#Find any version 2.X of SFML
#See the FindSFML.cmake file for additional details and instructions
find_package(SFML 2 REQUIRED network audio graphics window system)
if(SFML_FOUND)
include_directories(${SFML_INCLUDE_DIR})
target_link_libraries(${EXECUTABLE_NAME} ${SFML_LIBRARIES} ${SFML_DEPENDENCIES})
endif()
set_target_properties(${EXECUTABLE_NAME} PROPERTIES
MACOSX_BUNDLE TRUE
MACOSX_FRAMEWORK_IDENTIFIER org.cmake.ExecutableTarget
RESOURCE "${RESOURCE_FILES}"
)
# Install target
IF (WIN32)
set (ASSETS_BASE_PATH data)
install(TARGETS ${EXECUTABLE_NAME} DESTINATION .)
ELSE()
set (ASSETS_BASE_PATH share/games/deerportal)
install(TARGETS ${EXECUTABLE_NAME} DESTINATION bin)
ENDIF()
add_definitions(-DBASE_PATH="${CMAKE_INSTALL_PREFIX}")
IF (WIN32)
add_definitions(-DASSETS_PATH="${ASSETS_BASE_PATH}/")
#install(DIRECTORY assets DESTINATION share/games/deerportal)
install(DIRECTORY assets DESTINATION "${ASSETS_BASE_PATH}/")
ELSE()
- # add_definitions(-DASSETS_PATH="${CMAKE_INSTALL_PREFIX}/${ASSETS_BASE_PATH}/")
+ add_definitions(-DASSETS_PATH="${CMAKE_INSTALL_PREFIX}/${ASSETS_BASE_PATH}/")
# install(DIRECTORY assets DESTINATION share/games/deerportal)
install(DIRECTORY assets DESTINATION "${CMAKE_INSTALL_PREFIX}/${ASSETS_BASE_PATH}/")
ENDIF()
# install(DIRECTORY assets DESTINATION share/games/deerportal)
# CPack packaging
include(InstallRequiredSystemLibraries)
# set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
set(CPACK_PACKAGE_VERSION_MAJOR "${DEERPORTAL_VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${DEERPORTAL_VERSION_MINOR}.${DEERPORTAL_VERSION_PATCH}")
include(CPack)
diff --git a/snapcraft.yaml b/snapcraft.yaml
index 6ac0bdf..3fbca00 100644
--- a/snapcraft.yaml
+++ b/snapcraft.yaml
@@ -1,104 +1,104 @@
base: core18
name: deerportal
version: "0.8"
summary: Deer Portal" snap
description: Board game where you need to transfer yourself into the Deer God
grade: stable
-confinement: devmode
+confinement: strict
apps:
- deerportalsnap:
+ deerportal:
command: desktop-launch DeerPortal
environment:
DP_DIR: "$SNAP"
plugs:
- - alsa
+# - alsa
- audio-playback
- desktop
- desktop-legacy
# - gsettings
# - home
- opengl
- pulseaudio
- - unity7
+# - unity7
- wayland
- x11
# - alsa
parts:
desktop-gtk3:
build-packages:
- libgtk-3-dev
make-parameters:
- FLAVOR=gtk3
plugin: make
source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
source-subdir: gtk
stage-packages:
- libxkbcommon0
- ttf-ubuntu-font-family
- dmz-cursor-theme
- light-themes
- adwaita-icon-theme
- gnome-themes-standard
- shared-mime-info
- libgtk-3-0
- libgdk-pixbuf2.0-0
- libglib2.0-bin
- libgtk-3-bin
- unity-gtk3-module
- libappindicator3-1
- locales-all
- xdg-user-dirs
- ibus-gtk3
- libibus-1.0-5
source-deerportal:
plugin: cmake
configflags:
- -DCMAKE_BUILD_TYPE=Release
- -DCMAKE_INSTALL_PREFIX=/usr
source: .
source-type: local
# source-depth: 1
build-packages:
- g++
- libsfml-dev
- libgl1-mesa-dri
- libopenal-dev
- libsndio-dev
- libasound2-dev
- libasound2-data
# stage-packages:
# - libc6
# - alsa
stage-packages:
- alsa
- libasound2
- libflac8
- libfreetype6
- libgl1
- libglvnd0
- libglx0
- libjpeg-turbo8
- libogg0
- libopenal1
- libpng16-16
- libsfml-audio2.4
- libsfml-graphics2.4
- libsfml-system2.4
- libsfml-window2.4
- libsndio6.1
- libvorbis0a
- libvorbisenc2
- libvorbisfile3
- libx11-6
- libxau6
- libxcb1
- libxdmcp6
- libxext6
- libxrandr2
- libxrender1
- libasound2-data
- libasound2-plugins
after: [desktop-gtk3]
diff --git a/src/boarddiamond.cpp b/src/boarddiamond.cpp
index f313253..90f6610 100644
--- a/src/boarddiamond.cpp
+++ b/src/boarddiamond.cpp
@@ -1,33 +1,33 @@
#include "boarddiamond.h"
BoardDiamond::BoardDiamond()
{
idNumber = 0;
playerNumber = 0;
textures = nullptr;
}
BoardDiamond::BoardDiamond(TextureHolder *textures, int idNumber,
int playerNumber, int boardPosition)
{
this->textures = textures;
this->playerNumber = playerNumber;
this->boardPosition = boardPosition;
this->idNumber = idNumber;
spriteHolder.setTexture(this->textures->textureBoardDiamond);
sf::IntRect textureRect(idNumber*44, 0, 44,44);
spriteHolder.setTextureRect(textureRect);
- spriteHolder.scale(0.5, 0.5);
+ // spriteHolder.scale(0.5, 0.5);
setBoardPosition(boardPosition);
}
void BoardDiamond::draw(sf::RenderTarget& target, sf::RenderStates states) const
{
if (boardPosition>-1)
{
states.transform *= getTransform();
target.draw(spriteHolder, states);
}
}

File Metadata

Mime Type
text/x-diff
Expires
Wed, Jun 17, 9:31 PM (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
72317
Default Alt Text
(6 KB)

Event Timeline