If you'd like to experiment with Terraform on macOS locally, a great provider for doing so is the Docker provider. You can get set up in a few simple steps, like so:
Install Docker for Mac if you have not already.
#ifndef __STBTTF_H__ | |
#define __STBTTF_H__ | |
#include <SDL2/SDL.h> | |
#include "stb_rect_pack.h" | |
#include "stb_truetype.h" | |
/* STBTTF: A quick and dirty SDL2 text renderer based on stb_truetype and stdb_rect_pack. | |
* Benoit Favre 2019 |
If you'd like to experiment with Terraform on macOS locally, a great provider for doing so is the Docker provider. You can get set up in a few simple steps, like so:
Install Docker for Mac if you have not already.
# get OAuth2 token | |
curl -H 'host:www.deviantart.com' -H 'User-Agent:DeviantArt/1.12 (iPhone; iOS 8.2; Scale/2.00)' -H 'Accept-Language:en;q=1' -H 'DA-SYNC-TOKEN:2fcf547f0e4ddcd8e8e45084b6dc0d2c' -H 'dA-minor-version:20160316' -H 'Accept:*/*' -H 'Content-Type:application/x-www-form-urlencoded' -H 'dA-session-id:b0618f6c2819e75b9d2b20b0e96c5802' -H 'Connection:keep-alive' -H 'Proxy-Connection:keep-alive' -H 'Content-Length:123' -H 'Accept-Encoding:gzip, deflate' -X POST 'https://www.deviantart.com/oauth2/token' --compressed --data-binary 'client_id=1701&client_secret=e6af3dc9712a1aad9efed05f16ceecf198aefcb5bab1531018e28034a3792e30&grant_type=client_credentials' |
// compile with: clang++ main.cpp -o image_exmple -lSDL2 -lSDL2_image | |
#include <SDL2/SDL.h> | |
#include <SDL2/SDL_image.h> | |
#include <cstdio> | |
#include <string> | |
#define SCREEN_WIDTH 640 | |
#define SCREEN_HEIGHT 480 | |
SDL_Window *window = NULL; |
A week ago I was CC'd in on a thread about Linux packaging, and how to avoid doing it the wrong way (i.e. RPM, Deb, etc.). I've always used MojoSetup and I've never forced distributions to do any additional work, but this is still a new concept to a lot of people. Additionally, Amos suggested that I expand on Itch's FNA appendix, so here's a guide on how I package my games.
This is a bit of an expansion on my MAGFest 2016 presentation, which you can find here:
http://www.flibitijibibo.com/magfest2016/
https://www.youtube.com/watch?v=B83CWUh0Log
I would recommend looking at that first! After that, read on...
# /etc/udev/rules.d/51-these-are-not-joysticks.rules | |
# https://gist.github.com/denilsonsa/978f1d842cf5430f57f6 | |
# | |
# These are devices that, although recognized by kernel as joysticks, are not | |
# joysticks. These rules will prevent the non-functional /dev/input/js* devices | |
# from being used, by removing read/write permissions from them. | |
# | |
# This is just a blacklist, which will always be incomplete (until the actual | |
# bug gets fixed). Feel free to add more devices to this list. | |
# |
#define MAX_CONTROLLERS 4 | |
class JoypadController { | |
public: | |
JoypadController() : m_is_connected(false), m_gamepad(0), m_instance_id(-1), m_haptic(0) {} | |
int JoypadController::processEvent(const SDL_Event& event); | |
private: | |
SDL_GameController *m_gamepad; | |
SDL_Haptic *m_haptic; |