Skip to content

Instantly share code, notes, and snippets.

View RobertShippey's full-sized avatar

Robert Shippey RobertShippey

View GitHub Profile
GSound myTrack;
GSample myPlayableTrack = myTrack.load("path/to/file.mp3", true);
myPlayableTrack.play();
//It looks like that's passing back a GError so you could try this:
GError myError = myTrack.load("path/to/file.mp3", true);
Gwin.writeString(myError.getErrorMsg());
/*
* use import to include classes defined within the java.io package
*/
import java.io.*;
/**
* This example will demonstrate how to write information to a file.
* <p>
* It also shows you how to use comments that can be used by javadoc to produce
* HTML api document files for your class. There are a number of javadoc tags that
@RobertShippey
RobertShippey / gist:1918458
Created February 26, 2012 19:26
Scape Invaders - Tony
// Space Invaders Project.cpp : Defines the entry point for the application.
// Author:
// ID:
// Version:
// Date: 17 Feb 2012
// Description:
#include "stdafx.h"
#include "gwin.h"
@RobertShippey
RobertShippey / gist:1878992
Created February 21, 2012 21:14
Pacman - Will
#include "stdafx.h"
#include "gwin.h"
class Pacman {
public:
int x;
int y;
int Scale;
// direction
@RobertShippey
RobertShippey / gist:1670791
Created January 24, 2012 15:48
track struct init
struct Track {
char TrackName[MAXCHARS];
int Genre;
int PlayMin;
int PlaySec;
};
Track MusicTrack[MAXTRACKS] = { //opening the array
{"Holst_Mars", 1, 15, 10}, //first struct in the array with each item in the struct
{"New_York", 2, 3, 50}, //second