Upload
This commit is contained in:
commit
43352ff262
1291 changed files with 220976 additions and 0 deletions
BIN
ALKU/ALKU.DSK
Normal file
BIN
ALKU/ALKU.DSK
Normal file
Binary file not shown.
BIN
ALKU/ALKU.PRJ
Normal file
BIN
ALKU/ALKU.PRJ
Normal file
Binary file not shown.
110
ALKU/ASMYT.ASM
Normal file
110
ALKU/ASMYT.ASM
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
IDEAL
|
||||
MODEL large
|
||||
P386
|
||||
|
||||
CODESEG
|
||||
|
||||
mmask dw 0102h,0202h,0402h,0802h,0102h,0202h,0402h,0802h
|
||||
rmask dw 0004h,0104h,0204h,0304h,0004h,0104h,0204h,0304h
|
||||
|
||||
PUBLIC C ascrolltext
|
||||
|
||||
PROC C ascrolltext
|
||||
|
||||
ARG scrl:word, text:dword
|
||||
|
||||
push ds es si di
|
||||
push 0a000h
|
||||
pop es
|
||||
lds si, [text]
|
||||
mov cx, 0d
|
||||
@@l1:
|
||||
|
||||
mov bx, cx
|
||||
add bx, [scrl]
|
||||
and bx, 3d
|
||||
shl bx, 1d
|
||||
mov ax, [cs:mmask+bx]
|
||||
mov dx, 3c4h
|
||||
out dx, ax
|
||||
mov ax, [cs:rmask+bx]
|
||||
mov dx, 3ceh
|
||||
out dx, ax
|
||||
|
||||
mov di, cx
|
||||
add di, [scrl]
|
||||
shr di, 2d
|
||||
@@l3:
|
||||
REPT 20
|
||||
add si, 4d
|
||||
mov bx, [si-4]
|
||||
cmp bx, -1
|
||||
je @@l2
|
||||
mov ax, [si-2]
|
||||
xor [es:bx+di], al
|
||||
ENDM
|
||||
jmp @@l3
|
||||
@@l2:
|
||||
inc cx
|
||||
cmp cx, 4d
|
||||
jne @@l1
|
||||
|
||||
pop di si es ds
|
||||
ret
|
||||
ENDP
|
||||
|
||||
PUBLIC C outline
|
||||
|
||||
mrol dw 0
|
||||
|
||||
PROC C outline
|
||||
|
||||
ARG src:dword, dest:dword
|
||||
|
||||
push ds es si di
|
||||
|
||||
mov [cs:mrol], 0802h
|
||||
mov cx, 4d
|
||||
@@l1:
|
||||
mov dx, 3c4h
|
||||
mov ax, [cs:mrol]
|
||||
out dx, ax
|
||||
|
||||
lds si, [src]
|
||||
add si, cx
|
||||
dec si
|
||||
les di, [dest]
|
||||
xor ax, ax
|
||||
mov [es:di-352], al
|
||||
mov [es:di-352+176], al
|
||||
|
||||
ccc=0
|
||||
REPT 75
|
||||
mov al, [ds:si+ccc*640]
|
||||
mov [es:di+ccc*352], al
|
||||
mov [es:di+ccc*352+176], al
|
||||
ccc=ccc+1
|
||||
ENDM
|
||||
|
||||
mov ax, ds
|
||||
add ax, 75*40
|
||||
mov ds, ax
|
||||
|
||||
ccc=0
|
||||
REPT 75
|
||||
mov al, [ds:si+ccc*640]
|
||||
mov [es:di+ccc*352+75*352], al
|
||||
mov [es:di+ccc*352+75*352+176], al
|
||||
ccc=ccc+1
|
||||
ENDM
|
||||
|
||||
shr [cs:(Byte mrol+1)], 1d
|
||||
dec cx
|
||||
jnz @@l1
|
||||
|
||||
|
||||
pop di si es ds
|
||||
ret
|
||||
ENDP
|
||||
|
||||
END
|
||||
BIN
ALKU/ASMYT.OBJ
Normal file
BIN
ALKU/ASMYT.OBJ
Normal file
Binary file not shown.
149
ALKU/COPPER.ASM
Normal file
149
ALKU/COPPER.ASM
Normal file
|
|
@ -0,0 +1,149 @@
|
|||
IDEAL
|
||||
MODEL large
|
||||
P386
|
||||
|
||||
CODESEG
|
||||
|
||||
PUBLIC C frame_count, C init_copper, C close_copper, C cop_pal, C do_pal, C cop_start, C cop_scrl
|
||||
|
||||
twait dw 0
|
||||
frame_count dw 0
|
||||
old_int8 dw 0
|
||||
dw 0
|
||||
cop_pal dd 0
|
||||
do_pal dw 0
|
||||
cop_start dw 0
|
||||
cop_scrl dw 0
|
||||
|
||||
|
||||
PROC close_copper
|
||||
|
||||
mov bx, 7
|
||||
mov ax, 0
|
||||
mov cx, 0
|
||||
mov dx, 0
|
||||
int 0fch
|
||||
|
||||
mov bx, 7
|
||||
mov ax, 1
|
||||
mov cx, 0
|
||||
mov dx, 0
|
||||
int 0fch
|
||||
|
||||
mov bx, 7
|
||||
mov ax, 2
|
||||
mov cx, 0
|
||||
mov dx, 0
|
||||
int 0fch
|
||||
|
||||
ret
|
||||
ENDP
|
||||
|
||||
PROC init_copper
|
||||
|
||||
mov bx, 7
|
||||
mov ax, 1
|
||||
mov cx, OFFSET copper1
|
||||
mov dx, SEG copper1
|
||||
int 0fch
|
||||
|
||||
mov bx, 7
|
||||
mov ax, 2
|
||||
mov cx, OFFSET copper2
|
||||
mov dx, SEG copper2
|
||||
int 0fch
|
||||
|
||||
mov bx, 7
|
||||
mov ax, 0
|
||||
mov cx, OFFSET copper3
|
||||
mov dx, SEG copper3
|
||||
int 0fch
|
||||
|
||||
ret
|
||||
|
||||
PROC copper1
|
||||
|
||||
mov dx, 03d4h
|
||||
mov al, 0dh
|
||||
mov ah, [Byte cs:cop_start]
|
||||
out dx, ax
|
||||
mov al, 0ch
|
||||
mov ah, [Byte cs:cop_start+1]
|
||||
out dx, ax
|
||||
|
||||
mov dx, 3c0h
|
||||
mov al, 33h
|
||||
out dx, al
|
||||
mov ax, [cs:cop_scrl]
|
||||
out dx, al
|
||||
|
||||
retf
|
||||
ENDP
|
||||
|
||||
PROC copper2
|
||||
|
||||
inc [cs:frame_count]
|
||||
|
||||
cmp [cs:do_pal], 0d
|
||||
je @@no_pal
|
||||
|
||||
pusha
|
||||
push ds
|
||||
lds si, [cs:cop_pal]
|
||||
mov cx, 768d
|
||||
mov dx, 3c8h
|
||||
mov al, 0d
|
||||
out dx, al
|
||||
inc dx
|
||||
rep outsb
|
||||
mov [cs:do_pal], 0d
|
||||
pop ds
|
||||
popa
|
||||
@@no_pal:
|
||||
retf
|
||||
ENDP
|
||||
|
||||
PUBLIC C cop_dofade
|
||||
cop_dofade dw 0
|
||||
|
||||
PUBLIC C fadepal
|
||||
fadepal db 768*2 dup(?)
|
||||
|
||||
PUBLIC C cop_fadepal
|
||||
cop_fadepal dd 0
|
||||
|
||||
PROC copper3
|
||||
cmp [cs:cop_dofade], 0d
|
||||
je @@l1
|
||||
dec [cs:cop_dofade]
|
||||
|
||||
push ds si di cx
|
||||
|
||||
mov [Word cs:cop_pal], OFFSET fadepal
|
||||
mov [Word cs:cop_pal+2], SEG fadepal
|
||||
mov [do_pal], 1d
|
||||
|
||||
lds si, [cs:cop_fadepal]
|
||||
mov di, OFFSET fadepal
|
||||
mov cx, 768/16d
|
||||
@@l4:
|
||||
ccc=0
|
||||
REPT 16
|
||||
mov ax, [ds:si+ccc*2]
|
||||
add [cs:di+ccc+768], al
|
||||
adc [cs:di+ccc], ah
|
||||
ccc=ccc+1
|
||||
ENDM
|
||||
add di, 16d
|
||||
add si, 32d
|
||||
dec cx
|
||||
jnz @@l4
|
||||
|
||||
pop cx di si ds
|
||||
@@l1:
|
||||
retf
|
||||
ENDP
|
||||
|
||||
|
||||
END
|
||||
|
||||
BIN
ALKU/COPPER.OBJ
Normal file
BIN
ALKU/COPPER.OBJ
Normal file
Binary file not shown.
BIN
ALKU/CUT64KB.EXE
Normal file
BIN
ALKU/CUT64KB.EXE
Normal file
Binary file not shown.
BIN
ALKU/DISC.OBJ
Normal file
BIN
ALKU/DISC.OBJ
Normal file
Binary file not shown.
BIN
ALKU/DP_PREFS
Normal file
BIN
ALKU/DP_PREFS
Normal file
Binary file not shown.
2813
ALKU/FONA.INC
Normal file
2813
ALKU/FONA.INC
Normal file
File diff suppressed because it is too large
Load diff
BIN
ALKU/FONA.LBM
Normal file
BIN
ALKU/FONA.LBM
Normal file
Binary file not shown.
BIN
ALKU/FONA.UH
Normal file
BIN
ALKU/FONA.UH
Normal file
Binary file not shown.
BIN
ALKU/FONA2.LBM
Normal file
BIN
ALKU/FONA2.LBM
Normal file
Binary file not shown.
4097
ALKU/HOI.IN0
Normal file
4097
ALKU/HOI.IN0
Normal file
File diff suppressed because it is too large
Load diff
3955
ALKU/HOI.IN1
Normal file
3955
ALKU/HOI.IN1
Normal file
File diff suppressed because it is too large
Load diff
BIN
ALKU/HOI.LBM
Normal file
BIN
ALKU/HOI.LBM
Normal file
Binary file not shown.
BIN
ALKU/HOI.U
Normal file
BIN
ALKU/HOI.U
Normal file
Binary file not shown.
BIN
ALKU/HOIKKA.LBM
Normal file
BIN
ALKU/HOIKKA.LBM
Normal file
Binary file not shown.
BIN
ALKU/INCBIN.EXE
Normal file
BIN
ALKU/INCBIN.EXE
Normal file
Binary file not shown.
22
ALKU/INCLUDE.ASM
Normal file
22
ALKU/INCLUDE.ASM
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
IDEAL
|
||||
MODEL large
|
||||
P386
|
||||
|
||||
PUBLIC C hzpic, C font
|
||||
|
||||
SEGMENT kakka0 para use16 private 'FAR_DATA'
|
||||
LABEL hzpic BYTE
|
||||
INCLUDE 'hoi.in0'
|
||||
ENDS
|
||||
SEGMENT kakka1 byte use16 private 'FAR_DATA'
|
||||
INCLUDE 'hoi.in1'
|
||||
ENDS
|
||||
|
||||
SEGMENT asdf byte use16 private 'FAR_DATA'
|
||||
LABEL font byte
|
||||
INCLUDE 'fona.inc'
|
||||
|
||||
dw 1500*5 dup(?)
|
||||
|
||||
ENDS
|
||||
END
|
||||
BIN
ALKU/INCLUDE.OBJ
Normal file
BIN
ALKU/INCLUDE.OBJ
Normal file
Binary file not shown.
BIN
ALKU/LBM2P.EXE
Normal file
BIN
ALKU/LBM2P.EXE
Normal file
Binary file not shown.
BIN
ALKU/LBM2U.EXE
Normal file
BIN
ALKU/LBM2U.EXE
Normal file
Binary file not shown.
542
ALKU/MAIN.C
Normal file
542
ALKU/MAIN.C
Normal file
|
|
@ -0,0 +1,542 @@
|
|||
#include <dos.h>
|
||||
#include <stdio.h>
|
||||
#include <conio.h>
|
||||
#include "tweak.h"
|
||||
#include "h:\u2\dis\dis.h"
|
||||
|
||||
#define SCRLF 9
|
||||
|
||||
extern init_copper();
|
||||
extern close_copper();
|
||||
extern far int frame_count;
|
||||
extern far char * far cop_pal;
|
||||
extern far int do_pal;
|
||||
extern far int cop_start;
|
||||
extern far int cop_scrl;
|
||||
extern far int cop_dofade;
|
||||
extern far char * far cop_fadepal;
|
||||
extern far char fadepal[];
|
||||
|
||||
extern char far hzpic[];
|
||||
extern outline(char far *f, char far *t);
|
||||
extern ascrolltext(int scrl, int *dtau);
|
||||
char * far vmem=(char *)0x0a0000000L;
|
||||
int mmask[4]={0x0102,0x0202,0x0402,0x0802};
|
||||
|
||||
char (* far vvmem)[176];
|
||||
extern char far font[31][1500];
|
||||
char rowbuf[1024];
|
||||
|
||||
char palette[768]; // pic
|
||||
char palette2[768]; // pic & text
|
||||
|
||||
char fade1[768]; // black
|
||||
char fade2[768]; // text
|
||||
|
||||
int picin[768];
|
||||
int textin[768];
|
||||
int textout[768];
|
||||
|
||||
char *fonaorder="ABCDEFGHIJKLMNOPQRSTUVWXabcdefghijklmnopqrstuvwxyz0123456789!?,.:<3A><>()+-*='<27>™";
|
||||
int fonap[256];
|
||||
int fonaw[256];
|
||||
|
||||
int far dtau[30000];
|
||||
char far tbuf[186][352];
|
||||
|
||||
int a=0,p=0,tptr=0;
|
||||
|
||||
main()
|
||||
{
|
||||
int aa,b,c,x,y,f;
|
||||
|
||||
asm mov ax, 3
|
||||
asm int 10h
|
||||
|
||||
init();
|
||||
|
||||
|
||||
while(dis_sync()<1 && !dis_exit());
|
||||
|
||||
prtc(160,120,"A");
|
||||
prtc(160,160,"Future Crew");
|
||||
prtc(160,200,"Production");
|
||||
dofade(fade1,fade2); wait(300); dofade(fade2,fade1); fonapois();
|
||||
|
||||
while(dis_sync()<2 && !dis_exit());
|
||||
|
||||
prtc(160,160,"First Presented");
|
||||
prtc(160,200,"at Assembly 93");
|
||||
dofade(fade1,fade2); wait(300); dofade(fade2,fade1); fonapois();
|
||||
|
||||
while(dis_sync()<3 && !dis_exit());
|
||||
|
||||
prtc(160,120,"in");
|
||||
prtc(160,160,"<EFBFBD>");
|
||||
prtc(160,179,"™");
|
||||
dofade(fade1,fade2); wait(300); dofade(fade2,fade1); fonapois();
|
||||
|
||||
while(dis_sync()<4 && !dis_exit());
|
||||
|
||||
memcpy(fadepal,fade1,768);
|
||||
cop_fadepal=picin;
|
||||
cop_dofade=128;
|
||||
for(a=1,p=1,f=0,frame_count=0;cop_dofade!=0 && !dis_exit();)
|
||||
do_scroll(2);
|
||||
|
||||
for(f=60;a<320 && !dis_exit();)
|
||||
{
|
||||
if(f==0) {
|
||||
cop_fadepal=textin;
|
||||
cop_dofade=64;
|
||||
f+=20;
|
||||
}
|
||||
else if(f==50) {
|
||||
cop_fadepal=textout;
|
||||
cop_dofade=64;
|
||||
f++;
|
||||
}
|
||||
else if(f>50 && cop_dofade==0) {
|
||||
cop_pal=palette; do_pal=1; f++;
|
||||
memset(tbuf,0,186*320);
|
||||
switch(tptr++) {
|
||||
case 0:
|
||||
addtext(160,50,"Graphics");
|
||||
addtext(160,90,"Marvel");
|
||||
addtext(160,130,"Pixel"); // sucks
|
||||
ffonapois();
|
||||
break;
|
||||
case 1:
|
||||
faddtext(160,50,"Music");
|
||||
faddtext(160,90, "Purple Motion");
|
||||
faddtext(160,130, "Skaven");
|
||||
ffonapois();
|
||||
break;
|
||||
case 2:
|
||||
faddtext(160,30,"Code");
|
||||
faddtext(160,70, "Psi");
|
||||
faddtext(160,110, "Trug");
|
||||
faddtext(160,148, "Wildfire");
|
||||
ffonapois();
|
||||
break;
|
||||
case 3:
|
||||
faddtext(160,50,"Additional Design");
|
||||
faddtext(160,90, "Abyss");
|
||||
// faddtext(160,110,"Useless Design");
|
||||
faddtext(160,130, "Gore");
|
||||
ffonapois();
|
||||
break;
|
||||
case 4:
|
||||
ffonapois();
|
||||
break;
|
||||
default:
|
||||
faddtext(160,80, "BUG BUG BUG");
|
||||
faddtext(160,130, "Timing error");
|
||||
ffonapois();
|
||||
break;
|
||||
}
|
||||
while(((a&1) || dis_sync()<4+tptr) && !dis_exit() && a<319)
|
||||
do_scroll(0);
|
||||
aa=a;
|
||||
if(aa<320-12) fmaketext(aa+16);
|
||||
f=0;
|
||||
}
|
||||
else f++;
|
||||
do_scroll(1);
|
||||
}
|
||||
if(f>63/SCRLF){
|
||||
dofade(palette2,palette);
|
||||
}
|
||||
fonapois();
|
||||
close_copper();
|
||||
}
|
||||
|
||||
init() {
|
||||
int a,b,c,x,y,p=0,f;
|
||||
|
||||
dis_partstart();
|
||||
tw_opengraph();
|
||||
init_copper();
|
||||
tw_setpalette(fade1);
|
||||
memcpy(palette,hzpic+16,768);
|
||||
|
||||
for(a=0;a<88;a++)
|
||||
{
|
||||
outline(MK_FP(FP_SEG(hzpic),FP_OFF(hzpic)+a*4+784), MK_FP(0x0a000,a+176*50));
|
||||
outline(MK_FP(FP_SEG(hzpic),FP_OFF(hzpic)+a*4+784), MK_FP(0x0a000,a+176*50+88));
|
||||
}
|
||||
|
||||
for(y=0;y<32;y++)
|
||||
{
|
||||
for(a=0;a<1500;a++)
|
||||
{
|
||||
switch(font[y][a]&3)
|
||||
{
|
||||
case 0x1 : b=0x40; break;
|
||||
case 0x2 : b=0x80; break;
|
||||
case 0x3 : b=0xc0; break;
|
||||
default : b=0;
|
||||
}
|
||||
font[y][a]=b;
|
||||
}
|
||||
}
|
||||
|
||||
for(y=0;y<768;y+=3)
|
||||
{
|
||||
if(y<64*3)
|
||||
{
|
||||
palette2[y+0]=palette[y+0];
|
||||
palette2[y+1]=palette[y+1];
|
||||
palette2[y+2]=palette[y+2];
|
||||
}
|
||||
else if(y<128*3)
|
||||
{
|
||||
palette2[y+0]=(fade2[y+0]=palette[0x1*3+0])*63+palette[y%(64*3)+0]*(63-palette[0x1*3+0])>>6;
|
||||
palette2[y+1]=(fade2[y+1]=palette[0x1*3+1])*63+palette[y%(64*3)+1]*(63-palette[0x1*3+1])>>6;
|
||||
palette2[y+2]=(fade2[y+2]=palette[0x1*3+2])*63+palette[y%(64*3)+2]*(63-palette[0x1*3+2])>>6;
|
||||
}
|
||||
else if(y<192*3)
|
||||
{
|
||||
palette2[y+0]=(fade2[y+0]=palette[0x2*3+0])*63+palette[y%(64*3)+0]*(63-palette[0x2*3+0])>>6;
|
||||
palette2[y+1]=(fade2[y+1]=palette[0x2*3+1])*63+palette[y%(64*3)+1]*(63-palette[0x2*3+1])>>6;
|
||||
palette2[y+2]=(fade2[y+2]=palette[0x2*3+2])*63+palette[y%(64*3)+2]*(63-palette[0x2*3+2])>>6;
|
||||
}
|
||||
else
|
||||
{
|
||||
palette2[y+0]=(fade2[y+0]=palette[0x3*3+0])*63+palette[y%(64*3)+0]*(63-palette[0x3*3+0])>>6;
|
||||
palette2[y+1]=(fade2[y+1]=palette[0x3*3+1])*63+palette[y%(64*3)+1]*(63-palette[0x3*3+1])>>6;
|
||||
palette2[y+2]=(fade2[y+2]=palette[0x3*3+2])*63+palette[y%(64*3)+2]*(63-palette[0x3*3+2])>>6;
|
||||
}
|
||||
}
|
||||
|
||||
for(a=192;a<768;a++) palette[a]=palette[a-192];
|
||||
|
||||
for(x=0;x<1500 && *fonaorder;)
|
||||
{
|
||||
while(x<1500)
|
||||
{
|
||||
for(y=0;y<32;y++) if(font[y][x]) break;
|
||||
if(y!=32) break;
|
||||
x++;
|
||||
}
|
||||
b=x;
|
||||
while(x<1500)
|
||||
{
|
||||
for(y=0;y<32;y++) if(font[y][x]) break;
|
||||
if(y==32) break;
|
||||
x++;
|
||||
}
|
||||
//printf("%c: %i %i\n",*fonaorder,b,x-b);
|
||||
fonap[*fonaorder]=b;
|
||||
fonaw[*fonaorder]=x-b;
|
||||
fonaorder++;
|
||||
}
|
||||
fonap[32]=1500-20;
|
||||
fonaw[32]=16;
|
||||
|
||||
for(a=0;a<768;a++)
|
||||
{
|
||||
textin[a]=(palette2[a]-palette[a])*256/64;
|
||||
textout[a]=(palette[a]-palette2[a])*256/64;
|
||||
picin[a]=(palette[a]-fade1[a])*256/128;
|
||||
}
|
||||
}
|
||||
|
||||
wait(int t)
|
||||
{
|
||||
while(frame_count<t && !dis_exit()); frame_count=0;
|
||||
}
|
||||
|
||||
fonapois()
|
||||
{
|
||||
char far *vvmem=MK_FP(0x0a000,0);
|
||||
unsigned a;
|
||||
|
||||
outport(0x3c4,0x0102);
|
||||
outport(0x3ce,0x0004);
|
||||
for(a=160*64;a<160U*(64+256);a++) vvmem[a]=vvmem[a]&63;
|
||||
|
||||
outport(0x3c4,0x0202);
|
||||
outport(0x3ce,0x0104);
|
||||
for(a=160*64;a<160U*(64+256);a++) vvmem[a]=vvmem[a]&63;
|
||||
|
||||
outport(0x3c4,0x0402);
|
||||
outport(0x3ce,0x0204);
|
||||
for(a=160*64;a<160U*(64+256);a++) vvmem[a]=vvmem[a]&63;
|
||||
outport(0x3c4,0x0802);
|
||||
outport(0x3ce,0x0304);
|
||||
for(a=160*64;a<160U*(64+256);a++) vvmem[a]=vvmem[a]&63;
|
||||
|
||||
}
|
||||
|
||||
prt(int x,int y,char *txt)
|
||||
{
|
||||
int x2w,x2,y2,y2w=y+32,sx,d;
|
||||
while(*txt)
|
||||
{
|
||||
x2w=fonaw[*txt]+x;
|
||||
sx=fonap[*txt];
|
||||
for(x2=x;x2<x2w;x2++)
|
||||
{
|
||||
for(y2=y;y2<y2w;y2++)
|
||||
{
|
||||
d=font[y2-y][sx];
|
||||
tw_putpixel(x2,y2,tw_getpixel(x2,y2)|d);
|
||||
}
|
||||
sx++;
|
||||
}
|
||||
x=x2+2;
|
||||
txt++;
|
||||
}
|
||||
}
|
||||
|
||||
prtc(int x,int y,char *txt)
|
||||
{
|
||||
int w=0;
|
||||
char *t=txt;
|
||||
while(*t) w+=fonaw[*t++]+2;
|
||||
prt(x-w/2,y,txt);
|
||||
}
|
||||
|
||||
dofade(char far *pal1, char far *pal2)
|
||||
{
|
||||
int a,b,c;
|
||||
char pal[768];
|
||||
|
||||
for(a=0;a<64 && !dis_exit();a++)
|
||||
{
|
||||
for(b=0;b<768;b++) pal[b]=(pal1[b]*(64-a)+pal2[b]*a>>6);
|
||||
cop_pal=pal; do_pal=1;
|
||||
while(frame_count<1); frame_count=0;
|
||||
}
|
||||
}
|
||||
char fuckpal[768];
|
||||
|
||||
fdofade(char far *pal1, char far *pal2, int a)
|
||||
{
|
||||
int b,c;
|
||||
|
||||
if(a<0 || a>64) return(0);
|
||||
for(b=0;b<768;b++) fuckpal[b]=(pal1[b]*(64-a)+pal2[b]*a>>6);
|
||||
cop_pal=fuckpal; do_pal=1;
|
||||
}
|
||||
|
||||
addtext(int tx,int ty,char *txt)
|
||||
{
|
||||
int a,b,c,x,y,w=0;
|
||||
char *t=txt;
|
||||
|
||||
while(*t) w+=fonaw[*t++]+2;
|
||||
|
||||
t=txt; w/=2;
|
||||
while(*t)
|
||||
{
|
||||
for(x=0;x<fonaw[*t];x++)
|
||||
for(y=0;y<32;y++)
|
||||
tbuf[y+ty][tx+x-w]=font[y][fonap[*t]+x];
|
||||
|
||||
tx+=fonaw[*t++]+2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
maketext(int scrl)
|
||||
{
|
||||
char far *vvmem=MK_FP(0x0a000,0);
|
||||
int *p1=dtau;
|
||||
int mtau[]={1*256+2,2*256+2,4*256+2,8*256+2};
|
||||
int a,b,c,x,y,m;
|
||||
|
||||
for(m=0;m<4;m++)
|
||||
{
|
||||
for(x=m;x<320;x+=4) for(y=1;y<184;y++)
|
||||
if(tbuf[y][x]!=tbuf[y][x-2]) {
|
||||
*p1++=x/4+y*176+100*176;
|
||||
*p1++=tbuf[y][x]^tbuf[y][x-2];
|
||||
}
|
||||
*p1++=-1;
|
||||
*p1++=-1;
|
||||
}
|
||||
|
||||
for(x=0;x<320;x++)
|
||||
{
|
||||
outport(0x3c4,mtau[(x+scrl)&3]);
|
||||
outport(0x3ce,((x+scrl)&3)*256+4);
|
||||
for(y=1;y<184;y++)
|
||||
{
|
||||
vvmem[y*176+176*100+(x+scrl)/4]^=tbuf[y][x-1-1];
|
||||
vvmem[y*176+176*100+(x+scrl)/4+88]^=tbuf[y][x-1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
scrolltext(int scrl)
|
||||
{
|
||||
char far *vvmem=MK_FP(0x0a000,0);
|
||||
int mtau[]={1*256+2,2*256+2,4*256+2,8*256+2,1*256+2,2*256+2,4*256+2,8*256+2};
|
||||
int *p1=dtau;
|
||||
int x,y,a,c,m,aa;
|
||||
|
||||
p1=dtau;
|
||||
for(m=0;m<4;m++)
|
||||
{
|
||||
aa=(scrl+m)/4;
|
||||
outport(0x3c4,mtau[(scrl+m)&3]);
|
||||
outport(0x3ce,((scrl+m)&3)*256+4);
|
||||
while(*p1!=-1)
|
||||
{
|
||||
a=*p1++;
|
||||
c=*p1++;
|
||||
vvmem[a+aa]^=c;
|
||||
}
|
||||
p1+=2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
do_scroll(int mode)
|
||||
{
|
||||
if(mode==0 && frame_count<SCRLF) return(0);
|
||||
while(frame_count<SCRLF);
|
||||
frame_count-=SCRLF;
|
||||
if(mode==1) ascrolltext(a+p*352,dtau);
|
||||
cop_start=a/4+p*88; cop_scrl=(a&3)*2;
|
||||
|
||||
if((a&3)==0)
|
||||
{
|
||||
outline(MK_FP(FP_SEG(hzpic),FP_OFF(hzpic)+(a/4+86)*4+784), MK_FP(0x0a000,(a/4+86)+176*50));
|
||||
outline(MK_FP(FP_SEG(hzpic),FP_OFF(hzpic)+(a/4+86)*4+784), MK_FP(0x0a000,(a/4+86)+176*50+88));
|
||||
}
|
||||
a+=1; p^=1;
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
faddtext(int tx,int ty,char *txt)
|
||||
{
|
||||
int a,b,c,x,y,w=0;
|
||||
char *t=txt;
|
||||
|
||||
while(*t) w+=fonaw[*t++]+2;
|
||||
|
||||
t=txt; w/=2;
|
||||
while(*t)
|
||||
{
|
||||
for(x=0;x<fonaw[*t];x++)
|
||||
for(y=0;y<32;y++)
|
||||
tbuf[y+ty][tx+x-w]=font[y][fonap[*t]+x];
|
||||
|
||||
do_scroll(0);
|
||||
tx+=fonaw[*t++]+2;
|
||||
}
|
||||
}
|
||||
|
||||
fmaketext(int scrl)
|
||||
{
|
||||
char far *vvmem=MK_FP(0x0a000,0);
|
||||
int *p1=dtau;
|
||||
int mtau[]={1*256+2,2*256+2,4*256+2,8*256+2};
|
||||
int b,c,x,y,m;
|
||||
|
||||
for(m=0;m<4;m++)
|
||||
{
|
||||
for(x=m;x<320;x+=4) {
|
||||
for(y=1;y<184;y++) if(tbuf[y][x]!=tbuf[y][x-2]) {
|
||||
*p1++=x/4+y*176+100*176;
|
||||
*p1++=tbuf[y][x]^tbuf[y][x-2];
|
||||
}
|
||||
do_scroll(0);
|
||||
}
|
||||
*p1++=-1;
|
||||
*p1++=-1;
|
||||
}
|
||||
|
||||
for(x=0;x<320;x++)
|
||||
{
|
||||
outport(0x3c4,mtau[(x+scrl)&3]);
|
||||
outport(0x3ce,((x+scrl)&3)*256+4);
|
||||
for(y=1;y<184;y++)
|
||||
{
|
||||
vvmem[y*176+176*100+(x+scrl)/4]^=tbuf[y][x-1-1];
|
||||
vvmem[y*176+176*100+(x+scrl)/4+88]^=tbuf[y][x-1];
|
||||
}
|
||||
do_scroll(0);
|
||||
}
|
||||
|
||||
while(a<=scrl) do_scroll(0);
|
||||
}
|
||||
|
||||
ffonapois()
|
||||
{
|
||||
long far *vvmem=MK_FP(0x0a000,0);
|
||||
unsigned a;
|
||||
|
||||
outport(0x3c4,0x0102);
|
||||
outport(0x3ce,0x0004);
|
||||
for(a=40*64;a<40U*(64+256+10);a++) vvmem[a]=vvmem[a]&0x3f3f3f3f;
|
||||
do_scroll(0);
|
||||
|
||||
outport(0x3c4,0x0202);
|
||||
outport(0x3ce,0x0104);
|
||||
for(a=40*64;a<40U*(64+256+10);a++) vvmem[a]=vvmem[a]&0x3f3f3f3f;
|
||||
do_scroll(0);
|
||||
|
||||
outport(0x3c4,0x0402);
|
||||
outport(0x3ce,0x0204);
|
||||
for(a=40*64;a<40U*(64+256+10);a++) vvmem[a]=vvmem[a]&0x3f3f3f3f;
|
||||
do_scroll(0);
|
||||
|
||||
outport(0x3c4,0x0802);
|
||||
outport(0x3ce,0x0304);
|
||||
for(a=40*64;a<40U*(64+256+10);a++) vvmem[a]=vvmem[a]&0x3f3f3f3f;
|
||||
do_scroll(0);
|
||||
}
|
||||
|
||||
char far cfpal[768*2];
|
||||
int far cop_fade;
|
||||
|
||||
fffade(char far *pal1, char far *pal2, int frames)
|
||||
{
|
||||
int a,b,c;
|
||||
for(a=0;a<768;a++)
|
||||
{
|
||||
cfpal[a]=pal1[a];
|
||||
cfpal[a+768]=(pal2[a]-pal1[a])*256/frames;
|
||||
}
|
||||
cop_fade=frames;
|
||||
}
|
||||
|
||||
/*
|
||||
dis_sync
|
||||
|
||||
0 = ...
|
||||
1 = fc_pres
|
||||
2 = first
|
||||
3 = maisema
|
||||
4 = gfx
|
||||
5 = music
|
||||
6 = code
|
||||
7 = addi
|
||||
8 = exit
|
||||
|
||||
dis_muscode=row/order
|
||||
|
||||
2 ekaa = mustaa
|
||||
2 fc..
|
||||
3 93..
|
||||
4 feidaa ineen
|
||||
5 music
|
||||
6 gfx
|
||||
7 code
|
||||
8 addi
|
||||
|
||||
bx=6
|
||||
ax=?
|
||||
int fch
|
||||
cx=ord
|
||||
bx=row
|
||||
|
||||
|
||||
*/
|
||||
BIN
ALKU/MAIN.OBJ
Normal file
BIN
ALKU/MAIN.OBJ
Normal file
Binary file not shown.
BIN
ALKU/PIC001.LBM
Normal file
BIN
ALKU/PIC001.LBM
Normal file
Binary file not shown.
BIN
ALKU/RYPPIS.LBM
Normal file
BIN
ALKU/RYPPIS.LBM
Normal file
Binary file not shown.
3
ALKU/TEST.BAT
Normal file
3
ALKU/TEST.BAT
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
@alku.exe
|
||||
@..\pam\pam.exe
|
||||
@d
|
||||
333
ALKU/TWEAK.ASM
Normal file
333
ALKU/TWEAK.ASM
Normal file
|
|
@ -0,0 +1,333 @@
|
|||
IDEAL
|
||||
MODEL large
|
||||
P386
|
||||
|
||||
CODESEG
|
||||
|
||||
PUBLIC C tw_opengraph, C tw_putpixel, C tw_setpalette, C tw_setstart
|
||||
PUBLIC C tw_pictovmem, C tw_closegraph, C tw_waitvr, C tw_setrgbpalette
|
||||
PUBLIC C tw_clrscr, C tw_setpalarea, C tw_getpixel
|
||||
|
||||
PUBLIC C scr_seg ; videomuistin alku segmentti
|
||||
|
||||
planetau db 1,2,4,8
|
||||
scr_seg dw 0a000h
|
||||
|
||||
; avaa 320x200 tweak tilan, 4 sivua, 4 planea
|
||||
|
||||
PROC tw_opengraph
|
||||
|
||||
mov ax,13h
|
||||
int 10h
|
||||
|
||||
mov dx, 03c4h
|
||||
mov ax, 0604h
|
||||
out dx, ax ; chain4 off
|
||||
|
||||
mov ax, 0f02h
|
||||
out dx, ax
|
||||
mov dx, 0a000h
|
||||
mov es, dx
|
||||
xor di, di
|
||||
xor ax, ax
|
||||
mov cx, 8000h
|
||||
rep stosw ; clear vmem
|
||||
|
||||
mov dx, 03d4h
|
||||
mov ax, 0014h
|
||||
out dx, ax ; crtc long off
|
||||
|
||||
mov ax, 0e317h
|
||||
out dx, ax ; crtc byte on
|
||||
|
||||
mov ax, 0009h
|
||||
out dx, ax ; 400
|
||||
|
||||
mov ax, 5813h
|
||||
out dx, ax ; 640 wide
|
||||
|
||||
mov ax, 07018h ; linecompare
|
||||
out dx, ax
|
||||
mov ax, 1f07h
|
||||
out dx, ax ; 8th bit
|
||||
ret
|
||||
ENDP
|
||||
|
||||
PROC tw_clrscr
|
||||
|
||||
mov dx, 3c4h
|
||||
mov ax, 0f02h
|
||||
out dx, ax
|
||||
mov dx, [cs:scr_seg]
|
||||
mov es, dx
|
||||
xor di, di
|
||||
xor eax, eax
|
||||
mov cx, 1000h
|
||||
rep stosd ; clear vmem
|
||||
|
||||
ret
|
||||
ENDP
|
||||
|
||||
PROC tw_closegraph
|
||||
|
||||
mov ax, 03h
|
||||
int 10h
|
||||
|
||||
ret
|
||||
ENDP
|
||||
|
||||
; piirt„„ pisteen ruudulle
|
||||
|
||||
PROC tw_putpixel
|
||||
|
||||
ARG x:word, y:word, color:word
|
||||
|
||||
push bp
|
||||
mov bp, sp
|
||||
|
||||
mov ax, [cs:scr_seg]
|
||||
mov es, ax
|
||||
|
||||
mov dx, 03c4h
|
||||
mov bx, [x]
|
||||
and bx, 03h
|
||||
mov ah, [cs:planetau+bx]
|
||||
mov al, 02h
|
||||
out dx, ax ; select plane
|
||||
|
||||
mov bx, [x]
|
||||
shr bx, 2
|
||||
mov ax, [y]
|
||||
shl ax, 4
|
||||
add bx, ax
|
||||
shl ax, 1
|
||||
add bx, ax
|
||||
shl ax, 2
|
||||
add bx, ax
|
||||
|
||||
mov cx, [color]
|
||||
mov [es:bx], cl
|
||||
|
||||
pop bp
|
||||
ret
|
||||
ENDP
|
||||
|
||||
PROC tw_getpixel
|
||||
|
||||
ARG x:word, y:word
|
||||
|
||||
push bp
|
||||
mov bp, sp
|
||||
|
||||
mov ax, [scr_seg]
|
||||
mov es, ax
|
||||
|
||||
mov dx, 03ceh
|
||||
mov ax, [x]
|
||||
and ax, 03h
|
||||
mov ah, al
|
||||
mov al, 04h
|
||||
out dx, ax ; select plane
|
||||
|
||||
mov ax, [y]
|
||||
shl ax, 4
|
||||
mov bx, ax
|
||||
shl ax, 1
|
||||
add bx, ax
|
||||
shl ax, 2
|
||||
add bx, ax
|
||||
mov ax, [x]
|
||||
shr ax, 2
|
||||
add bx, ax
|
||||
|
||||
xor ax, ax
|
||||
mov al,[es:bx]
|
||||
|
||||
pop bp
|
||||
ret
|
||||
ENDP
|
||||
; vaihtaa koko paletin
|
||||
|
||||
PROC tw_setpalette
|
||||
|
||||
ARG pal:dword
|
||||
|
||||
push bp
|
||||
mov bp, sp
|
||||
push si ds
|
||||
|
||||
lds si,[pal]
|
||||
cld
|
||||
mov cx, 300h
|
||||
mov dx, 03c8h
|
||||
mov al, 0
|
||||
out dx, al
|
||||
inc dx
|
||||
|
||||
rep outsb
|
||||
|
||||
pop ds si
|
||||
pop bp
|
||||
ret
|
||||
ENDP
|
||||
|
||||
PROC C tw_setpalarea
|
||||
|
||||
ARG pal:dword, start:word, cnt:word
|
||||
|
||||
push si ds
|
||||
|
||||
lds si,[pal]
|
||||
cld
|
||||
mov cx, [cnt]
|
||||
mov ax, cx
|
||||
add cx, ax
|
||||
add cx, ax
|
||||
mov dx, 03c8h
|
||||
mov ax, [start]
|
||||
out dx, al
|
||||
inc dx
|
||||
|
||||
rep outsb
|
||||
|
||||
pop ds si
|
||||
ret
|
||||
ENDP
|
||||
|
||||
; asettaa videomuistin alun
|
||||
|
||||
PROC tw_setstart
|
||||
|
||||
ARG start:word
|
||||
|
||||
push bp
|
||||
mov bp,sp
|
||||
|
||||
mov bx, [start]
|
||||
mov dx, 03d4h
|
||||
mov al, 0dh
|
||||
mov ah, bl
|
||||
out dx, ax
|
||||
mov al, 0ch
|
||||
mov ah, bh
|
||||
out dx, ax
|
||||
|
||||
pop bp
|
||||
ret
|
||||
ENDP
|
||||
|
||||
; kopioi muistista unpacked 1bpl kuvan 4planen kuvaksi videomuistiin
|
||||
; void tw_pictovmem(char far *pic, unsigned int vstart, unsigned int bytes);
|
||||
|
||||
PROC tw_pictovmem
|
||||
|
||||
ARG pic:dword,to:word,len:word
|
||||
|
||||
push bp
|
||||
mov bp,sp
|
||||
push ds es si di
|
||||
|
||||
mov es, [scr_seg]
|
||||
mov di, [to]
|
||||
lds si, [pic]
|
||||
mov cx, [len]
|
||||
|
||||
mov dx,03ceh
|
||||
mov ax,4005h ; w-mode 0
|
||||
out dx,ax
|
||||
|
||||
mov dx, 03c4h
|
||||
mov al, 02h
|
||||
mov ah, 1h
|
||||
out dx, ax
|
||||
shr cx, 2
|
||||
@@l1:
|
||||
movsb
|
||||
add si, 3
|
||||
loop @@l1
|
||||
|
||||
|
||||
lds si, [pic]
|
||||
add si, 1d
|
||||
mov di, [to]
|
||||
mov cx, [len]
|
||||
|
||||
mov ax, 0202h
|
||||
out dx, ax
|
||||
shr cx, 2
|
||||
@@l2:
|
||||
movsb
|
||||
add si, 3
|
||||
loop @@l2
|
||||
|
||||
|
||||
lds si, [pic]
|
||||
add si, 2d
|
||||
mov di, [to]
|
||||
mov cx, [len]
|
||||
|
||||
mov ax, 0402h
|
||||
out dx, ax
|
||||
shr cx, 2
|
||||
@@l3:
|
||||
movsb
|
||||
add si, 3
|
||||
loop @@l3
|
||||
|
||||
|
||||
lds si, [pic]
|
||||
add si, 3d
|
||||
mov di, [to]
|
||||
mov cx, [len]
|
||||
|
||||
mov ax, 0802h
|
||||
out dx, ax
|
||||
shr cx, 2
|
||||
@@l4:
|
||||
movsb
|
||||
add si, 3
|
||||
loop @@l4
|
||||
|
||||
pop di si es ds
|
||||
pop bp
|
||||
ret
|
||||
ENDP
|
||||
|
||||
PROC tw_waitvr
|
||||
|
||||
mov dx, 03dah
|
||||
|
||||
@@loop1:
|
||||
in al, dx
|
||||
test al, 08h
|
||||
jnz @@loop1
|
||||
|
||||
@@loop2:
|
||||
in al, dx
|
||||
test al, 08h
|
||||
jz @@loop2
|
||||
|
||||
ret
|
||||
ENDP
|
||||
|
||||
|
||||
PROC C tw_setrgbpalette
|
||||
|
||||
ARG pal:word, r:word, g:word, b:word
|
||||
|
||||
mov dx, 3c8h
|
||||
mov ax, [pal]
|
||||
out dx, al
|
||||
|
||||
inc dx
|
||||
mov ax, [r]
|
||||
out dx, al
|
||||
mov ax, [g]
|
||||
out dx, al
|
||||
mov ax, [b]
|
||||
out dx, al
|
||||
|
||||
ret
|
||||
ENDP
|
||||
|
||||
END
|
||||
12
ALKU/TWEAK.H
Normal file
12
ALKU/TWEAK.H
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
extern void tw_opengraph();
|
||||
extern void tw_closegraph();
|
||||
extern void tw_putpixel(int x, int y, int color);
|
||||
extern int tw_getpixel(int x, int y);
|
||||
extern void tw_setpalette(void far *pal);
|
||||
extern void tw_setpalarea(void far *pal,int start,int cnt);
|
||||
extern void tw_setrgbpalette(int pal, int r, int g, int b);
|
||||
extern void tw_setstart(int start);
|
||||
extern void tw_pictovmem(void far *pic, int to, int len);
|
||||
extern void tw_crlscr();
|
||||
|
||||
extern int far scr_seg;
|
||||
BIN
ALKU/TWEAK.OBJ
Normal file
BIN
ALKU/TWEAK.OBJ
Normal file
Binary file not shown.
BIN
ALKU/U2-MOVIE.LBM
Normal file
BIN
ALKU/U2-MOVIE.LBM
Normal file
Binary file not shown.
1
ALKU/U2.BAT
Normal file
1
ALKU/U2.BAT
Normal file
|
|
@ -0,0 +1 @@
|
|||
@h:\u2\main\u2.exe %1 %2 %3 %4 %5
|
||||
1
ALKU/X.BAT
Normal file
1
ALKU/X.BAT
Normal file
|
|
@ -0,0 +1 @@
|
|||
copy alku.exe ..\main\data
|
||||
Loading…
Reference in a new issue