Restore native inference, card-bound readings and paged dialogue. Provide manual, checksum-verified model setup instead of Git LFS so source checkouts work without uploading multi-gigabyte weights. The game stays offline; complete release archives still bundle the model.
47 lines
2.1 KiB
PHP
47 lines
2.1 KiB
PHP
; Offline inference transport. UI and session lifecycle remain native MASM.
|
|
CreatePipe PROTO :DWORD,:DWORD,:DWORD,:DWORD
|
|
SetHandleInformation PROTO :DWORD,:DWORD,:DWORD
|
|
CreateProcessA PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD
|
|
PeekNamedPipe PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD
|
|
TerminateProcess PROTO :DWORD,:DWORD
|
|
StartFortuneWorker3D PROTO
|
|
CloseFortuneInference3D PROTO
|
|
FailFortuneInference3D PROTO
|
|
SendFortuneRequest3D PROTO
|
|
ParseFortuneAnswer3D PROTO
|
|
ShowFortuneReading3D PROTO :DWORD
|
|
AdvanceFortuneReading3D PROTO
|
|
ShowFortuneStatus3D PROTO
|
|
.data
|
|
fortuneWorkerPath3D db "ai\fortune-engine.exe",0
|
|
fortuneWorkerCommand3D db "ai\fortune-engine.exe",0
|
|
fortuneModelPath3D db "ai\models\fortune-qwen3-4b-q4_k_m.gguf",0
|
|
fortuneNullName3D db "NUL",0
|
|
fortunePipeSecurity3D dd 12,0,1
|
|
fortuneStartup3D dd 17 dup(0)
|
|
; Consecutive handles, closed on every partial startup/error/exit.
|
|
fortuneChildRead3D dd 0
|
|
fortuneChildWrite3D dd 0
|
|
fortuneNull3D dd 0
|
|
fortuneWorkerTick3D dd 0
|
|
fortuneReceiveLength3D dd -1
|
|
fortuneReceiveHeader3D dd 3 dup(0)
|
|
fortuneRequest3D dd 31514346h,0,0,0,0
|
|
fortuneIo3D dd 0
|
|
fortuneAvailable3D dd 0
|
|
fortunePending3D dd 0
|
|
fortuneAnswerLength3D dd 0
|
|
fortuneAnswer3D db 8193 dup(0)
|
|
fortuneSections3D dd 4 dup(0)
|
|
fortuneSection3D dd 0
|
|
fortuneReadingOffset3D dd 0
|
|
fortuneReadingNext3D dd 0
|
|
fortuneReadingShown3D dd 0
|
|
fortuneErrorText3D dd OFFSET fortuneAiError3D
|
|
fortuneAiThinking3D db 209,226,255,231,251,226,224,254,32,234,224,240,242,251,10,241,32,242,226,238,232,236,32,226,238,239,240,238,241,238,236,46,46,46,0
|
|
fortuneAiError3D db 205,229,32,243,228,224,235,238,241,252,32,239,238,235,243,247,232,242,252,10,240,224,241,234
|
|
db 235,224,228,46,32,207,240,238,226,229,240,252,10,239,238,235,237,243,254,32,238,244,235,224
|
|
db 233,237,45,241,225,238,240,234,243,10,241,32,236,238,228,229,235,252,254,46,0
|
|
fortuneAiMissing3D db 205,229,242,32,238,244,235,224,233,237,45,236,238,228,229,235,232,46,10,205,243,230,237,224
|
|
db 32,239,238,235,237,224,255,32,241,225,238,240,234,224,10,241,32,239,224,239,234,238,233,32
|
|
db 97,105,47,109,111,100,101,108,115,46,0
|