Skip to content

Instantly share code, notes, and snippets.

View Keshizin's full-sized avatar

石川 Takeshi Keshizin

  • São Paulo - Brazil
View GitHub Profile
/*
* Example of a Windows OpenGL program.
* The OpenGL code is the same as that used in
* the X Window System sample
*/
#include <windows.h>
#include <GL/gl.h>
#include <GL/glu.h>
/* Windows globals, defines, and prototypes */
import pygame, sys, os
from pygame.locals import *
from sys import exit
# Inicializando todos os módulos de PyGame
pygame.init()
# Resolução da janela do jogo
WINDOW_WIDTH_SCREEN = 640
WINDOW_HEIGHT_SCREEN = 480
@Keshizin
Keshizin / .json
Last active August 5, 2020 03:18
{
"characters":[
{
"id":"Lane_0jesz44",
"type":"non-player-character",
"name":"Delegado",
"sprite_width":48,
"sprite_height":48,
"sprite_texture":"character_atlas.png",
"sprite_texture_frame":4,
int soma(int a, int b) { return a + b; }
int subtracao(int a, int b) { return a - b; }
int operacao(int (*func)(int, int))
{
int a = 10; // solicitar o valor do usuário
int b = 10; // solicitar o valor do usuário
return (*func)(a, b); // chamada de função
}
@Keshizin
Keshizin / .cpp
Created January 13, 2016 19:59
Janela OpenGL
#include <Windows.h>
#include <gl\GL.h>
#include <gl\GLU.h>
HGLRC hRC = NULL; // Rendering Context
HDC hDC = NULL; // GDI Device Context
HINSTANCE hInstance; // handle para aplicação
bool keys[256]; // estado (pressionado ou não) das 256 teclas do teclado