b0VIM 6.2 POSEIDON C:\Documents and Settings\ben\Desktop\KEEPSAKE DEMO ENGILSH LI\res\scenes\common\introduction\main.tcl 3210#"! oz'widget::child [FOREGROUNDWIDGET] [set ::itf::back] 0.5 oz'widget::property [set ::itf::back] -pos 0.703125 0.791666 -alpha 0 set ::itf::back [new itf'back] oz'event { } } } oz'delay 0.125 oz'widget::fadeto [set ::itf::game$i] 1 oz'event { if [set ::itf::game$i] { for {set i 1} {$i <= 5} {incr i} { oz'event {wizDisableMouse} } set y [expr $y + 0.1875] } oz'widget::child [FOREGROUNDWIDGET] [set ::itf::game$i] 0.5 oz'widget::property [set ::itf::game$i] -pos 0.0625 $y -alpha 0 set ::itf::game$i [new itf'game $i] if [file exists "[ROOT]/save/savegame$i.tcl"] { set ::itf::game$i 0 for {set i 1} {$i <= 5} {incr i} { set y 0.041666 proc ShowSaveGamePanel {} { wq'widget::fadeto $::itf::vbox 0.5 wq'widget::fadeto $::itf::intro 1 wq'widget::fadeto $::itf::logo 1 oz'widget::child [FOREGROUNDWIDGET] $::itf::vbox 0.5 oz'widget::child $::itf::vbox $::itf::vers 0.5 oz'widget::child [FOREGROUNDWIDGET] $::itf::intro 0.5 oz'widget::child [FOREGROUNDWIDGET] $::itf::logo 0.5 oz'widget::property $::itf::intro -pos 0.328125 0.657552 -alpha 0 oz'widget::property $::itf::logo -pos 0.246582 0.083333 -alpha 0 oz'widget::property $::itf::vbox -pos 0 0.93 -alpha 0 oz'label::property $::itf::vers -pos 0 0 -font system.ttf -fsize 16 -color 0 0 0.1 -alpha 1 -text "Keepsake Demo v1.0" set ::itf::vbox [new oz'widget "vbox"] set ::itf::vers [new oz'label "version" 0.13 0.07] set ::itf::intro [new itf'intro] set ::itf::logo [new oz'sprite "interface/[MODE]/intro/intro.logo"] proc ShowIntroPanel {} { updateVolume updateGamma masterVolume $::config::music::volume oz'track::play $::music_track "sound/music/introKeepsake.ogg" -repeat 1 set ::ref_ambient2d_volume $::config::user::soundfx_volume set ::ref_music_volume $::config::user::music_volume set ::ref_soundfx_volume $::config::user::soundfx_volume set ::ref_voice_volume $::config::user::voice_volume set ::config::ambient2d::volume $::config::user::soundfx_volume set ::config::music::volume $::config::user::music_volume set ::config::soundfx::volume $::config::user::soundfx_volume set ::config::voice::volume $::config::user::voice_volume } set ::config::user::music_volume 0.01 if {$::config::user::music_volume == 0} { set ::config::user::gamma_correction [expr double([itf'slider::get_pos $itfopt::($itf::opt,gamma)]) / 10.0] set ::config::user::music_volume [expr double([itf'slider::get_pos $itfopt::($itf::opt,music)]) / 25] set ::config::user::soundfx_volume [expr double([itf'slider::get_pos $itfopt::($itf::opt,sfx)]) / 10.0] set ::config::user::voice_volume [expr double([itf'slider::get_pos $itfopt::($itf::opt,voice)]) / 10.0] proc update_var {} { } oz'delay 0.1 oz'widget::fadeto $widget 0 0.1 oz'event { } oz'delay [expr $delay - 0.2] oz'event { } oz'delay 0.1 oz'widget::fadeto $widget 1 0.1 oz'event { } eval "oz'label::property $label -color $color -text \\\"$text\\\"" oz'event { set color "1 1 1" proc subtitle {widget label who text delay} { ## ===================================================== ## ## The after effect of the first Vision ## ## ===================================================== ## source "[AUTO]/introduction.mvwrap.tcl" chainEvent { standardFadein } chainEvent { showInterface } chainEvent { initializeGame } callChainEvent "newsavegame" event "next" { ShowIntroPanel showMouse chainEvent { chainEvent {standardFadein} chainEvent {cameraFadeout 0} introduction::new logo -play oz'event {oz'track::play $::music_track "sound/music/introKeepsake.ogg" -repeat 1} ozqSound::Volume $s 0 wq'widget::delete& introduction::logoB wq'widget::waitfor [set introduction::logoB] -animate set s [ozqSound::NewFX2 "sound/cutscenes/lb.ogg"] introduction::new logoB chainEvent {cameraFadein 1000} setCamera "menu" chainEvent { bind next 3 1 1 1 chainEvent { set ::ref_ambient2d_volume $::config::user::soundfx_volume set ::ref_music_volume $::config::user::music_volume set ::ref_soundfx_volume $::config::user::soundfx_volume set ::ref_voice_volume $::config::user::voice_volume set ::itf::back 0 } } wq'widget::fadeto $::itf::opt 0 if $::itf::opt { wq'widget::fadeto $::itf::vbox 0 wq'widget::fadeto $::itf::logo 0 } return oz'flush wq'widget::delete& ::itf::intro wq'widget::delete& ::itf::opt wq'widget::delete& ::itf::vbox wq'widget::delete& ::itf::vers wq'widget::delete& ::itf::logo wq'widget::fadeto $::itf::message 1 oz'widget::child [FOREGROUNDWIDGET] $::itf::message 0.5 oz'widget::property $::itf::message -pos 0.0625 0.416666 -alpha 0 set ::itf::message [new itf'message $::lng::i_create] wq'widget::fadeto $::itf::intro 0 -wait } wq'widget::fadeto $::itf::opt 0 if $::itf::opt { wq'widget::fadeto $::itf::vbox 0 wq'widget::fadeto $::itf::logo 0 if {$i == 1} { } if ![file exists "[ROOT]/save/savegame$i.tcl"] break for {set i 1} {$i <= 5} {incr i} { proc continue {} { } oz'flush wq'widget::delete& ::itf::intro wq'widget::delete& ::itf::opt wq'widget::delete& ::itf::logo wq'widget::delete& ::itf::vbox wq'widget::delete& ::itf::vers } } oz'event {set ::isGameReady 1} oz'event {wizEnableMouse} oz'event {standardFadein} oz'event {showInterface} oz'event {initializeGame} if !\$::isGameReady { oz'event { } } } closeGameNoSave ozMessage "$::lng::i_corrupted" if [catch {source "[ROOT]/save/savegame$i.tcl"}] { } else { source "[ROOT]/save/savegame$i.tcl" if [info exists ::debug_] { oz'event { oz'event {wizqEntityStopFollow Zak} wizqWaitQueue 1 # Wait for Block 1 oz'event {cameraFadeout 0} oz'event {showMouse} wq'widget::delete& introduction::introduction wq'widget::waitfor $introduction::introduction -animate } standardFadein chainEvent { }] oz'event {delete $w} oz'event {delete $l} subtitle $w $l Nathaniel "$::lng::introN10" 5 oz'event {oz'delay 3.5} subtitle $w $l Nathaniel "$::lng::introN9" 9 oz'event {oz'delay 1} subtitle $w $l Nathaniel "$::lng::introN8" 7 oz'event {oz'delay 6.5} subtitle $w $l Nathaniel "$::lng::introN7" 4 oz'event {oz'delay 4.5} subtitle $w $l Nathaniel "$::lng::introN6" 6.5 oz'event {oz'delay 4} subtitle $w $l Nathaniel "$::lng::introN5" 2 oz'event {oz'delay 3.5} subtitle $w $l Nathaniel "$::lng::introN4" 6.5 oz'event {oz'delay 1.5} } wq'widget::fadeto $::itf::opt 0 if $::itf::opt { wq'widget::fadeto $::itf::vbox 0 wq'widget::fadeto $::itf::logo 0 } return oz'flush wq'widget::delete& ::itf::intro wq'widget::delete& ::itf::opt wq'widget::delete& ::itf::vbox wq'widget::delete& ::itf::vers wq'widget::delete& ::itf::logo wq'widget::fadeto $::itf::message 1 oz'widget::child [FOREGROUNDWIDGET] $::itf::message 0.5 oz'widget::property $::itf::message -pos 0.0625 0.416666 -alpha 0 set ::itf::message [new itf'message $::lng::i_create] wq'widget::fadeto $::itf::intro 0 -wait } wq'widget::fadeto $::itf::opt 0 if $::itf::opt { wq'widget::fadeto $::itf::vbox 0 wq'widget::fadeto $::itf::logo 0 if {$i == 1} { } if ![file exists "[ROOT]/save/savegame$i.tcl"] break for {set i 1} {$i <= 5} {incr i} { proc continue {} { } oz'flush wq'widget::delete& ::itf::intro wq'widget::delete& ::itf::opt wq'widget::delete& ::itf::logo wq'widget::delete& ::itf::vbox wq'widget::delete& ::itf::vers } } oz'event {set ::isGameReady 1} oz'event {wizEnableMouse} oz'event {standardFadein} oz'event {showInterface} oz'event {initializeGame} if !\$::isGameReady { oz'event { } } } closeGameNoSave ozMessage "$::lng::i_corrupted" if [catch {source "[ROOT]/save/savegame$i.tcl"}] { } else { source "[ROOT]/save/savegame$i.tcl" if [info exists ::debug_] { oz'event { oz'event {wizqEntityStopFollow Zak} wizqWaitQueue 1 # Wait for Block 1 oz'event {cameraFadeout 0} oz'event {showMouse} wq'widget::delete& introduction::introduction wq'widget::waitfor $introduction::introduction -animate } standardFadein chainEvent { }] oz'event {delete $w} oz'event {delete $l} subtitle $w $l Nathaniel "$::lng::introN10" 7.22 oz'event {oz'delay 1.5} subtitle $w $l Nathaniel "$::lng::introN9" 10 oz'event {oz'delay 2} subtitle $w $l Nathaniel "$::lng::introN8" 7 oz'event {oz'delay 4.7} subtitle $w $l Nathaniel "$::lng::introN7" 6 oz'event {oz'delay 3.5} subtitle $w $l Nathaniel "$::lng::introN6" 7.2 oz'event {oz'delay 2.5} subtitle $w $l Nathaniel "$::lng::introN5" 4 oz'event {oz'de subtitle $w $l Nathaniel "$::lng::introN3" 4 oz'event {oz'delay 2} subtitle $w $l Nathaniel "$::lng::introN2" 4.5 oz'event {oz'delay 2} subtitle $w $l Nathaniel "$::lng::introN1" 4 oz'event {oz'delay 12} wizqQueue 1 [subst { ozqSound::NewFX "sound/vo/$::LNG/intro/introduction.ogg" introduction::new introduction -foreground -depth 0.5 -nopan oz'widget::child [FOREGROUNDWIDGET] $w 0 oz'widget::child $w $l 0 oz'widget::property $w -alpha 0 oz'label::property $l -pos 0.1 0.75 -font caligula.ttf -fsize 20 -alpha 1 set w [new oz'widget "widget"] set l [new oz'label "label" 0.8 0.25] } oz'widget::child $this $($this,bar9) 0 oz'widget::child $this $($this,bar8) 0 oz'widget::child $this $($this,bar7) 0 oz'widget::child $this $($this,bar6) 0 oz'widget::child $this $($this,bar5) 0 oz'widget::child $this $($this,bar4) 0 oz'widget::child $this $($this,bar3) 0 oz'widget::child $this $($this,bar2) 0 oz'widget::child $this $($this,bar1) 0 oz'widget::child $this $($this,bar0) 0 oz'widget::child $this $($this,more) 0 oz'widget::child $this $($this,less) 0 set ($this,pos) 0 oz'widget::property $($this,bar9) -pos 0.191406 0.010417 -alpha 0 oz'widget::property $($this,bar8) -pos 0.175781 0.010417 -alpha 0 oz'widget::property $($this,bar7) -pos 0.160156 0.010417 -alpha 0 oz'widget::property $($this,bar6) -pos 0.144531 0.010417 -alpha 0 oz'widget::property $($this,bar5) -pos 0.128906 0.010417 -alpha 0 oz'widget::property $($this,bar4) -pos 0.113281 0.010417 -alpha 0 oz'widget::property $($this,bar3) -pos 0.097656 0.010417 -alpha 0 oz'widget::property $($this,bar2) -pos 0.082031 0.010417 -alpha 0 oz'widget::property $($this,bar1) -pos 0.066406 0.010417 -alpha 0 oz'widget::property $($this,bar0) -pos 0.050781 0.010417 -alpha 0 oz'button::property $($this,more) -click itf'slider::more $this oz'button::property $($this,less) -click itf'slider::less $this oz'widget::property $($this,more) -pos 0.213867 0.010417 oz'widget::property $($this,less) -pos 0.005859 0.010417 set ($this,bar9) [new oz'sprite "interface/[MODE]/slider/slider.bar9"] set ($this,bar8) [new oz'sprite "interface/[MODE]/slider/slider.bar8"] set ($this,bar7) [new oz'sprite "interface/[MODE]/slider/slider.bar7"] set ($this,bar6) [new oz'sprite "interface/[MODE]/slider/slider.bar6"] set ($this,bar5) [new oz'sprite "interface/[MODE]/slider/slider.bar5"] set ($this,bar4) [new oz'sprite "interface/[MODE]/slider/slider.bar4"] set ($this,bar3) [new oz'sprite "interface/[MODE]/slider/slider.bar3"] set ($this,bar2) [new oz'sprite "interface/[MODE]/slider/slider.bar2"] set ($this,bar1) [new oz'sprite "interface/[MODE]/slider/slider.bar1"] set ($this,bar0) [new oz'sprite "interface/[MODE]/slider/slider.bar0"] set ($this,less) [new oz'button "interface/[MODE]/slider/slider.less"] set ($this,more) [new oz'button "interface/[MODE]/slider/slider.more"] proc itf'slider {this} oz'widget {itf'slider} { class itf'slider { } oz'flush chainEvent {closeGameNoSave} chainEvent {standardFadeout} close $fid puts $fid $config set fid [open "../res/user.tcl" "w"] set config "set soundfx_volume $::config::user::soundfx_volume\nset voice_volume $::config::user::voice_volume\nset music_volume $::config::user::music_volume\nset gamma_correction $::config::user::gamma_correction" proc quit {} { } } oz'flush wq'widget::fadeto $::itf::opt 1 oz'widget::child [FOREGROUNDWIDGET] $::itf::opt 0.5 oz'widget::property $::itf::opt -pos 0.328125 0.276042 -alpha 0 set ::itf::opt [new itfopt] if {$::itf::opt == 0} { proc option {} { } oz'flush oz'event {ShowSaveGamePanel} wq'widget::delete& ::itf::intro wq'widget::delete& ::itf::opt wq'widget::delete& ::itf::vers wq'widget::delete& ::itf::vbox wq'widget::delete& ::itf::logo wq'widget::fadeto $::itf::intro 0 -wait set ($this,enter) [new oz'button "interface/[MODE]/intro/intro.enter"] set ($this,icon) [new oz'sprite "interface/[MODE]/intro/intro.icon/intro.icon.$icon"] } set ($this,ss) [new oz'sprite "save/newgamess-[MODE]"] } else { set ($this,ss) [new oz'sprite "save/ss$n-[MODE]"] if [file exists "[ROOT]/save/ss$n-[MODE].tga"] { set ($this,bg) [new oz'sprite "interface/[MODE]/intro/intro.continue.bg"] } } set icon [expr int(rand() * 10)] set roomname "Unknown" if [catch {source "[ROOT]/save/savegame$n-info.tcl"}] { if [file exists "[ROOT]/save/savegame$n-info.tcl"] { set icon [expr int(rand() * 10)] set roomname "Unknown" proc itf'game {this n} oz'widget {itf'game} { class itf'game { } delete $($this,gamma) delete $($this,sfx) delete $($this,music) delete $($this,voice) delete $($this,bg) proc ~itfopt {this} { } itf'slider::set_pos $($this,gamma) [expr int($::config::user::gamma_correction * 10)] itf'slider::set_pos $($this,music) [expr int($::config::user::music_volume * 25)] itf'slider::set_pos $($this,sfx) [expr int($::config::user::soundfx_volume * 10)] itf'slider::set_pos $($this,voice) [expr int($::config::user::voice_volume * 10)] oz'widget::child $this $($this,gamma) 0 oz'widget::child $this $($this,music) 0 oz'widget::child $this $($this,sfx) 0 oz'widget::child $this $($this,voice) 0 oz'widget::child $this $($this,bg) 0.5 oz'widget::property $($this,gamma) -pos [expr 0.072266 - 0.001] [expr 0.296875 - 0.004] oz'widget::property $($this,music) -pos [expr 0.072266 - 0.001] [expr 0.182292 - 0.004] oz'widget::property $($this,sfx) -pos 0.072266 [expr 0.109375 - 0.004] oz'widget::property $($this,voice) -pos 0.072266 [expr 0.036459 - 0.004] set ($this,gamma) [new itf'slider] set ($this,sfx) [new itf'slider] set ($this,music) [new itf'slider] set ($this,voice) [new itf'slider] set ($this,bg) [new oz'sprite "interface/[MODE]/opt/opt.bg"] proc itfopt {this} oz'widget {itfopt} { class itfopt { } oz'flush update_var incr ($this,pos) 1 oz'widget::fadeto $($this,bar$($this,pos)) 1 if {$($this,pos) >= 10} return oz'flush proc more {this} { } oz'flush update_var oz'widget::fadeto $($this,bar$($this,pos)) 0 incr ($this,pos) -1 if {$($this,pos) <= 0} return oz'flush proc less {this} { } } oz'widget::alpha $($this,bar$i) 0 for {set i $p} {$i < 10} {incr i} { } oz'widget::alpha $($this,bar$i) 1 for {set i 0} {$i < $p} {incr i} { set ($this,pos) $p proc set_pos {this p} { } return $($this,pos) proc get_pos {this} { } delete $($this,bar9) delete $($this,bar8) delete $($this,bar7) delete $($this,bar6) delete $($this,bar5) delete $($this,bar4) delete $($this,bar3) delete $($this,bar2) delete $($this,bar1) delete $($this,bar0) delete $($this,less) delete $($this,more) proc ~itf'slider {this} { oz'widget::property $::itf::delete -pos 0.0625 0.416666 -alpha 0 set ::itf::delete [new itf'delete $n] oz'event {oz'delay 0.5} CloseSaveGamePanel proc erase {n} { } oz'flush } } oz'event {set ::isGameReady 1} oz'event {wizEnableMouse} oz'event {standardFadein} oz'event {oz'delay 0.01} DeleteSaveGamePanel oz'event {showInterface} oz'event {initializeGame} if !\$::isGameReady { oz'event { } } } closeGameNoSave ozMessage "$::lng::i_corrupted" if [catch {source "[ROOT]/save/savegame$n.tcl"}] { } else { source "[ROOT]/save/savegame$n.tcl" if [info exists ::debug_] { oz'event { oz'event {wizqEntityStopFollow Zak} oz'event {oz'track::stop $::music_track} oz'event {standardFadeout} oz'event {wizDisableMouse} oz'event {oz'delay 0.25} CloseSaveGamePanel ozIMenu enable help iactive interface.help true ozIMenu enable menu iactive interface.sidebar true proc enter2 {n c} { } oz'flush wq'widget::fadeto $::itf::message 1 oz'widget::child [FOREGROUNDWIDGET] $::itf::message 0.5 oz'widget::property $::itf::message -pos 0.0625 0.416666 -alpha 0 set ::itf::message [new itf'message2 $::lng::h_warning $n] oz'event {oz'delay 0.5} CloseSaveGamePanel proc enter {n c} { } delete $($this,time) delete $($this,name) delete $($this,erase) delete $($this,history) delete $($this,enter) delete $($this,icon) delete $($this,ss) delete $($this,bg) proc ~itf'game {this} { } oz'widget::child $this $($this,time) 0 oz'widget::child $this $($this,name) 0 oz'widget::child $this $($this,erase) 0 oz'widget::child $this $($this,history) 0 oz'widget::child $this $($this,enter) 0 oz'widget::child $this $($this,icon) 1 oz'widget::child $this $($this,ss) 1 oz'widget::child $this $($this,bg) 0.5 oz'widget::property $($this,erase) -pos 0.188477 0.096354 oz'widget::property $($this,history) -pos 0.465820 0.110677 oz'widget::property $($this,enter) -pos 0.188477 [expr 0.031250 + 0.001] oz'widget::property $($this,icon) -pos 0.5 0 oz'button::property $($this,erase) -click itf'game::erase $n oz'button::property $($this,history) -click itf'game::enter $n $icon oz'button::property $($this,enter) -click itf'game::enter2 $n $icon oz'label::property $($this,time) -text "$time" oz'label::property $($this,name) -text "$name" catch {set name $::lng::roomName($roomname)} set name "" oz'label::property $($this,time) -pos 0.234375 0.087239 -font system.ttf -fsize 14 -color 1 1 1 oz'label::property $($this,name) -pos 0.234375 0.026041 -font system.ttf -fsize 16 -color 1 1 1 set time [clock format $time -format "%x %H:%M"] set time [file mtime "[ROOT]/save/savegame$n.tcl"] set ($this,time) [new oz'label "time" 0.227539 0.061197] set ($this,name) [new oz'label "name" 0.227539 0.061197] set ($this,erase) [new oz'button "interface/[MODE]/intro/intro.erase"] set ($this,history) [new oz'button "interface/[MODE]/intro/intro.history"] set ::itf::opt 0 set ::itf::history 0 set ::itf::game5 0 set ::itf::game4 0 set ::itf::game3 0 set ::itf::game2 0 set ::itf::game1 0 hideInterface hideMouse set ::isGameReady 0 wizqEntityStopFollow Zak updateVolume updateGamma chainEvent {wizEntityHide Npc} wizqEntityModel Npc "/character/mustavio/mustavio.cal3d" event "main" { cursor "introduction/infoCursor.tga" layer background "introduction/scrollIntro" 0 0 0 0 0 0 0 0 camera "info" { cursor "introduction/introCursor.tga" layer background "introduction/intro" 0 0 0 0 0 0 0 0 camera "intro" { cursor "introduction/menuCursor.tga" layer background "introduction/menu" 0 0 0 0 0 0 0 0 camera "menu" { setCamera "intro" event "Entrance" { ozSet "npcDiscussion" "" oz'event {oz'delay 0.25} } wizEntityHide Zak wizEntityShow Lydia chainEvent { ([ozGet "lydiaOnGround"] == "C" && [ozGet "zakOnGround"] == "A")} { if {([ozGet "zakOnGround"] == "C" && [ozGet "lydiaOnGround"] == "A") || wizqEntityResumeFollow Zak } else { wizqEntityStopFollow Zak } elseif { [ozGet "mainCharacter"] == "zak" } { wizqEntityStopFollow Zak } elseif { [ozGet "characterControlled"] == "zak" } { wizqEntityStopFollow Zak if {[ozGet "zakPresence"] == "away"} { chainEvent { switchAppearance } } elseif {[ozGet "sanctuaryZakSwitch"] == "initiated"} { } ozEntityZak follownormal 0 ozEntityLydia follownormal 1 oz'event { chainEvent { switchAppearance } } elseif { [ozGet "mainCharacter"] == "zak" } { } ozEntityZak follownormal 0 ozEntityLydia follownormal 1 oz'event { oz'event {switchAppearance} if {[ozGet "characterControlled"] == "Zak"} { oz'event {ozEntityZak hide} if { [ozGet "zakHide"] == "initiated" } { oz'event {ozEntityZak hide} } else { oz'event {ozEntityZak show} if { [ozGet "puzzleZak"] == "complete" } { SetModelLydia oz'event {ozEntityZak follownormal 1} wizqEntityModel Zak "/character/zakWolf/zakWolf.cal3d" } else { oz'event {ozEntityZak follownormal 0} wizqEntityModel Zak "/character/zakHuman/zakHuman.cal3d" } elseif { [ozGet "zakForm"] == "human" } { oz'event {ozEntityZak follownormal 0} wizqEntityModel Zak "/character/zakDragon/zakDragon.cal3d" } elseif { [ozGet "zakForm"] == "dragon" } { oz'event {ozEntityZak follownormal 1} wizqEntityModel Zak "/character/zakCat/zakCat.cal3d" if { [ozGet "zakForm"] == "cat" } { ozSet "trialRoomDoorSeen" "complete" [ozGet "trialTriumphDoor"] == "open"} { [ozGet "trialWisdomDoor"] == "open" || \ if {[ozGet "trialAllegianceDoor"] == "open" || \ ozSet "libraryZoomIn" "" chainCallEvent optionnalConversation.optionnalConversation ozSet "ghostWhiningVar" [expr 10000 + [ random 5000]] updateVolume source "../res/config.tcl" close $fid puts $fid $config set fid [open "../res/user.tcl" "w"] set config "set soundfx_volume $::config::user::soundfx_volume\nset voice_volume $::config::user::voice_volume\nset music_volume $::config::user::music_volume\nset gamma_correction $::config::user::gamma_correction" proc initializeGame { } { } oz'flush DeleteSaveGamePanel wq'widget::fadeto $::itf::delete 1 oz'widget::child [FOREGROUNDWIDGET] $::itf::delete 0.5 oz'button::disable $($this,enter0) incr max -1 } incr max } break if ![file exists "[ROOT]/save/$n/$max.tcl"] { while 1 { set max 0 oz'label::property $($this,time) -text "$time" oz'label::property $($this,name) -text "$name" catch {set name $::lng::roomName($roomname)} set name "" oz'label::property $($this,time) -pos 0.234375 0.087239 -font system.ttf -fsize 14 -color 1 1 1 oz'label::property $($this,name) -pos 0.234375 0.026041 -font system.ttf -fsize 16 -color 1 1 1 set time [ctime $time] set time [file mtime "[ROOT]/save/savegame$n.tcl"] set ($this,enter7) [new oz'button "interface/[MODE]/intro/intro.enter"] set ($this,enter6) [new oz'button "interface/[MODE]/intro/intro.enter"] set ($this,enter5) [new oz'button "interface/[MODE]/intro/intro.enter"] set ($this,enter4) [new oz'button "interface/[MODE]/intro/intro.enter"] set ($this,enter3) [new oz'button "interface/[MODE]/intro/intro.enter"] set ($this,enter2) [new oz'button "interface/[MODE]/intro/intro.enter"] set ($this,enter1) [new oz'button "interface/[MODE]/intro/intro.enter"] set ($this,enter0) [new oz'button "interface/[MODE]/intro/intro.enter"] set ($this,time7) [new oz'label "time7" 0.227539 0.061197] set ($this,time6) [new oz'label "time6" 0.227539 0.061197] set ($this,time5) [new oz'label "time5" 0.227539 0.061197] set ($this,time4) [new oz'label "time4" 0.227539 0.061197] set ($this,time3) [new oz'label "time3" 0.227539 0.061197] set ($this,time2) [new oz'label "time2" 0.227539 0.061197] set ($this,time1) [new oz'label "time1" 0.227539 0.061197] set ($this,time0) [new oz'label "time0" 0.227539 0.061197] set ($this,time) [new oz'label "time" 0.227539 0.061197] set ($this,name) [new oz'label "name" 0.227539 0.061197] set ($this,erase) [new oz'button "interface/[MODE]/intro/intro.erase"] set ($this,enter) [new oz'button "interface/[MODE]/intro/intro.enter"] set ($this,icon) [new oz'sprite "interface/[MODE]/intro/intro.icon/intro.icon.$icon"] } set ($this,ss) [new oz'sprite "save/newgamess-[MODE]"] } else { set ($this,ss) [new oz'sprite "save/ss$n-[MODE]"] if [file exists "[ROOT]/save/ss$n-[MODE].tga"] { set ($this,bg) [new oz'sprite "interface/[MODE]/history/history.bg"] } } set icon [expr int(rand() * 10)] set roomname "Unknown" if [catch {source "[ROOT]/save/savegame$n-info.tcl"}] { if [file exists "[ROOT]/save/savegame$n-info.tcl"] { set icon [expr int(rand() * 10)] set roomname "Unknown" proc itf'history {this n} oz'widget {itf'game} { class itf'history { wq'widget::delete& ::itf::back wq'widget::delete& ::itf::history wq'widget::delete& ::itf::game5 wq'widget::delete& ::itf::game4 wq'widget::delete& ::itf::game3 wq'widget::delete& ::itf::game2 wq'widget::delete& ::itf::game1 proc DeleteSaveGamePanel {} { wq'widget::fadeto $::itf::back 0 wq'widget::fadeto $::itf::history 0 wq'widget::fadeto $::itf::game5 0 wq'widget::fadeto $::itf::game4 0 wq'widget::fadeto $::itf::game3 0 wq'widget::fadeto $::itf::game2 0 wq'widget::fadeto $::itf::game1 0 proc CloseSaveGamePanel {} { oz'event {wizEnableMouse} } oz'delay 0.125 oz'widget::fadeto [set ::itf::back] 1 oz'widget::child $this $($this,time0) 0 oz'widget::child $this $($this,time) 0 oz'widget::child $this $($this,name) 0 oz'widget::child $this $($this,erase) 0 oz'widget::child $this $($this,enter) 0 oz'widget::child $this $($this,icon) 1 oz'widget::child $this $($this,ss) 1 oz'widget::child $this $($this,bg) 0.5 oz'widget::property $($this,enter7) -pos 0.187500 [expr 0.766927 - 0.000] oz'widget::property $($this,enter6) -pos 0.187500 [expr 0.684896 - 0.000] oz'widget::property $($this,enter5) -pos 0.187500 [expr 0.601563 - 0.000] oz'widget::property $($this,enter4) -pos 0.187500 [expr 0.518229 - 0.000] oz'widget::property $($this,enter3) -pos 0.187500 [expr 0.434896 - 0.000] oz'widget::property $($this,enter2) -pos 0.187500 [expr 0.351563 - 0.000] oz'widget::property $($this,enter1) -pos 0.187500 [expr 0.268229 - 0.000] oz'widget::property $($this,enter0) -pos 0.187500 [expr 0.184896 - 0.000] oz'widget::property $($this,erase) -pos 0.188477 0.096354 oz'widget::property $($this,enter) -pos 0.188477 [expr 0.031250 + 0.001] oz'widget::property $($this,icon) -pos 0.5 0 oz'button::property $($this,enter7) -click itf'history::enter_old $($this,gamenb7) $n $icon oz'button::property $($this,enter6) -click itf'history::enter_old $($this,gamenb6) $n $icon oz'button::property $($this,enter5) -click itf'history::enter_old $($this,gamenb5) $n $icon oz'button::property $($this,enter4) -click itf'history::enter_old $($this,gamenb4) $n $icon oz'button::property $($this,enter3) -click itf'history::enter_old $($this,gamenb3) $n $icon oz'button::property $($this,enter2) -click itf'history::enter_old $($this,gamenb2) $n $icon oz'button::property $($this,enter1) -click itf'history::enter_old $($this,gamenb1) $n $icon oz'button::property $($this,enter0) -click itf'history::enter_old $($this,gamenb0) $n $icon oz'button::property $($this,erase) -click itf'game::erase $n oz'button::property $($this,enter) -click itf'game::enter2 $n $icon } incr p set ($this,gamenb$p) $i oz'button::enable $($this,enter$p) oz'label::property $($this,time$p) -text $time -font system.ttf -fsize 16 -color 1 1 1 oz'label::property $($this,time$p) -pos 0.234375 [expr 0.083333*$p + 0.177] \ catch {set time $::lng::roomName($roomname)} set time "" } } set icon [expr int(rand() * 10)] set roomname "Unknown" if [catch {source "[ROOT]/save/$n/$i-info.tcl"}] { if [file exists "[ROOT]/save/$n/$i-info.tcl"] { set icon [expr int(rand() * 10)] set roomname "Unknown" } break if ![file exists "[ROOT]/save/$n/$i.tcl"] { for {set i $max} {$i >= 0 && $i > [expr $max - 8]} {incr i -1} { set ($this,gamenb7) 0 set ($this,gamenb6) 0 set ($this,gamenb5) 0 set ($this,gamenb4) 0 set ($this,gamenb3) 0 set ($this,gamenb2) 0 set ($this,gamenb1) 0 set ($this,gamenb0) 0 set p 0 oz'button::disable $($this,enter7) oz'button::disable $($this,enter6) oz'button::disable $($this,enter5) oz'button::disable $($this,enter4) oz'button::disable $($this,enter3) oz'button::disable $($this,enter2) oz'button::disable $($this,enter1) oz'event {ShowIntroPanel} wq'widget::fadeto $::itf::message 0 -wait proc ok {} { } delete $($this,label) delete $($this,ok) delete $($this,bg) proc ~itf'message {this} { } oz'widget::child $this $($this,label) 0 oz'widget::child $this $($this,ok) 0 oz'widget::child $this $($this,bg) 0.5 oz'label::property $($this,label) -text "$msg" oz'label::property $($this,label) -pos 0.053710 0.016927 -font caligula.ttf -fsize 24 -color 1 1 1 oz'button::property $($this,ok) -click itf'message::ok oz'widget::property $($this,ok) -pos 0.419922 0.089844 set ($this,label) [new oz'label "message" 0.768554 0.058593] set ($this,ok) [new oz'button "interface/[MODE]/intro/intro.ok"] set ($this,bg) [new oz'sprite "interface/[MODE]/intro/intro.message.bg"] proc itf'message {this msg} oz'widget {itf'message} { class itf'message { } oz'flush } } oz'event {set ::isGameReady 1} oz'event {wizEnableMouse} oz'event {standardFadein} oz'event {oz'delay 0.01} DeleteSaveGamePanel oz'event {showInterface} oz'event {initializeGame} if !\$::isGameReady { oz'event { } } } closeGameNoSave ozMessage "$::lng::i_corrupted" if [catch {source "[ROOT]/save/$n/$slot.tcl"}] { } else { source "[ROOT]/save/$n/$slot.tcl" if [info exists ::debug_] { oz'event { oz'event {wizqEntityStopFollow Zak} oz'event {oz'track::stop $::music_track} oz'event {standardFadeout} oz'event {wizDisableMouse} oz'event {oz'delay 0.25} CloseSaveGamePanel ozIMenu enable help iactive interface.help true ozIMenu enable menu iactive interface.sidebar true proc enter_old {slot n c} { } delete $($this,enter7) delete $($this,enter6) delete $($this,enter5) delete $($this,enter4) delete $($this,enter3) delete $($this,enter2) delete $($this,enter1) delete $($this,enter0) delete $($this,time7) delete $($this,time6) delete $($this,time5) delete $($this,time4) delete $($this,time3) delete $($this,time2) delete $($this,time1) delete $($this,time0) delete $($this,time) delete $($this,name) delete $($this,erase) delete $($this,enter) delete $($this,icon) delete $($this,ss) delete $($this,bg) proc ~itf'history {this} { } oz'widget::child $this $($this,enter7) 0 oz'widget::child $this $($this,enter6) 0 oz'widget::child $this $($this,enter5) 0 oz'widget::child $this $($this,enter4) 0 oz'widget::child $this $($this,enter3) 0 oz'widget::child $this $($this,enter2) 0 oz'widget::child $this $($this,enter1) 0 oz'widget::child $this $($this,enter0) 0 oz'widget::child $this $($this,time7) 0 oz'widget::child $this $($this,time6) 0 oz'widget::child $this $($this,time5) 0 oz'widget::child $this $($this,time4) 0 oz'widget::child $this $($this,time3) 0 oz'widget::child $this $($this,time2) 0 oz'widget::child $this $($this,time1) 0 catch {file mkdir "[ROOT]/save/\$i"} catch {file copy -force "[ROOT]/save/ss[expr \$i+1]-[MODE].tga" "[ROOT]/save/ss\$i-[MODE].tga"} catch {file copy -force "[ROOT]/save/savegame[expr \$i+1]-info.tcl" "[ROOT]/save/savegame\$i-info.tcl"} catch {file copy -force "[ROOT]/save/savegame[expr \$i+1].tcl" "[ROOT]/save/savegame\$i.tcl"} for {set i $n} {\$i < \$m} {incr i} { } } break set m [expr \$i-1] if ![file exists "[ROOT]/save/savegame\$i.tcl"] { for {set i $n} {\$i <= 7} {incr i} { set m 0 oz'event { wq'widget::fadeto $::itf::delete 0 -wait proc yes {n} { } delete $($this,label) delete $($this,no) delete $($this,yes) delete $($this,bg) proc ~itf'delete {this} { } oz'widget::child $this $($this,label) 0 oz'widget::child $this $($this,no) 0 oz'widget::child $this $($this,yes) 0 oz'widget::child $this $($this,bg) 0.5 -text $::lng::i_confirm oz'label::property $($this,label) -pos 0.053710 0.016927 -font caligula.ttf -fsize 24 -color 1 1 1 \ oz'button::property $($this,no) -click itf'delete::no oz'widget::property $($this,no) -pos 0.560547 0.089849 oz'button::property $($this,yes) -click itf'delete::yes $n oz'widget::property $($this,yes) -pos 0.279297 0.089849 set ($this,label) [new oz'label "question" 0.768554 0.058593] set ($this,no) [new oz'button "interface/[MODE]/intro/intro.no"] set ($this,yes) [new oz'button "interface/[MODE]/intro/intro.yes"] set ($this,bg) [new oz'sprite "interface/[MODE]/intro/intro.delete.bg"] proc itf'delete {this n} oz'widget {itf'delete} { class itf'delete { } oz'flush wq'widget::delete& ::itf::message } oz'delay 0.125 oz'widget::fadeto [set ::itf::back] 1 oz'widget::child [FOREGROUNDWIDGET] [set ::itf::back] 0.5 oz'widget::property [set ::itf::back] -pos 0.703125 0.791666 -alpha 0 set ::itf::back [new itf'back] oz'event { oz'event {oz'delay 0.125} wq'widget::fadeto $::itf::history 1 oz'widget::child [FOREGROUNDWIDGET] $::itf::history 0.5 oz'widget::property $::itf::history -pos 0.062500 0.041667 -alpha 0 set ::itf::history [new itf'history $n] wq'widget::fadeto $::itf::message 0 -wait proc ok {n} { } delete $($this,label) delete $($this,ok) delete $($this,bg) proc ~itf'message2 {this} { } oz'widget::child $this $($this,label) 0 oz'widget::child $this $($this,ok) 0 oz'widget::child $this $($this,bg) 0.5 oz'label::property $($this,label) -text "$msg" oz'label::property $($this,label) -pos 0.053710 0.020 -font system.ttf -fsize 16 -color 1 1 1 oz'button::property $($this,ok) -click itf'message2::ok $n oz'widget::property $($this,ok) -pos 0.419922 0.089844 set ($this,label) [new oz'label "message" 0.768554 [expr 0.058593]] set ($this,ok) [new oz'button "interface/[MODE]/intro/intro.ok"] set ($this,bg) [new oz'sprite "interface/[MODE]/intro/intro.message.bg"] proc itf'message2 {this msg n} oz'widget {itf'message2} { class itf'message2 { } oz'flush wq'widget::delete& ::itf::message oz'widget::property $($this,quit) -pos 0.028320 0.223958 oz'widget::property $($this,option) -pos 0.028320 0.160156 oz'widget::property $($this,continue) -pos 0.028320 0.096354 oz'widget::property $($this,newgame) -pos 0.028320 0.032552 set ($this,quit.label) [new oz'label "quit" 0.227539 0.059895] set ($this,option.label) [new oz'label "option" 0.227539 0.059895] set ($this,continue.label) [new oz'label "continue" 0.227539 0.059895] set ($this,newgame.label) [new oz'label "newgame" 0.227539 0.059895] set ($this,quit) [new oz'button "interface/[MODE]/intro/intro.quit"] set ($this,option) [new oz'button "interface/[MODE]/intro/intro.option"] set ($this,continue) [new oz'button "interface/[MODE]/intro/intro.continue"] set ($this,newgame) [new oz'button "interface/[MODE]/intro/intro.newgame"] set ($this,bg) [new oz'sprite "interface/[MODE]/intro/intro.bg"] proc itf'intro {this} oz'widget {itf'intro} { class itf'intro { } oz'flush DeleteSaveGamePanel ShowIntroPanel oz'event {oz'delay 0.5} CloseSaveGamePanel proc click {} { } delete $($this,back.label) delete $($this,back) delete $($this,bg) proc ~itf'back {this} { } oz'widget::child $this $($this,back.label) 0 oz'widget::child $this $($this,back) 0 oz'widget::child $this $($this,bg) 0.5 -center 0 -text $::lng::i_back oz'label::property $($this,back.label) -pos 0.080242 0.050781 -font caligula.ttf -fsize 24 -color 1 1 1 \ oz'button::property $($this,back) -click itf'back::click oz'widget::property $($this,back) -pos 0.025391 0.059896 set ($this,back.label) [new oz'label "back" 0.131835 0.061197] set ($this,back) [new oz'button "interface/[MODE]/intro/intro.back"] set ($this,bg) [new oz'sprite "interface/[MODE]/intro/intro.back.bg"] proc itf'back {this} oz'widget {itf'back} { class itf'back { } oz'flush wq'widget::delete& ::itf::delete oz'event {ShowSaveGamePanel} wq'widget::fadeto $::itf::delete 0 -wait proc no {} { } oz'flush wq'widget::delete& ::itf::delete } } oz'event {ShowSaveGamePanel} } else { oz'event {ShowIntroPanel} if {\$m == 1} { catch {file delete -force "[ROOT]/save/\$m"} catch {file delete -force "[ROOT]/save/ss\$m-[MODE].tga"} catch {file delete -force "[ROOT]/save/savegame\$m-info.tcl"} catch {file delete -force "[ROOT]/save/savegame\$m.tcl"} } catch {file copy -force "[ROOT]/save/[expr \$i+1]/7.tcl" "[ROOT]/save/\$i/7.tcl"} catch {file copy -force "[ROOT]/save/[expr \$i+1]/6.tcl" "[ROOT]/save/\$i/6.tcl"} catch {file copy -force "[ROOT]/save/[expr \$i+1]/5.tcl" "[ROOT]/save/\$i/5.tcl"} catch {file copy -force "[ROOT]/save/[expr \$i+1]/4.tcl" "[ROOT]/save/\$i/4.tcl"} catch {file copy -force "[ROOT]/save/[expr \$i+1]/3.tcl" "[ROOT]/save/\$i/3.tcl"} catch {file copy -force "[ROOT]/save/[expr \$i+1]/2.tcl" "[ROOT]/save/\$i/2.tcl"} catch {file copy -force "[ROOT]/save/[expr \$i+1]/1.tcl" "[ROOT]/save/\$i/1.tcl"} catch {file copy -force "[ROOT]/save/[expr \$i+1]/0.tcl" "[ROOT]/save/\$i/0.tcl"} oz'event {hideMouse} oz'event {cameraFadein 0} oz'event {oz'track::stop $::music_track} oz'event {standardFadeout} oz'event {wizDisableMouse} oz'event {oz'delay 0.25} wq'widget::fadeto $::itf::intro 0 } wq'widget::fadeto $::itf::opt 0 if $::itf::opt { wq'widget::fadeto $::itf::vbox 0 wq'widget::fadeto $::itf::logo 0 ozIMenu enable help iactive interface.help true ozIMenu enable menu iactive interface.sidebar true file copy -force "[ROOT]/save/newgamess-[MODE].tga" "[ROOT]/save/ss$i-[MODE].tga" file copy -force "[ROOT]/save/newgame-info.tcl" "[ROOT]/save/savegame$i-info.tcl" file copy -force "[ROOT]/save/newgame.tcl" "[ROOT]/save/savegame$i.tcl" set i 1 } return oz'flush wq'widget::delete& ::itf::intro wq'widget::delete& ::itf::opt wq'widget::delete& ::itf::logo wq'widget::delete& ::itf::vbox wq'widget::delete& ::itf::vers wq'widget::fadeto $::itf::message 1 oz'widget::child [FOREGROUNDWIDGET] $::itf::message 0.5 oz'widget::property $::itf::message -pos 0.0625 0.416666 -alpha 0 set ::itf::message [new itf'message $::lng::i_tooMuchGame] wq'widget::fadeto $::itf::intro 0 -wait } wq'widget::fadeto $::itf::opt 0 if $::itf::opt { wq'widget::fadeto $::itf::vbox 0 wq'widget::fadeto $::itf::logo 0 if {$i == 6} { } if ![file exists "[ROOT]/save/savegame$i.tcl"] break for {set i 1} {$i <= 5} {incr i} { proc newgame {} { } delete $($this,quit.label) delete $($this,continue.label) delete $($this,newgame.label) delete $($this,quit) delete $($this,continue) delete $($this,newgame) delete $($this,bg) proc ~itf'intro {this} { } oz'widget::child $this $($this,quit.label) 0 oz'widget::child $this $($this,option.label) 0 oz'widget::child $this $($this,continue.label) 0 oz'widget::child $this $($this,newgame.label) 0 oz'widget::child $this $($this,quit) 0 oz'widget::child $this $($this,option) 0 oz'widget::child $this $($this,continue) 0 oz'widget::child $this $($this,newgame) 0 oz'widget::child $this $($this,bg) 0.5 -center 0 -text $::lng::i_quit oz'label::property $($this,quit.label) -pos 0.079218 0.214843 -font caligula.ttf -fsize 24 -color 1 1 1 \ -center 0 -text $::lng::i_option oz'label::property $($this,option.label) -pos 0.079218 0.151041 -font caligula.ttf -fsize 24 -color 1 1 1 \ -center 0 -text $::lng::i_continue oz'label::property $($this,continue.label) -pos 0.079218 0.087239 -font caligula.ttf -fsize 24 -color 1 1 1 \ -center 0 -text $::lng::i_newGame oz'label::property $($this,newgame.label) -pos 0.079218 0.024739 -font caligula.ttf -fsize 24 -color 1 1 1 \ oz'button::property $($this,quit) -click itf'intro::quit oz'button::property $($this,option) -click itf'intro::option oz'button::property $($this,continue) -click itf'intro::continue oz'button::property $($this,newgame) -click itf'intro::newgame