many fantasy tips all. But just use You can high quality code, That's perfect tips!
have fun.
Code: Select all
; High quality command programming
; Copyright 2016 (c) Hiroyuki Yokota (oryaaaaa)
;
; How to use this tips
; result is [Improved] Image quality, Sound quality
; Please set two macro before call procedure.
;
; <example>
; CreateFresh
; FNOPx10
; Maximum(nb1, nb2)
;
; ; <open window>
;
; CreateFresh
; FNOPx10
; OpenWindow(para_1, para_2, para_3, para_4, para_5, para_6, para_7, para_8)
;
; ; <load dll>
;
; CreateFresh
; FNOPx10
; If Not OpenLibrary(16, "bass.dll")
; MessageRequester("bass.dll error", "Don't load bass.dll")
; End
; EndIf
;
; CreateFresh
; FNOPx10
; *BASS_Init = GetFunction(16, "BASS_Init")
;
; ; <Bass asio>
; ;
; CreateFresh
; FNOPx10
; If CallFunctionFast(*BASS_ASIO_Init, AsioSelectDevice, #BASS_ASIO_THREAD) And BASS_ASIO_CheckRate(Freq_d)
; CreateFresh
; FNOPx10
; BASS_ASIO_SetRate(Freq_d)
Macro CreateFresh
CompilerSelect #PB_Compiler_Processor
CompilerCase #PB_Processor_x86
!XOR Eax, Eax ; clear Eax
!XOR Eax, Eax
!MOV Eax, Esp
!XOR Esp, Esp ; clear Esp
!XOR Esp, Esp
!BSWAP Esp ; (just another code is) Not Esp
!BSWAP Esp ; (just another code is) Not Esp
!MOV Esp, Eax
CompilerCase #PB_Processor_x64
!XOR Rcx, Rcx ; clear Rcx
!XOR Rcx, Rcx
!BSWAP Rcx ; (just another code is) Not Rcx
!BSWAP Rcx ; (just another code is) Not Rcx
!XOR Rdx, Rdx ; clear Rdx
!XOR Rdx, Rdx
!BSWAP Rdx ; (just another code is) Not Rdx
!BSWAP Rdx ; (just another code is) Not Rdx
!XOR R8, R8 ; clear R8
!XOR R8, R8
!BSWAP R8 ; (just another code is) Not R8
!BSWAP R8 ; (just another code is) Not R8
!XOR R9, R9 ; clear R9
!XOR R9, R9
!BSWAP R9 ; (just another code is) Not R9
!BSWAP R9 ; (just another code is) Not R9
!XOR Rax, Rax ; clear Rax
!XOR Rax, Rax
!MOV Rax, Rsp
!XOR Rsp, Rsp ; clear Rsp
!XOR Rsp, Rsp
!BSWAP Rsp ; (just another code is) Not Rsp
!BSWAP Rsp ; (just another code is) Not Rsp
!MOV Rsp, Rax
CompilerEndSelect
!XCHG al, al
EndMacro
Macro FNOPx10
CompilerSelect #PB_Compiler_Processor
CompilerCase #PB_Processor_x86
!BSWAP Eax ; (just another code is) Not Eax
!BSWAP Eax ; (just another code is) Not Eax
CompilerCase #PB_Processor_x64
!BSWAP Rax ; (just another code is) Not Rax
!BSWAP Rax ; (just another code is) Not Rax
CompilerEndSelect
!FNOP ; 1 register's cool times
!FNOP
!FNOP ; 3
!FNOP
!FNOP ; 5
!FNOP
!FNOP ; 7
!FNOP
!FNOP
!FNOP ; 10
EndMacro
; This source code is from SoundPlugin.pb
; You can high quality sound output.
CreateFresh
FNOPx10
If Not InitSound()
End
EndIf
CreateFresh
FNOPx10
UseFLACSoundDecoder()
CreateFresh
FNOPx10
SoundFileName$ = OpenFileRequester("Choose a sound file (44.1kHz only)", "", "Wave or Flac files|*.wav;*.flac",0)
If SoundFileName$
CreateFresh
FNOPx10
If LoadSound(0, SoundFileName$)
CreateFresh
FNOPx10
SoundVolume(0, 70)
CreateFresh
FNOPx10
PlaySound(0,#PB_Sound_Loop)
CreateFresh
FNOPx10
MessageRequester("Sound", "Playing the sound (loop)..."+Chr(10)+"Click to quit..", 0)
Else
MessageRequester("Error", "Can't load the sound.", 0)
EndIf
EndIf
End