This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SDL/SDL.h> | |
#include <SDL/SDL_draw.h> | |
#include <stdio.h> | |
#include <math.h> | |
SDL_Surface* screen; | |
Uint8 *keys; | |
int done; | |
int main(int argc, char *argv[]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2010 Firat Salgur | |
* Improved by Abdallah Abdelazim | |
* <p> | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* <p> | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* <p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inline void ray(int i, float x, float y, float angle, float fisheye) | |
{ float fx = x - (int)x, fy = y - (int)y; | |
float xstep, ystep, xdist, ydist, xx, yy, xdistadd, ydistadd; | |
int xy, yx; | |
int xdir = (cos(angle)<0 ? 1 : 0), ydir = (sin(angle)<0 ? 1 : 0); | |
xstep = 1./tan(angle); | |
xx = x + (ydir ? fy*-xstep : (1-fy)*xstep); | |
xy = ydir ? (int)y : (int)y+1; | |
xdist = sqrt((xx-x)*(xx-x) + (xy-y)*(xy-y)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <windows.h> | |
#include <string.h> | |
#include "SDL.h" | |
#include "SDL_ttf.h" | |
#define WIDTH 1024 | |
#define HEIGHT 600 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void print_as_binary(unsigned int num) | |
{ | |
unsigned int mask = (1 << 31); | |
int i; | |
for (i = 1; i <= 32; i++) { | |
printf("%d", (num & mask) ? 1 : 0); | |
mask >>= 1; | |
if (i % 4 == 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <allegro.h> | |
#include <math.h> | |
#include <time.h> | |
#define WIDTH 320 | |
#define HEIGHT 240 | |
int progress = 0; | |
int plasma1Thickness = 10, plasma2Thickness = 10, plasma3Thickness = 10; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
processor 6502 | |
prod EQU $0380 | |
multiplier EQU $0381 | |
multiplicand EQU $0382 | |
INCLUDE basic.rom | |
INCLUDE common.asm | |
+autoRun |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
section .bss | |
intvar resw 1 | |
section .text | |
global _start | |
_start: | |
push 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <math.h> | |
#include <SDL/SDL.h> | |
#include <SDL/SDL_draw.h> | |
#define SCREEN_W 320 | |
#define SCREEN_H 320 | |
#define CELL_SIZ 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <math.h> | |
#include <time.h> | |
#include <ctype.h> | |
#include <SDL/SDL.h> | |
#include <SDL/SDL_gfxPrimitives.h> | |
#include "main.h" | |
#include "isometric.h" |
OlderNewer