port from perforce
This commit is contained in:
1629
ev16-4k/redist/4klang.asm
Normal file
1629
ev16-4k/redist/4klang.asm
Normal file
File diff suppressed because it is too large
Load Diff
22
ev16-4k/redist/4klang.h
Normal file
22
ev16-4k/redist/4klang.h
Normal file
@@ -0,0 +1,22 @@
|
||||
// some useful song defines for 4klang
|
||||
#define SAMPLE_RATE 44100
|
||||
#define BPM 160.014511
|
||||
#define MAX_INSTRUMENTS 6
|
||||
#define MAX_PATTERNS 100
|
||||
#define PATTERN_SIZE_SHIFT 4
|
||||
#define PATTERN_SIZE (1 << PATTERN_SIZE_SHIFT)
|
||||
#define MAX_TICKS (MAX_PATTERNS*PATTERN_SIZE)
|
||||
#define SAMPLES_PER_TICK 4134
|
||||
#define MAX_SAMPLES (SAMPLES_PER_TICK*MAX_TICKS)
|
||||
#define POLYPHONY 2
|
||||
#define FLOAT_32BIT
|
||||
#define SAMPLE_TYPE float
|
||||
|
||||
#define WINDOWS_OBJECT
|
||||
|
||||
// declaration of the external synth render function, you'll always need that
|
||||
extern "C" void __stdcall _4klang_render(void*);
|
||||
// declaration of the external envelope buffer. access only if you're song was exported with that option
|
||||
extern "C" float _4klang_envelope_buffer;
|
||||
// declaration of the external note buffer. access only if you're song was exported with that option
|
||||
extern "C" int _4klang_note_buffer;
|
||||
810
ev16-4k/redist/4klang.inc
Normal file
810
ev16-4k/redist/4klang.inc
Normal file
@@ -0,0 +1,810 @@
|
||||
%macro export_func 1
|
||||
global _%1
|
||||
_%1:
|
||||
%endmacro
|
||||
%define USE_SECTIONS
|
||||
%define SAMPLE_RATE 44100
|
||||
%define MAX_INSTRUMENTS 6
|
||||
%define MAX_VOICES 2
|
||||
%define HLD 1
|
||||
%define BPM 160.014511
|
||||
%define MAX_PATTERNS 100
|
||||
%define PATTERN_SIZE_SHIFT 4
|
||||
%define PATTERN_SIZE (1 << PATTERN_SIZE_SHIFT)
|
||||
%define MAX_TICKS (MAX_PATTERNS*PATTERN_SIZE)
|
||||
%define SAMPLES_PER_TICK 4134
|
||||
%define DEF_LFO_NORMALIZE 0.0000604741
|
||||
%define MAX_SAMPLES (SAMPLES_PER_TICK*MAX_TICKS)
|
||||
;%define GO4K_USE_16BIT_OUTPUT
|
||||
;%define GO4K_USE_GROOVE_PATTERN
|
||||
%define GO4K_USE_ENVELOPE_RECORDINGS
|
||||
;%define GO4K_USE_NOTE_RECORDINGS
|
||||
%define GO4K_CLIP_OUTPUT
|
||||
%define GO4K_USE_DST
|
||||
%define GO4K_USE_DLL
|
||||
%define GO4K_USE_PAN
|
||||
%define GO4K_USE_GLOBAL_DLL
|
||||
%define GO4K_USE_FSTG
|
||||
%define GO4K_USE_FLD
|
||||
%define GO4K_USE_ENV_CHECK
|
||||
%define GO4K_USE_ENV_MOD_GM
|
||||
%define GO4K_USE_VCO_CHECK
|
||||
%define GO4K_USE_VCO_PHASE_OFFSET
|
||||
%define GO4K_USE_VCO_SHAPE
|
||||
%define GO4K_USE_VCO_MOD_TM
|
||||
%define GO4K_USE_VCO_MOD_CM
|
||||
%define GO4K_USE_VCO_MOD_SM
|
||||
%define GO4K_USE_VCO_STEREO
|
||||
%define GO4K_USE_VCF_CHECK
|
||||
%define GO4K_USE_VCF_HIGH
|
||||
%define GO4K_USE_VCF_BAND
|
||||
%define GO4K_USE_VCF_PEAK
|
||||
%define GO4K_USE_VCF_STEREO
|
||||
%define GO4K_USE_DST_CHECK
|
||||
%define GO4K_USE_DST_STEREO
|
||||
%define GO4K_USE_DLL_CHORUS_CLAMP
|
||||
%define GO4K_USE_DLL_DAMP
|
||||
%define GO4K_USE_DLL_DC_FILTER
|
||||
%define GO4K_USE_FSTG_CHECK
|
||||
%define GO4K_USE_WAVESHAPER_CLIP
|
||||
%define GO4K_USE_FLD_MOD_VM
|
||||
%define MAX_DELAY 65536
|
||||
%define MAX_UNITS 48
|
||||
%define MAX_UNIT_SLOTS 9
|
||||
%define GO4K_BEGIN_CMDDEF(def_name)
|
||||
%define GO4K_END_CMDDEF db 0
|
||||
%define GO4K_BEGIN_PARAMDEF(def_name)
|
||||
%define GO4K_END_PARAMDEF
|
||||
GO4K_ENV_ID equ 1
|
||||
%macro GO4K_ENV 5
|
||||
db %1
|
||||
db %2
|
||||
db %3
|
||||
db %4
|
||||
db %5
|
||||
%endmacro
|
||||
%define ATTAC(val) val
|
||||
%define DECAY(val) val
|
||||
%define SUSTAIN(val) val
|
||||
%define RELEASE(val) val
|
||||
%define GAIN(val) val
|
||||
struc go4kENV_val
|
||||
.attac resd 1
|
||||
.decay resd 1
|
||||
.sustain resd 1
|
||||
.release resd 1
|
||||
.gain resd 1
|
||||
.size
|
||||
endstruc
|
||||
struc go4kENV_wrk
|
||||
.state resd 1
|
||||
.level resd 1
|
||||
.gm resd 1
|
||||
.am resd 1
|
||||
.dm resd 1
|
||||
.sm resd 1
|
||||
.rm resd 1
|
||||
.size
|
||||
endstruc
|
||||
%define ENV_STATE_ATTAC 0
|
||||
%define ENV_STATE_DECAY 1
|
||||
%define ENV_STATE_SUSTAIN 2
|
||||
%define ENV_STATE_RELEASE 3
|
||||
%define ENV_STATE_OFF 4
|
||||
GO4K_VCO_ID equ 2
|
||||
%macro GO4K_VCO 8
|
||||
db %1
|
||||
db %2
|
||||
%ifdef GO4K_USE_VCO_PHASE_OFFSET
|
||||
db %3
|
||||
%endif
|
||||
%ifdef GO4K_USE_VCO_GATE
|
||||
db %4
|
||||
%endif
|
||||
db %5
|
||||
%ifdef GO4K_USE_VCO_SHAPE
|
||||
db %6
|
||||
%endif
|
||||
db %7
|
||||
db %8
|
||||
%endmacro
|
||||
%define TRANSPOSE(val) val
|
||||
%define DETUNE(val) val
|
||||
%define PHASE(val) val
|
||||
%define GATES(val) val
|
||||
%define COLOR(val) val
|
||||
%define SHAPE(val) val
|
||||
%define FLAGS(val) val
|
||||
%define SINE 0x01
|
||||
%define TRISAW 0x02
|
||||
%define PULSE 0x04
|
||||
%define NOISE 0x08
|
||||
%define LFO 0x10
|
||||
%define GATE 0x20
|
||||
%define VCO_STEREO 0x40
|
||||
struc go4kVCO_val
|
||||
.transpose resd 1
|
||||
.detune resd 1
|
||||
%ifdef GO4K_USE_VCO_PHASE_OFFSET
|
||||
.phaseofs resd 1
|
||||
%endif
|
||||
%ifdef GO4K_USE_VCO_GATE
|
||||
.gate resd 1
|
||||
%endif
|
||||
.color resd 1
|
||||
%ifdef GO4K_USE_VCO_SHAPE
|
||||
.shape resd 1
|
||||
%endif
|
||||
.gain resd 1
|
||||
.flags resd 1
|
||||
.size
|
||||
endstruc
|
||||
struc go4kVCO_wrk
|
||||
.phase resd 1
|
||||
.tm resd 1
|
||||
.dm resd 1
|
||||
.fm resd 1
|
||||
.pm resd 1
|
||||
.cm resd 1
|
||||
.sm resd 1
|
||||
.gm resd 1
|
||||
.phase2 resd 1
|
||||
.size
|
||||
endstruc
|
||||
GO4K_VCF_ID equ 3
|
||||
%macro GO4K_VCF 3
|
||||
db %1
|
||||
db %2
|
||||
db %3
|
||||
%endmacro
|
||||
%define LOWPASS 0x1
|
||||
%define HIGHPASS 0x2
|
||||
%define BANDPASS 0x4
|
||||
%define BANDSTOP 0x3
|
||||
%define ALLPASS 0x7
|
||||
%define PEAK 0x8
|
||||
%define STEREO 0x10
|
||||
%define FREQUENCY(val) val
|
||||
%define RESONANCE(val) val
|
||||
%define VCFTYPE(val) val
|
||||
struc go4kVCF_val
|
||||
.freq resd 1
|
||||
.res resd 1
|
||||
.type resd 1
|
||||
.size
|
||||
endstruc
|
||||
struc go4kVCF_wrk
|
||||
.low resd 1
|
||||
.high resd 1
|
||||
.band resd 1
|
||||
.freq resd 1
|
||||
.fm resd 1
|
||||
.rm resd 1
|
||||
.low2 resd 1
|
||||
.high2 resd 1
|
||||
.band2 resd 1
|
||||
.size
|
||||
endstruc
|
||||
GO4K_DST_ID equ 4
|
||||
%macro GO4K_DST 3
|
||||
db %1
|
||||
%ifdef GO4K_USE_DST_SH
|
||||
db %2
|
||||
%ifdef GO4K_USE_DST_STEREO
|
||||
db %3
|
||||
%endif
|
||||
%else
|
||||
%ifdef GO4K_USE_DST_STEREO
|
||||
db %3
|
||||
%endif
|
||||
%endif
|
||||
%endmacro
|
||||
%define DRIVE(val) val
|
||||
%define SNHFREQ(val) val
|
||||
%define FLAGS(val) val
|
||||
struc go4kDST_val
|
||||
.drive resd 1
|
||||
%ifdef GO4K_USE_DST_SH
|
||||
.snhfreq resd 1
|
||||
%endif
|
||||
.flags resd 1
|
||||
.size
|
||||
endstruc
|
||||
struc go4kDST_wrk
|
||||
.out resd 1
|
||||
.snhphase resd 1
|
||||
.dm resd 1
|
||||
.sm resd 1
|
||||
.out2 resd 1
|
||||
.size
|
||||
endstruc
|
||||
GO4K_DLL_ID equ 5
|
||||
%macro GO4K_DLL 8
|
||||
db %1
|
||||
db %2
|
||||
db %3
|
||||
%ifdef GO4K_USE_DLL_DAMP
|
||||
db %4
|
||||
%endif
|
||||
%ifdef GO4K_USE_DLL_CHORUS
|
||||
db %5
|
||||
db %6
|
||||
%endif
|
||||
db %7
|
||||
db %8
|
||||
%endmacro
|
||||
%define PREGAIN(val) val
|
||||
%define DRY(val) val
|
||||
%define FEEDBACK(val) val
|
||||
%define DEPTH(val) val
|
||||
%define DAMP(val) val
|
||||
%define DELAY(val) val
|
||||
%define COUNT(val) val
|
||||
struc go4kDLL_val
|
||||
.pregain resd 1
|
||||
.dry resd 1
|
||||
.feedback resd 1
|
||||
%ifdef GO4K_USE_DLL_DAMP
|
||||
.damp resd 1
|
||||
%endif
|
||||
%ifdef GO4K_USE_DLL_CHORUS
|
||||
.freq resd 1
|
||||
.depth
|
||||
%endif
|
||||
.delay resd 1
|
||||
.count resd 1
|
||||
.size
|
||||
endstruc
|
||||
struc go4kDLL_wrk
|
||||
.index resd 1
|
||||
.store resd 1
|
||||
.dcin resd 1
|
||||
.dcout resd 1
|
||||
%ifdef GO4K_USE_DLL_CHORUS
|
||||
.phase resd 1
|
||||
%endif
|
||||
.buffer resd MAX_DELAY
|
||||
.size
|
||||
endstruc
|
||||
struc go4kDLL_wrk2
|
||||
.pm resd 1
|
||||
.fm resd 1
|
||||
.im resd 1
|
||||
.dm resd 1
|
||||
.sm resd 1
|
||||
.am resd 1
|
||||
.size
|
||||
endstruc
|
||||
GO4K_FOP_ID equ 6
|
||||
%macro GO4K_FOP 1
|
||||
db %1
|
||||
%endmacro
|
||||
%define OP(val) val
|
||||
%define FOP_POP 0x1
|
||||
%define FOP_ADDP 0x2
|
||||
%define FOP_MULP 0x3
|
||||
%define FOP_PUSH 0x4
|
||||
%define FOP_XCH 0x5
|
||||
%define FOP_ADD 0x6
|
||||
%define FOP_MUL 0x7
|
||||
%define FOP_ADDP2 0x8
|
||||
%define FOP_LOADNOTE 0x9
|
||||
%define FOP_MULP2 0xa
|
||||
struc go4kFOP_val
|
||||
.flags resd 1
|
||||
.size
|
||||
endstruc
|
||||
struc go4kFOP_wrk
|
||||
.size
|
||||
endstruc
|
||||
GO4K_FST_ID equ 7
|
||||
%macro GO4K_FST 2
|
||||
db %1
|
||||
dw %2
|
||||
%endmacro
|
||||
%define AMOUNT(val) val
|
||||
%define DEST(val) val
|
||||
%define FST_SET 0x0000
|
||||
%define FST_ADD 0x4000
|
||||
%define FST_POP 0x8000
|
||||
struc go4kFST_val
|
||||
.amount resd 1
|
||||
.op1 resd 1
|
||||
.size
|
||||
endstruc
|
||||
struc go4kFST_wrk
|
||||
.size
|
||||
endstruc
|
||||
GO4K_PAN_ID equ 8
|
||||
%macro GO4K_PAN 1
|
||||
%ifdef GO4K_USE_PAN
|
||||
db %1
|
||||
%endif
|
||||
%endmacro
|
||||
%define PANNING(val) val
|
||||
struc go4kPAN_val
|
||||
%ifdef GO4K_USE_PAN
|
||||
.panning resd 1
|
||||
%endif
|
||||
.size
|
||||
endstruc
|
||||
struc go4kPAN_wrk
|
||||
.pm resd 1
|
||||
.size
|
||||
endstruc
|
||||
GO4K_OUT_ID equ 9
|
||||
%macro GO4K_OUT 2
|
||||
db %1
|
||||
%ifdef GO4K_USE_GLOBAL_DLL
|
||||
db %2
|
||||
%endif
|
||||
%endmacro
|
||||
%define AUXSEND(val) val
|
||||
struc go4kOUT_val
|
||||
.gain resd 1
|
||||
%ifdef GO4K_USE_GLOBAL_DLL
|
||||
.auxsend resd 1
|
||||
%endif
|
||||
.size
|
||||
endstruc
|
||||
struc go4kOUT_wrk
|
||||
.am resd 1
|
||||
.gm resd 1
|
||||
.size
|
||||
endstruc
|
||||
GO4K_ACC_ID equ 10
|
||||
%macro GO4K_ACC 1
|
||||
db %1
|
||||
%endmacro
|
||||
%define OUTPUT 0
|
||||
%define AUX 8
|
||||
%define ACCTYPE(val) val
|
||||
struc go4kACC_val
|
||||
.acctype resd 1
|
||||
.size
|
||||
endstruc
|
||||
struc go4kACC_wrk
|
||||
.size
|
||||
endstruc
|
||||
%ifdef GO4K_USE_FLD
|
||||
GO4K_FLD_ID equ 11
|
||||
%macro GO4K_FLD 1
|
||||
db %1
|
||||
%endmacro
|
||||
%define VALUE(val) val
|
||||
struc go4kFLD_val
|
||||
.value resd 1
|
||||
.size
|
||||
endstruc
|
||||
struc go4kFLD_wrk
|
||||
.vm resd 1
|
||||
.size
|
||||
endstruc
|
||||
%endif
|
||||
%ifdef GO4K_USE_FSTG
|
||||
GO4K_FSTG_ID equ 12
|
||||
%macro GO4K_FSTG 2
|
||||
db %1
|
||||
dw %2
|
||||
%endmacro
|
||||
struc go4kFSTG_val
|
||||
.amount resd 1
|
||||
.op1 resd 1
|
||||
.size
|
||||
endstruc
|
||||
struc go4kFSTG_wrk
|
||||
.size
|
||||
endstruc
|
||||
%endif
|
||||
struc go4k_instrument
|
||||
.release resd 1
|
||||
.note resd 1
|
||||
.workspace resd MAX_UNITS*MAX_UNIT_SLOTS
|
||||
.dlloutl resd 1
|
||||
.dlloutr resd 1
|
||||
.outl resd 1
|
||||
.outr resd 1
|
||||
.size
|
||||
endstruc
|
||||
struc go4k_synth
|
||||
.instruments resb go4k_instrument.size * MAX_INSTRUMENTS * MAX_VOICES
|
||||
.global resb go4k_instrument.size * MAX_VOICES
|
||||
.size
|
||||
endstruc
|
||||
%ifdef USE_SECTIONS
|
||||
section .g4kmuc1 data align=1
|
||||
%else
|
||||
section .data align=1
|
||||
%endif
|
||||
go4k_patterns
|
||||
db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 36, 48, 60, 72, 74, HLD, 75, HLD, 60, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 36, 48, 60, 72, 75, HLD, 79, HLD, 60, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 36, 48, 60, 72, 80, HLD, 79, HLD, 60, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 48, 60, 72, 84, 92, HLD, 91, HLD, 72, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 91, 87, 84, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 89, 86, 82, 79, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 87, 84, 80, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 72, 75, 79, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 48, 60, 72, 84, 86, HLD, 87, HLD, 72, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 48, 60, 72, 84, 87, HLD, 91, HLD, 72, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 43, 55, 67, 79, 92, HLD, 91, HLD, 67, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 91, 87, 84, 79, 91, 87, 84, 79, 91, 87, 84, 79, 91, 87, 84, 79,
|
||||
db 92, 87, 84, 80, 92, 87, 84, 80, 92, 87, 84, 80, 92, 87, 84, 80,
|
||||
db 92, 89, 86, 83, 92, 89, 86, 83, 92, 89, 86, 83, 92, 89, 86, 83,
|
||||
db 91, 86, 84, 79, 91, 86, 84, 79, 89, 86, 83, 79, 89, 86, 83, 79,
|
||||
db 92, 89, 86, 83, 80, 77, 74, 71, 68, 65, 62, 59, 56, 53, 50, 47,
|
||||
db 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 91, 89, 86, 83, 79, 77, 74, 71, 67, 65, 62, 59, 55, 53, 50, 47,
|
||||
db 60, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 60, HLD, HLD, HLD, HLD, HLD,
|
||||
db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, HLD, 0, 0, 0, 0,
|
||||
db 60, HLD, HLD, HLD, 0, 0, 0, 0, 0, 0, 60, HLD, 0, 0, 0, 0,
|
||||
db 60, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 0, 0, 60, HLD, HLD, HLD, 60, HLD,
|
||||
db HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 0, 0, 60, HLD, HLD, HLD, HLD, HLD,
|
||||
db HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 0, 0, 60, HLD, 0, 0, 0, 0,
|
||||
db 60, HLD, HLD, HLD, 0, 0, 0, 0, 0, 0, 60, HLD, HLD, HLD, 60, HLD,
|
||||
db HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 67, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 0, 0, 67, HLD, HLD, HLD,
|
||||
db 0, 0, 0, 0, 67, HLD, HLD, HLD, HLD, HLD, 0, 0, 67, HLD, HLD, HLD,
|
||||
db 0, 0, 0, 0, 0, 0, 0, 0, 67, HLD, 0, 0, 0, 0, 0, 0,
|
||||
db 0, 0, 0, 0, 0, 0, 0, 0, 67, HLD, 0, 0, 67, HLD, 67, HLD,
|
||||
db 0, 0, 0, 0, 67, HLD, HLD, HLD, 67, HLD, 0, 0, 0, 0, 0, 0,
|
||||
db 67, HLD, 67, HLD, HLD, HLD, 67, HLD, 67, HLD, 0, 0, 67, HLD, 67, HLD,
|
||||
db 84, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD,
|
||||
db HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD,
|
||||
db 48, HLD, HLD, HLD, 0, 0, 0, 0, 36, HLD, HLD, HLD, HLD, HLD, HLD, HLD,
|
||||
db 44, HLD, HLD, HLD, HLD, HLD, 0, 0, 0, 0, 44, HLD, 56, HLD, 44, HLD,
|
||||
db HLD, HLD, 43, HLD, 55, HLD, HLD, HLD, 43, HLD, HLD, HLD, 0, 0, 0, 0,
|
||||
db 0, 0, 41, HLD, HLD, HLD, HLD, HLD, 0, 0, 53, HLD, 41, HLD, 53, HLD,
|
||||
db HLD, HLD, 48, HLD, 60, HLD, 36, HLD, HLD, HLD, HLD, HLD, 0, 0, 0, 0,
|
||||
db 48, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 60, HLD, 0, 0,
|
||||
db 0, 0, 0, 0, 36, HLD, HLD, HLD, 48, HLD, 36, HLD, 0, 0, 0, 0,
|
||||
db 0, 0, 0, 0, 48, HLD, HLD, HLD, HLD, HLD, 36, HLD, 0, 0, 0, 0,
|
||||
db 0, 0, 0, 0, 41, HLD, HLD, HLD, 53, HLD, 41, HLD, 0, 0, 0, 0,
|
||||
db 43, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 55, HLD, 0, 0,
|
||||
db 0, 0, 0, 0, 55, HLD, HLD, HLD, HLD, HLD, 79, HLD, 67, HLD, 0, 0,
|
||||
db 0, 0, 0, 0, 55, HLD, HLD, HLD, HLD, HLD, 67, HLD, 0, 0, 0, 0,
|
||||
db 55, HLD, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, HLD, 74, HLD,
|
||||
db 75, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 74, HLD, 75, HLD,
|
||||
db 77, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 72, HLD, HLD, HLD,
|
||||
db 71, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 71, HLD, 72, HLD,
|
||||
db 74, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 79, HLD, HLD, HLD, HLD, HLD, HLD, HLD,
|
||||
db 75, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 0, 0, 0, 0, 75, HLD, HLD, HLD,
|
||||
db 77, HLD, 0, 0, 77, HLD, 80, HLD, HLD, HLD, 77, HLD, HLD, HLD, HLD, HLD,
|
||||
db 79, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD,
|
||||
db HLD, HLD, HLD, HLD, 83, HLD, 86, HLD, HLD, HLD, HLD, HLD, 79, HLD, HLD, HLD,
|
||||
db 79, HLD, 0, 0, 77, HLD, 80, HLD, HLD, HLD, 77, HLD, HLD, HLD, HLD, HLD,
|
||||
db 79, HLD, HLD, HLD, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
go4k_patterns_end
|
||||
%ifdef USE_SECTIONS
|
||||
section .g4kmuc2 data align=1
|
||||
%else
|
||||
section .data
|
||||
%endif
|
||||
go4k_pattern_lists
|
||||
Instrument0List db 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 4, 5, 6, 7, 8, 5, 6, 7, 8, 9, 10, 9, 4, 9, 10, 9, 11, 12, 13, 14, 15, 12, 13, 14, 15, 12, 13, 14, 15, 12, 13, 14, 15, 12, 13, 14, 15, 12, 13, 14, 15, 12, 13, 14, 15, 14, 15, 16, 17, 1, 2, 1, 3, 1, 2, 1, 4, 5, 6, 7, 8, 5, 6, 7, 8, 9, 10, 9, 4, 9, 10, 9, 11, 12, 13, 14, 15, 12, 13, 14, 18, 1, 0, 0, 0,
|
||||
Instrument1List db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 19, 19, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 20, 22, 23, 22, 23, 22, 23, 22, 24, 22, 23, 22, 23, 22, 23, 22, 24, 22, 23, 22, 24, 22, 23, 22, 24, 22, 23, 22, 24, 25, 20, 19, 20, 22, 23, 22, 23, 22, 23, 22, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 20, 22, 23, 22, 24, 22, 23, 25, 20, 22, 26, 0, 0,
|
||||
Instrument2List db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 27, 29, 29, 29, 29, 29, 29, 29, 30, 29, 29, 29, 29, 29, 29, 29, 30, 29, 29, 29, 30, 29, 29, 29, 30, 29, 29, 29, 30, 31, 32, 0, 27, 29, 29, 29, 29, 29, 29, 29, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 27, 29, 29, 29, 30, 29, 29, 31, 32, 29, 0, 0, 0,
|
||||
Instrument3List db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 33, 34, 34, 34, 33, 34, 34, 34, 33, 34, 34, 34, 33, 34, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 34, 34, 34, 33, 34, 34, 34, 33, 34, 34, 34, 33, 34, 34, 34, 33, 34, 34, 34, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 33, 34, 34, 34, 33, 34, 34, 34, 33, 34, 34, 34, 33, 34, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
Instrument4List db 0, 0, 0, 0, 35, 0, 35, 0, 35, 0, 35, 0, 35, 0, 35, 0, 36, 37, 38, 39, 36, 37, 38, 39, 36, 39, 38, 37, 36, 39, 38, 37, 40, 41, 40, 42, 40, 43, 44, 45, 40, 43, 44, 46, 40, 43, 44, 46, 40, 43, 44, 46, 40, 43, 44, 46, 40, 43, 44, 46, 44, 46, 0, 47, 35, 0, 35, 0, 35, 0, 35, 0, 36, 37, 38, 39, 36, 37, 38, 39, 36, 39, 38, 37, 36, 39, 38, 37, 40, 43, 44, 45, 40, 43, 44, 46, 35, 0, 0, 0,
|
||||
Instrument5List db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 49, 50, 51, 52, 53, 54, 55, 56, 49, 50, 51, 52, 53, 54, 57, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
go4k_pattern_lists_end
|
||||
%ifdef USE_SECTIONS
|
||||
section .g4kmuc3 data align=1
|
||||
%else
|
||||
section .data
|
||||
%endif
|
||||
go4k_synth_instructions
|
||||
GO4K_BEGIN_CMDDEF(Instrument0)
|
||||
db GO4K_ENV_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FLD_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_VCF_ID
|
||||
db GO4K_DLL_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_DLL_ID
|
||||
db GO4K_OUT_ID
|
||||
GO4K_END_CMDDEF
|
||||
GO4K_BEGIN_CMDDEF(Instrument1)
|
||||
db GO4K_ENV_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_FSTG_ID
|
||||
db GO4K_ENV_ID
|
||||
db GO4K_DST_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_PAN_ID
|
||||
db GO4K_OUT_ID
|
||||
GO4K_END_CMDDEF
|
||||
GO4K_BEGIN_CMDDEF(Instrument2)
|
||||
db GO4K_ENV_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_ENV_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_VCF_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_VCF_ID
|
||||
db GO4K_DST_ID
|
||||
db GO4K_PAN_ID
|
||||
db GO4K_OUT_ID
|
||||
GO4K_END_CMDDEF
|
||||
GO4K_BEGIN_CMDDEF(Instrument3)
|
||||
db GO4K_ENV_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_VCF_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FLD_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FLD_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FLD_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_DST_ID
|
||||
db GO4K_DLL_ID
|
||||
db GO4K_VCF_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_PAN_ID
|
||||
db GO4K_OUT_ID
|
||||
GO4K_END_CMDDEF
|
||||
GO4K_BEGIN_CMDDEF(Instrument4)
|
||||
db GO4K_ENV_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_DST_ID
|
||||
db GO4K_VCF_ID
|
||||
db GO4K_VCF_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_VCF_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FLD_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_OUT_ID
|
||||
GO4K_END_CMDDEF
|
||||
GO4K_BEGIN_CMDDEF(Instrument5)
|
||||
db GO4K_ENV_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_DST_ID
|
||||
db GO4K_VCF_ID
|
||||
db GO4K_VCF_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_VCF_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FLD_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_OUT_ID
|
||||
GO4K_END_CMDDEF
|
||||
GO4K_BEGIN_CMDDEF(Global)
|
||||
db GO4K_ACC_ID
|
||||
db GO4K_DLL_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_DLL_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_ACC_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_VCF_ID
|
||||
db GO4K_DST_ID
|
||||
db GO4K_OUT_ID
|
||||
GO4K_END_CMDDEF
|
||||
go4k_synth_instructions_end
|
||||
%ifdef USE_SECTIONS
|
||||
section .g4kmuc4 data align=1
|
||||
%else
|
||||
section .data
|
||||
%endif
|
||||
go4k_synth_parameter_values
|
||||
GO4K_BEGIN_PARAMDEF(Instrument0)
|
||||
GO4K_ENV ATTAC(32),DECAY(64),SUSTAIN(0),RELEASE(64),GAIN(72)
|
||||
GO4K_FST AMOUNT(128),DEST(13*MAX_UNIT_SLOTS+0+FST_SET+FST_POP)
|
||||
GO4K_VCO TRANSPOSE(40),DETUNE(64),PHASE(0),GATES(0),COLOR(64),SHAPE(64),GAIN(128),FLAGS(TRISAW|LFO)
|
||||
GO4K_FST AMOUNT(66),DEST(9*MAX_UNIT_SLOTS+5+FST_SET+FST_POP)
|
||||
GO4K_VCO TRANSPOSE(32),DETUNE(64),PHASE(0),GATES(0),COLOR(64),SHAPE(64),GAIN(128),FLAGS(TRISAW|LFO)
|
||||
GO4K_FST AMOUNT(56),DEST(8*MAX_UNIT_SLOTS+5+FST_SET+FST_POP)
|
||||
GO4K_VCO TRANSPOSE(48),DETUNE(64),PHASE(0),GATES(0),COLOR(64),SHAPE(64),GAIN(128),FLAGS(TRISAW|LFO)
|
||||
GO4K_FST AMOUNT(80),DEST(11*MAX_UNIT_SLOTS+5+FST_SET+FST_POP)
|
||||
GO4K_VCO TRANSPOSE(76),DETUNE(62),PHASE(48),GATES(0),COLOR(32),SHAPE(40),GAIN(128),FLAGS(TRISAW|VCO_STEREO)
|
||||
GO4K_VCO TRANSPOSE(76),DETUNE(68),PHASE(0),GATES(0),COLOR(112),SHAPE(8),GAIN(64),FLAGS(TRISAW|VCO_STEREO)
|
||||
GO4K_FOP OP(FOP_ADDP2)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(72),PHASE(96),GATES(0),COLOR(120),SHAPE(96),GAIN(32),FLAGS(PULSE|VCO_STEREO)
|
||||
GO4K_FOP OP(FOP_ADDP2)
|
||||
GO4K_FLD VALUE(64)
|
||||
GO4K_FOP OP(FOP_PUSH)
|
||||
GO4K_FOP OP(FOP_MULP2)
|
||||
GO4K_VCF FREQUENCY(96),RESONANCE(128),VCFTYPE(LOWPASS|STEREO)
|
||||
GO4K_DLL PREGAIN(64),DRY(128),FEEDBACK(64),DAMP(64),FREQUENCY(0),DEPTH(0),DELAY(17),COUNT(1)
|
||||
GO4K_FOP OP(FOP_XCH)
|
||||
GO4K_DLL PREGAIN(64),DRY(128),FEEDBACK(64),DAMP(64),FREQUENCY(0),DEPTH(0),DELAY(17),COUNT(1)
|
||||
GO4K_OUT GAIN(32), AUXSEND(48)
|
||||
GO4K_END_PARAMDEF
|
||||
GO4K_BEGIN_PARAMDEF(Instrument1)
|
||||
GO4K_ENV ATTAC(16),DECAY(64),SUSTAIN(0),RELEASE(72),GAIN(128)
|
||||
GO4K_FST AMOUNT(112),DEST(0*MAX_UNIT_SLOTS+2+FST_SET)
|
||||
GO4K_FSTG AMOUNT(32),DEST((4*go4k_instrument.size*MAX_VOICES/4)+(0*MAX_UNIT_SLOTS+2)+(go4k_instrument.workspace/4)+FST_ADD)
|
||||
GO4K_ENV ATTAC(0),DECAY(56),SUSTAIN(0),RELEASE(0),GAIN(128)
|
||||
GO4K_DST DRIVE(32), SNHFREQ(128), FLAGS(0)
|
||||
GO4K_FST AMOUNT(88),DEST(7*MAX_UNIT_SLOTS+1+FST_SET)
|
||||
GO4K_FOP OP(FOP_POP)
|
||||
GO4K_VCO TRANSPOSE(52),DETUNE(64),PHASE(0),GATES(85),COLOR(128),SHAPE(64),GAIN(128),FLAGS(SINE)
|
||||
GO4K_FOP OP(FOP_MULP)
|
||||
GO4K_PAN PANNING(64)
|
||||
GO4K_OUT GAIN(128), AUXSEND(0)
|
||||
GO4K_END_PARAMDEF
|
||||
GO4K_BEGIN_PARAMDEF(Instrument2)
|
||||
GO4K_ENV ATTAC(16),DECAY(72),SUSTAIN(0),RELEASE(72),GAIN(128)
|
||||
GO4K_FST AMOUNT(128),DEST(0*MAX_UNIT_SLOTS+2+FST_SET)
|
||||
GO4K_ENV ATTAC(0),DECAY(56),SUSTAIN(0),RELEASE(0),GAIN(128)
|
||||
GO4K_FST AMOUNT(108),DEST(6*MAX_UNIT_SLOTS+1+FST_SET)
|
||||
GO4K_FST AMOUNT(72),DEST(7*MAX_UNIT_SLOTS+1+FST_SET)
|
||||
GO4K_FOP OP(FOP_POP)
|
||||
GO4K_VCO TRANSPOSE(32),DETUNE(64),PHASE(0),GATES(85),COLOR(128),SHAPE(32),GAIN(128),FLAGS(SINE)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(64),PHASE(0),GATES(85),COLOR(128),SHAPE(80),GAIN(64),FLAGS(SINE)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(64),PHASE(0),GATES(85),COLOR(64),SHAPE(64),GAIN(64),FLAGS(NOISE)
|
||||
GO4K_VCF FREQUENCY(112),RESONANCE(96),VCFTYPE(LOWPASS)
|
||||
GO4K_FOP OP(FOP_ADDP)
|
||||
GO4K_FOP OP(FOP_ADDP)
|
||||
GO4K_FOP OP(FOP_MULP)
|
||||
GO4K_VCF FREQUENCY(24),RESONANCE(32),VCFTYPE(HIGHPASS)
|
||||
GO4K_DST DRIVE(16), SNHFREQ(128), FLAGS(0)
|
||||
GO4K_PAN PANNING(72)
|
||||
GO4K_OUT GAIN(96), AUXSEND(24)
|
||||
GO4K_END_PARAMDEF
|
||||
GO4K_BEGIN_PARAMDEF(Instrument3)
|
||||
GO4K_ENV ATTAC(0),DECAY(128),SUSTAIN(128),RELEASE(0),GAIN(96)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(64),PHASE(0),GATES(0),COLOR(0),SHAPE(64),GAIN(84),FLAGS(NOISE)
|
||||
GO4K_VCF FREQUENCY(96),RESONANCE(128),VCFTYPE(BANDPASS)
|
||||
GO4K_VCO TRANSPOSE(76),DETUNE(64),PHASE(0),GATES(51),COLOR(0),SHAPE(32),GAIN(128),FLAGS(TRISAW|LFO)
|
||||
GO4K_FLD VALUE(128)
|
||||
GO4K_FOP OP(FOP_ADDP)
|
||||
GO4K_FOP OP(FOP_PUSH)
|
||||
GO4K_FOP OP(FOP_PUSH)
|
||||
GO4K_FOP OP(FOP_MULP)
|
||||
GO4K_FOP OP(FOP_MULP)
|
||||
GO4K_FOP OP(FOP_MULP)
|
||||
GO4K_VCO TRANSPOSE(52),DETUNE(64),PHASE(64),GATES(51),COLOR(0),SHAPE(64),GAIN(64),FLAGS(TRISAW|LFO)
|
||||
GO4K_FLD VALUE(128)
|
||||
GO4K_FOP OP(FOP_ADDP)
|
||||
GO4K_FOP OP(FOP_MULP)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(64),PHASE(0),GATES(51),COLOR(0),SHAPE(64),GAIN(128),FLAGS(TRISAW|LFO)
|
||||
GO4K_FLD VALUE(128)
|
||||
GO4K_FOP OP(FOP_ADDP)
|
||||
GO4K_FOP OP(FOP_MULP)
|
||||
GO4K_DST DRIVE(32), SNHFREQ(128), FLAGS(0)
|
||||
GO4K_DLL PREGAIN(72),DRY(128),FEEDBACK(128),DAMP(128),FREQUENCY(0),DEPTH(0),DELAY(18),COUNT(1)
|
||||
GO4K_VCF FREQUENCY(128),RESONANCE(32),VCFTYPE(PEAK)
|
||||
GO4K_FOP OP(FOP_MULP)
|
||||
GO4K_PAN PANNING(72)
|
||||
GO4K_OUT GAIN(8), AUXSEND(4)
|
||||
GO4K_END_PARAMDEF
|
||||
GO4K_BEGIN_PARAMDEF(Instrument4)
|
||||
GO4K_ENV ATTAC(0),DECAY(64),SUSTAIN(64),RELEASE(64),GAIN(128)
|
||||
GO4K_VCO TRANSPOSE(80),DETUNE(64),PHASE(0),GATES(0),COLOR(128),SHAPE(64),GAIN(128),FLAGS(TRISAW|LFO)
|
||||
GO4K_FST AMOUNT(96),DEST(0*MAX_UNIT_SLOTS+2+FST_SET+FST_POP)
|
||||
GO4K_FST AMOUNT(128),DEST(15*MAX_UNIT_SLOTS+0+FST_SET+FST_POP)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(72),PHASE(48),GATES(0),COLOR(96),SHAPE(64),GAIN(64),FLAGS(PULSE|VCO_STEREO)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(60),PHASE(16),GATES(0),COLOR(96),SHAPE(32),GAIN(128),FLAGS(TRISAW|VCO_STEREO)
|
||||
GO4K_FOP OP(FOP_ADDP2)
|
||||
GO4K_DST DRIVE(127), SNHFREQ(128), FLAGS(STEREO)
|
||||
GO4K_VCF FREQUENCY(128),RESONANCE(48),VCFTYPE(BANDSTOP|STEREO)
|
||||
GO4K_VCF FREQUENCY(112),RESONANCE(128),VCFTYPE(LOWPASS|STEREO)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(62),PHASE(96),GATES(0),COLOR(128),SHAPE(16),GAIN(128),FLAGS(SINE|VCO_STEREO)
|
||||
GO4K_VCF FREQUENCY(72),RESONANCE(128),VCFTYPE(LOWPASS|STEREO)
|
||||
GO4K_FOP OP(FOP_ADDP2)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(76),PHASE(96),GATES(0),COLOR(16),SHAPE(112),GAIN(128),FLAGS(SINE|VCO_STEREO)
|
||||
GO4K_FOP OP(FOP_ADDP2)
|
||||
GO4K_FLD VALUE(64)
|
||||
GO4K_FOP OP(FOP_PUSH)
|
||||
GO4K_FOP OP(FOP_MULP2)
|
||||
GO4K_OUT GAIN(32), AUXSEND(24)
|
||||
GO4K_END_PARAMDEF
|
||||
GO4K_BEGIN_PARAMDEF(Instrument5)
|
||||
GO4K_ENV ATTAC(32),DECAY(96),SUSTAIN(0),RELEASE(32),GAIN(64)
|
||||
GO4K_VCO TRANSPOSE(48),DETUNE(64),PHASE(0),GATES(0),COLOR(128),SHAPE(64),GAIN(128),FLAGS(TRISAW|LFO)
|
||||
GO4K_FST AMOUNT(128),DEST(6*MAX_UNIT_SLOTS+5+FST_SET+FST_POP)
|
||||
GO4K_VCO TRANSPOSE(52),DETUNE(64),PHASE(32),GATES(0),COLOR(128),SHAPE(64),GAIN(128),FLAGS(TRISAW|LFO)
|
||||
GO4K_FST AMOUNT(128),DEST(7*MAX_UNIT_SLOTS+6+FST_SET+FST_POP)
|
||||
GO4K_FST AMOUNT(128),DEST(17*MAX_UNIT_SLOTS+0+FST_SET+FST_POP)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(72),PHASE(48),GATES(0),COLOR(96),SHAPE(64),GAIN(64),FLAGS(PULSE|VCO_STEREO)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(60),PHASE(16),GATES(0),COLOR(96),SHAPE(32),GAIN(128),FLAGS(TRISAW|VCO_STEREO)
|
||||
GO4K_FOP OP(FOP_ADDP2)
|
||||
GO4K_DST DRIVE(127), SNHFREQ(128), FLAGS(STEREO)
|
||||
GO4K_VCF FREQUENCY(128),RESONANCE(48),VCFTYPE(BANDSTOP|STEREO)
|
||||
GO4K_VCF FREQUENCY(112),RESONANCE(128),VCFTYPE(LOWPASS|STEREO)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(62),PHASE(96),GATES(0),COLOR(128),SHAPE(16),GAIN(128),FLAGS(PULSE|VCO_STEREO)
|
||||
GO4K_VCF FREQUENCY(112),RESONANCE(128),VCFTYPE(LOWPASS|STEREO)
|
||||
GO4K_FOP OP(FOP_ADDP2)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(76),PHASE(96),GATES(0),COLOR(16),SHAPE(112),GAIN(128),FLAGS(SINE|VCO_STEREO)
|
||||
GO4K_FOP OP(FOP_ADDP2)
|
||||
GO4K_FLD VALUE(64)
|
||||
GO4K_FOP OP(FOP_PUSH)
|
||||
GO4K_FOP OP(FOP_MULP2)
|
||||
GO4K_OUT GAIN(32), AUXSEND(24)
|
||||
GO4K_END_PARAMDEF
|
||||
GO4K_BEGIN_PARAMDEF(Global)
|
||||
GO4K_ACC ACCTYPE(AUX)
|
||||
GO4K_DLL PREGAIN(64),DRY(128),FEEDBACK(96),DAMP(64),FREQUENCY(0),DEPTH(0),DELAY(1),COUNT(8)
|
||||
GO4K_FOP OP(FOP_XCH)
|
||||
GO4K_DLL PREGAIN(64),DRY(128),FEEDBACK(96),DAMP(64),FREQUENCY(0),DEPTH(0),DELAY(9),COUNT(8)
|
||||
GO4K_FOP OP(FOP_XCH)
|
||||
GO4K_ACC ACCTYPE(OUTPUT)
|
||||
GO4K_FOP OP(FOP_ADDP2)
|
||||
GO4K_VCF FREQUENCY(4),RESONANCE(64),VCFTYPE(HIGHPASS|STEREO)
|
||||
GO4K_DST DRIVE(64), SNHFREQ(128), FLAGS(STEREO)
|
||||
GO4K_OUT GAIN(88), AUXSEND(0)
|
||||
GO4K_END_PARAMDEF
|
||||
go4k_synth_parameter_values_end
|
||||
%ifdef USE_SECTIONS
|
||||
section .g4kmuc5 data align=1
|
||||
%else
|
||||
section .data
|
||||
%endif
|
||||
%ifdef GO4K_USE_DLL
|
||||
global _go4k_delay_times
|
||||
_go4k_delay_times
|
||||
dw 0
|
||||
dw 1116
|
||||
dw 1188
|
||||
dw 1276
|
||||
dw 1356
|
||||
dw 1422
|
||||
dw 1492
|
||||
dw 1556
|
||||
dw 1618
|
||||
dw 1140
|
||||
dw 1212
|
||||
dw 1300
|
||||
dw 1380
|
||||
dw 1446
|
||||
dw 1516
|
||||
dw 1580
|
||||
dw 1642
|
||||
dw 16536
|
||||
dw 4134
|
||||
%endif
|
||||
BIN
ev16-4k/redist/4klang.obj
Normal file
BIN
ev16-4k/redist/4klang.obj
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bf-detached-src.zip
Normal file
BIN
ev16-4k/redist/bf-detached-src.zip
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/Compress (slow)/intro2k15.exe
Normal file
BIN
ev16-4k/redist/bin/Compress (slow)/intro2k15.exe
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/Compress (slow)/intro2k15.pdb
Normal file
BIN
ev16-4k/redist/bin/Compress (slow)/intro2k15.pdb
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/Release/intro2k15.exe
Normal file
BIN
ev16-4k/redist/bin/Release/intro2k15.exe
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/Release/intro2k15.iobj
Normal file
BIN
ev16-4k/redist/bin/Release/intro2k15.iobj
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/Release/intro2k15.ipdb
Normal file
BIN
ev16-4k/redist/bin/Release/intro2k15.ipdb
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/Release/intro2k15.pdb
Normal file
BIN
ev16-4k/redist/bin/Release/intro2k15.pdb
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/party/bf-detached_1024x768.exe
Normal file
BIN
ev16-4k/redist/bin/party/bf-detached_1024x768.exe
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/party/bf-detached_1280x1024.exe
Normal file
BIN
ev16-4k/redist/bin/party/bf-detached_1280x1024.exe
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/party/bf-detached_1280x720.exe
Normal file
BIN
ev16-4k/redist/bin/party/bf-detached_1280x720.exe
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/party/bf-detached_1366x768.exe
Normal file
BIN
ev16-4k/redist/bin/party/bf-detached_1366x768.exe
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/party/bf-detached_1400x1050.exe
Normal file
BIN
ev16-4k/redist/bin/party/bf-detached_1400x1050.exe
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/party/bf-detached_1440x900.exe
Normal file
BIN
ev16-4k/redist/bin/party/bf-detached_1440x900.exe
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/party/bf-detached_1600x1200.exe
Normal file
BIN
ev16-4k/redist/bin/party/bf-detached_1600x1200.exe
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/party/bf-detached_1600x900.exe
Normal file
BIN
ev16-4k/redist/bin/party/bf-detached_1600x900.exe
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/party/bf-detached_1680x1050.exe
Normal file
BIN
ev16-4k/redist/bin/party/bf-detached_1680x1050.exe
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/party/bf-detached_1920x1080.exe
Normal file
BIN
ev16-4k/redist/bin/party/bf-detached_1920x1080.exe
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/party/bf-detached_1920x1200.exe
Normal file
BIN
ev16-4k/redist/bin/party/bf-detached_1920x1200.exe
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/party/bf-detached_640x480.exe
Normal file
BIN
ev16-4k/redist/bin/party/bf-detached_640x480.exe
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/party/bf-detached_800x600.exe
Normal file
BIN
ev16-4k/redist/bin/party/bf-detached_800x600.exe
Normal file
Binary file not shown.
2
ev16-4k/redist/build.bat
Normal file
2
ev16-4k/redist/build.bat
Normal file
@@ -0,0 +1,2 @@
|
||||
cl /c /GS- /Qpar- /analyze- /W0 /Gy- /Zc:wchar_t /Gm- /O1 /Ob2 /Fd"obj/party/vc140.pdb" /fp:fast /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "SCREENWIDTH"=%1 /D "SCREENHEIGHT"=%2 /errorReport:prompt /WX- /Zc:forScope /GR- /arch:IA32 /Gz /Oy /Oi /MT /Fa"obj/party/" /nologo /Fo"obj/party/" /Os /Fp"obj/party/intro.pch" main.compress.cpp
|
||||
link /OUT:"bin/party/bf-detached_%1x%2.exe" "opengl32.lib" "winmm.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" "obj/party/main.compress.obj" "4klang.obj" /ENTRY:"main" /SUBSYSTEM:WINDOWS /CRINKLER /COMPMODE:FAST /REPORT:report.html /RANGE:opengl32
|
||||
25
ev16-4k/redist/buildall.bat
Normal file
25
ev16-4k/redist/buildall.bat
Normal file
@@ -0,0 +1,25 @@
|
||||
@echo off
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\vcvars32.bat"
|
||||
mkdir bin\party
|
||||
mkdir obj\party
|
||||
|
||||
REM 16:9
|
||||
call build 1280 720
|
||||
call build 1366 768
|
||||
call build 1600 900
|
||||
call build 1920 1080
|
||||
|
||||
REM 16:10
|
||||
call build 1440 900
|
||||
call build 1680 1050
|
||||
call build 1920 1200
|
||||
|
||||
REM 4:3
|
||||
call build 640 480
|
||||
call build 800 600
|
||||
call build 1024 768
|
||||
call build 1400 1050
|
||||
call build 1600 1200
|
||||
|
||||
REM 5:4
|
||||
call build 1280 1024
|
||||
1
ev16-4k/redist/do_minify.bat
Normal file
1
ev16-4k/redist/do_minify.bat
Normal file
@@ -0,0 +1 @@
|
||||
shader_minifier.exe "intro.fs" -o intro_small.h -v
|
||||
BIN
ev16-4k/redist/evk16_4k.VC.db
Normal file
BIN
ev16-4k/redist/evk16_4k.VC.db
Normal file
Binary file not shown.
34
ev16-4k/redist/evk16_4k.sln
Normal file
34
ev16-4k/redist/evk16_4k.sln
Normal file
@@ -0,0 +1,34 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25123.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "intro2k15", "intro2k15.vcxproj", "{DE5F7702-06F1-44F7-8823-87A60E4990BE}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Compress (Slow)|Win32 = Compress (Slow)|Win32
|
||||
Compress (Slow)|x64 = Compress (Slow)|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
Video|Win32 = Video|Win32
|
||||
Video|x64 = Video|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{DE5F7702-06F1-44F7-8823-87A60E4990BE}.Compress (Slow)|Win32.ActiveCfg = Compress (slow)|Win32
|
||||
{DE5F7702-06F1-44F7-8823-87A60E4990BE}.Compress (Slow)|Win32.Build.0 = Compress (slow)|Win32
|
||||
{DE5F7702-06F1-44F7-8823-87A60E4990BE}.Compress (Slow)|x64.ActiveCfg = Release|x64
|
||||
{DE5F7702-06F1-44F7-8823-87A60E4990BE}.Compress (Slow)|x64.Build.0 = Release|x64
|
||||
{DE5F7702-06F1-44F7-8823-87A60E4990BE}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{DE5F7702-06F1-44F7-8823-87A60E4990BE}.Release|Win32.Build.0 = Release|Win32
|
||||
{DE5F7702-06F1-44F7-8823-87A60E4990BE}.Release|x64.ActiveCfg = Release|x64
|
||||
{DE5F7702-06F1-44F7-8823-87A60E4990BE}.Release|x64.Build.0 = Release|x64
|
||||
{DE5F7702-06F1-44F7-8823-87A60E4990BE}.Video|Win32.ActiveCfg = Video|Win32
|
||||
{DE5F7702-06F1-44F7-8823-87A60E4990BE}.Video|Win32.Build.0 = Video|Win32
|
||||
{DE5F7702-06F1-44F7-8823-87A60E4990BE}.Video|x64.ActiveCfg = Video|x64
|
||||
{DE5F7702-06F1-44F7-8823-87A60E4990BE}.Video|x64.Build.0 = Video|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
13146
ev16-4k/redist/glext.h
Normal file
13146
ev16-4k/redist/glext.h
Normal file
File diff suppressed because it is too large
Load Diff
399
ev16-4k/redist/intro.fs
Normal file
399
ev16-4k/redist/intro.fs
Normal file
@@ -0,0 +1,399 @@
|
||||
// make the whole shader non-const after minifying, because we set this constant before compiling
|
||||
|
||||
const int CurScene = 0x0; // this 0x0 has to be readded, because the optimizer throws it away
|
||||
|
||||
// Parameters from our host
|
||||
// x: Scene+Time
|
||||
// y: Height
|
||||
// z: Aspect offset
|
||||
// w: Sync
|
||||
uniform vec4 Y;
|
||||
|
||||
float cFac, CurTime, CurTime2, CurStep, pi2= 6.28319;
|
||||
int m;
|
||||
vec2 CurNormal;
|
||||
vec3 cRes, rayDir, CurColor = vec3(0.), RayStep = vec3(0.);
|
||||
vec3 LightColor= vec3( 3., 2.5, 2.0);
|
||||
vec3 BackColor= vec3( 0.7, 0.6, 0.4);
|
||||
vec4 HitMaterial;
|
||||
|
||||
vec2 rotate(vec2 v,float y)
|
||||
{
|
||||
return cos(y)*v+sin(y)*vec2(-v.y,v.x);
|
||||
}
|
||||
|
||||
float repeatr(inout vec2 v,float x, float y)
|
||||
{
|
||||
float a= atan(v.y,v.x);
|
||||
float z=mod(a,y)-y*.5;
|
||||
v=(length(v))*vec2(cos(z),sin(z));
|
||||
v.x-=x;
|
||||
return a-z;
|
||||
}
|
||||
|
||||
void repeat( inout float w, float y )
|
||||
{
|
||||
w= mod( w - y*.5, y ) - y*.5;
|
||||
}
|
||||
|
||||
void repeate( inout float w, float y, float z )
|
||||
{
|
||||
w= max( abs(w)-z, mod( w - y*.5, y ) - y*.5);
|
||||
}
|
||||
|
||||
float row( float w, float y)
|
||||
{
|
||||
return floor( ( w - y*.5 )/ y );
|
||||
}
|
||||
|
||||
float CBox( in vec3 p, in vec3 box, float rad )
|
||||
{
|
||||
return length( max( abs(p) - box + vec3(rad), 0.0 ) ) - rad;
|
||||
}
|
||||
|
||||
float CBox2D( in vec2 p, in vec2 box, float rad )
|
||||
{
|
||||
return length( max( abs(p) - box + vec2(rad), 0.0 ) ) - rad;
|
||||
}
|
||||
|
||||
float plasm(float x, float a, float b,float c)
|
||||
{
|
||||
return sin(x+a+c*sin(x+b));
|
||||
}
|
||||
|
||||
float smin( float a, float b, float k )
|
||||
{
|
||||
float h = clamp( 0.5+0.5*(b-a)/k, 0.0, 1.0 );
|
||||
return mix( b, a, h ) - k*h*(1.0-h);
|
||||
}
|
||||
|
||||
float hash( vec2 p )
|
||||
{
|
||||
float h = dot(p,vec2(23.2,15.7));
|
||||
return fract(sin(h)*232.45);
|
||||
}
|
||||
|
||||
float noise(vec2 p)
|
||||
{
|
||||
vec2 e = vec2(1.0, 0.0);
|
||||
vec2 i = floor( p );
|
||||
vec2 f = fract( p );
|
||||
f *= f*(3.0-2.0*f);
|
||||
return -0.5 + mix( mix( hash( i + e.yy ),
|
||||
hash( i + e.xy ), f.x),
|
||||
mix( hash( i + e.yx ),
|
||||
hash( i + e.xx ), f.x), f.y);
|
||||
}
|
||||
|
||||
float tunnel(vec3 p)
|
||||
{
|
||||
p.y += 4.0 * plasm(1.1, CurTime * 3. + p.z * 0.02, 0.4, p.z * 0.02);
|
||||
p.x += 4.0 * plasm(0.9, CurTime * 4. + p.z * 0.02, -1.4, p.z * 0.02);
|
||||
float r = row(p.z, 24.0);
|
||||
repeat(p.z, 24.0);
|
||||
p.xy= rotate( p.xy, r + plasm(1.1, CurTime * 4., 1.3, r * 0.2));
|
||||
r = max( 12. - length(p.xz), length(length(p.xy) - 32.) - 1.0);
|
||||
repeatr(p.xy, 32.0, pi2 / 5.0);
|
||||
return min ( r, max( length( p.z) - 1., length(length(p.xy) - 18.) - 1.0));
|
||||
}
|
||||
|
||||
float f0(vec3 p)
|
||||
{
|
||||
if (CurScene > 7)
|
||||
{
|
||||
return length(p) - 32. - Y.w;
|
||||
}
|
||||
else
|
||||
{
|
||||
return length(p) - 48. - Y.w;
|
||||
}
|
||||
}
|
||||
|
||||
float f1(vec3 p)
|
||||
{
|
||||
if (CurScene > 7)
|
||||
{
|
||||
float f = 999.0;
|
||||
|
||||
for (float i = 0.; i < 3.; i+=1)
|
||||
{
|
||||
vec3 o = p;
|
||||
o.xy= rotate( o.xy, i + 2.3 * CurTime );
|
||||
o.zx= rotate( o.zx, 2. * i + 4.3 * CurTime );
|
||||
o.z += 48. + 8.0 * plasm(1.1, CurTime * 2., 0.4, CurTime * 0.02);
|
||||
o.yz= rotate( o.yz, i + 5.9 * CurTime );
|
||||
o.xy= rotate( o.xy, i + 2.3 * CurTime );
|
||||
f = min (f, CBox(o, vec3(16., 16., 16.) + Y.w, 3.));
|
||||
}
|
||||
|
||||
return max( 40. - length(p), smin(f, length(p) - 34., 24.));
|
||||
}
|
||||
else if (CurScene > 3)
|
||||
{
|
||||
float r = 360. - CurTime * 222.0 - p.z;
|
||||
r = 8. - (r < 0. ? 0. : 0.001 * r * r);
|
||||
p.y -= 4.0 * plasm(1.1, CurTime * 2. + p.z * 0.02, 0.4, p.z * 0.02);
|
||||
p.x -= 4.0 * plasm(0.9, CurTime * 2. + p.z * 0.02, -1.4, p.z * 0.02);
|
||||
return length(p.xy) - r - Y.w;
|
||||
}
|
||||
else
|
||||
{
|
||||
p.z += 192. - 96.* CurTime;
|
||||
|
||||
p.xy= rotate( p.xy, 2.3 * CurTime );
|
||||
p.yz= rotate( p.yz, 1.9 * CurTime );
|
||||
|
||||
return CBox(p, vec3(32., 32., 32.) + Y.w, 0.);
|
||||
}
|
||||
}
|
||||
|
||||
float f2(vec3 p)
|
||||
{
|
||||
if (CurScene > 7)
|
||||
{
|
||||
//return 999.0;
|
||||
float f = CBox(p, vec3(555., 555., 555.), 0.);
|
||||
|
||||
float s = 1.0;
|
||||
vec3 o = p;
|
||||
for( int m=0; m<4; m++ )
|
||||
{
|
||||
o.x += 33.;
|
||||
o.xz= rotate( o.xz, 1.6 + 0.13 * CurTime);
|
||||
o.yz= rotate( o.yz, 4.8 * 0.19 * CurTime );
|
||||
float y = 444./s;
|
||||
vec3 r = abs(0.33 - 1.0*abs(mod( o - y*.5, y ) - y*.5));
|
||||
f = max(f, 111.0 / s - min(max(r.x,r.y),min(max(r.y,r.z),max(r.z,r.x))));
|
||||
s*= 3.0;
|
||||
}
|
||||
return f;
|
||||
}
|
||||
else if (CurScene > 3)
|
||||
{
|
||||
return tunnel(p);
|
||||
}
|
||||
else
|
||||
{
|
||||
float s = repeatr(p.xy, 64.0, pi2 / 48.0);
|
||||
float r = row(p.z, 6.0);
|
||||
repeat(p.z, 12.0);
|
||||
s = plasm(s, CurTime * 8., 1.3, r * 0.2) + 0.8;
|
||||
return length(p) - s;
|
||||
}
|
||||
}
|
||||
|
||||
float f(vec3 p)
|
||||
{
|
||||
return min( min( f0(p), f1(p) ), f2(p) );
|
||||
}
|
||||
|
||||
float fN(vec3 p)
|
||||
{
|
||||
return f(p);
|
||||
}
|
||||
|
||||
void mat(vec3 p)
|
||||
{
|
||||
HitMaterial = vec4(-1.8, 3.0, 0.6, 2.0);
|
||||
|
||||
float z= 0.1;
|
||||
|
||||
if( z > f0(p) )
|
||||
{
|
||||
z= f0(p);
|
||||
CurColor = vec3(250, 105, 0)/255;
|
||||
CurStep= .6;
|
||||
}
|
||||
|
||||
if( z > f1(p) )
|
||||
{
|
||||
z= f1(p);
|
||||
|
||||
CurColor = vec3(105, 210, 231)/255;
|
||||
CurStep= .6;
|
||||
}
|
||||
|
||||
if( z > f2(p) )
|
||||
{
|
||||
CurColor = vec3(224, 228, 204)/255;
|
||||
CurStep= .3;
|
||||
}
|
||||
}
|
||||
|
||||
vec3 lightSphere(vec3 normal, vec3 color, vec2 desc)
|
||||
{
|
||||
return smoothstep(desc.x, desc.y, dot(vec3( 0.86, 0.5, 0.0),normal)) * color;
|
||||
}
|
||||
|
||||
vec3 filter(vec3 col)
|
||||
{
|
||||
vec2 uv = vec2(gl_FragCoord.xy / Y.y);
|
||||
uv.x -= Y.z;
|
||||
vec2 uv2=2*uv-1;
|
||||
|
||||
float blend = min(8.0*abs(sin((Y.x)*3.1415)),1.0);
|
||||
col*=.9+0.1*sin(10.*Y.x+uv2.x*Y.y);
|
||||
col*=.9+0.1*sin(10.*Y.x+uv2.y*Y.y);
|
||||
float Scr=1.5-length(uv2*2)*0.15;
|
||||
|
||||
if (uv.y >= blend-0.02) col*=0.7;
|
||||
if (uv.y >= blend-0.04) col*=0.7;
|
||||
if (uv.y <= 1.02-blend) col*=0.7;
|
||||
if (uv.y <= 1.04-blend) col*=0.7;
|
||||
|
||||
return smoothstep(0.0, 1.0, col*Scr*blend) * 2.0;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
CurTime= fract(Y.x);
|
||||
CurTime2= CurTime * CurTime;
|
||||
|
||||
// Get the look direction for the current pixel (always look forwards)
|
||||
rayDir = vec3((gl_FragCoord.xy / Y.y - 0.5), 0.8);
|
||||
rayDir.x -= Y.z;
|
||||
|
||||
// Camera position
|
||||
vec3 p = vec3( 0.0, 11.0, -CurTime * 33.0);
|
||||
|
||||
if( CurScene < 1)
|
||||
{
|
||||
p = vec3( -44.0, -33.0, 99.0);
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
else if( CurScene < 2)
|
||||
{
|
||||
p = vec3( 22.0, 3.0, 111.0 * (1.0 - CurTime * 0.3));
|
||||
rayDir.xz= rotate( rayDir.xz, 3.);
|
||||
}
|
||||
else if( CurScene < 3 )
|
||||
{
|
||||
p = vec3( -44.0, -33.0, -99.0);
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime);
|
||||
rayDir.xz= rotate( rayDir.xz, 4.5 -CurTime);
|
||||
}
|
||||
else if( CurScene < 4 )
|
||||
{
|
||||
p = vec3( 55.0, 33.0, -155.0 * (1.0 - CurTime * 0.6));
|
||||
rayDir.yz= rotate( rayDir.yz, 0.4 );
|
||||
rayDir.xz= rotate( rayDir.xz, -4.5 - CurTime );
|
||||
}
|
||||
else if( CurScene < 5 )
|
||||
{
|
||||
p= vec3( 11., 0., -111.);
|
||||
rayDir.xz= rotate( rayDir.xz, 3.);
|
||||
}
|
||||
else if( CurScene < 6 )
|
||||
{
|
||||
p= vec3( -18.0, -11., -111.0 * (1.0 - CurTime * 0.3));
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime * .3);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
else if( CurScene < 7 )
|
||||
{
|
||||
p= vec3( -18.0, -11., 144.0 * (1.0 - CurTime * 0.3));
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime * .3);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
else if( CurScene < 8 )
|
||||
{
|
||||
p= vec3( 18.0, -11., 111.0 * (1.0 - CurTime * 0.5));
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime * .3);
|
||||
rayDir.xz= rotate( rayDir.xz, -0.3 + CurTime * 2.);
|
||||
}
|
||||
else if( CurScene < 9 )
|
||||
{
|
||||
p= vec3( -55.0, 99., 177.);
|
||||
rayDir.yz= rotate( rayDir.yz, -0.4);
|
||||
rayDir.xz= rotate( rayDir.xz, 3.5 * (1.0 - CurTime * 0.3) );
|
||||
}
|
||||
else if( CurScene < 10 )
|
||||
{
|
||||
p= vec3( -290., 153., -70.);
|
||||
rayDir.yz= rotate( rayDir.yz, 0.4);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
else if( CurScene < 11 )
|
||||
{
|
||||
p= vec3( -66., 44.0, 0.0);
|
||||
rayDir.yz= rotate( rayDir.yz, 0.6 );
|
||||
rayDir.xz= rotate( rayDir.xz, 4.4 );
|
||||
}
|
||||
else //if( CurScene < 12 )
|
||||
{
|
||||
p= vec3( -33., 33.0 * (1.0-CurTime), -11.0);
|
||||
rayDir.yz= rotate( rayDir.yz, -0.5 );
|
||||
rayDir.xz= rotate( rayDir.xz, -1.0 );
|
||||
}
|
||||
|
||||
rayDir = normalize(rayDir);
|
||||
|
||||
cRes= vec3( .0,.0,.0 );
|
||||
cFac=1.0;
|
||||
|
||||
float t= 0.0,y,z;
|
||||
|
||||
m=0;
|
||||
HitMaterial = vec4(-3.0, 8.0, 0.9, 1.0);
|
||||
vec3 fog = lightSphere(rayDir, LightColor, HitMaterial.zw);
|
||||
while(m++<5)
|
||||
{
|
||||
float ii = 222.0;
|
||||
for (CurStep=1.0;ii >=0.0 && t<999.0 && CurStep>t*.000001;t+=CurStep,RayStep=rayDir*t,ii-=1.0)
|
||||
{
|
||||
CurStep = f(p+RayStep);
|
||||
}
|
||||
|
||||
if (ii <= 1)
|
||||
{
|
||||
ii = 0.;
|
||||
t = 999.3 ;
|
||||
RayStep=rayDir*t;
|
||||
break;
|
||||
}
|
||||
ii = smoothstep(44., 1., ii);
|
||||
|
||||
vec3 NextPos = p+RayStep;
|
||||
|
||||
// Start point and direction for reflected ray
|
||||
p= NextPos;
|
||||
|
||||
CurNormal = vec2(0.04, 0.0);
|
||||
vec3 n= vec3( fN(p + CurNormal.xyy) - fN(p - CurNormal.xyy), fN(p + CurNormal.yxy) - fN(p - CurNormal.yxy), fN(p + CurNormal.yyx) - fN(p - CurNormal.yyx) );
|
||||
|
||||
mat(p);
|
||||
n= normalize(n);
|
||||
|
||||
// CurStep == reflection
|
||||
|
||||
if( t > 999.0)
|
||||
{
|
||||
if( m < 2)
|
||||
{
|
||||
HitMaterial = vec4(-3.0, 8.0, 0.9, 1.0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
rayDir= reflect( rayDir, n );
|
||||
|
||||
// ao
|
||||
y= 8.0;
|
||||
for (z=1.0;y>0.;y-=1.0)
|
||||
{
|
||||
z-=.5*(y-f(p+n*y))/exp2(y);
|
||||
}
|
||||
CurColor*= z;
|
||||
CurColor*= lightSphere(rayDir, BackColor, HitMaterial.xy);
|
||||
|
||||
cRes+= cFac*mix(CurColor, fog, ii);
|
||||
cFac*= CurStep;
|
||||
t= 0.5;
|
||||
RayStep = rayDir * t;
|
||||
}
|
||||
|
||||
gl_FragColor.xyz = step(-12.0, -Y.x) * filter(cRes + cFac*
|
||||
( lightSphere(rayDir, LightColor, HitMaterial.zw) +
|
||||
lightSphere(rayDir, BackColor, HitMaterial.xy)));
|
||||
}
|
||||
303
ev16-4k/redist/intro2k15.vcxproj
Normal file
303
ev16-4k/redist/intro2k15.vcxproj
Normal file
@@ -0,0 +1,303 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Compress (slow)|Win32">
|
||||
<Configuration>Compress (slow)</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Compress (slow)|x64">
|
||||
<Configuration>Compress (slow)</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Video|Win32">
|
||||
<Configuration>Video</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Video|x64">
|
||||
<Configuration>Video</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{DE5F7702-06F1-44F7-8823-87A60E4990BE}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>intro2k15</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Video|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Video|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Video|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Video|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)obj\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Video|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)obj\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)obj\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<ExecutablePath>$(SolutionDir);$(ExecutablePath)</ExecutablePath>
|
||||
<OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)obj\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)obj\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<ExecutablePath>$(SolutionDir);$(ExecutablePath)</ExecutablePath>
|
||||
<OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)obj\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>Gdi32.lib;user32.lib;opengl32.lib;winmm.lib;glu32.lib;vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Video|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>Gdi32.lib;user32.lib;opengl32.lib;winmm.lib;glu32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalOptions>/CRINKLER /COMPMODE:FAST /ORDERTRIES:400 /HASHTRIES:30 /UNSAFEIMPORT /TRUNCATEFLOATS:24 /HASHSIZE:200 /REPORT:report.html /RANGE:opengl32 /PROGRESSGUI /TRANSFORM:CALLS /UNALIGNCODE %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>Gdi32.lib;user32.lib;opengl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<ExceptionHandling>false</ExceptionHandling>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
|
||||
<ProfileGuidedDatabase />
|
||||
<EntryPointSymbol>main</EntryPointSymbol>
|
||||
<AdditionalDependencies>winmm.lib;opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalOptions>/crinkler %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>Gdi32.lib;user32.lib;opengl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalOptions>/CRINKLER /COMPMODE:FAST /ORDERTRIES:400 /HASHTRIES:30 /UNSAFEIMPORT /TRUNCATEFLOATS:24 /HASHSIZE:200 /REPORT:report.html /RANGE:opengl32 /PROGRESSGUI /TRANSFORM:CALLS /UNALIGNCODE %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<ExceptionHandling>false</ExceptionHandling>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<AdditionalOptions>/CRINKLER /COMPMODE:FAST /ORDERTRIES:400 /HASHTRIES:30 /UNSAFEIMPORT /TRUNCATEFLOATS:24 /HASHSIZE:200 /REPORT:report.html /RANGE:opengl32 /PROGRESSGUI /TRANSFORM:CALLS /UNALIGNCODE %(AdditionalOptions)</AdditionalOptions>
|
||||
<GenerateDebugInformation>No</GenerateDebugInformation>
|
||||
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
|
||||
<ProfileGuidedDatabase />
|
||||
<EntryPointSymbol>main</EntryPointSymbol>
|
||||
<AdditionalDependencies>winmm.lib;opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="4klang.h" />
|
||||
<ClInclude Include="glext.h" />
|
||||
<ClInclude Include="intro_small.h" />
|
||||
<ClInclude Include="synth.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="4klang.asm">
|
||||
<FileType>Document</FileType>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">yasm-1.2.0-win32.exe -f win32 -o 4klang.obj 4klang.asm</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">yasm-1.2.0-win32.exe -f win32 -o 4klang.obj 4klang.asm</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|Win32'">yasm-1.2.0-win32.exe -f win32 -o 4klang.obj 4klang.asm</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Video|x64'">yasm-1.2.0-win32.exe -f win32 -o 4klang.obj 4klang.asm</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">yasm-1.2.0-win32.exe -f win32 -o 4klang.obj 4klang.asm</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|x64'">yasm-1.2.0-win32.exe -f win32 -o 4klang.obj 4klang.asm</Command>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">Compiling 4klang...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">4klang.obj</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">4klang.inc</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Compiling 4klang...</Message>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|Win32'">Compiling 4klang...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4klang.obj</Outputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|Win32'">4klang.obj</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4klang.inc</AdditionalInputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|Win32'">4klang.inc</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Video|x64'">Compiling 4klang...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Video|x64'">4klang.obj</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Video|x64'">4klang.inc</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Compiling 4klang...</Message>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|x64'">Compiling 4klang...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">4klang.obj</Outputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|x64'">4klang.obj</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">4klang.inc</AdditionalInputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|x64'">4klang.inc</AdditionalInputs>
|
||||
</CustomBuild>
|
||||
<None Include="4klang.inc" />
|
||||
<None Include="intro.fs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Object Include="4klang.obj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.compress.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|Win32'">false</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="main.video.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="main_rel.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
6
ev16-4k/redist/intro2k15.vcxproj.user
Normal file
6
ev16-4k/redist/intro2k15.vcxproj.user
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ShowAllFiles>true</ShowAllFiles>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
272
ev16-4k/redist/intro_small.h
Normal file
272
ev16-4k/redist/intro_small.h
Normal file
@@ -0,0 +1,272 @@
|
||||
/* File generated with Shader Minifier 1.1.1
|
||||
* http://www.ctrl-alt-test.fr
|
||||
*/
|
||||
#ifndef INTRO_SMALL_H_
|
||||
# define INTRO_SMALL_H_
|
||||
# define U_Y "v"
|
||||
|
||||
char intro_fs[] = ""
|
||||
"const int z=0x0;"
|
||||
"uniform vec4 v;"
|
||||
"float i,y,f,m,l=6.28319;"
|
||||
"int e;"
|
||||
"vec2 r;"
|
||||
"vec3 x,a,s=vec3(0.),w=vec3(0.),d=vec3(3.,2.5,2.),t=vec3(.7,.6,.4);"
|
||||
"vec4 b;"
|
||||
"vec2 n(vec2 a,float y)"
|
||||
"{"
|
||||
"return cos(y)*a+sin(y)*vec2(-a.y,a.x);"
|
||||
"}"
|
||||
"float n(inout vec2 a,float v,float y)"
|
||||
"{"
|
||||
"float z=atan(a.y,a.x),m=mod(z,y)-y*.5;"
|
||||
"a=length(a)*vec2(cos(m),sin(m));"
|
||||
"a.x-=v;"
|
||||
"return z-m;"
|
||||
"}"
|
||||
"void h(inout float z,float y)"
|
||||
"{"
|
||||
"z=mod(z-y*.5,y)-y*.5;"
|
||||
"}"
|
||||
"void h(inout float z,float y,float x)"
|
||||
"{"
|
||||
"z=max(abs(z)-x,mod(z-y*.5,y)-y*.5);"
|
||||
"}"
|
||||
"float p(float z,float y)"
|
||||
"{"
|
||||
"return floor((z-y*.5)/y);"
|
||||
"}"
|
||||
"float p(in vec3 z,in vec3 y,float a)"
|
||||
"{"
|
||||
"return length(max(abs(z)-y+vec3(a),0.))-a;"
|
||||
"}"
|
||||
"float c(in vec2 z,in vec2 y,float a)"
|
||||
"{"
|
||||
"return length(max(abs(z)-y+vec2(a),0.))-a;"
|
||||
"}"
|
||||
"float c(float z,float y,float x,float i)"
|
||||
"{"
|
||||
"return sin(z+y+i*sin(z+x));"
|
||||
"}"
|
||||
"float o(float y,float z,float x)"
|
||||
"{"
|
||||
"float a=clamp(.5+.5*(z-y)/x,0.,1.);"
|
||||
"return mix(z,y,a)-x*a*(1.-a);"
|
||||
"}"
|
||||
"float c(vec2 z)"
|
||||
"{"
|
||||
"float y=dot(z,vec2(23.2,15.7));"
|
||||
"return fract(sin(y)*232.45);"
|
||||
"}"
|
||||
"float h(vec2 y)"
|
||||
"{"
|
||||
"vec2 a=vec2(1.,0.),z=floor(y),v=fract(y);"
|
||||
"v*=v*(3.-2.*v);"
|
||||
"return-.5+mix(mix(c(z+a.yy),c(z+a.xy),v.x),mix(c(z+a.yx),c(z+a.xx),v.x),v.y);"
|
||||
"}"
|
||||
"float n(vec3 a)"
|
||||
"{"
|
||||
"a.y+=4.*c(1.1,y*3.+a.z*.02,.4,a.z*.02);"
|
||||
"a.x+=4.*c(.9,y*4.+a.z*.02,-1.4,a.z*.02);"
|
||||
"float z=p(a.z,24.);"
|
||||
"h(a.z,24.);"
|
||||
"a.xy=n(a.xy,z+c(1.1,y*4.,1.3,z*.2));"
|
||||
"z=max(12.-length(a.xz),length(length(a.xy)-32.)-1.);"
|
||||
"n(a.xy,32.,l/5.);"
|
||||
"return min(z,max(length(a.z)-1.,length(length(a.xy)-18.)-1.));"
|
||||
"}"
|
||||
"float o(vec3 y)"
|
||||
"{"
|
||||
"if(z>7)"
|
||||
"return length(y)-32.-v.w;"
|
||||
"else"
|
||||
" return length(y)-48.-v.w;"
|
||||
"}"
|
||||
"float p(vec3 a)"
|
||||
"{"
|
||||
"if(z>7)"
|
||||
"{"
|
||||
"float i=999.;"
|
||||
"for(float f=0.;f<3.;f+=1)"
|
||||
"{"
|
||||
"vec3 m=a;"
|
||||
"m.xy=n(m.xy,f+2.3*y);"
|
||||
"m.zx=n(m.zx,2.*f+4.3*y);"
|
||||
"m.z+=48.+8.*c(1.1,y*2.,.4,y*.02);"
|
||||
"m.yz=n(m.yz,f+5.9*y);"
|
||||
"m.xy=n(m.xy,f+2.3*y);"
|
||||
"i=min(i,p(m,vec3(16.,16.,16.)+v.w,3.));"
|
||||
"}"
|
||||
"return max(40.-length(a),o(i,length(a)-34.,24.));"
|
||||
"}"
|
||||
"else"
|
||||
" if(z>3)"
|
||||
"{"
|
||||
"float i=360.-y*222.-a.z;"
|
||||
"i=8.-(i<0.?0.:.001*i*i);"
|
||||
"a.y-=4.*c(1.1,y*2.+a.z*.02,.4,a.z*.02);"
|
||||
"a.x-=4.*c(.9,y*2.+a.z*.02,-1.4,a.z*.02);"
|
||||
"return length(a.xy)-i-v.w;"
|
||||
"}"
|
||||
"else"
|
||||
" return a.z+=192.-96.*y,a.xy=n(a.xy,2.3*y),a.yz=n(a.yz,1.9*y),p(a,vec3(32.,32.,32.)+v.w,0.);"
|
||||
"}"
|
||||
"float u(vec3 a)"
|
||||
"{"
|
||||
"if(z>7)"
|
||||
"{"
|
||||
"float i=p(a,vec3(555.,555.,555.),0.),f=1.;"
|
||||
"vec3 v=a;"
|
||||
"for(int m=0;m<4;m++)"
|
||||
"{"
|
||||
"v.x+=33.;"
|
||||
"v.xz=n(v.xz,1.6+.13*y);"
|
||||
"v.yz=n(v.yz,.912*y);"
|
||||
"float x=444./f;"
|
||||
"vec3 s=abs(.33-abs(mod(v-x*.5,x)-x*.5));"
|
||||
"i=max(i,111./f-min(max(s.x,s.y),min(max(s.y,s.z),max(s.z,s.x))));"
|
||||
"f*=3.;"
|
||||
"}"
|
||||
"return i;"
|
||||
"}"
|
||||
"else"
|
||||
" if(z>3)"
|
||||
"return n(a);"
|
||||
"else"
|
||||
"{"
|
||||
"float i=n(a.xy,64.,l/48.),f=p(a.z,6.);"
|
||||
"h(a.z,12.);"
|
||||
"i=c(i,y*8.,1.3,f*.2)+.8;"
|
||||
"return length(a)-i;"
|
||||
"}"
|
||||
"}"
|
||||
"float g(vec3 a)"
|
||||
"{"
|
||||
"return min(min(o(a),p(a)),u(a));"
|
||||
"}"
|
||||
"float F(vec3 a)"
|
||||
"{"
|
||||
"return g(a);"
|
||||
"}"
|
||||
"void C(vec3 a)"
|
||||
"{"
|
||||
"b=vec4(-1.8,3.,.6,2.);"
|
||||
"float z=.1;"
|
||||
"if(z>o(a))"
|
||||
"z=o(a),s=vec3(250,105,0)/255,m=.6;"
|
||||
"if(z>p(a))"
|
||||
"z=p(a),s=vec3(105,210,231)/255,m=.6;"
|
||||
"if(z>u(a))"
|
||||
"s=vec3(224,228,204)/255,m=.3;"
|
||||
"}"
|
||||
"vec3 C(vec3 y,vec3 z,vec2 a)"
|
||||
"{"
|
||||
"return smoothstep(a.x,a.y,dot(vec3(.86,.5,0.),y))*z;"
|
||||
"}"
|
||||
"vec3 k(vec3 y)"
|
||||
"{"
|
||||
"vec2 a=vec2(gl_FragCoord.xy/v.y);"
|
||||
"a.x-=v.z;"
|
||||
"vec2 z=2*a-1;"
|
||||
"float i=min(8.*abs(sin(v.x*3.1415)),1.);"
|
||||
"y*=.9+.1*sin(10.*v.x+z.x*v.y);"
|
||||
"y*=.9+.1*sin(10.*v.x+z.y*v.y);"
|
||||
"float m=1.5-length(z*2)*.15;"
|
||||
"if(a.y>=i-.02)"
|
||||
"y*=.7;"
|
||||
"if(a.y>=i-.04)"
|
||||
"y*=.7;"
|
||||
"if(a.y<=1.02-i)"
|
||||
"y*=.7;"
|
||||
"if(a.y<=1.04-i)"
|
||||
"y*=.7;"
|
||||
"return smoothstep(0.,1.,y*m*i)*2.;"
|
||||
"}"
|
||||
"void main()"
|
||||
"{"
|
||||
"y=fract(v.x);"
|
||||
"f=y*y;"
|
||||
"a=vec3(gl_FragCoord.xy/v.y-.5,.8);"
|
||||
"a.x-=v.z;"
|
||||
"vec3 l=vec3(0.,11.,-y*33.);"
|
||||
"if(z<1)"
|
||||
"l=vec3(-44.,-33.,99.),a.yz=n(a.yz,-y),a.xz=n(a.xz,-y);"
|
||||
"else"
|
||||
" if(z<2)"
|
||||
"l=vec3(22.,3.,111.*(1.-y*.3)),a.xz=n(a.xz,3.);"
|
||||
"else"
|
||||
" if(z<3)"
|
||||
"l=vec3(-44.,-33.,-99.),a.yz=n(a.yz,-y),a.xz=n(a.xz,4.5-y);"
|
||||
"else"
|
||||
" if(z<4)"
|
||||
"l=vec3(55.,33.,-155.*(1.-y*.6)),a.yz=n(a.yz,.4),a.xz=n(a.xz,-4.5-y);"
|
||||
"else"
|
||||
" if(z<5)"
|
||||
"l=vec3(11.,0.,-111.),a.xz=n(a.xz,3.);"
|
||||
"else"
|
||||
" if(z<6)"
|
||||
"l=vec3(-18.,-11.,-111.*(1.-y*.3)),a.yz=n(a.yz,-y*.3),a.xz=n(a.xz,-y);"
|
||||
"else"
|
||||
" if(z<7)"
|
||||
"l=vec3(-18.,-11.,144.*(1.-y*.3)),a.yz=n(a.yz,-y*.3),a.xz=n(a.xz,-y);"
|
||||
"else"
|
||||
" if(z<8)"
|
||||
"l=vec3(18.,-11.,111.*(1.-y*.5)),a.yz=n(a.yz,-y*.3),a.xz=n(a.xz,-.3+y*2.);"
|
||||
"else"
|
||||
" if(z<9)"
|
||||
"l=vec3(-55.,99.,177.),a.yz=n(a.yz,-.4),a.xz=n(a.xz,3.5*(1.-y*.3));"
|
||||
"else"
|
||||
" if(z<10)"
|
||||
"l=vec3(-290.,153.,-70.),a.yz=n(a.yz,.4),a.xz=n(a.xz,-y);"
|
||||
"else"
|
||||
" if(z<11)"
|
||||
"l=vec3(-66.,44.,0.),a.yz=n(a.yz,.6),a.xz=n(a.xz,4.4);"
|
||||
"else"
|
||||
" l=vec3(-33.,33.*(1.-y),-11.),a.yz=n(a.yz,-.5),a.xz=n(a.xz,-1.);"
|
||||
"a=normalize(a);"
|
||||
"x=vec3(0.,0.,0.);"
|
||||
"i=1.;"
|
||||
"float h=0.,u,p;"
|
||||
"e=0;"
|
||||
"b=vec4(-3.,8.,.9,1.);"
|
||||
"vec3 c=C(a,d,b.zw);"
|
||||
"while(e++<5)"
|
||||
"{"
|
||||
"float o=222.;"
|
||||
"for(m=1.;o>=0.&&h<999.&&m>h*1e-06;h+=m,w=a*h,o-=1.)"
|
||||
"m=g(l+w);"
|
||||
"if(o<=1)"
|
||||
"{"
|
||||
"o=0.;"
|
||||
"h=999.3;"
|
||||
"w=a*h;"
|
||||
"break;"
|
||||
"}"
|
||||
"o=smoothstep(44.,1.,o);"
|
||||
"vec3 Z=l+w;"
|
||||
"l=Z;"
|
||||
"r=vec2(.04,0.);"
|
||||
"vec3 Y=vec3(F(l+r.xyy)-F(l-r.xyy),F(l+r.yxy)-F(l-r.yxy),F(l+r.yyx)-F(l-r.yyx));"
|
||||
"C(l);"
|
||||
"Y=normalize(Y);"
|
||||
"if(h>999.)"
|
||||
"{"
|
||||
"if(e<2)"
|
||||
"b=vec4(-3.,8.,.9,1.);"
|
||||
"break;"
|
||||
"}"
|
||||
"a=reflect(a,Y);"
|
||||
"u=8.;"
|
||||
"for(p=1.;u>0.;u-=1.)"
|
||||
"p-=.5*(u-g(l+Y*u))/exp2(u);"
|
||||
"s*=p;"
|
||||
"s*=C(a,t,b.xy);"
|
||||
"x+=i*mix(s,c,o);"
|
||||
"i*=m;"
|
||||
"h=.5;"
|
||||
"w=a*h;"
|
||||
"}"
|
||||
"gl_FragColor.xyz=step(-12.,-v.x)*k(x+i*(C(a,d,b.zw)+C(a,t,b.xy)));"
|
||||
"}";
|
||||
|
||||
#endif // INTRO_SMALL_H_
|
||||
BIN
ev16-4k/redist/link.exe
Normal file
BIN
ev16-4k/redist/link.exe
Normal file
Binary file not shown.
307
ev16-4k/redist/main.compress.cpp
Normal file
307
ev16-4k/redist/main.compress.cpp
Normal file
@@ -0,0 +1,307 @@
|
||||
// HACKS - Don't use unless you're really in desperate size problems
|
||||
//------------------------------------------------------------------
|
||||
//#define WAVHDR_PREPARE_HACK
|
||||
//#define PFD_HACK
|
||||
|
||||
// FEATURES - Use whenever you can, at the expense of some size
|
||||
//-------------------------------------------------------------
|
||||
#define SHADER_WARMUP
|
||||
#define START_BLACK
|
||||
|
||||
// INCLUDES
|
||||
//---------
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_EXTRA_LEAN
|
||||
#include "synth.h"
|
||||
#include <GL/gl.h>
|
||||
#include "glext.h"
|
||||
|
||||
// CONFIGURATION
|
||||
//---------------
|
||||
//#define WINDOWED
|
||||
|
||||
#ifndef SCREENWIDTH
|
||||
#define SCREENWIDTH 1280
|
||||
#endif
|
||||
|
||||
#ifndef SCREENHEIGHT
|
||||
#define SCREENHEIGHT 720
|
||||
#endif
|
||||
|
||||
#ifndef ASPECTOFFSET
|
||||
#define ASPECTOFFSET ((float(SCREENWIDTH) / float(SCREENHEIGHT) - 1.0f) * 0.5f)
|
||||
#endif
|
||||
|
||||
#define shaderOffset 14
|
||||
#define shaderCount 13
|
||||
#define ATOM_EDIT 0xC018
|
||||
#define ATOM_STATIC 0xC019
|
||||
#define SCENE_LENGTH (SAMPLES_PER_TICK * 128)
|
||||
|
||||
#pragma data_seg(".aspectOffset")
|
||||
static const float gfAspectOffset = ASPECTOFFSET;
|
||||
|
||||
#pragma data_seg(".scebeLength")
|
||||
static const int giSceneLength = SCENE_LENGTH;
|
||||
|
||||
#pragma data_seg(".Shader0")
|
||||
#include "intro_small.h"
|
||||
char* source = intro_fs;
|
||||
|
||||
struct FAKEDEVMODE
|
||||
{
|
||||
BYTE _a[36];
|
||||
DWORD dmSize;
|
||||
DWORD dmFields;
|
||||
struct
|
||||
{
|
||||
BYTE _b[4];
|
||||
DWORD pfdFlags;
|
||||
} pfd;
|
||||
BYTE _c[56];
|
||||
DWORD width;
|
||||
DWORD height;
|
||||
BYTE _d[8];
|
||||
};
|
||||
|
||||
#pragma data_seg(".devmode")
|
||||
static FAKEDEVMODE devmode = {
|
||||
"", sizeof(devmode), DM_PELSWIDTH | DM_PELSHEIGHT, "",
|
||||
#ifdef PFD_HACK
|
||||
0,
|
||||
#else
|
||||
PFD_DOUBLEBUFFER | PFD_SUPPORT_OPENGL,
|
||||
#endif
|
||||
"", SCREENWIDTH, SCREENHEIGHT, ""
|
||||
};
|
||||
|
||||
#pragma data_seg("fcw")
|
||||
static WORD fcw = 0x0E7f;
|
||||
|
||||
#pragma data_seg(".fltused")
|
||||
int _fltused = 1;
|
||||
|
||||
#pragma data_seg(".glCreateShaderProgramv")
|
||||
static const char* sglCreateShaderProgramv = "glCreateShaderProgramv";
|
||||
|
||||
#pragma data_seg(".glUseProgram")
|
||||
static const char* sglUseProgram = "glUseProgram";
|
||||
|
||||
#pragma data_seg(".glUniform4f")
|
||||
static const char* sglUniform4f = "glUniform4f";
|
||||
|
||||
#pragma bss_seg(".mainbss")
|
||||
static GLuint programs[shaderCount];
|
||||
|
||||
#pragma code_seg(".main")
|
||||
void _cdecl main()
|
||||
{
|
||||
_asm
|
||||
{
|
||||
fldcw [fcw]
|
||||
|
||||
xor esi, esi
|
||||
|
||||
push esi
|
||||
push esi
|
||||
push esi
|
||||
push esi
|
||||
|
||||
#ifndef WINDOWED
|
||||
push esi
|
||||
push esi
|
||||
push esi
|
||||
push esi
|
||||
push WS_POPUP | WS_VISIBLE | WS_MAXIMIZE
|
||||
push esi
|
||||
push ATOM_STATIC
|
||||
push esi
|
||||
push CDS_FULLSCREEN
|
||||
push offset devmode
|
||||
push esi
|
||||
push esi
|
||||
push offset lpSoundBuffer
|
||||
push _4klang_render
|
||||
push esi
|
||||
push esi
|
||||
call CreateThread
|
||||
call ChangeDisplaySettings
|
||||
call CreateWindowExA
|
||||
#else
|
||||
push SCREENHEIGHT
|
||||
push SCREENWIDTH
|
||||
push esi
|
||||
push esi
|
||||
push WS_POPUP | WS_VISIBLE
|
||||
push esi
|
||||
push ATOM_STATIC
|
||||
push esi
|
||||
push esi
|
||||
push esi
|
||||
push offset lpSoundBuffer
|
||||
push _4klang_render
|
||||
push esi
|
||||
push esi
|
||||
call CreateThread
|
||||
call CreateWindowExA
|
||||
#endif
|
||||
|
||||
push eax
|
||||
call GetDC
|
||||
mov edi, eax
|
||||
|
||||
push esi
|
||||
#ifdef START_BLACK
|
||||
push edi
|
||||
#endif
|
||||
push edi
|
||||
#ifdef PFD_HACK
|
||||
push esi
|
||||
push 8
|
||||
#else
|
||||
push esi
|
||||
push offset devmode.pfd
|
||||
push edi
|
||||
call ChoosePixelFormat
|
||||
push eax
|
||||
#endif
|
||||
push edi
|
||||
call SetPixelFormat
|
||||
call wglCreateContext
|
||||
push eax
|
||||
push edi
|
||||
call wglMakeCurrent
|
||||
#ifdef START_BLACK
|
||||
call SwapBuffers
|
||||
#endif
|
||||
call ShowCursor
|
||||
|
||||
xor ebx, ebx
|
||||
|
||||
shaderwarmup :
|
||||
#ifdef SHADER_WARMUP
|
||||
push 1
|
||||
push 1
|
||||
push -1
|
||||
push -1
|
||||
#endif
|
||||
push offset source
|
||||
push 1
|
||||
push GL_FRAGMENT_SHADER
|
||||
push sglCreateShaderProgramv
|
||||
call wglGetProcAddress
|
||||
call eax
|
||||
mov dword ptr programs[ebx * 4], eax
|
||||
#ifdef SHADER_WARMUP
|
||||
push eax
|
||||
push sglUseProgram
|
||||
call wglGetProcAddress
|
||||
call eax
|
||||
#endif
|
||||
inc byte ptr[intro_fs + shaderOffset]
|
||||
|
||||
cmp ebx, 9
|
||||
jnz skip
|
||||
mov byte ptr[intro_fs + shaderOffset], 'A'
|
||||
skip:
|
||||
#ifdef SHADER_WARMUP
|
||||
push esi
|
||||
push gfAspectOffset
|
||||
push dword ptr[devmode.height]
|
||||
fild dword ptr[esp]
|
||||
fstp dword ptr[esp]
|
||||
push ebx
|
||||
fild dword ptr[esp]
|
||||
fstp dword ptr[esp]
|
||||
push esi
|
||||
push sglUniform4f
|
||||
call wglGetProcAddress
|
||||
call eax
|
||||
call glRecti
|
||||
#endif
|
||||
inc ebx
|
||||
cmp ebx, shaderCount
|
||||
jnz shaderwarmup
|
||||
|
||||
#ifndef WAVHDR_PREPARE_HACK
|
||||
push 0x20
|
||||
push offset WaveHDR
|
||||
#endif
|
||||
push 0x20
|
||||
push offset WaveHDR
|
||||
push esi
|
||||
push esi
|
||||
push esi
|
||||
push offset WaveFMT
|
||||
push -1
|
||||
push offset hWaveOut
|
||||
call waveOutOpen
|
||||
#ifndef WAVHDR_PREPARE_HACK
|
||||
push[hWaveOut]
|
||||
call waveOutPrepareHeader
|
||||
#endif
|
||||
push [hWaveOut]
|
||||
call waveOutWrite
|
||||
|
||||
mainloop:
|
||||
push 0xC
|
||||
push offset MMTime
|
||||
push [hWaveOut]
|
||||
call waveOutGetPosition
|
||||
|
||||
push esi
|
||||
push esi
|
||||
push esi
|
||||
push esi
|
||||
push esi
|
||||
push edi
|
||||
push 1
|
||||
push 1
|
||||
push -1
|
||||
push -1
|
||||
push esi
|
||||
|
||||
// 4klang envelope buffer, instrument 2, 2x polyphony
|
||||
mov eax, dword ptr[MMTime + 4]
|
||||
shr eax, 3
|
||||
and eax, 1FFFFFE0h
|
||||
movss xmm0, dword ptr _4klang_envelope_buffer + 14h[eax * 4]
|
||||
addss xmm0, dword ptr _4klang_envelope_buffer + 10h[eax * 4]
|
||||
movss dword ptr[esp], xmm0
|
||||
|
||||
push gfAspectOffset
|
||||
push dword ptr[devmode.height]
|
||||
fild dword ptr[esp]
|
||||
fstp dword ptr[esp]
|
||||
push dword ptr[MMTime.u.sample]
|
||||
fild dword ptr[esp]
|
||||
fild giSceneLength
|
||||
fdiv
|
||||
fst dword ptr[esp]
|
||||
push esi
|
||||
push esi
|
||||
fistp dword ptr[esp]
|
||||
pop eax
|
||||
push dword ptr programs[eax * 4]
|
||||
push sglUseProgram
|
||||
call wglGetProcAddress
|
||||
call eax
|
||||
|
||||
push sglUniform4f
|
||||
call wglGetProcAddress
|
||||
call eax
|
||||
call glRecti
|
||||
call SwapBuffers
|
||||
call PeekMessage
|
||||
|
||||
cmp dword ptr [MMTime+4], MAX_SAMPLES
|
||||
jae exit
|
||||
push VK_ESCAPE
|
||||
call GetAsyncKeyState
|
||||
test ax,ax
|
||||
je mainloop
|
||||
exit:
|
||||
push esi
|
||||
call ExitProcess
|
||||
}
|
||||
}
|
||||
217
ev16-4k/redist/main.video.cpp
Normal file
217
ev16-4k/redist/main.video.cpp
Normal file
@@ -0,0 +1,217 @@
|
||||
// INCLUDES
|
||||
//---------
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_EXTRA_LEAN
|
||||
#include "synth.h"
|
||||
#include <GL/gl.h>
|
||||
#include "glext.h"
|
||||
#include "intro_small.h"
|
||||
#include <vfw.h>
|
||||
|
||||
// CONFIG
|
||||
//-------
|
||||
#define FPS 60
|
||||
#define MOTION_BLUR 2
|
||||
#define SCREENWIDTH 1920
|
||||
#define SCREENHEIGHT 1080
|
||||
#define ASPECTOFFSET ((float(SCREENWIDTH) / float(SCREENHEIGHT) - 1.0f) * 0.5f)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
PAVISTREAM m_ps;
|
||||
PAVISTREAM m_psCompressed;
|
||||
PAVISTREAM m_psAudio;
|
||||
AVISTREAMINFO m_strhdr;
|
||||
AVICOMPRESSOPTIONS m_opts;
|
||||
PAVIFILE m_pfile;
|
||||
BITMAPINFOHEADER m_alpbi;
|
||||
} AVIWRITER;
|
||||
|
||||
static AVIWRITER avi;
|
||||
static int frame = 0;
|
||||
static GLushort tempBuffer[3 * SCREENWIDTH * SCREENHEIGHT];
|
||||
static GLubyte data[3 * SCREENWIDTH * SCREENHEIGHT];
|
||||
|
||||
struct FAKEPFD
|
||||
{
|
||||
WORD nSize;
|
||||
WORD nVersion;
|
||||
DWORD dwFlags;
|
||||
// Snip
|
||||
};
|
||||
|
||||
struct FAKEDEVMODE
|
||||
{
|
||||
BYTE dmDeviceName[CCHDEVICENAME];
|
||||
WORD dmSpecVersion;
|
||||
WORD dmDriverVersion;
|
||||
WORD dmSize;
|
||||
WORD dmDriverExtra;
|
||||
DWORD dmFields;
|
||||
union {
|
||||
/* printer only fields */
|
||||
struct {
|
||||
short dmOrientation;
|
||||
short dmPaperSize;
|
||||
short dmPaperLength;
|
||||
short dmPaperWidth;
|
||||
short dmScale;
|
||||
short dmCopies;
|
||||
short dmDefaultSource;
|
||||
short dmPrintQuality;
|
||||
};
|
||||
FAKEPFD pfd;
|
||||
};
|
||||
short dmColor;
|
||||
short dmDuplex;
|
||||
short dmYResolution;
|
||||
short dmTTOption;
|
||||
short dmCollate;
|
||||
BYTE dmFormName[CCHFORMNAME];
|
||||
WORD dmLogPixels;
|
||||
DWORD dmBitsPerPel;
|
||||
DWORD dmPelsWidth;
|
||||
DWORD dmPelsHeight;
|
||||
union {
|
||||
DWORD dmDisplayFlags;
|
||||
DWORD dmNup;
|
||||
};
|
||||
DWORD dmDisplayFrequency;
|
||||
};
|
||||
|
||||
static PFNGLCREATESHADERPROGRAMEXTPROC glCreateShaderProgramEXT;
|
||||
static PFNGLUSEPROGRAMPROC glUseProgram;
|
||||
static PFNGLUNIFORM4FPROC glUniform4f;
|
||||
|
||||
static FAKEDEVMODE devmode = {
|
||||
"", 0, 0, sizeof(devmode), 0, DM_PELSWIDTH | DM_PELSHEIGHT, 0, 0, PFD_DOUBLEBUFFER | PFD_SUPPORT_OPENGL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", 0, 0, SCREENWIDTH, SCREENHEIGHT, 0, 0
|
||||
};
|
||||
|
||||
static const char* sglCreateShaderProgramEXT = "glCreateShaderProgramEXT";
|
||||
static const char* sglUseProgram = "glUseProgram";
|
||||
static const char* sglUniform4f = "glUniform4f";
|
||||
|
||||
#define shaderCountOffset 14
|
||||
|
||||
#define ATOM_EDIT 0xC018
|
||||
#define ATOM_STATIC 0xC019
|
||||
|
||||
#define SCENE_LENGTH (SAMPLES_PER_TICK * 128)
|
||||
|
||||
void _cdecl main()
|
||||
{
|
||||
InitSound();
|
||||
HWND hWnd = CreateWindowExA(0, (LPCSTR)ATOM_STATIC, 0, WS_VISIBLE | WS_SYSMENU, 0, 0, SCREENWIDTH, SCREENHEIGHT, 0, 0, 0, 0);
|
||||
HDC hDC = GetDC(hWnd);
|
||||
|
||||
SetPixelFormat(hDC, ChoosePixelFormat(hDC, (const PIXELFORMATDESCRIPTOR*)&devmode.pfd), 0);
|
||||
wglMakeCurrent(hDC, wglCreateContext(hDC));
|
||||
|
||||
glCreateShaderProgramEXT = (PFNGLCREATESHADERPROGRAMEXTPROC)wglGetProcAddress(sglCreateShaderProgramEXT);
|
||||
glUseProgram = (PFNGLUSEPROGRAMPROC)wglGetProcAddress(sglUseProgram);
|
||||
glUniform4f = (PFNGLUNIFORM4FPROC)wglGetProcAddress(sglUniform4f);
|
||||
|
||||
for (int i = 0; i < 12; ++i)
|
||||
{
|
||||
glUseProgram(glCreateShaderProgramEXT(GL_FRAGMENT_SHADER, intro_fs));
|
||||
intro_fs[shaderCountOffset]++;
|
||||
if (i == 9)
|
||||
{
|
||||
intro_fs[shaderCountOffset] = 'A';
|
||||
}
|
||||
glUniform4f(0, i, SCREENHEIGHT, ASPECTOFFSET, 0.0f);
|
||||
glRecti(-1, -1, 1, 1);
|
||||
}
|
||||
|
||||
AVIFileInit();
|
||||
AVIFileOpen(&avi.m_pfile, "intro.avi", OF_WRITE | OF_CREATE, NULL);
|
||||
|
||||
memset(&avi.m_strhdr, 0, sizeof(avi.m_strhdr));
|
||||
avi.m_strhdr.fccType = streamtypeVIDEO;
|
||||
avi.m_strhdr.fccHandler = 0;
|
||||
avi.m_strhdr.dwScale = 1;
|
||||
avi.m_strhdr.dwRate = FPS;
|
||||
avi.m_strhdr.dwSuggestedBufferSize = 0;
|
||||
SetRect(&avi.m_strhdr.rcFrame, 0, 0, SCREENWIDTH, SCREENHEIGHT);
|
||||
|
||||
AVIFileCreateStream(avi.m_pfile, &avi.m_ps, &avi.m_strhdr);
|
||||
|
||||
memset(&avi.m_strhdr, 0, sizeof(avi.m_strhdr));
|
||||
avi.m_strhdr.fccType = streamtypeAUDIO;
|
||||
avi.m_strhdr.dwScale = WaveFMT.nBlockAlign;
|
||||
avi.m_strhdr.dwRate = WaveFMT.nSamplesPerSec * WaveFMT.nBlockAlign;
|
||||
avi.m_strhdr.dwSampleSize = WaveFMT.nBlockAlign;
|
||||
avi.m_strhdr.dwQuality = (DWORD)-1;
|
||||
SetRect(&avi.m_strhdr.rcFrame, 0, 0, SCREENWIDTH, SCREENHEIGHT);
|
||||
|
||||
AVIFileCreateStream(avi.m_pfile, &avi.m_psAudio, &avi.m_strhdr);
|
||||
AVIStreamSetFormat(avi.m_psAudio, 0, &WaveFMT, sizeof(WAVEFORMATEX));
|
||||
|
||||
// Display "choose codec" dialog, allow user to cancel
|
||||
auto ops = &avi.m_opts;
|
||||
if (AVISaveOptions(hWnd, 0, 1, &avi.m_ps, &ops) == FALSE)
|
||||
{
|
||||
ExitProcess(0);
|
||||
}
|
||||
|
||||
AVIMakeCompressedStream(&avi.m_psCompressed, avi.m_ps, &avi.m_opts, NULL);
|
||||
|
||||
memset(&avi.m_alpbi, 0, sizeof(avi.m_alpbi));
|
||||
avi.m_alpbi.biSize = sizeof(avi.m_alpbi);
|
||||
avi.m_alpbi.biWidth = SCREENWIDTH;
|
||||
avi.m_alpbi.biHeight = SCREENHEIGHT;
|
||||
avi.m_alpbi.biPlanes = 1;
|
||||
avi.m_alpbi.biBitCount = 24;
|
||||
avi.m_alpbi.biCompression = BI_RGB;
|
||||
|
||||
AVIStreamSetFormat(avi.m_psCompressed, 0, &avi.m_alpbi, sizeof(avi.m_alpbi));
|
||||
|
||||
int sample = 0;
|
||||
do
|
||||
{
|
||||
sample = ((float)frame / (float)(FPS * MOTION_BLUR)) * SAMPLE_RATE;
|
||||
float fTime = (float)sample / SCENE_LENGTH;
|
||||
|
||||
glUseProgram((int)fTime + 1);
|
||||
|
||||
int i = ((sample >> 8) << 5) + 2 * 2;
|
||||
float* a = &_4klang_envelope_buffer;
|
||||
float aha = a[i] + a[i + 1];
|
||||
|
||||
glUniform4f(0, fTime, SCREENHEIGHT, ASPECTOFFSET, aha);
|
||||
glRecti(-1, -1, 1, 1);
|
||||
SwapBuffers(hDC);
|
||||
|
||||
::PeekMessage(0, 0, 0, 0, 0);
|
||||
|
||||
glReadPixels(0, 0, SCREENWIDTH, SCREENHEIGHT, GL_BGR_EXT, GL_UNSIGNED_BYTE, data);
|
||||
|
||||
for (int i = 0; i < SCREENWIDTH * SCREENHEIGHT * 3; ++i)
|
||||
{
|
||||
tempBuffer[i] += data[i];
|
||||
}
|
||||
|
||||
if ((frame++ % MOTION_BLUR) == 0)
|
||||
{
|
||||
for (int i = 0; i < SCREENWIDTH * SCREENHEIGHT * 3; ++i)
|
||||
{
|
||||
data[i] = (tempBuffer[i] / MOTION_BLUR);
|
||||
tempBuffer[i] = 0;
|
||||
}
|
||||
|
||||
AVIStreamWrite(avi.m_psCompressed, (frame - 1) / MOTION_BLUR, 1, data, 3 * SCREENWIDTH * SCREENHEIGHT, AVIIF_KEYFRAME, NULL, NULL);
|
||||
}
|
||||
|
||||
} while (sample < MAX_SAMPLES && !GetAsyncKeyState(VK_ESCAPE));
|
||||
|
||||
auto const extraSamples = 0;// SOUND_TICKS_PER_SCENE * SAMPLES_PER_TICK / 4;
|
||||
static SAMPLE_TYPE audioBuffer[2 * (MAX_SAMPLES + extraSamples)];
|
||||
memcpy(audioBuffer + extraSamples * 2, WaveHDR.lpData, WaveHDR.dwBufferLength);
|
||||
AVIStreamWrite(avi.m_psAudio, 0, MAX_SAMPLES + extraSamples, audioBuffer, WaveHDR.dwBufferLength + extraSamples * sizeof(SAMPLE_TYPE) * 2, 0, NULL, NULL);
|
||||
|
||||
AVIStreamClose(avi.m_ps);
|
||||
AVIStreamClose(avi.m_psCompressed);
|
||||
AVIStreamClose(avi.m_psAudio);
|
||||
AVIFileClose(avi.m_pfile);
|
||||
AVIFileExit();
|
||||
}
|
||||
156
ev16-4k/redist/main_rel.cpp
Normal file
156
ev16-4k/redist/main_rel.cpp
Normal file
@@ -0,0 +1,156 @@
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_EXTRA_LEAN
|
||||
#include "synth.h"
|
||||
#include <GL/gl.h>
|
||||
#include "glext.h"
|
||||
|
||||
#ifndef SCREENWIDTH
|
||||
#define SCREENWIDTH 1280
|
||||
#endif
|
||||
|
||||
#ifndef SCREENHEIGHT
|
||||
#define SCREENHEIGHT 720
|
||||
#endif
|
||||
|
||||
#ifndef ASPECTOFFSET
|
||||
#define ASPECTOFFSET ((float(SCREENWIDTH) / float(SCREENHEIGHT) - 1.0f) * 0.5f)
|
||||
#endif
|
||||
|
||||
#define WINDOWED
|
||||
|
||||
#pragma data_seg(".Shader0")
|
||||
#include "intro_small.h"
|
||||
char* source = intro_fs;
|
||||
|
||||
struct FAKEPFD
|
||||
{
|
||||
WORD nSize;
|
||||
WORD nVersion;
|
||||
DWORD dwFlags;
|
||||
// Snip
|
||||
};
|
||||
|
||||
struct FAKEDEVMODE
|
||||
{
|
||||
BYTE dmDeviceName[CCHDEVICENAME];
|
||||
WORD dmSpecVersion;
|
||||
WORD dmDriverVersion;
|
||||
WORD dmSize;
|
||||
WORD dmDriverExtra;
|
||||
DWORD dmFields;
|
||||
union {
|
||||
/* printer only fields */
|
||||
struct {
|
||||
short dmOrientation;
|
||||
short dmPaperSize;
|
||||
short dmPaperLength;
|
||||
short dmPaperWidth;
|
||||
short dmScale;
|
||||
short dmCopies;
|
||||
short dmDefaultSource;
|
||||
short dmPrintQuality;
|
||||
};
|
||||
FAKEPFD pfd;
|
||||
};
|
||||
short dmColor;
|
||||
short dmDuplex;
|
||||
short dmYResolution;
|
||||
short dmTTOption;
|
||||
short dmCollate;
|
||||
BYTE dmFormName[CCHFORMNAME];
|
||||
WORD dmLogPixels;
|
||||
DWORD dmBitsPerPel;
|
||||
DWORD dmPelsWidth;
|
||||
DWORD dmPelsHeight;
|
||||
union {
|
||||
DWORD dmDisplayFlags;
|
||||
DWORD dmNup;
|
||||
};
|
||||
DWORD dmDisplayFrequency;
|
||||
};
|
||||
|
||||
#pragma data_seg(".devmode")
|
||||
static FAKEDEVMODE devmode = {
|
||||
"", 0, 0, sizeof(devmode), 0, DM_PELSWIDTH | DM_PELSHEIGHT, 0, 0, PFD_DOUBLEBUFFER | PFD_SUPPORT_OPENGL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", 0, 0, SCREENWIDTH, SCREENHEIGHT, 0, 0
|
||||
};
|
||||
|
||||
#pragma data_seg(".fltused")
|
||||
int _fltused = 1;
|
||||
|
||||
#pragma data_seg(".glCreateShaderProgramv")
|
||||
static const char* sglCreateShaderProgramv = "glCreateShaderProgramv";
|
||||
|
||||
#pragma data_seg(".glUseProgram")
|
||||
static const char* sglUseProgram = "glUseProgram";
|
||||
|
||||
#pragma data_seg(".glUniform4f")
|
||||
static const char* sglUniform4f = "glUniform4f";
|
||||
|
||||
#define shaderOffset 14
|
||||
#define shaderCount 12
|
||||
#define ATOM_EDIT 0xC018
|
||||
#define ATOM_STATIC 0xC019
|
||||
#define SCENE_LENGTH (SAMPLES_PER_TICK * 128)
|
||||
|
||||
#pragma bss_seg(".mainbss")
|
||||
static PFNGLCREATESHADERPROGRAMVPROC glCreateShaderProgramv;
|
||||
static PFNGLUSEPROGRAMPROC glUseProgram;
|
||||
static PFNGLUNIFORM4FPROC glUniform4f;
|
||||
static GLuint programs[shaderCount];
|
||||
|
||||
#pragma code_seg(".main")
|
||||
void _cdecl main()
|
||||
{
|
||||
InitSound();
|
||||
|
||||
#ifndef WINDOWED
|
||||
ChangeDisplaySettings((DEVMODEA*)&devmode, CDS_FULLSCREEN);
|
||||
HDC hDC = GetDC(CreateWindowExA(0, (LPCSTR)ATOM_STATIC, 0, WS_POPUP | WS_VISIBLE | WS_MAXIMIZE, 0, 0, 0, 0, 0, 0, 0, 0));
|
||||
#else
|
||||
HDC hDC = GetDC(CreateWindowExA(0, (LPCSTR)ATOM_STATIC, 0, WS_VISIBLE | WS_SYSMENU, 0, 0, SCREENWIDTH, SCREENHEIGHT, 0, 0, 0, 0));
|
||||
#endif
|
||||
|
||||
SetPixelFormat(hDC, ChoosePixelFormat(hDC, (const PIXELFORMATDESCRIPTOR*)&devmode.pfd), 0);
|
||||
wglMakeCurrent(hDC, wglCreateContext(hDC));
|
||||
|
||||
glCreateShaderProgramv = (PFNGLCREATESHADERPROGRAMVPROC)wglGetProcAddress(sglCreateShaderProgramv);
|
||||
glUseProgram = (PFNGLUSEPROGRAMPROC)wglGetProcAddress(sglUseProgram);
|
||||
glUniform4f = (PFNGLUNIFORM4FPROC)wglGetProcAddress(sglUniform4f);
|
||||
|
||||
for (int i = 0; i < shaderCount; ++i)
|
||||
{
|
||||
programs[i] = glCreateShaderProgramv(GL_FRAGMENT_SHADER, 1, &source);
|
||||
intro_fs[shaderOffset]++;
|
||||
if (i == 9)
|
||||
{
|
||||
intro_fs[shaderOffset] = 'A';
|
||||
}
|
||||
glUseProgram(programs[i]);
|
||||
glUniform4f(0, i, SCREENHEIGHT, ASPECTOFFSET, 0.0f);
|
||||
glRecti(-1, -1, 1, 1);
|
||||
}
|
||||
|
||||
ShowCursor(FALSE);
|
||||
PlaySound();
|
||||
|
||||
do
|
||||
{
|
||||
get_Sample();
|
||||
|
||||
float fTime = (float)MMTime.u.sample / SCENE_LENGTH;
|
||||
|
||||
glUseProgram(programs[(int)fTime]);
|
||||
|
||||
int i = ((MMTime.u.sample >> 8) << 5) + 2 * 2;
|
||||
float* a = &_4klang_envelope_buffer;
|
||||
float aha = a[i] + a[i + 1];
|
||||
|
||||
glUniform4f(0, fTime, SCREENHEIGHT, ASPECTOFFSET, aha);
|
||||
glRecti(-1, -1, 1, 1);
|
||||
SwapBuffers(hDC);
|
||||
|
||||
::PeekMessage(0, 0, 0, 0, 0);
|
||||
} while (MMTime.u.sample < MAX_SAMPLES && !GetAsyncKeyState(VK_ESCAPE));
|
||||
|
||||
ExitProcess(0);
|
||||
}
|
||||
79
ev16-4k/redist/obj/Compress (slow)/intro2k15.log
Normal file
79
ev16-4k/redist/obj/Compress (slow)/intro2k15.log
Normal file
@@ -0,0 +1,79 @@
|
||||
main.compress.cpp
|
||||
Crinkler 2.0 (Jul 28 2015) (c) 2005-2015 Aske Simon Christensen & Rune Stubbe
|
||||
|
||||
Ignoring unknown argument '/ERRORREPORT:PROMPT'
|
||||
Ignoring unknown argument '/INCREMENTAL:NO'
|
||||
Ignoring unknown argument '/NOLOGO'
|
||||
Ignoring unknown argument '/MANIFEST'
|
||||
Ignoring unknown argument '/MANIFESTUAC:level='asInvoker' uiAccess='false''
|
||||
Ignoring unknown argument '/manifest:embed'
|
||||
Ignoring unknown argument '/DEBUG'
|
||||
Ignoring unknown argument '/PDB:E:\blu-flame.org\ev16-4k\redist\bin\Compress (slow)\intro2k15.pdb'
|
||||
Ignoring unknown argument '/TLBID:1'
|
||||
Ignoring unknown argument '/DYNAMICBASE'
|
||||
Ignoring unknown argument '/NXCOMPAT'
|
||||
Ignoring unknown argument '/IMPLIB:E:\blu-flame.org\ev16-4k\redist\bin\Compress (slow)\intro2k15.lib'
|
||||
Ignoring unknown argument '/MACHINE:X86'
|
||||
Ignoring unknown argument '/SAFESEH'
|
||||
Target: E:\blu-flame.org\ev16-4k\redist\bin\Compress (slow)\intro2k15.exe
|
||||
Tiny compressor: NO
|
||||
Tiny import: NO
|
||||
Subsystem type: CONSOLE
|
||||
Large address aware: NO
|
||||
Compression mode: FAST
|
||||
Saturate counters: NO
|
||||
Hash size: 100 MB
|
||||
Hash tries: 20
|
||||
Order tries: 0
|
||||
Report: NONE
|
||||
Transforms: NONE
|
||||
Replace DLLs: NONE
|
||||
Fallback DLLs: NONE
|
||||
Range DLLs: NONE
|
||||
Exports: NONE
|
||||
|
||||
Loading winmm.lib...
|
||||
Loading opengl32.lib...
|
||||
Loading kernel32.lib...
|
||||
Loading user32.lib...
|
||||
Loading gdi32.lib...
|
||||
Loading winspool.lib...
|
||||
Loading comdlg32.lib...
|
||||
Loading advapi32.lib...
|
||||
Loading shell32.lib...
|
||||
Loading ole32.lib...
|
||||
Loading oleaut32.lib...
|
||||
Loading uuid.lib...
|
||||
Loading odbc32.lib...
|
||||
Loading odbccp32.lib...
|
||||
Loading 4klang.obj...
|
||||
Loading E:\blu-flame.org\ev16-4k\redist\obj\Compress (slow)\main.compress.obj...
|
||||
Loading 4klang.obj...
|
||||
|
||||
Linking...
|
||||
|
||||
|
||||
Uncompressed size of code: 2224
|
||||
Uncompressed size of data: 7096
|
||||
|
||||
|-- Estimating models for code ----------------------------|
|
||||
............................................................ 0m00s
|
||||
Ideal compressed size: 1330.77
|
||||
|
||||
|-- Estimating models for data ----------------------------|
|
||||
............................................................ 0m00s
|
||||
Ideal compressed size: 2380.26
|
||||
|
||||
Estimated ideal compressed total size: 3711.03
|
||||
|
||||
|-- Optimizing hash table size ----------------------------|
|
||||
............................................................ 0m00s
|
||||
Real compressed total size: 3718
|
||||
Bytes lost to hashing: 6.97
|
||||
|
||||
Output file: E:\blu-flame.org\ev16-4k\redist\bin\Compress (slow)\intro2k15.exe
|
||||
Final file size: 4078 (previous size 4083)
|
||||
|
||||
time spent: 0m03s
|
||||
intro2k15.vcxproj -> E:\blu-flame.org\ev16-4k\redist\bin\Compress (slow)\intro2k15.exe
|
||||
intro2k15.vcxproj -> E:\blu-flame.org\ev16-4k\redist\bin\Compress (slow)\intro2k15.pdb (Full PDB)
|
||||
Binary file not shown.
BIN
ev16-4k/redist/obj/Compress (slow)/intro2k15.tlog/CL.read.1.tlog
Normal file
BIN
ev16-4k/redist/obj/Compress (slow)/intro2k15.tlog/CL.read.1.tlog
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1
|
||||
Compress (slow)|Win32|E:\blu-flame.org\ev16-4k\redist\|
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
ev16-4k/redist/obj/Compress (slow)/main.compress.obj
Normal file
BIN
ev16-4k/redist/obj/Compress (slow)/main.compress.obj
Normal file
Binary file not shown.
BIN
ev16-4k/redist/obj/Compress (slow)/vc140.pdb
Normal file
BIN
ev16-4k/redist/obj/Compress (slow)/vc140.pdb
Normal file
Binary file not shown.
13
ev16-4k/redist/obj/Release/intro2k15.log
Normal file
13
ev16-4k/redist/obj/Release/intro2k15.log
Normal file
@@ -0,0 +1,13 @@
|
||||
main_rel.cpp
|
||||
main_rel.cpp(129): warning C4244: 'argument': conversion from 'int' to 'GLfloat', possible loss of data
|
||||
Crinkler 2.0 (Jul 28 2015) (c) 2005-2015 Aske Simon Christensen & Rune Stubbe
|
||||
|
||||
Launching default linker at 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\VC\BIN\LINK.EXE'
|
||||
|
||||
4klang.obj : warning LNK4042: object specified more than once; extras ignored
|
||||
Generating code
|
||||
1 of 4 functions (25.0%) were compiled, the rest were copied from previous compilation.
|
||||
0 functions were new in current compilation
|
||||
0 functions had inline decision re-evaluated but remain unchanged
|
||||
Finished generating code
|
||||
intro2k15.vcxproj -> E:\blu-flame.org\ev16-4k\redist\bin\Release\intro2k15.exe
|
||||
BIN
ev16-4k/redist/obj/Release/intro2k15.tlog/CL.command.1.tlog
Normal file
BIN
ev16-4k/redist/obj/Release/intro2k15.tlog/CL.command.1.tlog
Normal file
Binary file not shown.
BIN
ev16-4k/redist/obj/Release/intro2k15.tlog/CL.read.1.tlog
Normal file
BIN
ev16-4k/redist/obj/Release/intro2k15.tlog/CL.read.1.tlog
Normal file
Binary file not shown.
BIN
ev16-4k/redist/obj/Release/intro2k15.tlog/CL.write.1.tlog
Normal file
BIN
ev16-4k/redist/obj/Release/intro2k15.tlog/CL.write.1.tlog
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1
|
||||
Release|Win32|E:\blu-flame.org\ev16-4k\redist\|
|
||||
Binary file not shown.
BIN
ev16-4k/redist/obj/Release/intro2k15.tlog/link.command.1.tlog
Normal file
BIN
ev16-4k/redist/obj/Release/intro2k15.tlog/link.command.1.tlog
Normal file
Binary file not shown.
BIN
ev16-4k/redist/obj/Release/intro2k15.tlog/link.read.1.tlog
Normal file
BIN
ev16-4k/redist/obj/Release/intro2k15.tlog/link.read.1.tlog
Normal file
Binary file not shown.
BIN
ev16-4k/redist/obj/Release/main_rel.obj
Normal file
BIN
ev16-4k/redist/obj/Release/main_rel.obj
Normal file
Binary file not shown.
BIN
ev16-4k/redist/obj/Release/vc140.pdb
Normal file
BIN
ev16-4k/redist/obj/Release/vc140.pdb
Normal file
Binary file not shown.
516
ev16-4k/redist/obj/party/main.compress.asm
Normal file
516
ev16-4k/redist/obj/party/main.compress.asm
Normal file
@@ -0,0 +1,516 @@
|
||||
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.00.23918.0
|
||||
|
||||
TITLE E:\blu-flame.org\ev16-4k\redist\main.compress.cpp
|
||||
.686P
|
||||
.XMM
|
||||
include listing.inc
|
||||
.model flat
|
||||
|
||||
INCLUDELIB LIBCMT
|
||||
INCLUDELIB OLDNAMES
|
||||
|
||||
PUBLIC ?intro_fs@@3PADA ; intro_fs
|
||||
PUBLIC ?source@@3PADA ; source
|
||||
PUBLIC ?_fltused@@3HA ; _fltused
|
||||
PUBLIC ??_C@_0BH@BOJGDFJN@glCreateShaderProgramv?$AA@ ; `string'
|
||||
PUBLIC ??_C@_0N@ICBDHBI@glUseProgram?$AA@ ; `string'
|
||||
PUBLIC ??_C@_0M@MNEJMNAO@glUniform4f?$AA@ ; `string'
|
||||
PUBLIC ?WaveFMT@@3UtWAVEFORMATEX@@A ; WaveFMT
|
||||
PUBLIC ?WaveHDR@@3Uwavehdr_tag@@A ; WaveHDR
|
||||
PUBLIC ?MMTime@@3Ummtime_tag@@A ; MMTime
|
||||
synthnothing SEGMENT
|
||||
?lpSoundBuffer@@3PAMA DD 0c9db00H DUP (?) ; lpSoundBuffer
|
||||
synthnothing ENDS
|
||||
mmtime SEGMENT
|
||||
?MMTime@@3Ummtime_tag@@A DD 02H ; MMTime
|
||||
DD 00H
|
||||
ORG $+4
|
||||
mmtime ENDS
|
||||
wavehdr SEGMENT
|
||||
?WaveHDR@@3Uwavehdr_tag@@A DD FLAT:?lpSoundBuffer@@3PAMA ; WaveHDR
|
||||
DD 03276c00H
|
||||
DD 00H
|
||||
DD 00H
|
||||
DD 00H
|
||||
DD 00H
|
||||
DD 00H
|
||||
DD 00H
|
||||
wavehdr ENDS
|
||||
wavefmt SEGMENT
|
||||
?WaveFMT@@3UtWAVEFORMATEX@@A DW 03H ; WaveFMT
|
||||
DW 02H
|
||||
DD 0ac44H
|
||||
DD 056220H
|
||||
DW 08H
|
||||
DW 020H
|
||||
DW 00H
|
||||
wavefmt ENDS
|
||||
; COMDAT ??_C@_0M@MNEJMNAO@glUniform4f?$AA@
|
||||
CONST SEGMENT
|
||||
??_C@_0M@MNEJMNAO@glUniform4f?$AA@ DB 'glUniform4f', 00H ; `string'
|
||||
CONST ENDS
|
||||
glUniform4f SEGMENT
|
||||
?sglUniform4f@@3PBDB DD FLAT:??_C@_0M@MNEJMNAO@glUniform4f?$AA@ ; sglUniform4f
|
||||
glUniform4f ENDS
|
||||
; COMDAT ??_C@_0N@ICBDHBI@glUseProgram?$AA@
|
||||
CONST SEGMENT
|
||||
??_C@_0N@ICBDHBI@glUseProgram?$AA@ DB 'glUseProgram', 00H ; `string'
|
||||
CONST ENDS
|
||||
glUseProgram SEGMENT
|
||||
?sglUseProgram@@3PBDB DD FLAT:??_C@_0N@ICBDHBI@glUseProgram?$AA@ ; sglUseProgram
|
||||
glUseProgram ENDS
|
||||
; COMDAT ??_C@_0BH@BOJGDFJN@glCreateShaderProgramv?$AA@
|
||||
CONST SEGMENT
|
||||
??_C@_0BH@BOJGDFJN@glCreateShaderProgramv?$AA@ DB 'glCreateShaderProgramv'
|
||||
DB 00H ; `string'
|
||||
CONST ENDS
|
||||
glCreateShaderProgramv SEGMENT
|
||||
?sglCreateShaderProgramv@@3PBDB DD FLAT:??_C@_0BH@BOJGDFJN@glCreateShaderProgramv?$AA@ ; sglCreateShaderProgramv
|
||||
glCreateShaderProgramv ENDS
|
||||
fltused SEGMENT
|
||||
?_fltused@@3HA DD 01H ; _fltused
|
||||
fltused ENDS
|
||||
fcw SEGMENT
|
||||
?fcw@@3GA DW 0e7fH ; fcw
|
||||
fcw ENDS
|
||||
devmode SEGMENT
|
||||
?devmode@@3UFAKEDEVMODE@@A DB 00H ; devmode
|
||||
ORG $+35
|
||||
DD 07cH
|
||||
DD 0180000H
|
||||
DB 00H
|
||||
ORG $+3
|
||||
DD 021H
|
||||
DB 00H
|
||||
ORG $+55
|
||||
DD 0500H
|
||||
DD 0400H
|
||||
DB 00H
|
||||
ORG $+7
|
||||
devmode ENDS
|
||||
Shader0 SEGMENT
|
||||
?intro_fs@@3PADA DB 'const int z=0x0;uniform vec4 v;float i,y,f,m,l=6.283'
|
||||
DB '19;int e;vec2 r;vec3 x,a,s=vec3(0.),w=vec3(0.),d=vec3(3.,2.5,'
|
||||
DB '2.),t=vec3(.7,.6,.4);vec4 b;vec2 n(vec2 a,float y){return cos'
|
||||
DB '(y)*a+sin(y)*vec2(-a.y,a.x);}float n(inout vec2 a,float v,flo'
|
||||
DB 'at y){float z=atan(a.y,a.x),m=mod(z,y)-y*.5;a=length(a)*vec2('
|
||||
DB 'cos(m),sin(m));a.x-=v;return z-m;}void h(inout float z,float '
|
||||
DB 'y){z=mod(z-y*.5,y)-y*.5;}void h(inout float z,float y,float x'
|
||||
DB '){z=max(abs(z)-x,mod(z-y*.5,y)-y*.5);}float p(float z,float y'
|
||||
DB '){return floor((z-y*.5)/y);}float p(in vec3 z,in vec3 y,float'
|
||||
DB ' a){return length(max(abs(z)-y+vec3(a),0.))-a;}float c(in vec'
|
||||
DB '2 z,in vec2 y,float a){return length(max(abs(z)-y+vec2(a),0.)'
|
||||
DB ')-a;}float c(float z,float y,float x,float i){return sin(z+y+'
|
||||
DB 'i*sin(z+x));}float o(float y,float z,float x){float a=clamp(.'
|
||||
DB '5+.5*(z-y)/x,0.,1.);return mix(z,y,a)-x*a*(1.-a);}float c(vec'
|
||||
DB '2 z){float y=dot(z,vec2(23.2,15.7));return fract(sin(y)*232.4'
|
||||
DB '5);}float h(vec2 y){vec2 a=vec2(1.,0.),z=floor(y),v=fract(y);'
|
||||
DB 'v*=v*(3.-2.*v);return-.5+mix(mix(c(z+a.yy),c(z+a.xy),v.x),mix'
|
||||
DB '(c(z+a.yx),c(z+a.xx),v.x),v.y);}float n(vec3 a){a.y+=4.*c(1.1'
|
||||
DB ',y*3.+a.z*.02,.4,a.z*.02);a.x+=4.*c(.9,y*4.+a.z*.02,-1.4,a.z*'
|
||||
DB '.02);float z=p(a.z,24.);h(a.z,24.);a.xy=n(a.xy,z+c(1.1,y*4.,1'
|
||||
DB '.3,z*.2));z=max(12.-length(a.xz),length(length(a.xy)-32.)-1.)'
|
||||
DB ';n(a.xy,32.,l/5.);return min(z,max(length(a.z)-1.,length(leng'
|
||||
DB 'th(a.xy)-18.)-1.));}float o(vec3 y){if(z>7)return length(y)-3'
|
||||
DB '2.-v.w;else return length(y)-48.-v.w;}float p(vec3 a){if(z>7)'
|
||||
DB '{float i=999.;for(float f=0.;f<3.;f+=1){vec3 m=a;m.xy=n(m.xy,'
|
||||
DB 'f+2.3*y);m.zx=n(m.zx,2.*f+4.3*y);m.z+=48.+8.*c(1.1,y*2.,.4,y*'
|
||||
DB '.02);m.yz=n(m.yz,f+5.9*y);m.xy=n(m.xy,f+2.3*y);i=min(i,p(m,ve'
|
||||
DB 'c3(16.,16.,16.)+v.w,3.));}return max(40.-length(a),o(i,length'
|
||||
DB '(a)-34.,24.));}else if(z>3){float i=360.-y*222.-a.z;i=8.-(i<0'
|
||||
DB '.?0.:.001*i*i);a.y-=4.*c(1.1,y*2.+a.z*.02,.4,a.z*.02);a.x-=4.'
|
||||
DB '*c(.9,y*2.+a.z*.02,-1.4,a.z*.02);return length(a.xy)-i-v.w;}e'
|
||||
DB 'lse return a.z+=192.-96.*y,a.xy=n(a.xy,2.3*y),a.yz=n(a.yz,1.9'
|
||||
DB '*y),p(a,vec3(32.,32.,32.)+v.w,0.);}float u(vec3 a){if(z>7){fl'
|
||||
DB 'oat i=p(a,vec3(555.,555.,555.),0.),f=1.;vec3 v=a;for(int m=0;'
|
||||
DB 'm<4;m++){v.x+=33.;v.xz=n(v.xz,1.6+.13*y);v.yz=n(v.yz,.912*y);'
|
||||
DB 'float x=444./f;vec3 s=abs(.33-abs(mod(v-x*.5,x)-x*.5));i=max('
|
||||
DB 'i,111./f-min(max(s.x,s.y),min(max(s.y,s.z),max(s.z,s.x))));f*'
|
||||
DB '=3.;}return i;}else if(z>3)return n(a);else{float i=n(a.xy,64'
|
||||
DB '.,l/48.),f=p(a.z,6.);h(a.z,12.);i=c(i,y*8.,1.3,f*.2)+.8;retur'
|
||||
DB 'n length(a)-i;}}float g(vec3 a){return min(min(o(a),p(a)),u(a'
|
||||
DB '));}float F(vec3 a){return g(a);}void C(vec3 a){b=vec4(-1.8,3'
|
||||
DB '.,.6,2.);float z=.1;if(z>o(a))z=o(a),s=vec3(250,105,0)/255,m='
|
||||
DB '.6;if(z>p(a))z=p(a),s=vec3(105,210,231)/255,m=.6;if(z>u(a))s='
|
||||
DB 'vec3(224,228,204)/255,m=.3;}vec3 C(vec3 y,vec3 z,vec2 a){retu'
|
||||
DB 'rn smoothstep(a.x,a.y,dot(vec3(.86,.5,0.),y))*z;}vec3 k(vec3 '
|
||||
DB 'y){vec2 a=vec2(gl_FragCoord.xy/v.y);a.x-=v.z;vec2 z=2*a-1;flo'
|
||||
DB 'at i=min(8.*abs(sin(v.x*3.1415)),1.);y*=.9+.1*sin(10.*v.x+z.x'
|
||||
DB '*v.y);y*=.9+.1*sin(10.*v.x+z.y*v.y);float m=1.5-length(z*2)*.'
|
||||
DB '15;if(a.y>=i-.02)y*=.7;if(a.y>=i-.04)y*=.7;if(a.y<=1.02-i)y*='
|
||||
DB '.7;if(a.y<=1.04-i)y*=.7;return smoothstep(0.,1.,y*m*i)*2.;}vo'
|
||||
DB 'id main(){y=fract(v.x);f=y*y;a=vec3(gl_FragCoord.xy/v.y-.5,.8'
|
||||
DB ');a.x-=v.z;vec3 l=vec3(0.,11.,-y*33.);if(z<1)l=vec3(-44.,-33.'
|
||||
DB ',99.),a.yz=n(a.yz,-y),a.xz=n(a.xz,-y);else if(z<2)l=vec3(22.,'
|
||||
DB '3.,111.*(1.-y*.3)),a.xz=n(a.xz,3.);else if(z<3)l=vec3(-44.,-3'
|
||||
DB '3.,-99.),a.yz=n(a.yz,-y),a.xz=n(a.xz,4.5-y);else if(z<4)l=vec'
|
||||
DB '3(55.,33.,-155.*(1.-y*.6)),a.yz=n(a.yz,.4),a.xz=n(a.xz,-4.5-y'
|
||||
DB ');else if(z<5)l=vec3(11.,0.,-111.),a.xz=n(a.xz,3.);else if(z<'
|
||||
DB '6)l=vec3(-18.,-11.,-111.*(1.-y*.3)),a.yz=n(a.yz,-y*.3),a.xz=n'
|
||||
DB '(a.xz,-y);else if(z<7)l=vec3(-18.,-11.,144.*(1.-y*.3)),a.yz=n'
|
||||
DB '(a.yz,-y*.3),a.xz=n(a.xz,-y);else if(z<8)l=vec3(18.,-11.,111.'
|
||||
DB '*(1.-y*.5)),a.yz=n(a.yz,-y*.3),a.xz=n(a.xz,-.3+y*2.);else if('
|
||||
DB 'z<9)l=vec3(-55.,99.,177.),a.yz=n(a.yz,-.4),a.xz=n(a.xz,3.5*(1'
|
||||
DB '.-y*.3));else if(z<10)l=vec3(-290.,153.,-70.),a.yz=n(a.yz,.4)'
|
||||
DB ',a.xz=n(a.xz,-y);else if(z<11)l=vec3(-66.,44.,0.),a.yz=n(a.yz'
|
||||
DB ',.6),a.xz=n(a.xz,4.4);else l=vec3(-33.,33.*(1.-y),-11.),a.yz='
|
||||
DB 'n(a.yz,-.5),a.xz=n(a.xz,-1.);a=normalize(a);x=vec3(0.,0.,0.);'
|
||||
DB 'i=1.;float h=0.,u,p;e=0;b=vec4(-3.,8.,.9,1.);vec3 c=C(a,d,b.z'
|
||||
DB 'w);while(e++<5){float o=222.;for(m=1.;o>=0.&&h<999.&&m>h*1e-0'
|
||||
DB '6;h+=m,w=a*h,o-=1.)m=g(l+w);if(o<=1){o=0.;h=999.3;w=a*h;break'
|
||||
DB ';}o=smoothstep(44.,1.,o);vec3 Z=l+w;l=Z;r=vec2(.04,0.);vec3 Y'
|
||||
DB '=vec3(F(l+r.xyy)-F(l-r.xyy),F(l+r.yxy)-F(l-r.yxy),F(l+r.yyx)-'
|
||||
DB 'F(l-r.yyx));C(l);Y=normalize(Y);if(h>999.){if(e<2)b=vec4(-3.,'
|
||||
DB '8.,.9,1.);break;}a=reflect(a,Y);u=8.;for(p=1.;u>0.;u-=1.)p-=.'
|
||||
DB '5*(u-g(l+Y*u))/exp2(u);s*=p;s*=C(a,t,b.xy);x+=i*mix(s,c,o);i*'
|
||||
DB '=m;h=.5;w=a*h;}gl_FragColor.xyz=step(-12.,-v.x)*k(x+i*(C(a,d,'
|
||||
DB 'b.zw)+C(a,t,b.xy)));}', 00H ; intro_fs
|
||||
?source@@3PADA DD FLAT:?intro_fs@@3PADA ; source
|
||||
Shader0 ENDS
|
||||
CONST SEGMENT
|
||||
?gfAspectOffset@@3MB DD 03e000000r ; 0.125 ; gfAspectOffset
|
||||
?giSceneLength@@3HB DD 081300H ; giSceneLength
|
||||
CONST ENDS
|
||||
PUBLIC _main
|
||||
EXTRN __imp__ExitProcess@4:PROC
|
||||
EXTRN __imp__CreateThread@24:PROC
|
||||
EXTRN __imp__ChoosePixelFormat@8:PROC
|
||||
EXTRN __imp__SetPixelFormat@12:PROC
|
||||
EXTRN __imp__wglCreateContext@4:PROC
|
||||
EXTRN __imp__wglGetProcAddress@4:PROC
|
||||
EXTRN __imp__wglMakeCurrent@8:PROC
|
||||
EXTRN __imp__SwapBuffers@4:PROC
|
||||
EXTRN __imp__PeekMessageA@20:PROC
|
||||
EXTRN __imp__CreateWindowExA@48:PROC
|
||||
EXTRN __imp__GetAsyncKeyState@4:PROC
|
||||
EXTRN __imp__GetDC@4:PROC
|
||||
EXTRN __imp__ShowCursor@4:PROC
|
||||
EXTRN __imp__ChangeDisplaySettingsA@8:PROC
|
||||
EXTRN __imp__waveOutOpen@24:PROC
|
||||
EXTRN __imp__waveOutPrepareHeader@12:PROC
|
||||
EXTRN __imp__waveOutWrite@12:PROC
|
||||
EXTRN __imp__waveOutGetPosition@12:PROC
|
||||
EXTRN __4klang_render@4:PROC
|
||||
EXTRN __imp__glRecti@16:PROC
|
||||
EXTRN __4klang_envelope_buffer:DWORD
|
||||
synthnothing SEGMENT
|
||||
?hWaveOut@@3PAUHWAVEOUT__@@A DD 01H DUP (?) ; hWaveOut
|
||||
synthnothing ENDS
|
||||
mainbss SEGMENT
|
||||
?programs@@3PAIA DD 0dH DUP (?) ; programs
|
||||
mainbss ENDS
|
||||
; Function compile flags: /Ogspy
|
||||
; COMDAT _main
|
||||
main SEGMENT
|
||||
_main PROC ; COMDAT
|
||||
; File e:\blu-flame.org\ev16-4k\redist\main.compress.cpp
|
||||
; Line 98
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
; Line 101
|
||||
fldcw WORD PTR ?fcw@@3GA
|
||||
; Line 103
|
||||
xor esi, esi
|
||||
; Line 105
|
||||
push esi
|
||||
; Line 106
|
||||
push esi
|
||||
; Line 107
|
||||
push esi
|
||||
; Line 108
|
||||
push esi
|
||||
; Line 111
|
||||
push esi
|
||||
; Line 112
|
||||
push esi
|
||||
; Line 113
|
||||
push esi
|
||||
; Line 114
|
||||
push esi
|
||||
; Line 115
|
||||
push -1862270976 ; 91000000H
|
||||
; Line 116
|
||||
push esi
|
||||
; Line 117
|
||||
push 49177 ; 0000c019H
|
||||
; Line 118
|
||||
push esi
|
||||
; Line 119
|
||||
push 4
|
||||
; Line 120
|
||||
push OFFSET ?devmode@@3UFAKEDEVMODE@@A
|
||||
; Line 121
|
||||
push esi
|
||||
; Line 122
|
||||
push esi
|
||||
; Line 123
|
||||
push OFFSET ?lpSoundBuffer@@3PAMA
|
||||
; Line 124
|
||||
push OFFSET __4klang_render@4
|
||||
; Line 125
|
||||
push esi
|
||||
; Line 126
|
||||
push esi
|
||||
; Line 127
|
||||
call DWORD PTR __imp__CreateThread@24
|
||||
; Line 128
|
||||
call DWORD PTR __imp__ChangeDisplaySettingsA@8
|
||||
; Line 129
|
||||
call DWORD PTR __imp__CreateWindowExA@48
|
||||
; Line 149
|
||||
push eax
|
||||
; Line 150
|
||||
call DWORD PTR __imp__GetDC@4
|
||||
; Line 151
|
||||
mov edi, eax
|
||||
; Line 153
|
||||
push esi
|
||||
; Line 155
|
||||
push edi
|
||||
; Line 157
|
||||
push edi
|
||||
; Line 162
|
||||
push esi
|
||||
; Line 163
|
||||
push OFFSET ?devmode@@3UFAKEDEVMODE@@A+44
|
||||
; Line 164
|
||||
push edi
|
||||
; Line 165
|
||||
call DWORD PTR __imp__ChoosePixelFormat@8
|
||||
; Line 166
|
||||
push eax
|
||||
; Line 168
|
||||
push edi
|
||||
; Line 169
|
||||
call DWORD PTR __imp__SetPixelFormat@12
|
||||
; Line 170
|
||||
call DWORD PTR __imp__wglCreateContext@4
|
||||
; Line 171
|
||||
push eax
|
||||
; Line 172
|
||||
push edi
|
||||
; Line 173
|
||||
call DWORD PTR __imp__wglMakeCurrent@8
|
||||
; Line 175
|
||||
call DWORD PTR __imp__SwapBuffers@4
|
||||
; Line 177
|
||||
call DWORD PTR __imp__ShowCursor@4
|
||||
; Line 179
|
||||
xor ebx, ebx
|
||||
$shaderwarmup$4:
|
||||
; Line 183
|
||||
push 1
|
||||
; Line 184
|
||||
push 1
|
||||
; Line 185
|
||||
push -1
|
||||
; Line 186
|
||||
push -1
|
||||
; Line 188
|
||||
push OFFSET ?source@@3PADA ; source
|
||||
; Line 189
|
||||
push 1
|
||||
; Line 190
|
||||
push 35632 ; 00008b30H
|
||||
; Line 191
|
||||
push DWORD PTR ?sglCreateShaderProgramv@@3PBDB
|
||||
; Line 192
|
||||
call DWORD PTR __imp__wglGetProcAddress@4
|
||||
; Line 193
|
||||
call eax
|
||||
; Line 194
|
||||
mov DWORD PTR ?programs@@3PAIA[ebx*4], eax
|
||||
; Line 196
|
||||
push eax
|
||||
; Line 197
|
||||
push DWORD PTR ?sglUseProgram@@3PBDB
|
||||
; Line 198
|
||||
call DWORD PTR __imp__wglGetProcAddress@4
|
||||
; Line 199
|
||||
call eax
|
||||
; Line 201
|
||||
inc BYTE PTR ?intro_fs@@3PADA+14
|
||||
; Line 203
|
||||
cmp ebx, 9
|
||||
; Line 204
|
||||
jne SHORT $skip$5
|
||||
; Line 205
|
||||
mov BYTE PTR ?intro_fs@@3PADA+14, 65 ; 00000041H
|
||||
$skip$5:
|
||||
; Line 208
|
||||
push esi
|
||||
; Line 209
|
||||
push DWORD PTR ?gfAspectOffset@@3MB
|
||||
; Line 210
|
||||
push DWORD PTR ?devmode@@3UFAKEDEVMODE@@A+112
|
||||
; Line 211
|
||||
fild DWORD PTR [esp]
|
||||
; Line 212
|
||||
fstp DWORD PTR [esp]
|
||||
; Line 213
|
||||
push ebx
|
||||
; Line 214
|
||||
fild DWORD PTR [esp]
|
||||
; Line 215
|
||||
fstp DWORD PTR [esp]
|
||||
; Line 216
|
||||
push esi
|
||||
; Line 217
|
||||
push DWORD PTR ?sglUniform4f@@3PBDB
|
||||
; Line 218
|
||||
call DWORD PTR __imp__wglGetProcAddress@4
|
||||
; Line 219
|
||||
call eax
|
||||
; Line 220
|
||||
call (null) PTR __imp__glRecti@16
|
||||
; Line 222
|
||||
inc ebx
|
||||
; Line 223
|
||||
cmp ebx, 13 ; 0000000dH
|
||||
; Line 224
|
||||
jne SHORT $shaderwarmup$4
|
||||
; Line 227
|
||||
push 32 ; 00000020H
|
||||
; Line 228
|
||||
push OFFSET ?WaveHDR@@3Uwavehdr_tag@@A
|
||||
; Line 230
|
||||
push 32 ; 00000020H
|
||||
; Line 231
|
||||
push OFFSET ?WaveHDR@@3Uwavehdr_tag@@A
|
||||
; Line 232
|
||||
push esi
|
||||
; Line 233
|
||||
push esi
|
||||
; Line 234
|
||||
push esi
|
||||
; Line 235
|
||||
push OFFSET ?WaveFMT@@3UtWAVEFORMATEX@@A
|
||||
; Line 236
|
||||
push -1
|
||||
; Line 237
|
||||
push OFFSET ?hWaveOut@@3PAUHWAVEOUT__@@A
|
||||
; Line 238
|
||||
call DWORD PTR __imp__waveOutOpen@24
|
||||
; Line 240
|
||||
push DWORD PTR ?hWaveOut@@3PAUHWAVEOUT__@@A
|
||||
; Line 241
|
||||
call DWORD PTR __imp__waveOutPrepareHeader@12
|
||||
; Line 243
|
||||
push DWORD PTR ?hWaveOut@@3PAUHWAVEOUT__@@A
|
||||
; Line 244
|
||||
call DWORD PTR __imp__waveOutWrite@12
|
||||
$mainloop$6:
|
||||
; Line 247
|
||||
push 12 ; 0000000cH
|
||||
; Line 248
|
||||
push OFFSET ?MMTime@@3Ummtime_tag@@A
|
||||
; Line 249
|
||||
push DWORD PTR ?hWaveOut@@3PAUHWAVEOUT__@@A
|
||||
; Line 250
|
||||
call DWORD PTR __imp__waveOutGetPosition@12
|
||||
; Line 252
|
||||
push esi
|
||||
; Line 253
|
||||
push esi
|
||||
; Line 254
|
||||
push esi
|
||||
; Line 255
|
||||
push esi
|
||||
; Line 256
|
||||
push esi
|
||||
; Line 257
|
||||
push edi
|
||||
; Line 258
|
||||
push 1
|
||||
; Line 259
|
||||
push 1
|
||||
; Line 260
|
||||
push -1
|
||||
; Line 261
|
||||
push -1
|
||||
; Line 262
|
||||
push esi
|
||||
; Line 265
|
||||
mov eax, DWORD PTR ?MMTime@@3Ummtime_tag@@A+4
|
||||
; Line 266
|
||||
shr eax, 3
|
||||
; Line 267
|
||||
and eax, 536870880 ; 1fffffe0H
|
||||
; Line 268
|
||||
movss xmm0, XMMWORD PTR __4klang_envelope_buffer[GF2f+eax*4+20]
|
||||
; Line 269
|
||||
addss xmm0, DWORD PTR __4klang_envelope_buffer[GF2f+eax*4+16]
|
||||
; Line 270
|
||||
movss XMMWORD PTR [esp], xmm0
|
||||
; Line 272
|
||||
push DWORD PTR ?gfAspectOffset@@3MB
|
||||
; Line 273
|
||||
push DWORD PTR ?devmode@@3UFAKEDEVMODE@@A+112
|
||||
; Line 274
|
||||
fild DWORD PTR [esp]
|
||||
; Line 275
|
||||
fstp DWORD PTR [esp]
|
||||
; Line 276
|
||||
push DWORD PTR ?MMTime@@3Ummtime_tag@@A+4
|
||||
; Line 277
|
||||
fild DWORD PTR [esp]
|
||||
; Line 278
|
||||
fild DWORD PTR ?giSceneLength@@3HB
|
||||
; Line 279
|
||||
fdivp ST(1), ST(0)
|
||||
; Line 280
|
||||
fst DWORD PTR [esp]
|
||||
; Line 281
|
||||
push esi
|
||||
; Line 282
|
||||
push esi
|
||||
; Line 283
|
||||
fistp DWORD PTR [esp]
|
||||
; Line 284
|
||||
pop eax
|
||||
; Line 285
|
||||
push DWORD PTR ?programs@@3PAIA[eax*4]
|
||||
; Line 286
|
||||
push DWORD PTR ?sglUseProgram@@3PBDB
|
||||
; Line 287
|
||||
call DWORD PTR __imp__wglGetProcAddress@4
|
||||
; Line 288
|
||||
call eax
|
||||
; Line 290
|
||||
push DWORD PTR ?sglUniform4f@@3PBDB
|
||||
; Line 291
|
||||
call DWORD PTR __imp__wglGetProcAddress@4
|
||||
; Line 292
|
||||
call eax
|
||||
; Line 293
|
||||
call (null) PTR __imp__glRecti@16
|
||||
; Line 294
|
||||
call DWORD PTR __imp__SwapBuffers@4
|
||||
; Line 295
|
||||
call DWORD PTR __imp__PeekMessageA@20
|
||||
; Line 297
|
||||
cmp DWORD PTR ?MMTime@@3Ummtime_tag@@A+4, 6614400 ; 0064ed80H
|
||||
; Line 298
|
||||
jae SHORT $exit$7
|
||||
; Line 299
|
||||
push 27 ; 0000001bH
|
||||
; Line 300
|
||||
call WORD PTR __imp__GetAsyncKeyState@4
|
||||
; Line 301
|
||||
test ax, ax
|
||||
; Line 302
|
||||
je $mainloop$6
|
||||
$exit$7:
|
||||
; Line 304
|
||||
push esi
|
||||
; Line 305
|
||||
call (null) PTR __imp__ExitProcess@4
|
||||
; Line 307
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret 0
|
||||
_main ENDP
|
||||
main ENDS
|
||||
END
|
||||
BIN
ev16-4k/redist/obj/party/main.compress.obj
Normal file
BIN
ev16-4k/redist/obj/party/main.compress.obj
Normal file
Binary file not shown.
163
ev16-4k/redist/shader_code.h
Normal file
163
ev16-4k/redist/shader_code.h
Normal file
@@ -0,0 +1,163 @@
|
||||
/* File generated with Shader Minifier 1.0.3
|
||||
* http://www.ctrl-alt-test.fr
|
||||
*/
|
||||
#ifndef SHADER_CODE_H_
|
||||
# define SHADER_CODE_H_
|
||||
# define V_Y "v"
|
||||
# define V_Z "m"
|
||||
|
||||
const char *mark_fs = ""
|
||||
"varying vec4 v;"
|
||||
"varying vec2 m;"
|
||||
"vec3 f,z;"
|
||||
"float x=6.28319;"
|
||||
"vec2 n(vec2 f,float v)"
|
||||
"{"
|
||||
"return cos(v)*f+sin(v)*vec2(-f.y,f.x);"
|
||||
"}"
|
||||
"void i(inout vec3 v,float f)"
|
||||
"{"
|
||||
"float z=mod(atan(v.z,v.x),f)-f*.5;"
|
||||
"v.xz=length(v.xz)*vec2(cos(z),sin(z));"
|
||||
"}"
|
||||
"float i(vec3 v,float f,float z)"
|
||||
"{"
|
||||
"return length(vec2(length(v.xz)-f,v.y))-z;"
|
||||
"}"
|
||||
"float s(vec3 v,float z)"
|
||||
"{"
|
||||
"return length(v)-z;"
|
||||
"}"
|
||||
"float i(vec3 v)"
|
||||
"{"
|
||||
"return v.y+.6;"
|
||||
"}"
|
||||
"float n(vec3 v)"
|
||||
"{"
|
||||
"return min(s(v+vec3(0,8.,0),8.5),i(v,2.3,.5));"
|
||||
"}"
|
||||
"float s(vec3 v)"
|
||||
"{"
|
||||
"float z=max(s(v,6.),v.y);"
|
||||
"i(v,x/64.);"
|
||||
"v.x=abs(v.x-5.)-2.;"
|
||||
"float f=mix(length(v.yz),length(v.xyz),step(0.,v.x));"
|
||||
"return min(z,f-.4);"
|
||||
"}"
|
||||
"float l(vec3 f)"
|
||||
"{"
|
||||
"return f.y-=4.,f.xz=n(f.xz,v.y*6.),i(f,x/12.),f.yz=n(f.yz,x/4.),min(i(f,2.,.15),s(f,1.5));"
|
||||
"}"
|
||||
"float h(vec3 v)"
|
||||
"{"
|
||||
"return min(min(min(i(v),n(v)),s(v)),l(v));"
|
||||
"}"
|
||||
"int g(vec3 v)"
|
||||
"{"
|
||||
"float z=1000.;"
|
||||
"int f;"
|
||||
"if(i(v)<z)"
|
||||
"z=i(v),f=0;"
|
||||
"if(n(v)<z)"
|
||||
"z=n(v),f=1;"
|
||||
"if(s(v)<z)"
|
||||
"z=s(v),f=2;"
|
||||
"if(l(v)<z)"
|
||||
"z=l(v),f=3;"
|
||||
"return f;"
|
||||
"}"
|
||||
"vec3 p(vec3 v)"
|
||||
"{"
|
||||
"vec3 z=vec3(.04,0.,0.),f;"
|
||||
"f.x=h(v+z.xyy)-h(v-z.xyy);"
|
||||
"f.y=h(v+z.yxy)-h(v-z.yxy);"
|
||||
"f.z=h(v+z.yyx)-h(v-z.yyx);"
|
||||
"return normalize(f);"
|
||||
"}"
|
||||
"float e(vec3 v)"
|
||||
"{"
|
||||
"float z=1.;"
|
||||
"for(float f=.2;f<12.;f=f*1.1+.125)"
|
||||
"z+=min(h(v+vec3(0.,1.,0.)*f),0.);"
|
||||
"return clamp(z,.2,1.);"
|
||||
"}"
|
||||
"float e(vec3 v,vec3 f,float z,float i)"
|
||||
"{"
|
||||
"float x,y=sign(z);"
|
||||
"for(x=y*.5+.5;i>0.;i--)"
|
||||
"x-=(i*z-h(v+f*i*z*y))/exp2(i);"
|
||||
"return x;"
|
||||
"}"
|
||||
"vec3 t(vec3 v)"
|
||||
"{"
|
||||
"float z=.3+.3*dot(v,vec3(0.,1.,0.));"
|
||||
"i(v,x/16.);"
|
||||
"v.x=abs(v.x-.2)-.08;"
|
||||
"float f=mix(abs(v.z),length(v.xz),step(0.,v.x));"
|
||||
"z+=pow(smoothstep(.1,0.,f),15.);"
|
||||
"return vec3(z);"
|
||||
"}"
|
||||
"float c(vec3 v)"
|
||||
"{"
|
||||
"float z=abs(v.y-.9);"
|
||||
"return.4+.3*(1-z);"
|
||||
"}"
|
||||
"void main()"
|
||||
"{"
|
||||
"int x=int(v.y);"
|
||||
"float y=mod(v.y,1.);"
|
||||
"z=vec3(m.xy-.5,1);"
|
||||
"f=vec3(-30.-y*5.,3.,-16.+y*24.);"
|
||||
"z.xz=n(z.xz,y*-2.5);"
|
||||
"if(false)"
|
||||
"{"
|
||||
"f.x=gl_ModelViewMatrix[0][0];"
|
||||
"f.y=gl_ModelViewMatrix[0][1];"
|
||||
"f.z=gl_ModelViewMatrix[0][2];"
|
||||
"float i=gl_ModelViewMatrix[1][1],s,r;"
|
||||
"vec3 l=vec3(m.xy-.5,1);"
|
||||
"s=cos(i);"
|
||||
"r=sin(i);"
|
||||
"z.y=s*l.y-r*l.z;"
|
||||
"z.x=l.x;"
|
||||
"z.z=r*l.y+s*l.z;"
|
||||
"i=gl_ModelViewMatrix[1][0];"
|
||||
"l=z;"
|
||||
"s=cos(i);"
|
||||
"r=sin(i);"
|
||||
"z.x=s*l.x+r*l.z;"
|
||||
"z.z=-r*l.x+s*l.z;"
|
||||
"}"
|
||||
"z=normalize(z);"
|
||||
"vec3 i=vec3(0.,0.,0.);"
|
||||
"float s=1.,l=0.,r=256.,a;"
|
||||
"while(s>.1)"
|
||||
"{"
|
||||
"for(a=1.;l<r&&a>.05;l+=a)"
|
||||
"a=h(f+z*l);"
|
||||
"if(l<r)"
|
||||
"{"
|
||||
"f+=z*l;"
|
||||
"vec3 o=p(f);"
|
||||
"z=reflect(z,o);"
|
||||
"l=.1;"
|
||||
"vec3 d=vec3(.3,.2,.1);"
|
||||
"float u=.125;"
|
||||
"int M=g(f);"
|
||||
"if(M==1)"
|
||||
"d=vec3(.1,.1,.1),u=.8;"
|
||||
"if(M==2)"
|
||||
"d=vec3(.4,.3,.03),u=.2;"
|
||||
"if(M==3)"
|
||||
"d=vec3(.7,0.,0.),u=.2;"
|
||||
"d*=c(o)*e(f)*e(f,o,.4,10.);"
|
||||
"i+=s*d;"
|
||||
"s*=u;"
|
||||
"}"
|
||||
"else"
|
||||
" i+=s*t(z),s=0.;"
|
||||
"}"
|
||||
"gl_FragColor.xyz=i;"
|
||||
"}";
|
||||
|
||||
#endif // SHADER_CODE_H_
|
||||
BIN
ev16-4k/redist/shader_minifier.exe
Normal file
BIN
ev16-4k/redist/shader_minifier.exe
Normal file
Binary file not shown.
BIN
ev16-4k/redist/song.4kp
Normal file
BIN
ev16-4k/redist/song.4kp
Normal file
Binary file not shown.
BIN
ev16-4k/redist/song.it
Normal file
BIN
ev16-4k/redist/song.it
Normal file
Binary file not shown.
85
ev16-4k/redist/synth.h
Normal file
85
ev16-4k/redist/synth.h
Normal file
@@ -0,0 +1,85 @@
|
||||
#pragma once
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_EXTRA_LEAN
|
||||
#include "windows.h"
|
||||
#include "mmsystem.h"
|
||||
#include "mmreg.h"
|
||||
#include "4klang.h"
|
||||
|
||||
#define USE_SOUND_THREAD
|
||||
|
||||
#pragma bss_seg(".synthnothing")
|
||||
static float lpSoundBuffer[MAX_SAMPLES * 2];
|
||||
static HWAVEOUT hWaveOut;
|
||||
|
||||
#pragma data_seg(".wavefmt")
|
||||
WAVEFORMATEX WaveFMT =
|
||||
{
|
||||
#ifdef FLOAT_32BIT
|
||||
WAVE_FORMAT_IEEE_FLOAT,
|
||||
#else
|
||||
WAVE_FORMAT_PCM,
|
||||
#endif
|
||||
2, // channels
|
||||
SAMPLE_RATE, // samples per sec
|
||||
SAMPLE_RATE*sizeof(SAMPLE_TYPE)* 2, // bytes per sec
|
||||
sizeof(SAMPLE_TYPE)* 2, // block alignment;
|
||||
sizeof(SAMPLE_TYPE)* 8, // bits per sample
|
||||
0 // extension not needed
|
||||
};
|
||||
|
||||
#pragma data_seg(".wavehdr")
|
||||
WAVEHDR WaveHDR =
|
||||
{
|
||||
(LPSTR)lpSoundBuffer,
|
||||
MAX_SAMPLES*sizeof(SAMPLE_TYPE)* 2, // MAX_SAMPLES*sizeof(float)*2(stereo)
|
||||
0,
|
||||
0,
|
||||
#ifdef WAVHDR_PREPARE_HACK
|
||||
WHDR_PREPARED,
|
||||
#else
|
||||
0,
|
||||
#endif
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
#pragma data_seg(".mmtime")
|
||||
MMTIME MMTime =
|
||||
{
|
||||
TIME_SAMPLES,
|
||||
0
|
||||
};
|
||||
|
||||
#ifndef _DEBUG
|
||||
#pragma code_seg(".initsnd")
|
||||
#endif
|
||||
__forceinline void InitSound()
|
||||
{
|
||||
#ifdef USE_SOUND_THREAD
|
||||
::CreateThread(0, 0, (LPTHREAD_START_ROUTINE)_4klang_render, lpSoundBuffer, 0, 0);
|
||||
#else
|
||||
_4klang_render(lpSoundBuffer);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef _DEBUG
|
||||
#pragma code_seg(".playsnd")
|
||||
#endif
|
||||
__forceinline void PlaySound()
|
||||
{
|
||||
waveOutOpen(&hWaveOut, WAVE_MAPPER, &WaveFMT, NULL, 0, CALLBACK_NULL);
|
||||
#ifndef WAVHDR_PREPARE_HACK
|
||||
waveOutPrepareHeader( hWaveOut, &WaveHDR, sizeof(WaveHDR) );
|
||||
#endif
|
||||
waveOutWrite(hWaveOut, &WaveHDR, sizeof(WaveHDR));
|
||||
}
|
||||
|
||||
#ifndef _DEBUG
|
||||
#pragma code_seg(".sample")
|
||||
#endif
|
||||
__forceinline void get_Sample()
|
||||
{
|
||||
waveOutGetPosition(hWaveOut, &MMTime, sizeof(MMTIME));
|
||||
}
|
||||
BIN
ev16-4k/redist/yasm-1.2.0-win32.exe
Normal file
BIN
ev16-4k/redist/yasm-1.2.0-win32.exe
Normal file
Binary file not shown.
Reference in New Issue
Block a user