瀏覽代碼

Add the possibility to save and restore the game settings

rachels 2 年之前
父節點
當前提交
6f43b0f1e8
共有 3 個文件被更改,包括 94 次插入0 次删除
  1. 1 0
      glife.qproj
  2. 91 0
      locations/initg.qsrc
  3. 2 0
      locations/obj_din.qsrc

+ 1 - 0
glife.qproj

@@ -16,6 +16,7 @@
 	<Folder name="System">
 		<Location name="counter"/>
 		<Location name="loadg"/>
+		<Location name="initg"/>
 		<Location name="LOCA"/>
 		<Location name="saveg"/>
 		<Location name="inputProcessing"/>

+ 91 - 0
locations/initg.qsrc

@@ -0,0 +1,91 @@
+# initg
+
+if $ARGS[0] = '':
+	$initext = $USER_TEXT
+	CMDCLEAR
+	SHOWINPUT 0
+	*clr
+	:initg_loop
+	$t = MID($initext,0,STRPOS($initext, '\n')-1)
+	$inittext[] = $t
+	$t
+	dynamic $t
+	$initext = MID($initext,STRPOS($initext, '\n')+1, len($initext))
+	if STRPOS($initext, '\n') < 4 : $initext = MID($initext,STRPOS($initext, '\n')+1, len($initext))
+	if STRPOS($initext, '\r') < 4 : $initext = MID($initext,STRPOS($initext, '\r')+1, len($initext))
+	if STRPOS($initext, '\n') > 0 : jump 'initg_loop'
+	$t = $initext
+	$inittext[] = t
+	$t
+	dynamic $t
+	killvar '$t'
+	gs 'stat'
+	dynamic $cheatmenu['setting']
+end
+
+if $ARGS[0] = 'get_game_set':
+	*clr & cla
+	'As there is no other way to preserve your favorite settings, you have to do it in the following way:'
+	*nl 'All the game environment variable will be written on the main window in the next step, and you have to copy paste them via the clipboard into a text file, so you could restore it in your next game.'
+	act 'Continue' :
+		*clr & cla
+		'Enable_nogameover = <<Enable_nogameover>>'
+		'music_on = <<music_on>>'
+		'music_loop = <<music_loop>>'
+		'disable_autosave = <<disable_autosave>>'
+		'autohairbrush = <<autohairbrush>>'
+		'enfullmorrout = <<enfullmorrout>>'
+		'cyccustom = <<cyccustom>>'
+		'cheatKlisma = <<cheatKlisma>>'
+		'editpornname = <<editpornname>>'
+		'difficulty = <<difficulty>>'
+
+		'usePopUps = <<usePopUps>>'
+		'set_imgw = <<set_imgw>>'
+		'set_imgh = <<set_imgh>>'
+		'$set_imgh = "<<$set_imgh>>"'
+		'night_mode = <<night_mode>>'
+		'Enable_tablemap = <<Enable_tablemap>>'
+		'Enable_faceturn = <<Enable_faceturn>>'
+		'Enable_Android = <<Enable_Android>>'
+
+		'disable_LoadSave = <<disable_LoadSave>>'
+		'TempUnit = <<TempUnit>>'
+		'default_wbanner = <<default_wbanner>>'
+		'set_weatherht = <<set_weatherht>>'
+		'default_menu_icons = <<default_menu_icons>>'
+		'set_miconht = <<set_miconht>>'
+		'cheatStatusIcons = <<cheatStatusIcons>>'
+		'disable_show_icons = <<disable_show_icons>>'
+		'set_siconht = <<set_siconht>>'
+		'ETOmenu = <<ETOmenu>>'
+		'Enable_scalepic = <<Enable_scalepic>>'
+		'Enable_scalewidth = <<Enable_scalewidth>>'
+		'Enable_scaleheight = <<Enable_scaleheight>>'
+		'Enable_statfsize = <<Enable_statfsize>>'
+		'Enable_showattr = <<Enable_showattr>>'
+		'Enable_showskill = <<Enable_showskill>>'
+		'Enable_showrelation = <<Enable_showrelation>>'
+		'Enable_showstatimg = <<Enable_showstatimg>>'
+		'Enable_statimg_loc = <<Enable_statimg_loc>>'
+		'set_statimgh = <<set_statimgh>>'
+		'set_statimgw = <<set_statimgw>>'
+
+		act 'Finish': dynamic $cheatmenu['setting']
+	end
+end
+
+if $ARGS[0] = 'set_game_set':
+	*clr & cla
+	'In the next step, it will be opened the input window where you can copy your saved state of the game environment variables. Both Windows (cr lf) and Unix (lf) end of line is supported, although the second one will not be properly formatted on the screen.'
+
+	act 'Continue' :
+		cla
+		$USERCOM = 'initg'
+		SHOWINPUT 1
+		*nl 'Now you can input your data and press <b>Enter</b>'
+	end
+end
+
+--- initg ---------------------------------
+

+ 2 - 0
locations/obj_din.qsrc

@@ -69,6 +69,8 @@ if $ARGS[0] = 'settingtabs':
 	else
 		!call from Menu - Game settings
 		act 'Enter cheat menu': killvar 'menu_page' & gs '$menu_cheat'
+		act 'Get Game Settings': killvar 'menu_page' & gt 'initg', 'get_game_set'
+		act 'Set Game Settings': killvar 'menu_page' & gt 'initg', 'set_game_set'
 		act 'Emergency Exit': killvar 'menu_page' & gt 'obj_din', 'emergency'
 		act 'Exit the menu': killvar 'menu_page' & gt 'obj_din', 'menu_exit'
 	end