From: sparky4 Date: Fri, 11 Dec 2015 18:14:22 +0000 (-0600) Subject: i hate being tired wwww i will work on the project some more sometime wwww! class... X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=7611d1bc827125392da557bf2ea99dd3e480e561;p=16.git i hate being tired wwww i will work on the project some more sometime wwww! class is going to delay me because i have to focous on studying the star resistor curcit --- diff --git a/16.exe b/16.exe index 23f69d34..b6f2dbe7 100755 Binary files a/16.exe and b/16.exe differ diff --git a/16/xw/modex/demo01.c b/16/xw/modex/demo01.c index 0908fdf4..9ec316f6 100755 --- a/16/xw/modex/demo01.c +++ b/16/xw/modex/demo01.c @@ -1,125 +1,132 @@ /* - DEMO01 - Sprites, page flipping and palette rotation - Copyright (c) 1994 Alessandro Scotti + DEMO01 - Sprites, page flipping and palette rotation + Copyright (c) 1994 Alessandro Scotti */ uses Crt, Modex; #DEFINE MAX_SPRITE 100 + type - (* Sprite structure *) - TSprite = record - X, Y : integer; (* Sprite coordinates *) - DX,DY: integer; (* Deltas for sprite movement *) - W, H : integer; (* Sprite width and height *) - Image: array[ 1..16, 1..16 ] of byte; (* Sprite image data *) - end; - (* RGB color structure *) - TRgb = record - R, G, B: byte; - end; + /* Sprite structure */ + TSprite = record + X, Y : integer; /* Sprite coordinates */ + DX,DY: integer; /* Deltas for sprite movement */ + W, H : integer; /* Sprite width and height */ + Image: array[ 1..16, 1..16 ] of byte; /* Sprite image data */ + } + /* RGB color structure */ + TRgb = record + R, G, B: byte; + } var - S : array[ 1..MAX_SPRITE ] of TSprite; (* An array of sprites *) - Palette: array[ byte ] of TRgb; (* Palette *) - Page : word; (* Page offset *) - I : word; + S : array[ 1..MAX_SPRITE ] of TSprite; /* An array of sprites */ + Palette: array[ byte ] of TRgb; /* Palette */ + Page : word; /* Page offset */ + I : word; -(* Initializes a sprite structure *) +/* Initializes a sprite structure */ procedure sxInit( var S: TSprite ); var - I: word; + I: word; begin - S.X := Random( 320 ); (* Initialize position with random values *) - S.Y := Random( 240 ); - S.DX := Random( 7 )-3; (* Initialize speed with random values *) - S.DY := Random( 7 )-3; - S.W := 16; (* Size is fixed in this program *) - S.H := 16; - (* The image is a square with a hole inside *) - FillChar( S.Image, SizeOf(S.Image), Random(15)+1 ); - for I:=5 to 12 do FillChar( S.Image[ I, 5 ], 8, 0 ); -end; + S.X := Random( 320 ); /* Initialize position with random values */ + S.Y := Random( 240 ); + S.DX := Random( 7 )-3; /* Initialize speed with random values */ + S.DY := Random( 7 )-3; + S.W := 16; /* Size is fixed in this program */ + S.H := 16; + /* The image is a square with a hole inside */ + FillChar( S.Image, SizeOf(S.Image), Random(15)+1 ); + for I:=5 to 12 do FillChar( S.Image[ I, 5 ], 8, 0 ); +} -(* Moves a sprite *) +/* Moves a sprite */ procedure sxMove( var S: TSprite ); begin - Inc( S.X, S.DX ); (* Get new position *) - Inc( S.Y, S.DY ); - (* Check sprite position, change delta if needed *) - if( S.X > 320 ) then begin - S.X := 320; - S.DX := -S.DX; - end; - if( S.X < -16 ) then begin - S.X := -16; - S.DX := -S.DX; - end; - if( S.Y > 240 ) then begin - S.Y := 240; - S.DY := -S.DY; - end; - if( S.Y < -16 ) then begin - S.Y := -16; - S.DY := -S.DY; - end; - (* Draw the sprite, note the Page offset added to the *) - (* Y coordinate of the image *) - mxPutImage( @S.Image, S.X, Page+S.Y, S.W, S.H, OP_TRANS ); -end; + Inc( S.X, S.DX ); /* Get new position */ + Inc( S.Y, S.DY ); + /* Check sprite position, change delta if needed */ + if( S.X > 320 ) then begin + S.X := 320; + S.DX := -S.DX; + } + if( S.X < -16 ) then begin + S.X := -16; + S.DX := -S.DX; + } + if( S.Y > 240 ) then begin + S.Y := 240; + S.DY := -S.DY; + } + if( S.Y < -16 ) then begin + S.Y := -16; + S.DY := -S.DY; + } + /* Draw the sprite, note the Page offset added to the */ + /* Y coordinate of the image */ + mxPutImage( @S.Image, S.X, Page+S.Y, S.W, S.H, OP_TRANS ); +} -begin - (* Initialize library *) - mxInit; +void main() +{ + int i; + /* Initialize library */ + mxInit(); + + /* Enter graphics mode */ + mxSetMode( MX_320x240 ); - (* Enter graphics mode *) - mxSetMode( MX_320x240 ); + /* Print initialization message */ + mxSetTextColor( 15, OP_TRANS ); + mxOutStr( 4, 4, 'Initializing...' ); - (* Print initialization message *) - mxSetTextColor( 15, OP_TRANS ); - mxOutStr( 4, 4, 'Initializing...' ); + /* Initialize sprites */ + for(i=1;i<=MAX_SPRITE;i++) + sxInit( S[i] ); - (* Initialize sprites *) - for I:=1 to MAX_SPRITE do sxInit( S[I] ); + /* Draw background */ + for(i=1;i<=192;i++) + { + mxCircle( 160, 480+120, I, I+63 ); + mxCircle( 161, 480+120, I, I+63 ); + } - (* Draw background *) - for I:=1 to 192 do begin - mxCircle( 160, 480+120, I, I+63 ); - mxCircle( 161, 480+120, I, I+63 ); - end; + /* Compute and set palette */ + for I:=1 to 192 do with Palette[I+63] do begin + R := 0; + G := 0; + B := 0; + if( I < 64 ) then + R := I shr 1+31 + else if( i < 128 ) + G := (I-64) shr 1+31 + else + B := (I-128) shr 1+31; + } + mxSetPalette( @Palette[64], 64, 192 ); - (* Compute and set palette *) - for I:=1 to 192 do with Palette[I+63] do begin - R := 0; - G := 0; - B := 0; - if( I < 64 ) then - R := I shr 1+31 - else if( I < 128 ) then - G := (I-64) shr 1+31 - else - B := (I-128) shr 1+31; - end; - mxSetPalette( @Palette[64], 64, 192 ); + /* Main loop */ + Page := 240; + while(!kbhit()) + { + /* Set clip region to current page */ + mxSetClipRegion( 0, Page, 320, 240 ); + mxSetClip( TRUE ); + /* Restore background */ + mxBitBlt( 0, 480, 320, 240, 0, Page ); + /* Draw sprites */ + for I:=1 to MAX_SPRITE do sxMove( S[I] ); + /* Print message */ + mxOutStr( 4, Page+4, 'Some sprites moving...' ); + /* Flip page */ + mxStartLine( Page ); + Page := 240-Page; + /* Animate palette */ + mxSetPalette( @Palette[64], 64, 192 ); + mxRotatePalette( @Palette[64], 192, 3 ); + } - (* Main loop *) - Page := 240; - while( not KeyPressed ) do begin - (* Set clip region to current page *) - mxSetClipRegion( 0, Page, 320, 240 ); - mxSetClip( TRUE ); - (* Restore background *) - mxBitBlt( 0, 480, 320, 240, 0, Page ); - (* Draw sprites *) - for I:=1 to MAX_SPRITE do sxMove( S[I] ); - (* Print message *) - mxOutStr( 4, Page+4, 'Some sprites moving...' ); - (* Flip page *) - mxStartLine( Page ); - Page := 240-Page; - (* Animate palette *) - mxSetPalette( @Palette[64], 64, 192 ); - mxRotatePalette( @Palette[64], 192, 3 ); - end; + mxSetMode( MX_TEXT ); + mxTerm; - mxSetMode( MX_TEXT ); - mxTerm; -end. +} diff --git a/awoo.sh b/awoo.sh index 2cc044c2..f5b766ec 100755 --- a/awoo.sh +++ b/awoo.sh @@ -4,7 +4,7 @@ if [ -z "$*" ]; then else pee="$*" fi -#echo "$pee" +##echo "$pee" git add . . ./boop.sh "$pee" cp -fp *.exe /var/www/ diff --git a/exmmtest.exe b/exmmtest.exe index 56e2e39d..beb8f6e2 100755 Binary files a/exmmtest.exe and b/exmmtest.exe differ diff --git a/makefile b/makefile index f89a9290..723216e7 100755 --- a/makefile +++ b/makefile @@ -444,5 +444,6 @@ mx: .symbolic mx_: .symbolic @cd 16/xw_ - @wmake -f makefile.wat all + @wmake -f makefile all @cd ../../ + diff --git a/planrpcx.exe b/planrpcx.exe index c10314f1..2a242c93 100755 Binary files a/planrpcx.exe and b/planrpcx.exe differ diff --git a/scroll.exe b/scroll.exe index b05cd0f2..ee058e28 100755 Binary files a/scroll.exe and b/scroll.exe differ diff --git a/test.exe b/test.exe index 25353c75..78e4ac32 100755 Binary files a/test.exe and b/test.exe differ