Skip to content

Instantly share code, notes, and snippets.

@mantognini
mantognini / main.cpp
Created September 4, 2011 16:19
SFML test sf::Window::Create
//#define CREATE // vs new/delete
//#define SHAPE // vs sprite+texture
// Create VERSION :
#ifdef CREATE
#include <SFML/Graphics.hpp>
int main (int argc, const char * argv[])
@mantognini
mantognini / main.cpp
Created September 4, 2011 23:08
RenderTexture fait des images residuelles
#include <SFML/Graphics.hpp>
#include <SFML/Audio.hpp>
#include "ResourcePath.hpp"
int main (int argc, const char * argv[])
{
// Create the main window
sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window");
//creation d'une texture et du sprite qui la dessine
@mantognini
mantognini / sfml_joysticks_patch.diff
Created December 24, 2011 15:17
SFML2 joysticks patch
diff --git a/src/SFML/Window/OSX/HIDJoystickManager.cpp b/src/SFML/Window/OSX/HIDJoystickManager.cpp
index fcb9730..0b6bb68 100644
--- a/src/SFML/Window/OSX/HIDJoystickManager.cpp
+++ b/src/SFML/Window/OSX/HIDJoystickManager.cpp
@@ -75,10 +75,23 @@ HIDJoystickManager::HIDJoystickManager()
{
myHIDManager = IOHIDManagerCreate(kCFAllocatorDefault, kIOHIDOptionsTypeNone);
- CFDictionaryRef mask = HIDInputManager::CopyDevicesMask(kHIDPage_GenericDesktop,
- kHIDUsage_GD_Joystick);
@mantognini
mantognini / pong.cpp
Created January 5, 2012 16:08
pong.cpp épuré pour faire ressortir le bug d'affichage
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Graphics.hpp>
////////////////////////////////////////////////////////////
/// Entry point of application
///
sub q211
{
my %table = ();
my $index = 0;
foreach $i (A..R) {
$table{$i} = int ($index++ / 3) + 2;
}
$index = 0;
foreach $i (T..Y) {
$table{$i} = int ($index++ / 3) + 8;
#ifndef STANDARDCURSOR_HPP
#define STANDARDCURSOR_HPP
#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#if defined(SFML_SYSTEM_WINDOWS)
#include <windows.h>
#elif defined(SFML_SYSTEM_LINUX)
#include <X11/cursorfont.h>
@mantognini
mantognini / nsarray.m
Created July 20, 2012 12:33
how to use nsarray
#import <Foundation/Foundation.h>
@interface Person : NSObject
@property (nonatomic, strong) NSString *name;
+ (id)personWithName:(NSString *)name;
- (id)initWithName:(NSString *)name;
- (void)hello;
@mantognini
mantognini / patch.diff
Created August 20, 2012 18:39
dash docset patch
diff --git a/doc/doxyfile.in b/doc/doxyfile.in
index df37dbf..4fd6a17 100644
--- a/doc/doxyfile.in
+++ b/doc/doxyfile.in
@@ -848,21 +848,21 @@ HTML_DYNAMIC_SECTIONS = NO
# it at startup.
# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information.
-GENERATE_DOCSET = NO
+GENERATE_DOCSET = YES
@mantognini
mantognini / Info.plist
Created August 20, 2012 18:55
SFML 2.0 Docset Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleIdentifier</key>
<string>org.sfml-dev.doc.2.0</string>
<key>CFBundleName</key>
@mantognini
mantognini / gcc_build_how_to.txt
Created September 23, 2012 19:48
Build GCC 4.6.3 -- How To
##
## Build GCC 4.6.3 -- How To
## for icvdi.epfl.ch Ubuntu 10.04 VMs
## (without sudo command)
##
## 22.09.2012
## Marco Antognini
##