Skip to content

Instantly share code, notes, and snippets.

Wellington Domiciano wldomiciano

Block or report user

Report or block wldomiciano

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@wldomiciano
wldomiciano / FindSDL2.cmake
Last active Aug 30, 2018
Only a custom CMake find module for SDL 2 in development stage
View FindSDL2.cmake
set(SDL2_SEARCH_PATHS "$ENV{SDL2_HOME}/SDL2")
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
if(MINGW)
set(PATH_SUFFIXES "x86_64-w64-mingw32/bin" "x86_64-w64-mingw32/lib" "x86_64-w64-mingw32/include/SDL2")
elseif(WIN32)
set(PATH_SUFFIXES "lib/x64" "include")
endif()
else()
if(MINGW)
@wldomiciano
wldomiciano / sdl2-setup.ps1
Last active Aug 26, 2018
Download and install SDL 2 and extra Visual Studio development libraries
View sdl2-setup.ps1
Set-PSDebug -off
$SDL2_DIR = "SDL_TEST"
$TEMP = "SDL_TEMP"
$SDL2_VERSIONS = @{
"SDL" = "2.0.7";
"SDL_image" = "2.0.2";
"SDL_mixer" = "2.0.2";
"SDL_net" = "2.0.1";
@wldomiciano
wldomiciano / game.c
Last active Sep 11, 2018
Demonstração das funções para lidar com eventos de teclado usando SDL 2 com um protótipo simples, os exemplos estão descritos nesta postagem: https://wldomiciano.com/sdl-2-como-lidar-com-eventos-unicos-do-teclado/
View game.c
// Testado no MinGW64
// gcc -Wall -Wextra -Wpedantic -Wno-unused-parameter game.c `sdl2-config --cflags --libs`
#include <SDL.h>
SDL_Window* window;
SDL_Renderer* renderer;
SDL_bool quit = SDL_FALSE;
// A tecla está pressionada?
@wldomiciano
wldomiciano / test.c
Last active Nov 6, 2017
Demonstração das funções para lidar com eventos de teclado usando SDL 2 com logs no console
View test.c
// Testado no MinGW64
// gcc -Wall -Wextra -Wpedantic -Wno-unused-parameter game.c `sdl2-config --cflags --libs`
#include <SDL.h>
SDL_bool quit = SDL_FALSE;
// A tecla está pressionada?
SDL_bool isKeyPressed(int key) {
return SDL_GetKeyboardState(NULL) [key];
}
@wldomiciano
wldomiciano / latest-git-installation.sh
Last active Jun 11, 2017
Script for install the latest Git version on Ubuntu
View latest-git-installation.sh
#!/usr/bin/env bash
# Run as root
# Use the '--no-doc' option for installation without doc and their dependencies.
apt-get update
apt-get install -y unzip build-essential autoconf \
libssl-dev libcurl4-openssl-dev \
libexpat1-dev gettext \
wget https://github.com/git/git/archive/master.zip;
@wldomiciano
wldomiciano / latest-linux-guest-additions.sh
Last active Aug 29, 2015
Install the latest Linux Guest Additions from command-line
View latest-linux-guest-additions.sh
#!/usr/bin/env bash
# Run as root
# Use the '--no-xorg' option for install without all xorg dependencies.
echo "Installing dependencies..."
apt-get update
if [ "$1" = "--no-xorg" ]; then
You can’t perform that action at this time.