[cairo-commit] cairo-demo/svgspacewar ChangeLog, NONE, 1.1 Makefile, NONE, 1.1 svgspacewar.c, NONE, 1.1

Oeyvind Kolaas commit at pdx.freedesktop.org
Thu Mar 31 06:38:00 PST 2005


Committed by: pippin

Update of /cvs/cairo/cairo-demo/svgspacewar
In directory gabe:/tmp/cvs-serv12854

Added Files:
	ChangeLog Makefile svgspacewar.c 
Log Message:
importing svgspacewar

--- NEW FILE: ChangeLog ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: Makefile ---
CC = gcc

APPS =				\
	svgspacewar

CFLAGS  = -g -Wall

CFLAGS  += `pkg-config gtkcairo --cflags`
LDFLAGS += `pkg-config gtkcairo --libs`

all: $(APPS)

clean:
	rm -f *.o $(APPS)

--- NEW FILE: svgspacewar.c ---
// SVG Spacewar is copyright 2005 by Nigel Tao: nigel.tao at myrealbox.com
// Licenced under the GNU GPL.
// Developed on cairo version 0.4.0.
//
// 2005-03-31: Version 0.1.

#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#include <gtkcairo.h>
#include <sys/timeb.h>

#define WIDTH  800
#define HEIGHT 600

#define TWO_PI 6.2831853070
[...1058 lines suppressed...]
      break;
    case GDK_Control_L:
      player1.is_firing = key_is_on;
      break;

    case GDK_KP_Left:
      player2.is_turning_left = key_is_on;
      break;
    case GDK_KP_Right:
      player2.is_turning_right = key_is_on;
      break;
    case GDK_KP_Up:
      player2.is_thrusting = key_is_on;
      break;
    case GDK_KP_Insert:
      player2.is_firing = key_is_on;
      break;
    }
  return TRUE;
}




More information about the cairo-commit mailing list