#NoTrayIcon #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=megaman.ico #AutoIt3Wrapper_Outfile=AIT-ADRLIST.exe #AutoIt3Wrapper_Outfile_x64=AIT-ADRLIST_x64.exe #AutoIt3Wrapper_Compile_Both=y #AutoIt3Wrapper_UseX64=y #AutoIt3Wrapper_Res_Comment= #AutoIt3Wrapper_Res_Description=Loader Manager #AutoIt3Wrapper_Res_Fileversion=0.3.0.58 #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y #AutoIt3Wrapper_Res_LegalCopyright=Coded by|BHNS #AutoIt3Wrapper_Res_Field=Version|0.3 #AutoIt3Wrapper_Res_Field=Build|2011.06.06 #AutoIt3Wrapper_Res_Field=Coded by|BHNS #AutoIt3Wrapper_Res_Field=Compile date|%longdate% %time% #AutoIt3Wrapper_Res_Field=AutoIt Version|%AutoItVer% #AutoIt3Wrapper_Res_Icon_Add=megaman.ico #AutoIt3Wrapper_Run_AU3Check=n #Au3Stripper_Parameters=/sf /sv /om /cs=0 /cn=0 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #Obfuscator_Parameters=/sf /sv /om /cs=0 /cn=0 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include Local $sFldr1 = @ScriptDir & "\AIT-ARDLIST\";pra criar pasta Local $sFldr2 = "\AIT-ARDLIST\" Local $romsdw = "\AIT-ARDLIST\ROMSDW\" Local $romsok = "\AIT-ARDLIST\ROMSOK\" Local $chd = "\AIT-ARDLIST\CHD\" Local $listgames = "\AIT-ARDLIST\LISTGAMES\" Local $biosrom = "\AIT-ARDLIST\BIOS\" Local $name_rom, $emulator_name, $check_bios, $description_val, $manufacturer_val, $year_val, $name_list, $size, $dir_roms, $n_lst1, $n_lst2, $n_lst3, $disk_chds, $total_disk, $select_disk_chd Local $in_bar, $total_, $name_rom, $emulator_n_cps1, $emulator_c_cps1, $emulator_n_cps2, $emulator_c_cps2, $emulator_n_cps3, $emulator_c_cps3 Global $year_val, $rom_year_in, $rom_year_out Global $_makeflyer, $fld_snap, $fld_flyer, $fld_cabinets, $fld_title #Region ### START Koda GUI section ### Form=d:\ait-arcade\sources\ait-adxml\ait-emulatores.kxf $Form1_1 = GUICreate("AIT-ARDLIST", 275, 673, 614, 13) GUISetBkColor(0x99B4D1) $Texto_admenu_export = GUICtrlCreateLabel("ADVMENU EXPORT LIST V 1.0", 56, 5, 159, 17) $Button1 = GUICtrlCreateButton("Now generator", 32, 575, 99, 50) $Button2 = GUICtrlCreateButton("Exit", 155, 575, 91, 50) $gp_emulators = GUICtrlCreateGroup("Emulators", 8, 95, 257, 249) $allcpus = GUICtrlCreateLabel("ALL CPUs", 27, 153, 53, 17) $Label1 = GUICtrlCreateLabel("ALL CPUs", 28, 128, 53, 17) $Label2 = GUICtrlCreateLabel("ALL NEOGEO", 28, 175, 72, 17) $Label3 = GUICtrlCreateLabel("ALL SEGA", 28, 201, 55, 17) $Label4 = GUICtrlCreateLabel("ALL NAOMI", 28, 229, 61, 17) $Label5 = GUICtrlCreateLabel("ALL ", 28, 257, 26, 17) $Label6 = GUICtrlCreateLabel("ALL", 29, 284, 23, 17) $Label7 = GUICtrlCreateLabel("ALL", 29, 308, 23, 17) $Radio1 = GUICtrlCreateRadio("List by CPUs", 176, 125, 81, 17) $Radio2 = GUICtrlCreateRadio("Only a list", 176, 150, 81, 17) $Radio3 = GUICtrlCreateRadio("Only a list", 176, 175, 81, 17) $Radio4 = GUICtrlCreateRadio("Only a list", 176, 201, 81, 17) $Radio5 = GUICtrlCreateRadio("Only a list", 176, 226, 81, 17) $Radio6 = GUICtrlCreateRadio("Only a list", 176, 254, 81, 17) $Radio7 = GUICtrlCreateRadio("Only a list", 176, 278, 81, 17) $Radio8 = GUICtrlCreateRadio("Only a list", 176, 303, 81, 17) $n_cps1 = GUICtrlCreateInput("CPS1", 53, 254, 49, 21) $c_cps1 = GUICtrlCreateInput("cps1.c", 112, 254, 49, 21) $n_cps2 = GUICtrlCreateInput("CPS2", 53, 279, 49, 21) $c_cps2 = GUICtrlCreateInput("cps2.c", 112, 279, 49, 21) $n_cps3 = GUICtrlCreateInput("CPS3", 53, 303, 49, 21) $c_cps3 = GUICtrlCreateInput("cps3.c", 113, 303, 49, 21) $Label8 = GUICtrlCreateLabel("= neodrvr.c", 103, 175, 58, 17) $Label9 = GUICtrlCreateLabel("= model2.c", 104, 201, 56, 17) $Label10 = GUICtrlCreateLabel("= naomi.c", 102, 228, 50, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $mame_source = GUICtrlCreateButton("M.A.M.E SOURCE", 80, 56, 123, 33) $Label11 = GUICtrlCreateLabel("Select MAME source export xml", 58, 32, 154, 17) $Group1 = GUICtrlCreateGroup("Move Roms", 9, 463, 257, 105) $Label15 = GUICtrlCreateLabel("Move roms for list", 24, 487, 86, 17) $Checkbox1 = GUICtrlCreateCheckbox("Yes Warning Option", 121, 485, 121, 17) $Button3 = GUICtrlCreateButton("Dir Roms", 108, 508, 75, 25) $Label16 = GUICtrlCreateLabel("Sample Rom after to ROM_CPU ", 72, 543, 159, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $year_in = GUICtrlCreateInput("", 66, 367, 57, 21, BitOR($ES_CENTER, $ES_NUMBER)) GUICtrlSetLimit(-1, 4) $roms_year = GUICtrlCreateLabel("ROMs YEARS Sample 1988-1991", 56, 349, 165, 17) $year_out = GUICtrlCreateInput("", 146, 367, 57, 21, BitOR($ES_CENTER, $ES_NUMBER)) GUICtrlSetLimit(-1, 4) $Flyers = GUICtrlCreateButton("Flyers", 8, 424, 59, 25) $Snaps = GUICtrlCreateButton("Snaps", 72, 424, 59, 25) $Titles = GUICtrlCreateButton("Titles", 136, 424, 59, 25) $cabinets = GUICtrlCreateButton("Cabinets", 200, 424, 59, 25) $make_flyers = GUICtrlCreateCheckbox("Make Flyers", 97, 400, 97, 17) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE $oXML = 0 _GDIPlus_Shutdown() Exit Case $Button1 $_makeflyer = GUICtrlRead($make_flyers) $emulator_n_cps1 = GUICtrlRead($n_cps1) $emulator_c_cps1 = GUICtrlRead($c_cps1) $emulator_n_cps2 = GUICtrlRead($n_cps2) $emulator_c_cps2 = GUICtrlRead($c_cps2) $emulator_n_cps3 = GUICtrlRead($n_cps3) $emulator_c_cps3 = GUICtrlRead($c_cps3) $rom_year_in = GUICtrlRead($year_in) $rom_year_out = GUICtrlRead($year_out) $read_check = GUICtrlRead($Checkbox1) $n_lst1 = $emulator_n_cps1 $n_lst2 = $emulator_n_cps2 $n_lst3 = $emulator_n_cps3 $emulator_n_cps1 = $emulator_n_cps1 & ".lst" $emulator_n_cps2 = $emulator_n_cps2 & ".lst" $emulator_n_cps3 = $emulator_n_cps3 & ".lst" _GDIPlus_Startup() If FileExists($sFldr1 & "ait-arcade.xml") Then ;FileDelete($sFldr1&"*.lst") ; Deleta todas as lista existentes FileDelete(@ScriptDir & $romsdw & "*.txt") ; Deleta todas as lista existentes FileDelete(@ScriptDir & $romsok & "*.txt") ; Deleta todas as lista existentes FileDelete(@ScriptDir & $chd & "*.txt") ; Deleta todas as lista existentes FileDelete(@ScriptDir & $biosrom & "*.txt") ; Deleta todas as lista existentes FileDelete(@ScriptDir & $listgames & "*.lst") ; Deleta todas as lista existentes export_lst() Else MsgBox(4096, "", "Not found " & $sFldr1 & "ait-arcade.xml") export_xml() export_lst() EndIf Case $Button3 $read_check = GUICtrlRead($Checkbox1) $dir_roms = FileSelectFolder("Folder Roms M.A.M.E .", "") Case $Snaps $fld_snap = FileSelectFolder("Folder Snaps M.A.M.E .", "") Case $Flyers $fld_flyer = FileSelectFolder("Folder Flyers M.A.M.E .", "") Case $Titles $fld_title = FileSelectFolder("Folder Titles M.A.M.E .", "") Case $cabinets $fld_cabinets = FileSelectFolder("Folder Cabinets M.A.M.E .", "") Case $Button2 $oXML = 0 _GDIPlus_Shutdown() Exit Case $mame_source export_xml() ;FileWriteLine(@ScriptDir &"\Config\info.log",$Input_Date & "|" & $Input_Time & " ==> Preparando instalação pela primeira vez.") ;FileWriteLine(@ScriptDir &"\Config\info.log",$Input_Date & "|" & $Input_Time & " ==> Criando Diretorio.") ;FileWriteLine(@ScriptDir &"\Config\info.log",$Input_Date & "|" & $Input_Time & " ==> Diretorio criado com sucesso. Caminho: "&@ScriptDir & $sFldr2) EndSwitch WEnd Func export_xml() Local $message = "Select mame.exe, mameui32.exe export xml." ;Local $s_emulator = FileOpenDialog($message, @ScriptDir & "\", "MAME Emulator (*.exe)", 1 + 4) Local $s_emulator = FileOpenDialog($message, @ScriptDir & "\", "MAME Emulator (*.exe)") If @error Then MsgBox(4096, "", "Mame no select") Else ;MsgBox(4096, "by AIT-ARCADE", "M.A.M.E >>" & $s_emulator) If DirGetSize($sFldr1) = -1 Then DirCreate(@ScriptDir & $sFldr2) EndIf Run(@ComSpec & " /c " & $s_emulator & " -lx>" & $sFldr1 & "ait-arcade.xml", @ScriptDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) ;MsgBox(4096, "by AIT-ARCADE Team", "XML Export sucess "&@LF & $sFldr1&"ait-arcade.xml") Sleep(2000) ProgressOn("M.A.M.E List Export XML", "Export", "") ProgressSet(5, $s_emulator, "Export XML .") Sleep(1000) ProgressSet(10, $s_emulator, "Export XML ..") Sleep(2000) ProgressSet(15, $s_emulator, "Export XML ...") Sleep(1000) ProgressSet(20, $s_emulator, "Export XML ....") Sleep(2000) ProgressSet(25, $s_emulator, "Export XML .....") Sleep(1000) ProgressSet(30, $s_emulator, "Export XML ......") Sleep(2000) ProgressSet(35, $s_emulator, "Export XML .......") Sleep(1000) ProgressSet(40, $s_emulator, "Export XML ........") Sleep(2000) ProgressSet(45, $s_emulator, "Export XML .........") Sleep(1000) ProgressSet(50, $s_emulator, "Export XML ..........") Sleep(2000) ProgressSet(55, $s_emulator, "Export XML ...........") Sleep(1000) ProgressSet(60, $s_emulator, "Export XML ............") Sleep(2000) ProgressSet(65, $s_emulator, "Export XML .............") Sleep(1000) ProgressSet(70, $s_emulator, "Export XML ..............") Sleep(2000) ProgressSet(75, $s_emulator, "Export XML ...............") Sleep(1000) ProgressSet(80, $s_emulator, "Export XML ................") Sleep(2000) $in_bar = 80 $size = FileGetSize(@ScriptDir & "\AIT-ARDLIST\ait-arcade.xml") Local $size2 Do $size2 = $size Sleep(1000) $size = FileGetSize(@ScriptDir & "\AIT-ARDLIST\ait-arcade.xml") $in_bar = $in_bar + 1 ProgressSet($in_bar, "Export data XML full", "Please ...M.A.M.E All sets") Until $size = $size2 #CS $oXML = ObjCreate("MSXML2.DOMDocument") $oXML.load(@ScriptDir & "\AIT-ARDLIST\ait-arcade.xml") $oXML.setProperty("SelectionLanguage", "XPath") $total_ = $oXML.selectNodes("/mame/game").length #CE ProgressSet(100, "Done", "M.A.M.E All ") Sleep(2000) ProgressOff() ;MsgBox(4096, "M.A.M.E All sets >>"& $total_) EndIf EndFunc ;==>export_xml Func read_options() Select Case GUICtrlRead($Radio1) = $GUI_CHECKED ; LISTA AIT ARCADE ISOLADA DOS EMULADORES ;$name_list = "ARCADE.lst" ; ; LISTA AIT ARCADE ISOLADA DOS EMULADORES If $emulator_name = "neodrvr.c" Then ;NEO GEO $name_list = "NEOGEO.lst" roms_mov() ElseIf $emulator_name = "snk6502.c" Then ; SNK $name_list = "NEOGEO.lst" roms_mov() ElseIf $emulator_name = "lasso.c" Then ; SNK $name_list = "NEOGEO.lst" roms_mov() ElseIf $emulator_name = "munchmo.c" Then ; SNK $name_list = "NEOGEO.lst" roms_mov() ElseIf $emulator_name = "snk.c" Then ; SNK $name_list = "NEOGEO.lst" roms_mov() ElseIf $emulator_name = "mainsnk.c" Then ; SNK $name_list = "NEOGEO.lst" roms_mov() ElseIf $emulator_name = "snk68.c" Then ; SNK $name_list = "NEOGEO.lst" roms_mov() ElseIf $emulator_name = "prehisle.c" Then ; SNK $name_list = "NEOGEO.lst" roms_mov() ElseIf $emulator_name = "bbusters.c" Then ; SNK $name_list = "NEOGEO.lst" roms_mov() ElseIf $emulator_name = "hng64.c" Then ; SNK $name_list = "NEOGEO.lst" roms_mov() ElseIf $emulator_name = "naomi.c" Then ; NAOMI $name_list = "NAOMI.lst" roms_mov() ElseIf $emulator_name = "naomcos23.c" Then ; NAMCO $name_list = "NAMCO.lst" roms_mov() ElseIf $emulator_name = "naomcos21.c" Then ; NAMCO $name_list = "NAMCO.lst" roms_mov() ElseIf $emulator_name = "namcos21.c" Then ; NAMCO $name_list = "NAMCO.lst" roms_mov() ElseIf $emulator_name = "naomcos22.c" Then ; NAMCO $name_list = "NAMCO.lst" roms_mov() ElseIf $emulator_name = "namcos22.c" Then ; NAMCO $name_list = "NAMCO.lst" roms_mov() ElseIf $emulator_name = "naomcos2.c" Then ; NAMCO $name_list = "NAMCO.lst" roms_mov() ElseIf $emulator_name = "namcos2.c" Then ; NAMCO $name_list = "NAMCO.lst" roms_mov() ElseIf $emulator_name = "naomcos1.c" Then ; NAMCO $name_list = "NAMCO.lst" roms_mov() ElseIf $emulator_name = "naomcos10.c" Then ; NAMCO $name_list = "NAMCO.lst" roms_mov() ElseIf $emulator_name = "namcona1.c" Then ; NAMCO $name_list = "NAMCO.lst" roms_mov() ElseIf $emulator_name = "namcops2.c" Then ; NAMCO $name_list = "NAMCO.lst" roms_mov() ElseIf $emulator_name = "namcos11.c" Then ; NAMCO $name_list = "NAMCO.lst" roms_mov() ElseIf $emulator_name = "namcos12.c" Then ; NAMCO $name_list = "NAMCO.lst" roms_mov() ElseIf $emulator_name = "namcofl.c" Then ; NAMCO $name_list = "NAMCO.lst" roms_mov() ElseIf $emulator_name = "namcos86.c" Then ; NAMCO $name_list = "NAMCO.lst" roms_mov() ElseIf $emulator_name = "namconb1.c" Then ; NAMCO $name_list = "NAMCO.lst" roms_mov() ElseIf $emulator_name = "model1.c" Then ;SEGA3D $name_list = "SEGA3D.lst" roms_mov() ElseIf $emulator_name = "model2.c" Then ;SEGA3D $name_list = "SEGA3D.lst" roms_mov() ElseIf $emulator_name = "model3.c" Then ;SEGA3D $name_list = "SEGA3D.lst" roms_mov() ElseIf $emulator_name = "triforce.c" Then ;SEGA3D $name_list = "SEGA3D.lst" roms_mov() ElseIf $emulator_name = "chihiro.c" Then ;SEGA3D $name_list = "SEGA3D.lst" roms_mov() ElseIf $emulator_name = "hikaru.c" Then ;SEGA3D $name_list = "SEGA3D.lst" roms_mov() ElseIf $emulator_name = "segag80v.c" Then ;SEGA $name_list = "SEGA.lst" roms_mov() ElseIf $emulator_name = "segald.c" Then ;SEGA $name_list = "SEGA.lst" roms_mov() ElseIf $emulator_name = "aladbl.c" Then ;SEGA $name_list = "SEGA.lst" roms_mov() ElseIf $emulator_name = "segae.c" Then ;SEGA $name_list = "SEGA.lst" roms_mov() ElseIf $emulator_name = "segahang.c" Then ;SEGA $name_list = "SEGA.lst" roms_mov() ElseIf $emulator_name = "segas16a.c" Then ;SEGA $name_list = "SEGA.lst" roms_mov() ElseIf $emulator_name = "segas16b.c" Then ;SEGA $name_list = "SEGA.lst" roms_mov() ElseIf $emulator_name = "segas16b.c" Then ;SEGA $name_list = "SEGA.lst" roms_mov() ElseIf $emulator_name = "system16.c" Then ;SEGA $name_list = "SEGA.lst" roms_mov() ElseIf $emulator_name = "segas18.c" Then ;SEGA $name_list = "SEGA.lst" roms_mov() ElseIf $emulator_name = "segaorun.c" Then ;SEGA $name_list = "SEGA.lst" roms_mov() ElseIf $emulator_name = "segaxbd.c" Then ;SEGA $name_list = "SEGA.lst" roms_mov() ElseIf $emulator_name = "segaybd.c" Then ;SEGA $name_list = "SEGA.lst" roms_mov() ElseIf $emulator_name = "segas32.c" Then ;SEGA $name_list = "SEGA.lst" roms_mov() ElseIf $emulator_name = "megatech.c" Then ;SEGA $name_list = "SEGA.lst" roms_mov() ElseIf $emulator_name = "segag80v.c" Then ;SEGA $name_list = "SEGA.lst" roms_mov() ElseIf $emulator_name = "stv.c" Then ;SEGA $name_list = "SEGA.lst" roms_mov() ElseIf $emulator_name = "segac2.c" Then ;SEGA $name_list = "SEGA.lst" roms_mov() ElseIf $emulator_name = "segag80r.c" Then ;SEGA $name_list = "SEGA.lst" roms_mov() ElseIf $emulator_name = "atarig1.c" Then ;ATARI $name_list = "ATARI.lst" roms_mov() ElseIf $emulator_name = "atarigx2.c" Then ;ATARI $name_list = "ATARI.lst" roms_mov() ElseIf $emulator_name = "atarigt.c" Then ;ATARI $name_list = "ATARI.lst" roms_mov() ElseIf $emulator_name = "vegas.c" Then ;ATARI $name_list = "ATARI.lst" roms_mov() ElseIf $emulator_name = "atarig42.c" Then ;ATARI $name_list = "ATARI.lst" roms_mov() ElseIf $emulator_name = "atarifb.c" Then ;ATARI $name_list = "ATARI.lst" roms_mov() ElseIf $emulator_name = "batman.c" Then ;ATARI $name_list = "ATARI.lst" roms_mov() ElseIf $emulator_name = "jaguar.c" Then ;ATARI $name_list = "ATARI.lst" roms_mov() ElseIf $emulator_name = "cojag.c" Then ;ATARI $name_list = "ATARI.lst" roms_mov() ElseIf $emulator_name = "harddriv.c" Then ;ATARI $name_list = "ATARI.lst" roms_mov() ElseIf $emulator_name = "gauntlet.c" Then ;ATARI $name_list = "ATARI.lst" roms_mov() ElseIf $emulator_name = "xybots.c" Then ;ATARI $name_list = "ATARI.lst" roms_mov() ElseIf $emulator_name = "blstroid.c" Then ;ATARI $name_list = "ATARI.lst" roms_mov() ElseIf $emulator_name = "vindictr.c" Then ;ATARI $name_list = "ATARI.lst" roms_mov() ElseIf $emulator_name = "toobin.c" Then ;ATARI $name_list = "ATARI.lst" roms_mov() ElseIf $emulator_name = "cyberbal.c" Then ;ATARI $name_list = "ATARI.lst" roms_mov() ElseIf $emulator_name = "skullxbo.c" Then ;ATARI $name_list = "ATARI.lst" roms_mov() ElseIf $emulator_name = "badlands.c" Then ;ATARI $name_list = "ATARI.lst" roms_mov() ElseIf $emulator_name = "klax.c" Then ;ATARI $name_list = "ATARI.lst" roms_mov() ElseIf $emulator_name = "kinst.c" Then ;NITENDO $name_list = "NITENDO.lst" roms_mov() ElseIf $emulator_name = "vsnes.c" Then ;NITENDO $name_list = "NITENDO.lst" roms_mov() ElseIf $emulator_name = "playch10.c" Then ;NITENDO $name_list = "NITENDO.lst" roms_mov() ElseIf $emulator_name = "nss.c" Then ;NITENDO $name_list = "NITENDO.lst" roms_mov() ElseIf $emulator_name = "snesb.c" Then ;NITENDO $name_list = "NITENDO.lst" roms_mov() ElseIf $emulator_name = "aerofgt.c" Then ;VIDEOSYSTEM $name_list = "VIDEOSYSTEM.lst" roms_mov() ElseIf $emulator_name = "fromance.c" Then ;VIDEOSYSTEM $name_list = "VIDEOSYSTEM.lst" roms_mov() ElseIf $emulator_name = "ojankohs.c" Then ;VIDEOSYSTEM $name_list = "VIDEOSYSTEM.lst" roms_mov() ElseIf $emulator_name = "tail2nos.c" Then ;VIDEOSYSTEM $name_list = "VIDEOSYSTEM.lst" roms_mov() ElseIf $emulator_name = "pipedrm.c" Then ;VIDEOSYSTEM $name_list = "VIDEOSYSTEM.lst" roms_mov() ElseIf $emulator_name = "f1gp.c" Then ;VIDEOSYSTEM $name_list = "VIDEOSYSTEM.lst" roms_mov() ElseIf $emulator_name = "crshrace.c" Then ;VIDEOSYSTEM $name_list = "VIDEOSYSTEM.lst" roms_mov() ElseIf $emulator_name = "zn.c" Then ;ARCADE3D $name_list = "ARCADE3D.lst" roms_mov() ElseIf $emulator_name = "pkscram.c" Then ;ARCADE3D $name_list = "ARCADE3D.lst" roms_mov() ElseIf $emulator_name = "gaelco3d.c" Then ;ARCADE3D $name_list = "ARCADE3D.lst" roms_mov() ElseIf $emulator_name = "seattle.c" Then ;ARCADE3D $name_list = "ARCADE3D.lst" roms_mov() ElseIf $emulator_name = "midwunit.c" Then ;MIDWAY $name_list = "MIDWAY.lst" roms_mov() ElseIf $emulator_name = "midtunit.c" Then ;MIDWAY $name_list = "MIDWAY.lst" roms_mov() ElseIf $emulator_name = "midvunit.c" Then ;MIDWAY $name_list = "MIDWAY.lst" roms_mov() ElseIf $emulator_name = "midzeus.c" Then ;MIDWAY $name_list = "MIDWAY.lst" roms_mov() ElseIf $emulator_name = "mw8080bw.c" Then ;MIDWAY $name_list = "MIDWAY.lst" roms_mov() ElseIf $emulator_name = "tmaster.c" Then ;MIDWAY $name_list = "MIDWAY.lst" roms_mov() ElseIf $emulator_name = "taitoair.c" Then ;TAITO $name_list = "TAITO.lst" roms_mov() ElseIf $emulator_name = "taito_f3.c" Then ;TAITO $name_list = "TAITO.lst" roms_mov() ElseIf $emulator_name = "taitosj.c" Then ;TAITO $name_list = "TAITO.lst" roms_mov() ElseIf $emulator_name = "galastrm.c" Then ;TAITO $name_list = "TAITO.lst" roms_mov() ElseIf $emulator_name = "taito_z.c" Then ;TAITO $name_list = "TAITO.lst" roms_mov() ElseIf $emulator_name = "taito_b.c" Then ;TAITO $name_list = "TAITO.lst" roms_mov() ElseIf $emulator_name = "taito_x.c" Then ;TAITO $name_list = "TAITO.lst" roms_mov() ElseIf $emulator_name = "taito_l.c" Then ;TAITO $name_list = "TAITO.lst" roms_mov() ElseIf $emulator_name = "taito_f2.c" Then ;TAITO $name_list = "TAITO.lst" roms_mov() ElseIf $emulator_name = "taito.c" Then ;TAITO $name_list = "TAITO.lst" roms_mov() ElseIf $emulator_name = "taitogn.c" Then ;TAITO $name_list = "TAITO.lst" roms_mov() ElseIf $emulator_name = "taitojc.c" Then ;TAITO $name_list = "TAITO.lst" roms_mov() ElseIf $emulator_name = "taito_h.c" Then ;TAITO $name_list = "TAITO.lst" roms_mov() ElseIf $emulator_name = "taitotz.c" Then ;TAITO $name_list = "TAITO.lst" roms_mov() ElseIf $emulator_name = "taitopjc.c" Then ;TAITO $name_list = "TAITO.lst" roms_mov() ElseIf $emulator_name = "taito_o.c" Then ;TAITO $name_list = "TAITO.lst" roms_mov() ElseIf $emulator_name = "taitowlf.c" Then ;TAITO $name_list = "TAITO.lst" roms_mov() ElseIf $emulator_name = "tnzs.c" Then ;TAITO $name_list = "TAITO.lst" roms_mov() ElseIf $emulator_name = "asuka.c" Then ;TAITO $name_list = "TAITO.lst" roms_mov() ElseIf $emulator_name = "qix.c" Then ;TAITO $name_list = "TAITO.lst" roms_mov() ElseIf $emulator_name = "williams.c" Then ;WILLIAMS $name_list = "WILLIAMS.lst" roms_mov() ElseIf $emulator_name = "deco_mlc.c" Then ;DATAEAST $name_list = "DATAEAST.lst" roms_mov() ElseIf $emulator_name = "deco_ld.c" Then ;DATAEAST $name_list = "DATAEAST.lst" roms_mov() ElseIf $emulator_name = "decocass.c" Then ;DATAEAST $name_list = "DATAEAST.lst" roms_mov() ElseIf $emulator_name = "deco32.c" Then ;DATAEAST $name_list = "DATAEAST.lst" roms_mov() ElseIf $emulator_name = "deco156.c" Then ;DATAEAST $name_list = "DATAEAST.lst" roms_mov() ElseIf $emulator_name = "dec0.c" Then ;DATAEAST $name_list = "DATAEAST.lst" roms_mov() ElseIf $emulator_name = "rohga.c" Then ;DATAEAST $name_list = "DATAEAST.lst" roms_mov() ElseIf $emulator_name = "funkyjet.c" Then ;DATAEAST $name_list = "DATAEAST.lst" roms_mov() ElseIf $emulator_name = "cninja.c" Then ;DATAEAST $name_list = "DATAEAST.lst" roms_mov() ElseIf $emulator_name = "dietgo.c" Then ;DATAEAST $name_list = "DATAEAST.lst" roms_mov() ElseIf $emulator_name = "boogwing.c" Then ;DATAEAST $name_list = "DATAEAST.lst" roms_mov() ElseIf $emulator_name = "konamigv.c" Then ;KONAMI $name_list = "KONAMI.lst" roms_mov() ElseIf $emulator_name = "konamim2.c" Then ;KONAMI $name_list = "KONAMI.lst" roms_mov() ElseIf $emulator_name = "konamigq.c" Then ;KONAMI $name_list = "KONAMI.lst" roms_mov() ElseIf $emulator_name = "Konamigx.c" Then ;KONAMI $name_list = "KONAMI.lst" roms_mov() ElseIf $emulator_name = "ajax.c" Then ;KONAMI $name_list = "KONAMI.lst" roms_mov() ElseIf $emulator_name = "hcastle.c" Then ;KONAMI $name_list = "KONAMI.lst" roms_mov() ElseIf $emulator_name = "aliens.c" Then ;KONAMI $name_list = "KONAMI.lst" roms_mov() ElseIf $emulator_name = "twinkle.c" Then ;KONAMI $name_list = "KONAMI.lst" roms_mov() ElseIf $emulator_name = "tmnt.c" Then ;KONAMI $name_list = "KONAMI.lst" roms_mov() ElseIf $emulator_name = "ksys573.c" Then ;KONAMI ksys573 $name_list = "KONAMI.lst" roms_mov() ElseIf $emulator_name = "konamigv.c" Then ;KONAMI $name_list = "KONAMI.lst" roms_mov() ElseIf $emulator_name = "viper.c" Then ;KONAMI $name_list = "KONAMI.lst" roms_mov() ElseIf $emulator_name = "lethal.c" Then ;KONAMI $name_list = "KONAMI.lst" roms_mov() ElseIf $emulator_name = "hornet.c" Then ;KONAMI $name_list = "KONAMI.lst" roms_mov() ElseIf $emulator_name = "tgtpanic.c" Then ;KONAMI $name_list = "KONAMI.lst" roms_mov() ElseIf $emulator_name = "nemesis.c" Then ;KONAMI $name_list = "KONAMI.lst" roms_mov() ElseIf $emulator_name = "twin16.c" Then ;KONAMI $name_list = "KONAMI.lst" roms_mov() ElseIf $emulator_name = "xmen.c" Then ;KONAMI $name_list = "KONAMI.lst" roms_mov() ElseIf $emulator_name = "xexex.c" Then ;KONAMI $name_list = "KONAMI.lst" roms_mov() ElseIf $emulator_name = "asterix.c" Then ;KONAMI $name_list = "KONAMI.lst" roms_mov() ElseIf $emulator_name = "gijoe.c" Then ;KONAMI $name_list = "KONAMI.lst" roms_mov() ElseIf $emulator_name = "moo.c" Then ;KONAMI $name_list = "KONAMI.lst" roms_mov() ElseIf $emulator_name = "mystwarr.c" Then ;KONAMI $name_list = "KONAMI.lst" roms_mov() ElseIf $emulator_name = "djmain.c" Then ;KONAMI $name_list = "KONAMI.lst" roms_mov() ElseIf $emulator_name = "sfbonus.c" Then ;CASINO $name_list = "CASINO.lst" roms_mov() ElseIf $emulator_name = "highvdeo.c" Then ;CASINO $name_list = "CASINO.lst" roms_mov() ElseIf $emulator_name = "goldnpkr.c" Then ;CASINO $name_list = "CASINO.lst" roms_mov() ElseIf $emulator_name = "goldstar.c" Then ;CASINO $name_list = "CASINO.lst" roms_mov() ElseIf $emulator_name = "aristmk4.c" Then ;CASINO $name_list = "CASINO.lst" roms_mov() ElseIf $emulator_name = "chsuper.c" Then ;CASINO $name_list = "CASINO.lst" roms_mov() ElseIf $emulator_name = "multfish.c" Then ;CASINO $name_list = "CASINO.lst" roms_mov() ElseIf $emulator_name = "bfm_sc5.c" Then ;CASINO $name_list = "CASINO.lst" roms_mov() ElseIf $emulator_name = "jpmimpct.c" Then ;CASINO $name_list = "CASINO.lst" roms_mov() ElseIf $emulator_name = "peplus.c" Then ;CASINO $name_list = "CASINO.lst" roms_mov() ElseIf $emulator_name = "calomega.c" Then ;CASINO $name_list = "CASINO.lst" roms_mov() ElseIf $emulator_name = "jackie.c" Then ;CASINO $name_list = "CASINO.lst" roms_mov() ElseIf $emulator_name = "nbmj8891.c" Then ;ADULTO $name_list = "ADULTO.lst" roms_mov() ElseIf $emulator_name = "nbmj8688.c" Then ;ADULTO $name_list = "ADULTO.lst" roms_mov() ElseIf $emulator_name = "galpani2.c" Then ;ADULTO $name_list = "ADULTO.lst" roms_mov() ElseIf $emulator_name = "splash.c" Then ;ADULTO $name_list = "ADULTO.lst" roms_mov() ElseIf $emulator_name = "paradise.c" Then ;ADULTO $name_list = "ADULTO.lst" roms_mov() ElseIf $emulator_name = "cabaret.c" Then ;ADULTO $name_list = "ADULTO.lst" roms_mov() ElseIf $emulator_name = "nbmj9195.c" Then ;ADULTO $name_list = "ADULTO.lst" roms_mov() ElseIf $emulator_name = "playmark.c" Then ;ADULTO $name_list = "ADULTO.lst" roms_mov() ElseIf $emulator_name = "expro02.c" Then ;ADULTO $name_list = "ADULTO.lst" roms_mov() ElseIf $emulator_name = "funybubl.c" Then ;ADULTO $name_list = "ADULTO.lst" roms_mov() ElseIf $emulator_name = "galpanic.c" Then ;ADULTO $name_list = "ADULTO.lst" roms_mov() ElseIf $emulator_name = "suprnova.c" Then ;ADULTO $name_list = "ADULTO.lst" roms_mov() ElseIf $emulator_name = "galspnbl.c" Then ;ADULTO $name_list = "ADULTO.lst" roms_mov() ElseIf $emulator_name = "gumbo.c" Then ;ADULTO $name_list = "ADULTO.lst" roms_mov() ElseIf $emulator_name = "dynax.c" Then ;ADULTO $name_list = "ADULTO.lst" roms_mov() ElseIf $emulator_name = "cubocd32.c" Then ;ADULTO $name_list = "ADULTO.lst" roms_mov() ElseIf $emulator_name = "deniam.c" Then ;ADULTO $name_list = "ADULTO.lst" roms_mov() ElseIf $emulator_name = "jangou.c" Then ;ADULTO $name_list = "ADULTO.lst" roms_mov() ElseIf $emulator_name = "twins.c" Then ;ADULTO $name_list = "ADULTO.lst" roms_mov() ElseIf $emulator_name = "zerozone.c" Then ;ADULTO $name_list = "ADULTO.lst" roms_mov() ElseIf $emulator_name = "niyanpai.c" Then ;ADULTO $name_list = "ADULTO.lst" roms_mov() ElseIf $emulator_name = $emulator_c_cps1 Then $name_list = $emulator_n_cps1 roms_mov() ElseIf $emulator_name = $emulator_c_cps2 Then $name_list = $emulator_n_cps2 roms_mov() ElseIf $emulator_name = $emulator_c_cps3 Then $name_list = $emulator_n_cps3 roms_mov() Else $name_list = "AIT-ARCADE.lst" roms_mov() EndIf Case GUICtrlRead($Radio2) = $GUI_CHECKED $name_list = "AIT-ARCADE.lst" roms_mov() Case GUICtrlRead($Radio3) = $GUI_CHECKED ; NEO GEO $option_select = "neodrvr.c" $name_list = "NEOGEO.lst" If $option_select = $emulator_name Then roms_mov() EndIf Case GUICtrlRead($Radio4) = $GUI_CHECKED ; SEGA If $emulator_name = "model1.c" Then ;SEGA3D $name_list = "SEGA3D.lst" roms_mov() ElseIf $emulator_name = "model2.c" Then ;SEGA3D $name_list = "SEGA3D.lst" roms_mov() ElseIf $emulator_name = "model3.c" Then ;SEGA3D $name_list = "SEGA3D.lst" roms_mov() ElseIf $emulator_name = "triforce.c" Then ;SEGA3D $name_list = "SEGA3D.lst" roms_mov() Else EndIf Case GUICtrlRead($Radio5) = $GUI_CHECKED ; NAOMI $name_list = $emulator_n_cps1 Case GUICtrlRead($Radio6) = $GUI_CHECKED ; OPTIONAL 1 $option_select = $emulator_c_cps1 $name_list = $emulator_n_cps1 If $option_select = $emulator_name Then roms_mov() EndIf Case GUICtrlRead($Radio7) = $GUI_CHECKED ; OPTIONAL 2 $option_select = $emulator_c_cps2 $name_list = $emulator_n_cps2 If $option_select = $emulator_name Then roms_mov() EndIf Case GUICtrlRead($Radio8) = $GUI_CHECKED ; OPTIONAL 3 $option_select = $emulator_c_cps3 $name_list = $emulator_n_cps3 If $option_select = $emulator_name Then roms_mov() EndIf EndSelect EndFunc ;==>read_options Func export_lst() ;-----------------------Load XML--------------------------- $oXML = ObjCreate("Microsoft.XMLDOM") ;$oXML.loadXML(ClipGet()) $oXML.load(@ScriptDir & "\AIT-ARDLIST\ait-arcade.xml") ;$oXML.setProperty("SelectionLanguage", "XPath") $total_disk = $oXML.selectNodes("/mame/game/disk").length $total_ = $oXML.selectNodes("/mame/game").length ;MsgBox(4096, "M.A.M.E All sets >>"& $total_) ;MsgBox(0,"M.A.M.E All sets >>","M.A.M.E All sets >>"&$total_disk) ProgressOn("M.A.M.E List by Team AIT-ARCADE", "M.A.M.E All sets >>" & $total_, "0 percent") Sleep(1000) $in_bar = 0 ;ConsoleWrite("!-----------------------------------------------------------------------------------" & @LF & @LF) For $oDirectoryRef In $oXML.selectNodes("/mame/game") $check_bios = "no" $disk_chds = "NODISK" $name_rom = $oDirectoryRef.getAttribute("name") $emulator_name = $oDirectoryRef.getAttribute("sourcefile") $check_bios = $oDirectoryRef.getAttribute("isbios") $description_val = XML_GetTextNodeValue($oDirectoryRef.selectSingleNode("description")) $manufacturer_val = XML_GetTextNodeValue($oDirectoryRef.selectSingleNode("manufacturer")) $year_val = XML_GetTextNodeValue($oDirectoryRef.selectSingleNode("year")) ; ConsoleWrite("> Game Rom: " & $name_rom &" Emulador Name: "& $emulator_name &" E uma Bios: "& $check_bios & @LF) ;For $Description_ In $oDirectoryRef.selectNodes("description") ;$description_val = $Description_.Text() $game_edit = StringReplace($description_val, '(', '') $game_edit1 = StringReplace($game_edit, ')', '') $game_edit2 = StringReplace($game_edit1, '[', '') $game_edit3 = StringReplace($game_edit2, ']', '') $game_edit4 = StringReplace($game_edit3, '"', '') $game_edit5 = StringReplace($game_edit4, "'", "") $game_edit6 = StringReplace($game_edit5, " ", " ") $description_val = $game_edit6 $in_bar = $in_bar + 1 $totallines = $total_ $UpdatePercentDone = ($in_bar / $totallines) * 100 ProgressSet($UpdatePercentDone, $description_val, "M.A.M.E All sets:" & $in_bar & '/' & $totallines) ; ConsoleWrite("Descricao: " & $description_val & @LF) ;For $year_ In $oDirectoryRef.selectNodes("year") ;$year_val = $year_.Text() ; ConsoleWrite("Ano: " & $year_val & @LF) ;For $manufacturer_ In $oDirectoryRef.selectNodes("manufacturer") ;$manufacturer_val = $manufacturer_.Text() ; ConsoleWrite("Manufacturer: " & $manufacturer_val & @LF) #cs For $select_disk_chd In $oDirectoryRef.selectNodes("./disk") $disk_chds = $oDirectoryRef.getAttribute("name") ;MsgBox(0,"CHD >>"&$disk_chds) ;$disk_chds = XML_GetTextNodeValue2 ( $select_disk_chd.selectNodes("/mame/game/disk/name")) ;Next ;Next Next #ce For $select_disk_chd In $oDirectoryRef.selectNodes("./disk") $disk_chds = $select_disk_chd.getAttribute("name") ;MsgBox(0,"CHD >>"&$disk_chds) ;$disk_chds = XML_GetTextNodeValue2 ( $select_disk_chd.selectNodes("/mame/game/disk/name")) ;Next ;Next Next read_options() ; GRAVA LISTA ;Sleep(5) ; pra nao pesar o processador todo ; ConsoleWrite(@LF) ; ConsoleWrite(@LF) Next ;ConsoleWrite("!-----------------------------------------------------------------------------------" & @LF & @LF) ProgressSet(100, "Done", "Complete") Sleep(3000) ProgressOff() $oXML = 0 EndFunc ;==>export_lst Func XML_GetTextNodeValue($oCallersNode) ;by jdelaney If Not IsObj($oCallersNode) Then ;Return SetError(1,0,-1) $oCallersNode = "NO_DATA_AA" Return $oCallersNode EndIf If $oCallersNode.childNodes < 1 Then $oCallersNode = "NO_DATA_AA" Return $oCallersNode Else For $oChild In $oCallersNode.childNodes ;by jdelaney If Int($oChild.nodeType) == 3 Then Return $oChild.nodeValue EndIf Next EndIf EndFunc ;==>XML_GetTextNodeValue Func roms_mov() If $rom_year_in > "" Then year_rom() ElseIf $rom_year_out > "" Then year_rom() Else ;MsgBox(4096, "", "MOVEU GERAL " & @CRLF & $rom_year_in & @CRLF & $rom_year_out & @CRLF & "=" & $year_val) mov_files() EndIf EndFunc ;==>roms_mov Func year_rom() If $year_val <= $rom_year_out And $year_val >= $rom_year_in Then mov_files() Else EndIf EndFunc ;==>year_rom Func mov_files() ; If DirGetSize($dir_roms & "\EMU") = -1 Then ;DirCreate($dir_roms & "\EMU") ;EndIf Local $dir_roms_c $dir_roms_c = StringReplace($name_list, '.lst', '') $dir_roms_c = "Emulators\" & $dir_roms_c & "\Roms" If DirGetSize($dir_roms & "\" & $dir_roms_c) = -1 Then DirCreate($dir_roms & "\" & $dir_roms_c) EndIf If DirGetSize(@ScriptDir & $romsdw) = -1 Then DirCreate(@ScriptDir & $romsdw) EndIf If DirGetSize(@ScriptDir & $romsok) = -1 Then DirCreate(@ScriptDir & $romsok) EndIf If DirGetSize(@ScriptDir & $chd) = -1 Then DirCreate(@ScriptDir & $chd) EndIf If DirGetSize(@ScriptDir & $biosrom) = -1 Then DirCreate(@ScriptDir & $biosrom) EndIf If $read_check = 1 Then If $check_bios = "yes" Then ; valida se uma bios e grava na pasta cooreta de emuladores If FileExists($dir_roms & "\" & $name_rom & ".zip") Then FileWriteLine(@ScriptDir & $biosrom & 'BIOS_OK.txt', 'Bios (name ' & $name_rom & ' description "' & $description_val & '" manufacturer "' & $manufacturer_val & '" year ' & $year_val & ')') Filecopy($dir_roms & "\" & $name_rom & ".zip", $dir_roms & "\" & $dir_roms_c & "\" & $name_rom & ".zip",$dir_roms & '\Emulators\' & $name_rom & ".zip") FileMove($dir_roms & "\" & $name_rom & ".zip", $dir_roms & "\" & $dir_roms_c & "\" & $name_rom & ".zip") ;Sleep(5) make_designe_flyer() write_list() _ReduceMemory() Else FileWriteLine(@ScriptDir & $biosrom & 'BIOS_DW.txt', 'Bios (name ' & $name_rom & ' description "' & $description_val & '" manufacturer "' & $manufacturer_val & '" year ' & $year_val & ')') EndIf EndIf If FileExists($dir_roms & "\" & $name_rom & ".zip") Then make_designe_flyer() write_list() _ReduceMemory() FileMove($dir_roms & "\" & $name_rom & ".zip", $dir_roms & "\" & $dir_roms_c & "\" & $name_rom & ".zip") FileWriteLine(@ScriptDir & $romsok & 'ROMS_OK_' & $name_list, 'game (name ' & $name_rom & ' description "' & $description_val & '" manufacturer "' & $manufacturer_val & '" year ' & $year_val & ')') ;Sleep(5) Else FileWriteLine(@ScriptDir & $romsdw & 'ROMS_DW_' & $name_list, 'game (name ' & $name_rom & ' description "' & $description_val & '" manufacturer "' & $manufacturer_val & '" year ' & $year_val & ')') EndIf $disk_chds2 = $disk_chds & ".chd" ;FileWriteLine($sFldr1 & '\CHD_FULL_OK.lst', 'game "' & $name_rom & '" DISK CHD "' & $disk_chds & '" description "' & $description_val & '" manufacturer "' & $manufacturer_val) If FileExists($dir_roms & "\" & $disk_chds2) Then FileWriteLine(@ScriptDir & $chd & '\CHD_OK.txt', 'game "' & $name_rom & '" DISK CHD "' & $disk_chds & '" description "' & $description_val & '" manufacturer "' & $manufacturer_val) FileMove($dir_roms & "\" & $disk_chds2, $dir_roms & "\" & $dir_roms_c & "\" & $disk_chds2) ;Sleep(5) ElseIf $disk_chds = "NODISK" Then Else FileWriteLine(@ScriptDir & $chd & '\CHD_DW.txt', 'game "' & $name_rom & '" DISK CHD "' & $disk_chds & '" description "' & $description_val & '" manufacturer "' & $manufacturer_val) EndIf Else ; Senao estiver marcado If $check_bios = "yes" Then ; valida se uma bios e grava na pasta cooreta de emuladores If FileExists($dir_roms & "\" & $name_rom & ".zip") Then FileWriteLine(@ScriptDir & $biosrom & 'BIOS_OK.txt', 'Bios (name ' & $name_rom & ' description "' & $description_val & '" manufacturer "' & $manufacturer_val & '" year ' & $year_val & ')') Else FileWriteLine(@ScriptDir & $biosrom & 'BIOS_DW.txt', 'Bios (name ' & $name_rom & ' description "' & $description_val & '" manufacturer "' & $manufacturer_val & '" year ' & $year_val & ')') EndIf EndIf If FileExists($dir_roms & "\" & $name_rom & ".zip") Then FileWriteLine(@ScriptDir & $romsok & 'ROMS_OK_' & $name_list, 'game (name ' & $name_rom & ' description "' & $description_val & '" manufacturer "' & $manufacturer_val & '" year ' & $year_val & ')') Else FileWriteLine(@ScriptDir & $romsdw & 'ROMS_DW_' & $name_list, 'game (name ' & $name_rom & ' description "' & $description_val & '" manufacturer "' & $manufacturer_val & '" year ' & $year_val & ')') EndIf $disk_chds2 = $disk_chds & ".chd" ;FileWriteLine($sFldr1 & '\CHD_FULL_OK.lst', 'game "' & $name_rom & '" DISK CHD "' & $disk_chds & '" description "' & $description_val & '" manufacturer "' & $manufacturer_val) If FileExists($dir_roms & "\" & $disk_chds2) Then FileWriteLine(@ScriptDir & $chd & '\CHD_OK.txt', 'game "' & $name_rom & '" DISK CHD "' & $disk_chds & '" description "' & $description_val & '" manufacturer "' & $manufacturer_val) ElseIf $disk_chds = "NODISK" Then ;NAO FAZ NADA Else FileWriteLine(@ScriptDir & $chd & '\CHD_DW.txt', 'game "' & $name_rom & '" DISK CHD "' & $disk_chds & '" description "' & $description_val & '" manufacturer "' & $manufacturer_val) EndIf EndIf ;FileWriteLine($sFldr1 &'\'&$name_list,'game (name '&$name_rom&' description "'&$description_val&'" manufacturer "'&$manufacturer_val&'" year '&$year_val&')') EndFunc ;==>mov_files Func make_designe_flyer() If $_makeflyer = 1 Then ;$name_list, 'game (name ' & $name_rom & ' description "' & $description_val & '" manufacturer "' & $manufacturer_val & '" year ' & $year_val & ')') ;Global $_makeflyer, $fld_snap, $fld_flyer, $fld_cabinets, $fld_title Global $hBitmap2, $hBitmap3, $hBitmap, $Folder_name If Not FileExists($fld_flyer & '\' & $name_rom & '.png') Then $ART_RANDOM = Random(1, 11, 1) If FileExists(@ScriptDir & '\AIT-ARDLIST\flyer_sample_'&$ART_RANDOM&'.png') Then ;$hBitmap = Load_BMP_From_Mem(fileread(@ScriptDir & '\AIT-ARDLIST\flyer_sample_'&$ART_RANDOM&'.png')) $hBitmap = _GDIPlus_ImageLoadFromFile(@ScriptDir & '\AIT-ARDLIST\flyer_sample_'&$ART_RANDOM&'.png') Else ;$hBitmap = Load_BMP_From_Mem(fileread(@ScriptDir & '\AIT-ARDLIST\flyer_sample.png')) $hBitmap = _GDIPlus_ImageLoadFromFile(@ScriptDir & '\AIT-ARDLIST\flyer_sample.png') EndIf Local $hBitmap_Scaled = _GDIPlus_ImageResize($hBitmap, 850, 1384) ;resize image $hGraphics = _GDIPlus_ImageGetGraphicsContext($hBitmap_Scaled) ;$hBitmap2 = _GDIPlus_ImageLoadFromFile((@ScriptDir & '\'&$name_rom& '.png') $fabricante_conver = StringReplace($manufacturer_val, '/', '-') $fabricante_conver = StringReplace($fabricante_conver, '<', '') $fabricante_conver = StringReplace($fabricante_conver, '>', '') $fabricante_conver = StringReplace($fabricante_conver, '\', '') $fabricante_conver = StringReplace($fabricante_conver, '�', '') $fabricante_conver = StringReplace($fabricante_conver, '?', '') If FileExists(@ScriptDir & '\AIT-ARDLIST\logo\' & $fabricante_conver & '.png') Then ;$hBitmap3 = Load_BMP_From_Mem(fileread(@ScriptDir & '\AIT-ARDLIST\logo\' & $fabricante_conver & '.png')) $hBitmap3 = _GDIPlus_ImageLoadFromFile(@ScriptDir & '\AIT-ARDLIST\logo\' & $fabricante_conver & '.png') $hBitmap2 = _GDIPlus_ImageResize($hBitmap3, 500, 200) _GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap2, 150, 1000) ; Canto inferior esquerdo Else Local $hBmpCtxt = _GDIPlus_ImageGetGraphicsContext($hBitmap_Scaled) ;get the graphics context of the bitmap _GDIPlus_GraphicsSetSmoothingMode($hBmpCtxt, $GDIP_SMOOTHINGMODE_HIGHQUALITY) ;_GDIPlus_GraphicsClear($hBmpCtxt, 0xFFFFFFFF) ;clear bitmap with color white _GDIPlus_GraphicsDrawString($hBmpCtxt, $manufacturer_val, 50, 1000, "Arial", 24) ;draw some text to the bit EndIf If FileExists($fld_title & '\' & $name_rom & '.png') Then ;$hBitmap3 = Load_BMP_From_Mem(fileread($fld_title & '\' & $name_rom & '.png')) $hBitmap3 = _GDIPlus_ImageLoadFromFile($fld_title & '\' & $name_rom & '.png') $hBitmap2 = _GDIPlus_ImageResize($hBitmap3, 550, 290) _GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap2, 150, 20) Local $hBmpCtxt = _GDIPlus_ImageGetGraphicsContext($hBitmap_Scaled) ;get the graphics context of the bitmap _GDIPlus_GraphicsSetSmoothingMode($hBmpCtxt, $GDIP_SMOOTHINGMODE_HIGHQUALITY) ;_GDIPlus_GraphicsClear($hBmpCtxt, 0xFFFFFFFF) ;clear bitmap with color white _GDIPlus_GraphicsDrawString($hBmpCtxt, $description_val, 70, 315, "Arial", 20) ;draw some text to the bit Else Local $hBmpCtxt = _GDIPlus_ImageGetGraphicsContext($hBitmap_Scaled) ;get the graphics context of the bitmap _GDIPlus_GraphicsSetSmoothingMode($hBmpCtxt, $GDIP_SMOOTHINGMODE_HIGHQUALITY) ;_GDIPlus_GraphicsClear($hBmpCtxt, 0xFFFFFFFF) ;clear bitmap with color white _GDIPlus_GraphicsDrawString($hBmpCtxt, $description_val, 50, 50, "Arial", 24) ;draw some text to the bit EndIf If FileExists($fld_snap & '\' & $name_rom & '.png') Then ;$hBitmap3 = Load_BMP_From_Mem(fileread($fld_snap & '\' & $name_rom & '.png')) $hBitmap3 = _GDIPlus_ImageLoadFromFile($fld_snap & '\' & $name_rom & '.png') $hBitmap2 = _GDIPlus_ImageResize($hBitmap3, 750, 500) _GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap2, 50, 350) Else ;$hBitmap3 = Load_BMP_From_Mem(fileread(@ScriptDir & '\AIT-ARDLIST\unknown_snap.png')) $hBitmap3 = _GDIPlus_ImageLoadFromFile(@ScriptDir & '\AIT-ARDLIST\unknown_snap.png') $hBitmap2 = _GDIPlus_ImageResize($hBitmap3, 750, 500) _GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap2, 50, 350) EndIf Local $hBmpCtxt = _GDIPlus_ImageGetGraphicsContext($hBitmap_Scaled) ;get the graphics context of the bitmap _GDIPlus_GraphicsSetSmoothingMode($hBmpCtxt, $GDIP_SMOOTHINGMODE_HIGHQUALITY) ;_GDIPlus_GraphicsClear($hBmpCtxt, 0xFFFFFFFF) ;clear bitmap with color white _GDIPlus_GraphicsDrawString($hBmpCtxt, $year_val, 580, 1200, "Arial", 62) ;draw some text to the bitmap Local $hBmpCtxt = _GDIPlus_ImageGetGraphicsContext($hBitmap_Scaled) ;get the graphics context of the bitmap _GDIPlus_GraphicsSetSmoothingMode($hBmpCtxt, $GDIP_SMOOTHINGMODE_HIGHQUALITY) ;_GDIPlus_GraphicsClear($hBmpCtxt, 0xFFFFFFFF) ;clear bitmap with color white _GDIPlus_GraphicsDrawString($hBmpCtxt, "AIT-ARCADE List V1.0", 50, 1300, "Arial", 14) ;draw some text to the bitmap ;Local $hBitmap_Scaled = _GDIPlus_ImageResize($hBitmap, $S_iX, $S_iY) ;resize image ;$hGraphics = _GDIPlus_ImageGetGraphicsContext($hBitmap_Scaled) ;--------------------------------- Salva a imagem ------------------------------------------------------ _GDIPlus_ImageSaveToFile($hBitmap_Scaled, $fld_flyer & '\' & $name_rom & '.png') ;cleanup resources _GDIPlus_GraphicsDispose($hGraphics) _GDIPlus_GraphicsDispose($hBmpCtxt) _GDIPlus_BitmapDispose($hBitmap) _GDIPlus_BitmapDispose($hBmpCtxt) _GDIPlus_BitmapDispose($hBitmap_Scaled) $hBitmap2 = 0 $hBitmap3 = 0 $hBitmap = 0 $hBitmap_Scaled = 0 $hBmpCtxt = 0 EndIf EndIf EndFunc ;==>make_designe_flyer Func write_list() If DirGetSize(@ScriptDir & $listgames) = -1 Then DirCreate(@ScriptDir & $listgames) EndIf $dir_roms_GAME = StringReplace($name_list, '.lst', '') FileWriteLine($dir_roms & '\Emulators\' & $dir_roms_GAME & '\' & $name_list, 'game (name ' & $name_rom & ' description "' & $description_val & '" manufacturer "' & $manufacturer_val & '" year ' & $year_val & ')') FileWriteLine(@ScriptDir & $listgames & '\' & $name_list, 'game (name ' & $name_rom & ' description "' & $description_val & '" manufacturer "' & $manufacturer_val & '" year ' & $year_val & ')') EndFunc ;==>write_list Func _ReduceMemory4() ; $DLL, $ResName ; THX to Progandy, Zedna Local $hInstance, $InfoBlock, $GlobalMemoryBlock, $MemoryPointer, $ResSize, $hData, $pData, $pStream, $dll2, $pBitmap $hInstance = DllCall('kernel32.dll', 'int', 'GetCurrentProcessId') $InfoBlock = DllCall("kernel32.dll", "int", "FindResourceA", "int", $hInstance[0], "str", "GUI1", "long", 10) $ResSize = DllCall("kernel32.dll", "dword", "SizeofResource", "int", $hInstance[0], "int", $InfoBlock[0]) $GlobalMemoryBlock = DllCall("kernel32.dll", "int", "LoadResource", "int", $hInstance[0], "int", $InfoBlock[0]) $MemoryPointer = DllCall("kernel32.dll", "int", "LockResource", "int", $GlobalMemoryBlock[0]) DllCall("Kernel32.dll", "int", "FreeLibrary", "str", $hInstance[0]) $hData = _MemGlobalAlloc($ResSize[0], 2) $pData = _MemGlobalLock($hData) _MemMoveMemory($MemoryPointer[0], $pData, $ResSize[0]) _MemGlobalUnlock($hData) ;$pStream = DllCall("ole32.dll", "int", "CreateStreamOnHGlobal", "int", $hData, "long", 1, "Int*", 0) ;$pBitmap = DllCall($ghGDIPDll, "int", "GdipCreateBitmapFromStream", "ptr", $pStream[3], "int*", 0) ;$DLL = DllStructCreate("Uint", $pStream[3]) ;$dll2 = DllStructCreate("uInt", DllStructGetData($DLL, 1) + 8) ;DllCall("", "UInt", DllStructGetData($dll2, 1), "UInt", $pStream[3]) ;_WinAPI_DeleteObject($pStream[3]) ;$pStream[3] = 0 _MemGlobalFree($hData) ;Return $pBitmap[2] EndFunc ;==>_ResourceLoadImage Func _ReduceMemory() $memory1 = MemGetStats() Do ReduceMemory_() $list = ProcessList() For $i=1 To $list[0][0] ReduceMemory_($list[$i][1]) Next $memory2 = $memory1 $memory1 = MemGetStats ( ) Until $memory1[2] >= $memory2[2] EndFunc Func ReduceMemory_($i_PID = -1) If $i_PID <> -1 Then Local $ai_Handle = DllCall("kernel32.dll", 'int', 'OpenProcess', 'int', 0x1f0fff, 'int', False, 'int', $i_PID) Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', $ai_Handle[0]) DllCall('kernel32.dll', 'int', 'CloseHandle', 'int', $ai_Handle[0]) Else Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', -1) EndIf Return $ai_Return[0] EndFunc;==> ReduceMemory() ;====================================================================================== ; Function Name: Load_BMP_From_Mem ; Description: Loads a image which is saved as a binary string and converts it to a bitmap or hbitmap ; ; Parameters: $mem_image: the binary string which contains any valid image which is supported by GDI+ ; Optional: $hHBITMAP: if false a bitmap will be created, if true a hbitmap will be created ; ; Remark: hbitmap format is used generally for GUI internal images ; ; Requirement(s): GDIPlus.au3, Memory.au3 ; Return Value(s): Success: handle to bitmap or hbitmap, Error: 0 ; Error codes: 1: $mem_image is not a binary string ; ; Author(s): UEZ ; Additional Code: thanks to progandy for the MemGlobalAlloc and tVARIANT lines ; Version: v0.95 Build 2011-06-11 Beta ;======================================================================================= Func Load_BMP_From_Mem($mem_image, $hHBITMAP = False) If Not IsBinary($mem_image) Then Return SetError(1, 0, 0) Local $declared = True If Not $__g_hGDIPDll Then _GDIPlus_Startup() $declared = False EndIf Local Const $memBitmap = Binary($mem_image) ;load image saved in variable (memory) and convert it to binary Local Const $len = BinaryLen($memBitmap) ;get length of image Local Const $hData = _MemGlobalAlloc($len, $GMEM_MOVEABLE) ;allocates movable memory ($GMEM_MOVEABLE = 0x0002) Local Const $pData = _MemGlobalLock($hData) ;translate the handle into a pointer Local $tMem = DllStructCreate("byte[" & $len & "]", $pData) ;create struct DllStructSetData($tMem, 1, $memBitmap) ;fill struct with image data _MemGlobalUnlock($hData) ;decrements the lock count associated with a memory object that was allocated with GMEM_MOVEABLE Local $hStream = DllCall("ole32.dll", "int", "CreateStreamOnHGlobal", "handle", $pData, "int", True, "ptr*", 0) $hStream = $hStream[3] Local $hBitmap = DllCall($__g_hGDIPDll, "uint", "GdipCreateBitmapFromStream", "ptr", $hStream, "int*", 0) ;Creates a Bitmap object based on an IStream COM interface $hBitmap = $hBitmap[2] Local Const $tVARIANT = DllStructCreate("word vt;word r1;word r2;word r3;ptr data; ptr") DllCall("oleaut32.dll", "long", "DispCallFunc", "ptr", $hStream, "dword", 8 + 8 * @AutoItX64, _ "dword", 4, "dword", 23, "dword", 0, "ptr", 0, "ptr", 0, "ptr", DllStructGetPtr($tVARIANT)) ;release memory from $hStream to avoid memory leak $tMem = 0 If $hHBITMAP Then Local Const $hHBmp = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap) _GDIPlus_BitmapDispose($hBitmap) If Not $declared Then _GDIPlus_Shutdown() Return $hHBmp EndIf If Not $declared Then _GDIPlus_Shutdown() Return $hBitmap EndFunc ;==>Load_BMP_From_Mem