This file contains hidden or 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
tweak_400x300: | |
; -------------------------- | |
; 400x300 | |
; | |
; pages = 2 | |
; line size = 100 | |
; page size = 120000 | |
; -------------------------- | |
outp 03d4h, 011h |
This file contains hidden or 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
set_mcga: | |
mov ax, 0013h | |
int 10h | |
ret |
This file contains hidden or 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> | |
#define PI_BY_2 (3.14159f * 2) | |
int main(int argc, char *argv[]) { | |
int theta = 0, count = 0, count2 = 0; | |
unsigned char values[256]; |
This file contains hidden or 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
plasma_frame: | |
; jump over the local variables | |
jmp plasma_frame_code | |
temp_phase_1 DB 0 | |
temp_phase_2 DB 0 | |
temp_phase_3 DB 0 | |
temp_phase_4 DB 0 |
This file contains hidden or 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
move_plasma: | |
mov al, phase_1 | |
add al, 2 | |
mov phase_1, al | |
mov al, phase_2 | |
add al, 1 | |
mov phase_2, al | |
This file contains hidden or 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
/* first of all, we need to read the dimensions of the | |
display viewport. */ | |
int viewport[4]; | |
glGetIntegerv(GL_VIEWPORT, viewport); | |
/* setup an orthographic matrix using the viewport | |
dimensions on the projection matrix */ | |
glMatrixMode(GL_PROJECTION); | |
glLoadIdentity(); | |
glOrtho(0, viewport[2], viewport[3], 0, -1, 1); |
This file contains hidden or 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
/* note that we're not clearing the depth buffer */ | |
glClear(GL_COLOR_BUFFER_BIT); | |
glMatrixMode(GL_MODELVIEW); | |
glLoadIdentity(); | |
/* draw a triangle */ | |
glBegin(GL_TRIANGLES); | |
glColor3ub(255, 0, 0); |
This file contains hidden or 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 mandelbrot_frame(double zoom, int max_iter, int xofs, int yofs) { | |
double zx = 0, zy = 0, cx = 0, cy = 0; | |
/* enumerate all of the rows */ | |
for (int y = 0; y < 200; y ++) { | |
/* enumerate all of the columns */ | |
for (int x = 0; x < 320; x ++) { | |
/* initialize step variables */ |
This file contains hidden or 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
get_random: | |
; start out with ax and bx = 0 | |
xor ax, ax | |
xor bx, bx | |
; get the first random number and | |
; store it off in bl | |
mov dx, 40h | |
in al, dx | |
mov bl, al |
This file contains hidden or 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
no_kbhit: | |
; put a new snowflake at the top | |
; of the screen | |
call get_random | |
mov di, ax | |
mov byte ptr es:[di], 15 | |
decend: |