code:
//写法思路来自biubiu影院，海阔视界，xpath筛选。
{
    //规则名
    "title": "",
    //作者
    "author": "认真の雪",
    //请求UA
    "UserAgent":"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36",
    //分类链接起始页码,禁止负数于合含小数点。
   "homeContent":"1",
     "firstpage": "1",
    //分类链接,{cateId}是分类，{catePg}是页码,第一页没有页码的可以这样写 第二页链接[firstPage=第一页的链接]
    "class_url": "https://wnvod.net/vodshow/{cateId}-{area}--{class}-----{catePg}---{year}.html",
    //https://wnvod.net/vodtype/{cateId}-{catePg}.html

    //分类名
    "class_name": "电视剧&电影&动漫&综艺",
    //分类名替换词，替换词中有英文&的用两个中文＆＆代替
    "class_value": "2&1&4&3",
    //筛选数据，json格式，参考xpath的筛选写法
    "filterdata": {
      "1": [
            {
                "key": "class",
                "name": "类型",
                "value": [
                    {
                        "n": "全部",
                        "v": ""
                    },
                    {
                        "n": "动作",
                        "v": "动作"
                    },
                    {
                        "n": "喜剧",
                        "v": "喜剧"
                    },
                    {
                        "n": "爱情",
                        "v": "爱情"
                    },
                    {
                        "n": "科幻",
                        "v": "科幻"
                    },
                    {
                        "n": "恐怖",
                        "v": "恐怖"
                    },
                    {
                        "n": "剧情",
                        "v": "剧情"
                    },
                    {
                        "n": "战争",
                        "v": "战争"
                    },
                    {
                        "n": "犯罪",
                        "v": "犯罪"
                    },
                    {
                        "n": "冒险",
                        "v": "冒险"
                    },
                    {
                        "n": "悬疑",
                        "v": "悬疑"
                    },
                    {
                        "n": "奇幻",
                        "v": "奇幻"
                    }
                ]
            },
            {
                "key": "year",
                "name": "年份",
                "value": [
                    {
                        "n": "全部",
                        "v": ""
                    },
                    {
                        "n": "2022",
                        "v": "2022"
                    },
                    {
                        "n": "2021",
                        "v": "2021"
                    },
                    {
                        "n": "2020",
                        "v": "2020"
                    },
                    {
                        "n": "2019",
                        "v": "2019"
                    },
                    {
                        "n": "2018",
                        "v": "2018"
                    },
                    {
                        "n": "2017",
                        "v": "2017"
                    },
                    {
                        "n": "2016",
                        "v": "2016"
                    },
                    {
                        "n": "2015",
                        "v": "2015"
                    },
                    {
                        "n": "2014",
                        "v": "2014"
                    },
                    {
                        "n": "2013",
                        "v": "2013"
                    },
                    {
                        "n": "2012",
                        "v": "2012"
                    },
                    {
                        "n": "2011",
                        "v": "2011"
                    },
                    {
                        "n": "2010",
                        "v": "2010"
                    },
                    {
                        "n": "2009",
                        "v": "2009"
                    },
                    {
                        "n": "2008",
                        "v": "2008"
                    },
                    {
                        "n": "2007",
                        "v": "2007"
                    },
                    {
                        "n": "2006",
                        "v": "2006"
                    },
                    {
                        "n": "2005",
                        "v": "2005"
                    },
                    {
                        "n": "2004",
                        "v": "2004"
                    },
                    {
                        "n": "2003",
                        "v": "2003"
                    },
                    {
                        "n": "2002",
                        "v": "2002"
                    },
                    {
                        "n": "2001",
                        "v": "2001"
                    },
                    {
                        "n": "2000",
                        "v": "2000"
                    }
                ]
            }
         ],     "2": [
            {
                "key": "class",
                "name": "类型",
                "value": [
                    {
                        "n": "全部",
                        "v": ""
                    },
                    {
                        "n": "国产",
                        "v": "国产"
                    },
                    {
                        "n": "港台",
                        "v": "港台"
                    },
                    {
                        "n": "日韩剧",
                        "v": "日韩"
                    },
                    {
                        "n": "欧美剧",
                        "v": "欧美"
                    }

                ]
            },
            {
                "key": "year",
                "name": "年份",
                "value": [
                    {
                        "n": "全部",
                        "v": ""
                    },
                    {
                        "n": "2022",
                        "v": "2022"
                    },
                    {
                        "n": "2021",
                        "v": "2021"
                    },
                    {
                        "n": "2020",
                        "v": "2020"
                    },
                    {
                        "n": "2019",
                        "v": "2019"
                    },
                    {
                        "n": "2018",
                        "v": "2018"
                    },
                    {
                        "n": "2017",
                        "v": "2017"
                    },
                    {
                        "n": "2016",
                        "v": "2016"
                    },
                    {
                        "n": "2015",
                        "v": "2015"
                    },
                    {
                        "n": "2014",
                        "v": "2014"
                    },
                    {
                        "n": "2013",
                        "v": "2013"
                    },
                    {
                        "n": "2012",
                        "v": "2012"
                    },
                    {
                        "n": "2011",
                        "v": "2011"
                    },
                    {
                        "n": "2010",
                        "v": "2010"
                    },
                    {
                        "n": "2009",
                        "v": "2009"
                    },
                    {
                        "n": "2008",
                        "v": "2008"
                    },
                    {
                        "n": "2007",
                        "v": "2007"
                    },
                    {
                        "n": "2006",
                        "v": "2006"
                    },
                    {
                        "n": "2005",
                        "v": "2005"
                    },
                    {
                        "n": "2004",
                        "v": "2004"
                    },
                    {
                        "n": "2003",
                        "v": "2003"
                    },
                    {
                        "n": "2002",
                        "v": "2002"
                    },
                    {
                        "n": "2001",
                        "v": "2001"
                    },
                    {
                        "n": "2000",
                        "v": "2000"
                    }
                ]
            }
        ],
            "3": [
            {
                "key": "area",
                "name": "地区",
                "value": [
                    {
                        "n": "全部",
                        "v": ""
                    },
                    {
                        "n": "内地",
                        "v": "内地"
                    },
                    {
                        "n": "港台",
                        "v": "港台"
                    },
                    {
                        "n": "日韩",
                        "v": "日韩"
                    },
                    {
                        "n": "欧美",
                        "v": "欧美"
                    }
               ]
            },
            {
                "key": "year",
                "name": "年份",
                "value": [
                    {
                        "n": "全部",
                        "v": ""
                    },
                    {
                        "n": "2022",
                        "v": "2022"
                    },
                    {
                        "n": "2021",
                        "v": "2021"
                    },
                    {
                        "n": "2020",
                        "v": "2020"
                    },
                    {
                        "n": "2019",
                        "v": "2019"
                    },
                    {
                        "n": "2018",
                        "v": "2018"
                    },
                    {
                        "n": "2017",
                        "v": "2017"
                    },
                    {
                        "n": "2016",
                        "v": "2016"
                    },
                    {
                        "n": "2015",
                        "v": "2015"
                    },
                    {
                        "n": "2014",
                        "v": "2014"
                    },
                    {
                        "n": "2013",
                        "v": "2013"
                    },
                    {
                        "n": "2012",
                        "v": "2012"
                    },
                    {
                        "n": "2011",
                        "v": "2011"
                    },
                    {
                        "n": "2010",
                        "v": "2010"
                    },
                    {
                        "n": "2009",
                        "v": "2009"
                    },
                    {
                        "n": "2008",
                        "v": "2008"
                    },
                    {
                        "n": "2007",
                        "v": "2007"
                    },
                    {
                        "n": "2006",
                        "v": "2006"
                    },
                    {
                        "n": "2005",
                        "v": "2005"
                    },
                    {
                        "n": "2004",
                        "v": "2004"
                    },
                    {
                        "n": "2003",
                        "v": "2003"
                    },
                    {
                        "n": "2002",
                        "v": "2002"
                    },
                    {
                        "n": "2001",
                        "v": "2001"
                    },
                    {
                        "n": "2000",
                        "v": "2000"
                    }
                ]
            }
        ],
              "4": [
            {
                "key": "area",
                "name": "地区",
                "value": [
                    {
                        "n": "全部",
                        "v": ""
                    },
                    {
                        "n": "内地",
                        "v": "内地"
                    },
                    {
                        "n": "日本",
                        "v": "日本"
                    },
                    {
                        "n": "美国",
                        "v": "美国"
                    }
               ]
            },
            {
                "key": "year",
                "name": "年份",
                "value": [
                    {
                        "n": "全部",
                        "v": ""
                    },
                    {
                        "n": "2022",
                        "v": "2022"
                    },
                    {
                        "n": "2021",
                        "v": "2021"
                    },
                    {
                        "n": "2020",
                        "v": "2020"
                    },
                    {
                        "n": "2019",
                        "v": "2019"
                    },
                    {
                        "n": "2018",
                        "v": "2018"
                    },
                    {
                        "n": "2017",
                        "v": "2017"
                    },
                    {
                        "n": "2016",
                        "v": "2016"
                    },
                    {
                        "n": "2015",
                        "v": "2015"
                    },
                    {
                        "n": "2014",
                        "v": "2014"
                    },
                    {
                        "n": "2013",
                        "v": "2013"
                    },
                    {
                        "n": "2012",
                        "v": "2012"
                    },
                    {
                        "n": "2011",
                        "v": "2011"
                    },
                    {
                        "n": "2010",
                        "v": "2010"
                    },
                    {
                        "n": "2009",
                        "v": "2009"
                    },
                    {
                        "n": "2008",
                        "v": "2008"
                    },
                    {
                        "n": "2007",
                        "v": "2007"
                    },
                    {
                        "n": "2006",
                        "v": "2006"
                    },
                    {
                        "n": "2005",
                        "v": "2005"
                    },
                    {
                        "n": "2004",
                        "v": "2004"
                    },
                    {
                        "n": "2003",
                        "v": "2003"
                    },
                    {
                        "n": "2002",
                        "v": "2002"
                    },
                    {
                        "n": "2001",
                        "v": "2001"
                    },
                    {
                        "n": "2000",
                        "v": "2000"
                    }
                ]
            }
        ]

},
    //分类是否二次截取
    "cat_YN_twice": "0",
    //分类二次截取前
    "cat_twice_pre": "",
    //分类二次截取后
    "cat_twice_suf": "",
    //分类数组截取前
    "cat_arr_pre": "class=\"myui-vodlist__thumb",
    //分类数组截取后
    "cat_arr_suf": "
",
    //分类截取片单图片，截取前缀&&截取后缀
    "cat_pic": "data-original=\"&&\"",
    //分类截取片单标题，截取前缀&&截取后缀
    "cat_title": "title=\"&&\"",
    //分类截取片单副标题，截取前缀&&截取后缀
    "cat_subtitle": "&&",
    //分类截取片单链接，截取前缀&&截取后缀
    "cat_url": "href=\"&&\"",
    //分类片单链接补前缀
    "cat_prefix": "https://wnvod.net",
    //分类片单链接补后缀
    "cat_suffix": "",

    //搜索链接，搜索关键字用{wd}表示，post请求的最后面加;post
    "search_url": "https://wnvod.net/index.php/ajax/suggest?mid=1&wd={wd}&limit=50",
    //搜索模式,0为json搜索，只支持列表在list数组里的，其它为网页截取。
    "search_mode": "0",
    //json片单图片
   "jsonpic": "pic",
    //json片单标题
   "jsonname": "name",
    //json片单链接
   "jsonid": "id",
    //json片单副标题，这个很少有，预留着
   "jsonstitle":"",
    //搜索是否二次截取
    "sea_YN_twice": "0",
    //搜索二次截取前
    "sea_twice_pre": "空",
    //搜索二次截取后
    "sea_twice_suf": "空",
    //搜索数组前缀
    "sea_arr_pre": "",
    //搜索数组后缀
    "sea_arr_suf": "",
    //搜索片单图片，截取前缀&&截取后缀
    "sea_pic": "",
    //搜索片单标题，截取前缀&&截取后缀
    "sea_title": "",
    //搜索片单链接，截取前缀&&截取后缀
    "sea_url": "",
    //搜索片单链接补前缀
    "search_prefix": "https://wnvod.net/voddetail/",
    //搜索片单链接补后缀，这个一般json搜索的需要
    "search_suffix": ".html",
    //搜索副标题，截取前缀&&截取后缀
    "sea_subtitle": "",

    //片单链接是否直接播放，1是直接播放。
    "force_play": "0",
    //直接播放链接补前缀
    "play_prefix": "",
    //直接播放链接补后缀，设置为#isVideo=true#可强制识别为视频链接
    "play_suffix": "",
    //直接播放链接设置请求头，每一组用#分开
    "play_header": "",

    //演员数据，截取前缀&&截取后缀
    "proj_actor": "主演：&&
",
    //简介内容，截取前缀&&截取后缀
    "proj_plot": "class=\"sketch content\">&&",
    //线路是否二次截取
    "tab_YN_twice": "0",
    //线路二次截取前
    "tab_twice_pre": "",
    //线路二次截取后
    "tab_twice_suf": "",
    //线路截取数组前
    "tab_arr_pre": "#playlist",
    //线路截取数组后
    "tab_arr_suf": "
",
    //线路标题，截取前缀&&截取后缀
    "tab_title": "\">&&",

    //列表是否二次截取
    "list_YN_twice": "0",
    //列表二次截取前
    "list_twice_pre": "",
    //列表二次截取后
    "list_twice_suf": "",
    //列表数组截取前
    "list_arr_pre": "class=\"myui-content__list sort-list clearfix",
    //列表数组截取后
    "list_arr_suf": "
",
    //集数是否二次截取
    "epi_YN_twice": "0",
    //集数二次截取前
    "epi_twice_pre": "空",
    //集数二次截取后
    "epi_twice_suf": "空",
    //集数数组截取前
    "epi_arr_pre": "",
    //集数标题，截取前缀&&截取后缀
    "epi_title": ">&&<",
    //集数链接，截取前缀&&截取后缀
    "epi_url": "href=\"&&\"",
    //集数链接补前缀
    "epiurl_prefix": "https://wnvod.net",
    //集数链接补后缀
    "epiurl_suffix": "",
    "Anal_MacPlayer":"0"
}


code:
//写法思路来海阔视界，xpath筛选。
//本文档为完整模板，实际情况可按规则写法删去不需要的。
{
    //规则名
    "title": "宝仙HD",
    //作者
    "author": "香雅情",
    //请求头UA,键名$键值，每一组用#分开，不填则默认okhttp/3.12.11，可填MOBILE_UA或PC_UA使用内置的手机版或电脑版UA
    //习惯查看手机源码写建议用手机版UA，习惯查看PC版源码写建议用电脑版UA
    "Headers":"User-Agent$PC_UA",
    //图片需要代理
    "PicNeedProxy":"0",
    //是否开启获取首页数据，0关闭，1开启
    "homeContent":"1",
    //首页推荐数据获取链接
    "rcmed_url": "https://webdillo.com",
    //首页列表数组截取。
    "home_arr_rule": "body&&.vodlist",
    //首页片单列表数组定位。
    "hmepi_arr_rule": "li",
    //首页片单信息jsoup与正则截取写法切换，只作用于html网页，1为jsoup写法(默认)，0为正则截取写法
    "home_is_jsoup":"1",
    //下面这六个首页数据如果不填将调用分类那截取的配置（片单写法需一致）。
    //首页片单标题
    "home_title": ".vodlist_title&&Text",
    //首页片单链接
    "home_url": "a&&href",
    //首页片单图片，支持自定义图片链接
    "home_pic": ".lazyload&&data-original",
    //首页片单副标题
    "home_subtitle":".text_right||.vodlist_sub&&Text",
    //首页片单链接补前缀
    "home_prefix": "https://webdillo.com",
    //首页片单链接补后缀
    "home_suffix": "",
    //分类链接起始页码,禁止负数和含小数点。
    "firstpage": "1",
    //分类链接,{cateId}是分类，{catePg}是页码,第一页没有页码的可以这样写 第二页链接[firstPage=第一页的链接]
    "class_url": "https://webdillo.com/index.php/vod/show/id/{cateId}/page/{catePg}.html",
    //分类名，分类1&分类2&分类3
    "class_name": "电影&电视剧&综艺&动漫",
    //分类名替换词，替换词1&替换词2&替换词3，替换词包含英文&的用两个中文＆＆代替，示例：＆＆id=0&＆＆id=1
    "class_value": "1&2&3&4",
    //筛选数据，json格式，参考官方仓库的筛选写法
    "filterdata":{},
    //分类页面截取数据模式，0为json，1为普通网页。
    "cat_mode": "1",

    //分类列表数组定位，最多支持3层，能力有限，不是所有页面都能支持
    "cat_arr_rule": ".vodlist&&li",
    "cat_is_jsoup":"1",
    "cat_subtitle":".pic_text&&Text",
    //搜索专属请求头UA
    "SHeaders":"User-Agent$PC_UA",
    //搜索链接，搜索关键字用{wd}表示，post请求的最后面加;post
    //POST链接示例 http://www.lezhutv.com/index.php?m=vod-search;post
    "search_url": "https://webdillo.com/index.php/ajax/suggest?mid=1&wd={wd}&limit=30",
    //POST搜索body，填写搜索关键字的键值，一般常见的是searchword和wd，不是POST搜索的可留空或删除。
    "sea_PtBody":"",
    //搜索模式,0为json搜索，只支持列表在list数组里的，其它为网页截取。
    "search_mode": "0",

    //搜索json列表数组定位，不填默认内置list，最多支持3层，能力有限，不是所有页面都能支持。
    "sea_arr_rule": "list",
    //搜索json片单图片
    "sea_pic": "pic",
    //搜索json片单标题
    "sea_title": "name",
    //搜索json片单链接
    "sea_url": "id",
    //json片单副标题，这个很少有，预留着
    "sea_subtitle":"",

    //搜索片单链接补前缀
    "search_prefix": "https://webdillo.com/index.php/vod/detail/id/",
    //搜索片单链接补后缀，这个一般json搜索的需要
    "search_suffix": ".html",

    //片单链接是否直接播放，0否，1分类片单链接直接播放，2详情选集链接直接播放。
    //设置成直接播放后，后面3个参数请注意该留空的请务必留空。
    "force_play": "0",
    //直接播放链接补前缀
    "play_prefix": "https://live.52sf.ga/huya/",
    //直接播放链接补后缀，设置为#isVideo=true#可强制识别为视频链接
    "play_suffix": "#isVideo=true#",
    //直接播放链接设置请求头，只对直链视频有效，每一组用#分开
    "play_header": "authority$ku.peizq.online#Referer$https://play.peizq.online",

    "proj_is_jsoup":"0",
    //演员数据，截取前缀&&截取后缀
    "proj_actor": "主演：&&
",
    //简介内容，截取前缀&&截取后缀
    "proj_plot": "简介：&&
",

    //线路截取区域，如果不需要请把tab_title或tab_arr_pre置空或者全部不要填。
    //线路截取数组前
    "tab_arr_rule": "#bofy&&.title_nav&&li",
    //线路标题，截取前缀&&截取后缀
    "tab_title": "li&&title",

    //列表数组截取前，必须
    "list_arr_rule": "body&&.content_playlist",
    //集数数组截取前，必须
    "epi_arr_rule": "li",
    //集数标题，截取前缀&&截取后缀
    "epi_title": "a&&Text",
    //集数链接，截取前缀&&截取后缀
    "epi_url": "a&&href",
    //集数链接补前缀
    "epiurl_prefix": "https://webdillo.com",
    //集数链接补后缀
    "epiurl_suffix": "",

    //下面几个参数请勿乱用。否则可能会有副作用。
    //分析网页源码中有

repo_name: qazwsx/hhh

license: unknown


title: 影视工场

author: 香雅情

class_name: 电影&电视剧&综艺&动漫

cat_twice_pre: class="myui-vodlist clearfix

cat_twice_suf: class="myui-page

cat_pic: original="&&"

cat_title: title="&&"

cat_subtitle: text-right">&&<

jsonpic: pic

jsonname: name

jsonid: id

sea_twice_suf: </ul

sea_arr_pre: class="thumb

sea_arr_suf: class="detail

sea_pic: data-original="&&"

sea_title: title="&&"

sea_subtitle: text-right">&&<

play_prefix: 空

play_suffix: 空

play_header: 空

proj_actor: 空

proj_plot: <span class="data"&&

tab_twice_pre: <ul class="nav nav-tabs

tab_arr_pre: <a

list_twice_pre: 空

list_twice_suf: 空

list_arr_pre: id="playlist

epi_twice_pre: 空

epi_twice_suf: 空

epi_arr_pre: <a


code:
{
    //规则名
    "title": "电影港",
    //作者
    "author": "香雅情",
    //请求头UA,键名$键值，每一组用#分开，不填则默认okhttp/3.12.11，可填MOBILE_UA或PC_UA使用内置的手机版或电脑版UA
    //多个请求头参数写法示例，"User-Agent$PC_UA#Referer$http://ww.baidu.com#Cookie$ser=ok",每一组用#分开。
    //习惯查看手机源码写建议用手机版UA，习惯查看PC版源码写建议用电脑版UA
    "Headers":"PC_UA",
    //网页编码格式默认UTF-8编码，UTF-8，GBK，GB2312
    "Coding_format":"gb2312",
    //图片是否需要代理
    "PicNeedProxy":"0",
    //是否开启获取首页数据，0关闭，1开启
    "homeContent":"0",
    //分类链接起始页码,禁止负数和含小数点。
    "firstpage": "1",
    //分类链接,{cateId}是分类，{catePg}是页码,第一页没有页码的可以这样写 第二页链接[firstPage=第一页的链接]
    "class_url": "https://www.dygang.cc/{cateId}/index_{catePg}.htm[firstPage=https://www.dygang.cc/{cateId}/index.htm]",
    //分类名，分类1&分类2&分类3
    "class_name": "最新电影&经典高清&国配电影&经典港片&国剧&日韩剧&美剧&综艺&动漫&纪录片&高清原盘&4K高清区&3D电影&电影专题",
    //分类名替换词，替换词1&替换词2&替换词3，替换词包含英文&的用两个中文＆＆代替，示例：＆＆id=0&＆＆id=1
    "class_value": "ys&bd&gy&gp&dsj&dsj1&yx&zy&dmq&jilupian&1080p&4K&3d&dyzt",
    //筛选数据，json格式，参考xpath的筛选写法
    "filterdata":{},

    //分类页面截取数据模式，0为json，其它数字为普通网页。
    "cat_mode": "1",
    //分类列表数组定位，最多支持3层，能力有限，不是所有页面都能支持
    "cat_arr_rule": "body&&table[width=388]",
    //分类片单信息jsoup与xb截取写法切换，只作用于html网页，1为jsoup写法(默认)，0为xb写法
    "cat_is_jsoup":"1",
    //分类片单标题
    "cat_title": "img&&alt",
    //分类片单链接
    "cat_url": "a&&href",
    //分类片单图片，支持自定义图片链接
    "cat_pic": "img&&src",
    //分类片单副标题
    "cat_subtitle":"[align=center]&&Text",
    //分类片单链接补前缀
    "cat_prefix": "https://www.dygang.cc",
    //分类片单链接补后缀
    "cat_suffix": "",

    //搜索请求头参数,不填则默认okhttp/3.12.11，可填MOBILE_UA或PC_UA使用内置的手机版或电脑版UA
    //多个请求头参数写法示例，键名$键值，每一组用#分开。"User-Agent$PC_UA#Referer$http://ww.baidu.com#Cookie$ser=ok"。
    "SHeaders":"User-Agent$PC_UA",
    //搜索链接，搜索关键字用{wd}表示，post请求的最后面加;post
    //POST链接示例 http://www.lezhutv.com/index.php?m=vod-search;post
    "search_url": "",
    //POST搜索body，填写搜索关键字的键值，一般常见的是searchword和wd，不是POST搜索的可留空或删除。
    "sea_PtBody":"",

    //搜索截取模式,0为json搜索，只支持列表在list数组里的，其它数字为网页截取。
    "search_mode": "0",
    //搜索列表数组定位，不填默认内置list，最多支持3层，能力有限，不是所有页面都能支持。
    "sea_arr_rule": "",
    //搜索片单信息jsoup与xb截取写法切换，只作用于html网页，1为jsoup写法(默认)，0为xb写法
    "sea_is_jsoup":"1",
    //搜索片单图片，支持自定义图片链接
    "sea_pic": "",
    //搜索片单标题
    "sea_title": "",
    //搜索片单链接
    "sea_url": "",
    //搜索片单副标题
    "sea_subtitle":"",
    //搜索片单链接补前缀
    "search_prefix": "",
    //搜索片单链接补后缀，这个一般json搜索的需要
    "search_suffix": "",

    //片单链接是否直接播放，0否，1分类片单链接直接播放，2详情选集链接直接播放。
    //设置成直接播放后，后面3个参数请注意该留空的请务必留空。
    "force_play": "0",
    //直接播放链接补前缀
    "play_prefix": "",
    //直接播放链接补后缀，设置为#isVideo=true#可强制识别为视频链接
    "play_suffix": "",
    //直接播放链接设置请求头，只对直链视频有效，每一组用#分开
    "play_header": "",

    //项目信息jsoup与xb截取写法切换，1为jsoup写法(默认)，0为xb写法
    "proj_is_jsoup":"0",
    //类型数据，截取前缀&&截取后缀
    "proj_cate": "",
    //年代数据，截取前缀&&截取后缀
    "proj_year": "",
    //地区数据，截取前缀&&截取后缀
    "proj_area": "",
    //演员数据，截取前缀&&截取后缀
    "proj_actor": "演　　员&&</",
    //简介内容，截取前缀&&截取后缀
    "proj_plot": "简　　介&&</",

    //线路截取区域，如果不需要请把tab_title或tab_arr_rule置空或者全部不要填。
    //线路截取数组
    "tab_arr_rule": "#dede_content",
    //线路标题，截取前缀&&截取后缀
    "tab_title": "strong&&Text",

    //列表数组截取，必须
    "list_arr_rule": "#dede_content",
    //集数数组截取，必须
    "epi_arr_rule": "table&&[href*=magnet]",
    //集数标题，截取前缀&&截取后缀
    "epi_title": "a&&Text",
    //集数链接，截取前缀&&截取后缀
    "epi_url": "a&&href",
    //选集是否反转显示
    "epi_reverse": "0",
    //集数链接补前缀
    "epiurl_prefix": "",
    //集数链接补后缀
    "epiurl_suffix": "",

    //下面几个参数请勿乱用。否则可能会有副作用。
    //分析网页源码中有<script type="text/javascript">var player_aaaa={"flag":"play","encrypt这种源码的链接解析
    //如果网页源码里没有这种请设置为0
    "Anal_MacPlayer":"0",
    //是否开启手动嗅探，只对网页嗅探有效，0否，1是
    "ManualSniffer":"0",
    //手动嗅探视频链接关键字，每个用#隔开
    "VideoFormat":".mp4#.m3u8#.flv",
    //手动嗅探视频链接过滤关键词,每个用#隔开
    "VideoFilter":".html#=http"
}


code:
{
    //规则名
    "规则名": "电影牛",
    //作者
    "规则作者": "香雅情",

    "请求头参数":"PC_UA",
    //网页编码格式默认UTF-8编码，UTF-8，GBK，GB2312
    "网页编码格式":"UTF-8",
    //图片是否需要代理
    "图片是否需要代理":"0",
    //是否开启获取首页数据，0关闭，1开启
    "是否开启获取首页数据":"1",
    //分类链接起始页码,禁止负数和含小数点。
    "分类起始页码": "1",
    //分类链接,{cateId}是分类，{catePg}是页码,第一页没有页码的可以这样写 第二页链接[firstPage=第一页的链接]
        "分类链接": "https://www.dianyingn.com/vodshow/{cateId}-{area}-{by}------{catePg}---{year}.html",
    //分类名，分类1&分类2&分类3
    "分类名称": "电影&电视剧&综艺&动漫",
    //分类名替换词，替换词1&替换词2&替换词3，替换词包含英文&的用两个中文＆＆代替，示例：＆＆id=0&＆＆id=1
    "分类名称替换词": "dianying&dianshiju&zongyi&dongman",
    //筛选数据，json格式，参考xpath的筛选写法
    "筛选数据":{},

    //分类页面截取数据模式，0为json，其它数字为普通网页。
    "分类截取模式": "1",
    //分类列表数组定位，最多支持3层，能力有限，不是所有页面都能支持
    "分类列表数组规则": ".fed-list-info&&li",
    //分类片单信息jsoup与正则截取写法切换，只作用于html网页，1为jsoup写法(默认)，0为正则截取写法
    "分类片单是否Jsoup写法":"1",
    //分类片单标题
    "分类片单标题": "a,1&&Text",
    //分类片单链接
    "分类片单链接": "a&&href",
    //分类片单图片，支持自定义图片链接
    "分类片单图片": ".fed-part-2by3&&data-original",
    //分类片单副标题
    "分类片单副标题":".fed-list-remarks&&Text",
    //分类片单链接补前缀
    "分类片单链接加前缀": "https://www.dianyingn.com",
    //分类片单链接补后缀
    "分类片单链接加后缀": "",

    //搜索请求头参数,不填则默认okhttp/3.12.11，可填MOBILE_UA或PC_UA使用内置的手机版或电脑版UA
    //多个请求头参数写法示例，键名$键值，每一组用#分开。"User-Agent$PC_UA#Referer$http://ww.baidu.com#Cookie$ser=ok"。
    "搜索请求头参数":"User-Agent$PC_UA",
    //搜索链接，搜索关键字用{wd}表示，post请求的最后面加;post
    //POST链接示例 http://www.lezhutv.com/index.php?m=vod-search;post
    "搜索链接": "https://www.dianyingn.com/index.php/ajax/suggest?mid=1&wd={wd}&limit=30",
    //POST搜索Params参数，只支持utf-8编码的请求，填写搜索关键字的键值，一般常见的是searchword和wd，不是POST搜索的可留空或删除。
    "POST请求数据":"wd={wd}&search=",

    //搜索截取模式,0为json搜索，只支持列表在list数组里的，其它数字为网页截取。
    "搜索截取模式": "0",
    //搜索列表数组定位，不填默认内置list，最多支持3层，能力有限，不是所有页面都能支持。
    "搜索列表数组规则": "list",
    //搜索片单信息jsoup与正则截取写法切换，只作用于html网页，1为jsoup写法(默认)，0为正则截取写法
    "搜索片单是否Jsoup写法":"1",
    //搜索片单图片，支持自定义图片链接
    "搜索片单图片": "pic",
    //搜索片单标题
    "搜索片单标题": "name",
    //搜索片单链接
    "搜索片单链接": "id",
    //搜索片单副标题
    "搜索片单副标题":"",
    //搜索片单链接补前缀
    "搜索片单链接加前缀": "https://www.dianyingn.com/voddetail/",
    //搜索片单链接补后缀，这个一般json搜索的需要
    "搜索片单链接加后缀": ".html",

    //片单链接是否直接播放，0否，1分类片单链接直接播放，2详情选集链接直接播放。
    //设置成直接播放后，后面3个参数请注意该留空的请务必留空。
    "链接是否直接播放": "0",
    //直接播放链接补前缀
    "直接播放链接加前缀": "https://live.52sf.ga/huya/",
    //直接播放链接补后缀，设置为#isVideo=true#可强制识别为视频链接
    "直接播放链接加后缀": "#isVideo=true#",
    //直接播放链接设置请求头，只对直链视频有效，每一组用#分开
    "直接播放直链视频请求头": "authority$ku.peizq.online#Referer$https://play.peizq.online",

    //项目信息jsoup与正则截取写法切换，1为jsoup写法(默认)，0为正则截取写法
    "详情是否Jsoup写法":"1",
    //类型数据，截取前缀&&截取后缀
    "类型详情": ".fed-col-xs12&&li,2&&Text!类型",
    //年代数据，截取前缀&&截取后缀
    "年代详情": ".fed-col-xs12&&li,4&&Text!年代",
    //地区数据，截取前缀&&截取后缀
    "地区详情": ".fed-col-xs12&&li,3&&Text!地区",
    //演员数据，截取前缀&&截取后缀
    "演员详情": ".fed-col-xs12&&li,0&&Text!主演",
    //简介内容，截取前缀&&截取后缀
    "简介详情": ".fed-part-esan&&div&&Text!简介",

    //线路截取区域，如果不需要请把tab_title或tab_arr_rule置空或者全部不要填。
    //线路截取数组
    "线路列表数组规则": ".fed-drop-tops&&li",
    //线路标题，截取前缀&&截取后缀
    "线路标题": "a&&Text",

    //列表数组截取，必须
    "播放列表数组规则": "body&&.fed-play-item",
    //集数数组截取，必须
    "选集列表数组规则": ".fed-btns-info",
    //集数标题与链接jsoup与正则截取写法切换，1为jsoup写法(默认)，0为正则截取写法
    "选集标题链接是否Jsoup写法":"1",
    //集数标题，截取前缀&&截取后缀
    "选集标题": "a&&Text",
    //集数链接，截取前缀&&截取后缀
    "选集链接": "a&&href",
    //选集是否反转显示
    "是否反转选集序列": "0",
    //集数链接补前缀
    "选集链接加前缀": "https://www.dianyingn.com",
    //集数链接补后缀
    "选集链接加后缀": "",

    //下面几个参数请勿乱用。否则可能会有副作用。
    //分析网页源码中有<script type="text/javascript">var player_aaaa={"flag":"play","encrypt这种源码的链接解析
    //如果网页源码里没有这种请设置为0
    "分析MacPlayer":"0",
    //是否开启手动嗅探，只对网页嗅探有效，0否，1是
    "是否开启手动嗅探":"0",
    //手动嗅探视频链接关键词，每个用#隔开
    "手动嗅探视频链接关键词":".mp4#.m3u8#.flv",
    //手动嗅探视频链接过滤关键词,每个用#隔开
    "手动嗅探视频链接过滤词":".html#=http"
}


code:
{
    //规则名
    "title": "https://www.nkvod.com/",
    //作者
    "author": "sm",
    //请求头UA,键名$键值，每一组用#分开，不填则默认okhttp/3.12.11，可填MOBILE_UA或PC_UA使用内置的手机版或电脑版UA
    //多个请求头参数写法示例，"User-Agent$PC_UA#Referer$http://ww.baidu.com#Cookie$ser=ok",每一组用#分开。
    //习惯查看手机源码写建议用手机版UA，习惯查看PC版源码写建议用电脑版UA
    "Headers":"MOBILE_UA",
    //图片是否需要代理
    "PicNeedProxy":"0",
    //是否开启获取首页数据，0关闭，1开启
    "homeContent":"1",
    //首页推荐数据获取链接
    "rcmed_url": "https://www.nkvod.com",
    //首页列表数组截取。
    "home_arr_rule": "body&&.module-item",
    //首页片单列表数组定位。
    "hmepi_arr_rule": "a",
    //首页片单信息jsoup与正则截取写法切换，只作用于html网页，1为jsoup写法(默认)，0为正则截取写法
    "home_is_jsoup":"1",

    //分类链接起始页码,禁止负数和含小数点。
    "firstpage": "1",
    //分类链接,{cateId}是分类，{catePg}是页码,第一页没有页码的可以这样写 第二页链接[firstPage=第一页的链接]
    "class_url": "https://www.nkvod.com/show/{cateId}--------{catePg}---.html",
    //分类名，分类1&分类2&分类3
    "class_name": "电影&电视剧&动漫&综艺",
    //分类名替换词，替换词1&替换词2&替换词3，替换词包含英文&的用两个中文＆＆代替，示例：＆＆id=0&＆＆id=1
    "class_value": "1&2&4&3",
    //筛选数据，json格式，参考xpath的筛选写法
    "filterdata":{},

    //分类页面截取数据模式，0为json，其它数字为普通网页。
    "cat_mode": "1",
    //分类列表数组定位，最多支持3层，能力有限，不是所有页面都能支持
    "cat_arr_rule": ".module&&a:has(.module-item-pic)",
    //分类片单信息jsoup与xb截取写法切换，只作用于html网页，1为jsoup写法(默认)，0为xb写法
    "cat_is_jsoup":"1",
    //分类片单标题
    "cat_title": "a&&title",
    //分类片单链接
    "cat_url": "a&&href",
    //分类片单图片，支持自定义图片链接
    "cat_pic": ".lazy&&data-original",
    //分类片单副标题
    "cat_subtitle":".module-item-note&&Text",
    //分类片单链接补前缀
    "cat_prefix": "https://www.nkvod.com",
    //分类片单链接补后缀
    "cat_suffix": "",

    //搜索请求头参数,不填则默认okhttp/3.12.11，可填MOBILE_UA或PC_UA使用内置的手机版或电脑版UA
    //多个请求头参数写法示例，键名$键值，每一组用#分开。"User-Agent$PC_UA#Referer$http://ww.baidu.com#Cookie$ser=ok"。
    "SHeaders":"User-Agent$PC_UA",
    //搜索链接，搜索关键字用{wd}表示，post请求的最后面加;post
    //POST链接示例 http://www.lezhutv.com/index.php?m=vod-search;post
    "search_url": "https://www.nkvod.com/index.php/ajax/suggest?mid=1&wd={wd}&limit=50",
    //POST搜索body，填写搜索关键字的键值，一般常见的是searchword和wd，不是POST搜索的可留空或删除。
    "sea_PtBody":"wd={wd}&search=",

    //搜索截取模式,0为json搜索，只支持列表在list数组里的，其它数字为网页截取。
    "search_mode": "0",
    //搜索列表数组定位，不填默认内置list，最多支持3层，能力有限，不是所有页面都能支持。
    "sea_arr_rule": "list",
    //搜索片单信息jsoup与xb截取写法切换，只作用于html网页，1为jsoup写法(默认)，0为xb写法
    "sea_is_jsoup":"1",
    //搜索片单图片，支持自定义图片链接
    "sea_pic": "pic",
    //搜索片单标题
    "sea_title": "name",
    //搜索片单链接
    "sea_url": "id",
    //搜索片单副标题
    "sea_subtitle":"",
    //搜索片单链接补前缀
    "search_prefix": "https://www.nkvod.com/detail/",
    //搜索片单链接补后缀，这个一般json搜索的需要
    "search_suffix": ".html",

    //片单链接是否直接播放，0否，1分类片单链接直接播放，2详情选集链接直接播放。
    //设置成直接播放后，后面3个参数请注意该留空的请务必留空。
    "force_play": "0",
    //直接播放链接补前缀
    "play_prefix": "https://live.52sf.ga/huya/",
    //直接播放链接补后缀，设置为#isVideo=true#可强制识别为视频链接
    "play_suffix": "#isVideo=true#",
    //直接播放链接设置请求头，只对直链视频有效，每一组用#分开
    "play_header": "authority$ku.peizq.online#Referer$https://play.peizq.online",

    //项目信息jsoup与xb截取写法切换，1为jsoup写法(默认)，0为xb写法
    "proj_is_jsoup":"0",
    //类型数据，截取前缀&&截取后缀
    "proj_cate": "",
    //年代数据，截取前缀&&截取后缀
    "proj_year": "",
    //地区数据，截取前缀&&截取后缀
    "proj_area": "",
    //演员数据，截取前缀&&截取后缀
    "proj_actor": "主演：&&
",
    //简介内容，截取前缀&&截取后缀
    "proj_plot": "style=\"line-height: 20px;&&
",

    //线路截取区域，如果不需要请把tab_title或tab_arr_rule置空或者全部不要填。
    //线路截取数组
    "tab_arr_rule": ".module-tab-items-box&&div",
    //线路标题，截取前缀&&截取后缀
    "tab_title": "span&&Text",

    //列表数组截取，必须
    "list_arr_rule": "body&&.module-list",
    //集数数组截取，必须
    "epi_arr_rule": "a",
    //集数标题，截取前缀&&截取后缀
    "epi_title": "a&&Text",
    //集数链接，截取前缀&&截取后缀
    "epi_url": "a&&href",
    //选集是否反转显示
    "epi_reverse": "0",
    //集数链接补前缀
    "epiurl_prefix": "https://www.nkvod.com",
    //集数链接补后缀
    "epiurl_suffix": "",

    //下面几个参数请勿乱用。否则可能会有副作用。
    //分析网页源码中有


code:
muban.首图.二级.tabs = '.myui-panel__head.bottom-line h3';
var rule = Object.assign(muban.首图,{
title:'TV云播',
host:'http://www.tvyb03.com',
url:'/vod/type/id/fyclass/page/fypage.html',
class_parse:'.item.nav-list.clearfix li:gt(0):lt(5);a&&Text;a&&href;/(\\d+).html',
推荐:'.myui-panel_bd.clearfix;.myui-vodlist.clearfix&&li;a&&title;a&&data-original;.background-color&&Text;a&&href',
 一级:'.myui-vodlist li;a&&title;a&&data-original;.pic-tag-top&&Text;a&&href',
});


code:
var rule={
    title:'子子影视',
    host:'https://www.ziziys.com',
    // homeUrl:'/',
    url:'/list/fyclass/page/fypage.html',
    searchUrl:'/vsearch/--.html?wd=**',
    searchable:2,//是否启用全局搜索,
    quickSearch:0,//是否启用快速搜索,
    filterable:0,//是否启用分类筛选,
    headers:{//网站的请求头,完整支持所有的,常带ua和cookies
        'User-Agent':'MOBILE_UA',
        // "Cookie": "searchneed=ok"
    },
    class_name:'电影&动漫&国产剧&美剧&日韩剧',
    class_url:'1&3&13&14&15',
    lazy:'',
    limit:6,
    推荐:'.module-item;a&&title;.lazyloaded&&data-src;.module-item-text&&Text;a&&href',
    double:true, // 推荐内容是否双层定位
    一级:'.module-item;a&&title;.lazyloaded&&data-src;.module-item-text&&Text;a&&href',
    二级:{"title":"h1&&Text;.video-info-header&&Text","img":".lazyload&&data-src","desc":".video-info-items:eq(1)&&Text;.video-info-items:eq(2)&&Text;.video-info-items:eq(3)&&Text","content":".vod_content&&Text","tabs":".module-tab-item","lists":".sort-item:eq(#id) a"},
    搜索:'.module-items;.lazyload&&alt;.lazyload&&data-src;.tag-link&&Text;*',
}


code:
var rule = {
    title:'素白白',
    host:'https://www.subaibaiys.com',
    url:'/fyclass/page/fypage',
    searchUrl:'/grabble?q=**',
    searchable:2,//是否启用全局搜索,
    quickSearch:0,//是否启用快速搜索,
    filterable:0,//是否启用分类筛选,
    headers:{
        'User-Agent':'UC_UA',
        // "Cookie": ""
    },
    class_parse:'.navlist&&li;a&&Text;a&&href;com/(.*)',
	cate_exclude:'公告留言',
    play_parse:true,
    lazy:'',
    limit:6,
    推荐:'.mi_cont&&ul;li;h3&&Text;img&&data-original;.jidi&&Text;a&&href',
    double:true, // 推荐内容是否双层定位
    一级:'.mi_cont&&ul&&li;h3&&Text;img&&data-original;.jidi&&Text;a&&href',
    二级:{"title":"h1&&Text;.moviedteail_list&&li&&Text","img":".dyimg&&img&&src","desc":".moviedteail_list&&li:eq(1)&&Text;.moviedteail_list&&li:eq(2)&&Text;.moviedteail_list&&li:eq(3)&&Text;.moviedteail_list&&li:eq(4)&&Text","content":".yp_context&&Text","tabs":".mi_paly_box .ypxingq_t","lists":".paly_list_btn:eq(#id) a"},
    搜索:'.mi_cont&&ul&&li;h3&&Text;.lazy&&data-original;.jidi&&Text;a&&href',
}


group: redirect

rule: cdn-tos obj/tos-cn

🐎🐎神马(爬虫)

key: Smdyy

🚈🚈快看(爬虫)

key: Kuaikan

🏃♂🏃♂追剧(爬虫)

key: Zjdr

🍺🍺图图(爬虫)

key: AppTT

☁☁棉花(爬虫)

key: 棉花影视

🍁🍁蓝光(爬虫)

key: Lgyy

👾👾奥特(爬虫)

key: Auete

☁☁Lib(爬虫)

key: Lib

🚀🚀七七(爬虫)

key: Kunyu

🏠🏠在线(爬虫)

key: Zxzj

🧃🧃可乐(爬虫)

key: Cokemv

🧚♂🏃♂厂长(爬虫)

key: Czsapp

🍎🍎苹果(爬虫)

key: LiteApple

📖📖听书(爬虫)

key: Tbook

🥰🥰爱看(爬虫)

key: IKan

🎞🎞简影(爬虫)

key: 简影影视

🌳🌳奇优(H规则)

key: qiyou

👎🏻👎🏻低端(爬虫)

key: Ddys

click: ddys.tv;#vjsp > button

📹📹念影(爬虫)

key: 念影

🍙🍙饭团(爬虫)

key: 饭团

➕➕双十(爬虫)

key: 双十

📰📰纸条(网盘)

key: Gitcafe

🏝🏝小宝(爬虫)

key: Xiaoh

key: BT

🅱🇩哔滴(爬虫)

key: bdys

💯💯资源(阿里搜索)

key: Zhaozy

💯💯易搜(阿里搜索)易搜

key: YiSo

💯💯盘搜(阿里搜索)

key: AliPS

💯💯AList

key: AList

⚽🏀JRS看球(H规则)

key: JRS看球网

🕹🕹胖虎影视(H规则)

key: 胖虎

🕹🕹奈非影视(H规则)

key: 奈非

🕹🕹剧白影视(H规则)

key: 剧白

🕹🕹素白影视(H规则)

key: 素白白

🕹🕹皮泡影视(H规则)

key: 皮皮泡

🕹🕹草民影视(H规则)

key: 草民影视

🕹🕹追剧影视(H规则)

key: 追剧达人

🕹🕹奥特影视(H规则)

key: au

🕹🕹看看影视(H规则)

key: kankan

🕹🕹盛世影视(H规则)

key: 盛世

🕹🕹石榴影视(H规则)

key: 石榴

🕹🕹往往影视(H规则)

key: 往往影视

🕹🕹特播影视(H规则)

key: 特播

🕹🕹看一看影(H规则)

key: 看一看

🕹🕹追剧兔兔(H规则)

key: 追剧兔兔

🕹🕹纽约影院(H规则)

key: 纽约影院

🕹🕹假片库网(H规则)

key: pianku

🕹🕹艾菲影院(H规则)

key: aifei

🕹🕹影视之光(H规则)

key: 影视之光

🕹🕹视觉影视(H规则)

key: 新视觉

🕹🕹多多资源(资源站)

key: 多多

😻😻小猫资源(资源站)

key: XMM

🕹🕹白嫖联盟(H规则)

key: 白嫖者联盟

解析聚合

url: Demo

Json并发

url: Parallel

Json轮询

url: Sequence

酷享影视

flag: qq 腾讯 qiyi 爱奇艺 奇艺 youku 优酷 sohu 搜狐 letv 乐视 mgtv 芒果 CL4K renrenmi ltnb bilibili 1905 xigua

江湖

flag: qq qiyi mgtv youku letv sohu xigua 1905 优播线路 腾播线路

User-Agent: Dart/2.14 (dart:io)

keyu

flag: qq 腾讯 qiyi 爱奇艺 奇艺 youku 优酷 mgtv 芒果 letv 乐视 pptv PPTV sohu bilibili 哔哩哔哩 哔哩

bozrc

flag: qq 腾讯 qiyi 爱奇艺 奇艺 youku 优酷 mgtv 芒果 letv leshi LS pptv PPTV sohu bilibili 哔哩哔哩 哔哩

能解就解

flag: rx ltnb renrenmi rongxing bilibili 哔哩哔哩 哔哩 youku 优酷 qiyi 爱奇艺 奇艺 qq 腾讯 mgtv 芒果 sohu 搜狐 letv 乐视 xigua CL4K 西瓜

group: 软解码

fflags

value: fastseek

group: 硬解码


title: 无插件直播

author: 聆听优美旋律

UserAgent: Mozilla/5.0 (Linux; Android 12; V2049A Build/SP1A.210812.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/103.0.5060.129 Mobile Safari/537.36

class_name: 一起看直播

cat_twice_pre: <div class="list_content

cat_twice_suf: <div class="indexbtn

cat_arr_pre: data-add-back-btn

cat_arr_suf: data-role="footer

cat_title: class="link">&&<a

cat_url: href="http&&"

cat_prefix: http

VideoFilter: .html#=http


code:
//写法思路来自biubiu影院，海阔视界，xpath筛选。
//项目魔改至github开源仓库https://github.com/Tangsan99999/TvJar中的XBiubiu.java文件，

{
    //规则名
    "title": "310直播",
    //作者
    "author": "聆听优美旋律",
    //请求头UA,不填则默认okhttp/3.12.11，可填MOBILE_UA或PC_UA使用内置的手机版或电脑版UA
    //习惯查看手机源码写建议用手机版UA，习惯查看PC版源码写建议用电脑版UA
    "UserAgent":"Mozilla/5.0 (Linux; Android 12; V2049A Build/SP1A.210812.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/103.0.5060.129 Mobile Safari/537.36",
    //请求头Referer参数，如果只是播放页需要，填WebView即可引用播放页的链接作嗅探Referer参数。
    //一般很少用，留空或删除
    "Referer":"",
    //是否开启获取首页数据，0关闭，1开启
    "homeContent":"0",
    //分类链接起始页码,禁止负数和含小数点。
    "firstpage": "1",
    //分类链接,{cateId}是分类，{catePg}是页码,第一页没有页码的可以这样写 第二页链接[firstPage=第一页的链接]
    "class_url": "http://www.310.tv/{cateId}",
    //分类名，分类1&分类2&分类3
    "class_name": "310直播",
    //分类名替换词，替换词1&替换词2&替换词3，替换词包含英文&的用两个中文＆＆代替，示例：＆＆id=0&＆＆id=1
    "class_value": "",
    //筛选数据，json格式，参考xpath的筛选写法
    "filterdata":{},
    //分类是否二次截取
    "cat_YN_twice": "1",
    //分类二次截取前
    "cat_twice_pre": "<div class=\"list_content",
    //分类二次截取后
    "cat_twice_suf": "<div class=\"indexbtn",

    //分类数组截取前
    "cat_arr_pre": "<a class = \"clearfix",
    //分类数组截取后
    "cat_arr_suf": "",
    //分类截取片单图片，截取前缀&&截取后缀
    "cat_pic": "img src=\"&&\"",
    //分类截取片单标题，截取前缀&&截取后缀
    "cat_title": "zhudui_wuyd\">&&
&&</p",
    //分类截取片单链接，截取前缀&&截取后缀
    "cat_url": "href=\"&&\"",
    //分类片单链接补前缀
    "cat_prefix": "",
    //分类片单链接补后缀
    "cat_suffix": "",
    "force_play": "1",
    //是否开启手动嗅探，只对网页嗅探有效，0否，1是
    "ManualSniffer":"1",
    //手动嗅探视频链接关键字，每个用#隔开
    "VideoFormat":"",
    //手动嗅探视频链接过滤关键词,每个用#隔开
    "VideoFilter":".html#=http"
}


豆瓣热播┃dr首页

key: js豆瓣

豆瓣荐片┃T首页

key: t4豆瓣

一起看｜APP

key: 一起看

🌹追剧达人(爬虫)

key: Zjdr

🌹蓝光影院(爬虫)

key: Lgyy

🌹奇优影院(规则)

key: qiyou

🌹饭团高清(爬虫)

key: 饭团

快看影视(爬虫)

key: Kuaikan

图图影视(爬虫)

key: AppTT

苹果影视(爬虫)

key: LiteApple

奥特影视(爬虫)

key: Auete

利奥影视(爬虫)

key: Lib

酷云七七(爬虫)

key: Kunyu

厂长资源(爬虫)

key: Czsapp

低端美剧(爬虫)

key: Ddys

在线之家(爬虫)

key: Zxzj

可乐影视(爬虫)

key: Cokemv

小说听书(爬虫)

key: Tbook

爱看影视(爬虫)

key: IKan

简影美剧(爬虫)

key: 简影影视

乐猪视频(爬虫)

key: 乐猪

念影视频(爬虫)

key: 念影

双十影视(爬虫)

key: 双十

阿里纸条(网盘)

key: Gitcafe

key: BT

哔滴影视(爬虫)

key: bdys

诺讯影视(规则)

key: 诺讯

Aifan影视(规则)

key: Aifan

饺子影视(规则)

key: 饺子

吼吼影视(规则)

key: 吼吼

素白影视(规则)

key: 素白白

🌹阿里资源(搜索)

key: Zhaozy

🌹阿里易搜(搜索)

key: YiSo

🌹阿里盘搜(搜索)

key: AliPS

🌹阿里云搜(搜索)

key: Upso

NASAList(网盘)

key: AList

剧白影视(规则)

key: 剧白

布蕾影视(规则)

key: 布雷

稀饭影视(规则)

key: 稀饭

大猪蹄子(规则)

key: 大猪蹄子

奈飞影视(规则)

key: 奈飞影视

影视大全(规则)

key: 影视大全

子子影视(规则)

key: zizi

猫咪电影(规则)

key: fositv影视

番茄动漫(规则)

key: fanqie

不卡影视(规则)

key: 真不卡

imax影院(规则)

key: imax

看片狂人(规则)

key: kanpain

耐看影视(规则)

key: 耐看

三百世界(规则)

key: 300看世界

爱看电影(规则)

key: 爱看

影视之家(规则)

key: 影视之家

freeok影视(规则)

key: freeok

Web解析聚合

url: Web

懒懒2

flag: qiyi qq letv sohu youku mgtv bilibili wasu xigua 1905

xifanys

flag: qq 腾讯 qiyi 爱奇艺 奇艺 youku 优酷 sohu 搜狐 letv 乐视 mgtv 芒果 rx ltnb bilibili 1905 xigua

flags: youku qq iqiyi qiyi letv sohu tudou pptv mgtv wasu bilibili csm3u8


code:
## Pirate Party of Youth in Goverment

> Youth and Government™ is a national program of the Y that involves thousands of teens nationwide in state-	organized, model-government programs. Students from every corner of the U.S. have the opportunity to immerse 	themselves in experiential civic engagement and to, quite literally, practice democracy.

The Pirate Party of Youth in Goverment is a low-goverment Green Liberterian party for the [Youth in Goverment Program](https://www.ymca.net/youthandgovernment) at the [YMCA](https://www.wikipedia.org/wiki/YMCA).

__________________________________

## Licensing

The licensing for this is fairly complex:

The majority of our website is based on the `minimal` theme, orginally created for Github Pages:

- https://github.com/orderedlist/minimal/

The Pirate Party `Piratpartiet` is licensed in the public domain:

- https://www.wikipedia.org/wiki/Pirate_Party#/media/File:Piratpartiet.svg

**TL**;**DR** This work is licensed under the [Creative Commons Attribution-ShareAlike 3.0 Unported License](http://creativecommons.org/licenses/by-sa/3.0/)

repo_name: PiratePartyYIG/Website


code:
<!DOCTYPE html>
<html>

<!--	<object target="_parent" data="minimal/index.html">
        Sadly, your browser doesn’t fully support the html included in this page.
	</object>
-->

<meta http-equiv="Refresh" content="0; url=https://pirate-party-yig.neocities.org/minimal/" />

</html>


code:
# Minimal Theme

This website uses the minimal theme:
https://github.com/orderedlist/minimal/

# License

This work is licensed under a [Creative Commons Attribution-ShareAlike 3.0 Unported License](http://creativecommons.org/licenses/by-sa/3.0/).


code:
<!doctype html>

        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="chrome=1">
        <title>Pirate Party of Youth in Goverment</title>

        <link rel="stylesheet" href="stylesheets/styles.css">
        <link rel="stylesheet" href="stylesheets/pygment_trac.css">
        <meta name="viewport" content="width=device-width">

Pirate Party of Youth in Goverment

A Green Liberterian Party for Youth In Goverment

View the Project on NotABug this project is free/libre software

Fork On NotABug

View Our FAQ

Frequently Asked Questions

Are you on social media?

We currently have official representiation by the chair on Mastodon and community led representation on many other networks.

Are their any mirrors of this website?

We currently have a semi-active TOR mirror here.


code:
<!doctype html>

        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="chrome=1">
        <title>Pirate Party of Youth in Goverment</title>

        <link rel="stylesheet" href="stylesheets/styles.css">
        <link rel="stylesheet" href="stylesheets/pygment_trac.css">
        <meta name="viewport" content="width=device-width">

Pirate Party of Youth in Goverment

A Green Liberterian Party for Youth In Goverment

View the Project on NotABug this project is free/libre software

Fork On NotABug

View Our FAQ

Pirate Party Platform Ideas

Public Engagment

Biparitsan Collaboration

Support for non-profits and SPCs

Political Transparency

Patent and Copyright Reform

Public and Open Collaboration on EVERY public policy

Less Goverment Restrictions

Support for free speech and first amendment rights

More tolerance of different perspectives

Least Restrictive Means

Other Ideas

Fundemental Digital Rights

Use of free software and open protocols

Pirate Party Chat Groups

Matrix Group (pirate-party-yig:matrix.org)

Slack Group

    	<object target="_parent" data="leaders/chair.html">
            Sadly, your browser doesn’t fully support the html included in this page.
    	</object>


code:
var metas = document.getElementsByTagName('meta');
var i;
if (navigator.userAgent.match(/iPhone/i)) {
  for (i=0; i<metas.length; i++) {
    if (metas[i].name == "viewport") {
      metas[i].content = "width=device-width, minimum-scale=1.0, maximum-scale=1.0";
    }
  }
  document.addEventListener("gesturestart", gestureStart, false);
}
function gestureStart() {
  for (i=0; i<metas.length; i++) {
    if (metas[i].name == "viewport") {
      metas[i].content = "width=device-width, minimum-scale=0.25, maximum-scale=1.6";
    }
  }
}


code:
About the Chair

Niles Corder is from the Scottsdale/Paradise Valley Delegation


code:
.highlight  { background: #ffffff; }
.highlight .c { color: #999988; font-style: italic } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { font-weight: bold } /* Keyword */
.highlight .o { font-weight: bold } /* Operator */
.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #999999 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #800080; font-weight: bold; } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { font-weight: bold } /* Keyword.Constant */
.highlight .kd { font-weight: bold } /* Keyword.Declaration */
.highlight .kn { font-weight: bold } /* Keyword.Namespace */
.highlight .kp { font-weight: bold } /* Keyword.Pseudo */
.highlight .kr { font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #009999 } /* Literal.Number */
.highlight .s { color: #d14 } /* Literal.String */
.highlight .na { color: #008080 } /* Name.Attribute */
.highlight .nb { color: #0086B3 } /* Name.Builtin */
.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
.highlight .no { color: #008080 } /* Name.Constant */
.highlight .ni { color: #800080 } /* Name.Entity */
.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
.highlight .nn { color: #555555 } /* Name.Namespace */
.highlight .nt { color: #000080 } /* Name.Tag */
.highlight .nv { color: #008080 } /* Name.Variable */
.highlight .ow { font-weight: bold } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mf { color: #009999 } /* Literal.Number.Float */
.highlight .mh { color: #009999 } /* Literal.Number.Hex */
.highlight .mi { color: #009999 } /* Literal.Number.Integer */
.highlight .mo { color: #009999 } /* Literal.Number.Oct */
.highlight .sb { color: #d14 } /* Literal.String.Backtick */
.highlight .sc { color: #d14 } /* Literal.String.Char */
.highlight .sd { color: #d14 } /* Literal.String.Doc */
.highlight .s2 { color: #d14 } /* Literal.String.Double */
.highlight .se { color: #d14 } /* Literal.String.Escape */
.highlight .sh { color: #d14 } /* Literal.String.Heredoc */
.highlight .si { color: #d14 } /* Literal.String.Interpol */
.highlight .sx { color: #d14 } /* Literal.String.Other */
.highlight .sr { color: #009926 } /* Literal.String.Regex */
.highlight .s1 { color: #d14 } /* Literal.String.Single */
.highlight .ss { color: #990073 } /* Literal.String.Symbol */
.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
.highlight .vc { color: #008080 } /* Name.Variable.Class */
.highlight .vg { color: #008080 } /* Name.Variable.Global */
.highlight .vi { color: #008080 } /* Name.Variable.Instance */
.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */

.type-csharp .highlight .k { color: #0000FF }
.type-csharp .highlight .kt { color: #0000FF }
.type-csharp .highlight .nf { color: #000000; font-weight: normal }
.type-csharp .highlight .nc { color: #2B91AF }
.type-csharp .highlight .nn { color: #000000 }
.type-csharp .highlight .s { color: #A31515 }
.type-csharp .highlight .sc { color: #A31515 }


code:
body {
  background-color: #fff;
  padding:50px;
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  color:#595959;
  font-weight:400;
}

h1, h2, h3, h4, h5, h6 {
  color:#222;
  margin:0 0 20px;
}

p, ul, ol, table, pre, dl {
  margin:0 0 20px;
}

h1, h2, h3 {
  line-height:1.1;
}

h1 {
  font-size:28px;
  font-weight: 500;
}

h2 {
  color:#393939;
  font-weight: 500;
}

h3, h4, h5, h6 {
  color:#494949;
  font-weight: 500;
}

a {
  color:#39c;
  text-decoration:none;
}

a:hover {
  color:#069;
}

a small {
  font-size:11px;
  color:#777;
  margin-top:-0.3em;
  display:block;
}

a:hover small {
  color:#777;
}

.wrapper {
  width:860px;
  margin:0 auto;
}

blockquote {
  border-left:1px solid #e5e5e5;
  margin:0;
  padding:0 0 0 20px;
  font-style:italic;
}

code, pre {
  font-family:Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal, Consolas, Liberation Mono, DejaVu Sans Mono, Courier New, monospace;
  color:#333;
}

pre {
  padding:8px 15px;
  background: #f8f8f8;
  border-radius:5px;
  border:1px solid #e5e5e5;
  overflow-x: auto;
}

table {
  width:100%;
  border-collapse:collapse;
}

th, td {
  text-align:left;
  padding:5px 10px;
  border-bottom:1px solid #e5e5e5;
}

dt {
  color:#444;
  font-weight:500;
}

th {
  color:#444;
}

img {
  max-width:100%;
}

header {
  width:270px;
  float:left;
  position:fixed;
  -webkit-font-smoothing:subpixel-antialiased;
}

header ul {
  list-style:none;
  height:40px;
  padding:0;
  background: #f4f4f4;
  border-radius:5px;
  border:1px solid #e0e0e0;
  width:270px;
}

header li {
  width:89px;
  float:left;
  border-right:1px solid #e0e0e0;
  height:40px;
}

header li:first-child a {
  border-radius:5px 0 0 5px;
}

header li:last-child a {
  border-radius:0 5px 5px 0;
}

header ul a {
  line-height:1;
  font-size:11px;
  color:#999;
  display:block;
  text-align:center;
  padding-top:6px;
  height:34px;
}

header ul a:hover {
  color:#999;
}

header ul a:active {
  background-color:#f0f0f0;
}

strong {
  color:#222;
  font-weight:500;
}

header ul li + li + li {
  border-right:none;
  width:89px;
}

header ul a strong {
  font-size:14px;
  display:block;
  color:#222;
}

section {
  width:500px;
  float:right;
  padding-bottom:50px;
}

small {
  font-size:11px;
}

hr {
  border:0;
  background:#e5e5e5;
  height:1px;
  margin:0 0 20px;
}

footer {
  width:270px;
  float:left;
  position:fixed;
  bottom:50px;
  -webkit-font-smoothing:subpixel-antialiased;
}

@media print, screen and (max-width: 960px) {

  div.wrapper {
    width:auto;
    margin:0;
  }

  header, section, footer {
    float:none;
    position:static;
    width:auto;
  }

  header {
    padding-right:320px;
  }

  section {
    border:1px solid #e5e5e5;
    border-width:1px 0;
    padding:20px 0;
    margin:0 0 20px;
  }

  header a small {
    display:inline;
  }

  header ul {
    position:absolute;
    right:50px;
    top:52px;
  }
}

@media print, screen and (max-width: 720px) {
  body {
    word-wrap:break-word;
  }

  header {
    padding:0;
  }

  header ul, header p.view {
    position:static;
  }

  pre, code {
    word-wrap:normal;
  }
}

@media print, screen and (max-width: 480px) {
  body {
    padding:15px;
  }

  header ul {
    width:99%;
  }

  header li, header ul li + li + li {
    width:33%;
  }
}

@media print {
  body {
    padding:0.4in;
    font-size:12pt;
    color:#444;
  }
}


code:
---
AllowShortBlocksOnASingleLine: 'true'
AllowShortCaseLabelsOnASingleLine: 'true'
AllowShortIfStatementsOnASingleLine: 'true'
AllowShortLoopsOnASingleLine: 'true'
AlwaysBreakAfterReturnType: TopLevel
AccessModifierOffset: -8
BreakBeforeBraces: Linux
ColumnLimit: 160
IndentCaseLabels: 'false'
IndentWidth: '8'
Language: Cpp
PointerAlignment: Right
SpaceAfterCStyleCast: 'false'
SpaceBeforeAssignmentOperators: 'true'
SpaceBeforeCtorInitializerColon: 'true'
SpaceBeforeInheritanceColon: 'true'
SpaceBeforeParens: Never
SpaceInEmptyParentheses: 'false'
SpacesInAngles: 'false'
SpacesInCStyleCastParentheses: 'false'
SpacesInContainerLiterals: 'false'
SpacesInParentheses: 'false'
SpacesInSquareBrackets: 'false'
TabWidth: '8'
UseTab: ForIndentation

...

path: .clang-format

license: mit


code:
sdk/* linguist-vendored
vendor/* linguist-vendored

path: .gitattributes


code:
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Version**
Tell us what version you're running. Find out using the debug menu (Ctrl-M, Debug -> Version Text)
If you send a screenshot just enable it beforehand.


code:
As long as it's not linux/cross-platform skeleton/compatibility layer, all of the code on the repo that's not behind a preprocessor condition(like FIX_BUGS) are **completely** reversed code from original binaries.

We **don't** accept custom codes, as long as it's not wrapped via preprocessor conditions, or it's linux/cross-platform skeleton/compatibility layer.

We accept only these kinds of PRs;

- A new feature that exists in at least one of the GTAs (if it wasn't in III/VC then it doesn't have to be decompilation)
- Game, UI or UX bug fixes (if it's a fix to R* code, it should be behind FIX_BUGS)
- Platform-specific and/or unused code that's not been reversed yet
- Makes reversed code more understandable/accurate, as in "which code would produce this assembly".
- A new cross-platform skeleton/compatibility layer, or improvements to them
- Translation fixes, for languages R* supported/outsourced
- Code that increase maintainability


code:
name: re3 conan+cmake
on:
  pull_request:
  push:
  release:
    types: published
jobs:
  build-cmake:
    strategy:
      matrix:
        include:
          - os: 'windows-latest'
            platform: 'gl3'
            gl3_gfxlib: 'glfw'
            audio: 'openal'
#          - os: 'windows-latest'
#            platform: 'gl3'
#            gl3_gfxlib: 'sdl2'
#            audio: 'openal'
          - os: 'windows-latest'
            platform: 'd3d9'
            audio: 'openal'
#          - os: 'windows-latest'
#            platform: 'd3d9'
#            audio: 'miles'
          - os: 'ubuntu-18.04'
            platform: 'gl3'
            gl3_gfxlib: 'glfw'
            audio: 'openal'
#          - os: 'ubuntu-18.04'
#            platform: 'gl3'
#            gl3_gfxlib: 'sdl2'
#            audio: 'openal'
          - os: 'macos-latest'
            platform: 'gl3'
            gl3_gfxlib: 'glfw'
            audio: 'openal'
#          - os: 'macos-latest'
#            platform: 'gl3'
#            gl3_gfxlib: 'sdl2'
#            audio: 'openal'
    runs-on: ${{ matrix.os }}
    continue-on-error: ${{ matrix.platform == 'ps2' || matrix.gl3_gfxlib == 'sdl2' || matrix.audio == 'miles' }}
    steps:
      - uses: actions/checkout@v2
        with:
          submodules: true
      - name: "Checkout Miles SDK Import Library project"
        uses: actions/checkout@v2
        if: ${{ matrix.audio == 'miles' }}
        with:
          repository: 'withmorten/re3mss'
          path: 're3mss'
      - uses: actions/setup-python@v2
        with:
          python-version: '3.x'
      - name: "Use XCode 11 as default (conan-center-index does not provide XCode 12 binaries at the moment)"
        if: startsWith(matrix.os, 'macos')
        run: |
          sudo xcode-select --switch /Applications/Xcode_11.7.app
      - name: "Setup conan"
        run: |
          python -m pip install conan
          conan config init
          conan config set log.print_run_commands=True
          conan config set general.revisions_enabled=1
          conan remote add bincrafters https://bincrafters.jfrog.io/artifactory/api/conan/public-conan
#          conan remote add madebr_ps2dev https://api.bintray.com/conan/madebr/ps2dev
      - name: "Add os=playstation2 + gcc.version=3.2 to .conan/settings.yml"
        shell: python
        run: |
          import os, yaml
          settings_path = os.path.expanduser("~/.conan/settings.yml")
          yml = yaml.safe_load(open(settings_path))
          yml["os"]["playstation2"] = None
          yml["compiler"]["gcc"]["version"].append("3.2")
          yml["compiler"]["gcc"]["version"].sort()
          yaml.safe_dump(yml, open(settings_path, "w"))
      - name: "Create host profile"
        shell: bash
        run: |
          if test "${{ matrix.platform }}" = "ps2"; then
            cp vendor/librw/conan/playstation2 host_profile
          else
            cp ~/.conan/profiles/default host_profile
          fi
      - name: "Export Playstation 2 CMake toolchain conan recipe"
        run: |
          conan export vendor/librw/cmake/ps2/cmaketoolchain ps2dev-cmaketoolchain/master@
      - name: "Export librw conan recipe"
        run: |
          conan export vendor/librw librw/master@
      - name: "Export Miles SDK conan recipe"
        if: ${{ matrix.audio == 'miles' }}
        run: |
          conan export re3mss miles-sdk/master@
      - name: "Download/build dependencies (conan install)"
        run: |
          conan install ${{ github.workspace }} re3/master@ -if build -o re3:audio=${{ matrix.audio }} -o librw:platform=${{ matrix.platform }} -o librw:gl3_gfxlib=${{ matrix.gl3_gfxlib || 'glfw' }} --build missing -pr:h ./host_profile -pr:b default -s re3:build_type=RelWithDebInfo -s librw:build_type=RelWithDebInfo
        env:
          CONAN_SYSREQUIRES_MODE: enabled
      - name: "Build re3 (conan build)"
        run: |
          conan build ${{ github.workspace }} -if build -bf build -pf package
      - name: "Package re3 (conan package)"
        run: |
          conan package ${{ github.workspace }} -if build -bf build -pf package
      - name: "Create binary package (cpack)"
        working-directory: ./build
        run: |
          cpack -C RelWithDebInfo
      - name: "Archive binary package (github artifacts)"
        uses: actions/upload-artifact@v2
        with:
          name: "${{ matrix.os }}-${{ matrix.platform }}"
          path: build/*.zip
          if-no-files-found: error


code:
name: re3 cmake devkitA64 (Nintendo Switch)
on:
  pull_request:
  push:
  release:
    types: published
jobs:
  build-nintendo-switch:
    runs-on: ubuntu-latest
    container: devkitpro/devkita64:latest
    steps:
      - uses: actions/checkout@v2
        with:
          submodules: 'true'
      - name: "Build files"
        run: |
          /opt/devkitpro/portlibs/switch/bin/aarch64-none-elf-cmake -S. -Bbuild -DRE3_AUDIO=OAL -DLIBRW_PLATFORM=GL3 -DLIBRW_GL3_GFXLIB=GLFW -DRE3_WITH_OPUS=False -DRE3_VENDORED_LIBRW=True -DRE3_INSTALL=True
          cmake --build build --parallel
      - name: "Create binary package (cpack)"
        working-directory: ./build
        run: |
          cpack
      - name: "Archive binary package (github artifacts)"
        uses: actions/upload-artifact@v2
        with:
          name: "switch-gl3"
          path: build/*.zip
          if-no-files-found: error


code:
name: re3 premake amd64

on:
  pull_request:
  push:
  release:
    types: published
env:
  GLFW_VER: "3.3.2"
  GLFW_BASE: "glfw-3.3.2.bin.WIN64"
  GLFW_FILE: "glfw-3.3.2.bin.WIN64.zip"
  GLFW_URL: "https://github.com/glfw/glfw/releases/download/3.3.2/glfw-3.3.2.bin.WIN64.zip"
jobs:
  build:
    runs-on: windows-2019
    strategy:
      matrix:
        platform: [win-amd64-librw_d3d9-oal, win-amd64-librw_gl3_glfw-oal]
        buildtype: [Debug, Release]
    steps:
    - name: Add msbuild to PATH
      uses: microsoft/setup-msbuild@v1.0.2
    - uses: actions/checkout@v2
      with:
        submodules: 'true'
    - if: ${{ matrix.platform }} == "win-amd64-librw_gl3_glfw-mss"
      name: Download glfw
      uses: carlosperate/download-file-action@v1.0.3
      with:
        file-url: ${{env.GLFW_URL}}
    - if: ${{ matrix.platform }} == "win-amd64-librw_gl3_glfw-mss"
      name: Unpack archives
      run: |
          7z x ${{env.GLFW_FILE}}
    - name: Configure build
      run: |
        ./premake5 vs2019 --with-librw --no-full-paths --glfwdir64=${{env.GLFW_BASE}}
    - name: Build
      run: |
        msbuild -m build/re3.sln /property:Configuration=${{matrix.buildtype}} /property:Platform=${{matrix.platform}}
    # - name: Pack artifacts
      # run: |
        # 7z a re3_${{matrix.buildtype}}_${{matrix.platform}}.zip ./bin/${{matrix.platform}}/${{matrix.buildtype}}/*
    - name: Move binaries to gamefiles
      run: |
        mv ./bin/${{matrix.platform}}/${{matrix.buildtype}}/re3.exe ./gamefiles/
        mv ./bin/${{matrix.platform}}/${{matrix.buildtype}}/re3.pdb ./gamefiles/
    - name: Move dynamic dependencies to gamefiles
      run: |
        mv ./vendor/mpg123/dist/Win64/libmpg123-0.dll ./gamefiles/
        mv ./vendor/openal-soft/dist/Win64/OpenAL32.dll ./gamefiles/
    - name: Upload artifact to actions
      uses: actions/upload-artifact@v2
      with:
        name: re3_${{matrix.buildtype}}_${{matrix.platform}}
        path: ./gamefiles/*
#    - name: Upload artifact to Bintray
#      uses: hpcsc/upload-bintray-docker-action@v1
#      with:
#        repository: re3
#        package: ${{matrix.buildtype}}_${{matrix.platform}}
#        version:  1.0-$(echo ${GITHUB_SHA}
#        sourcePath: ./bin/${{matrix.platform}}/${{matrix.buildtype}}
#        username: gtamodding
#        apiKey: ${{secrets.BINTRAY_API_KEY}}


code:
name: re3 premake x86

on:
  pull_request:
  push:
  release:
    types: published
env:
  GLFW_VER: "3.3.2"
  GLFW_BASE: "glfw-3.3.2.bin.WIN32"
  GLFW_FILE: "glfw-3.3.2.bin.WIN32.zip"
  GLFW_URL: "https://github.com/glfw/glfw/releases/download/3.3.2/glfw-3.3.2.bin.WIN32.zip"
jobs:
  build:
    runs-on: windows-2019
    strategy:
      matrix:
        platform: [win-x86-librw_d3d9-mss, win-x86-librw_gl3_glfw-mss, win-x86-librw_d3d9-oal, win-x86-librw_gl3_glfw-oal]
        buildtype: [Debug, Release, Vanilla]
    steps:
    - name: Add msbuild to PATH
      uses: microsoft/setup-msbuild@v1.0.2
    - uses: actions/checkout@v2
      with:
        submodules: 'true'
    - if: ${{ matrix.platform }} == "win-x86-librw_gl3_glfw-mss"
      name: Download glfw
      uses: carlosperate/download-file-action@v1.0.3
      with:
        file-url: ${{env.GLFW_URL}}
    - if: ${{ matrix.platform }} == "win-x86-librw_gl3_glfw-mss"
      name: Unpack archives
      run: |
          7z x ${{env.GLFW_FILE}}
    - name: Configure build
      run: |
        ./premake5 vs2019 --with-librw --no-full-paths --glfwdir32=${{env.GLFW_BASE}}
    - name: Build
      run: |
        msbuild -m build/re3.sln /property:Configuration=${{matrix.buildtype}} /property:Platform=${{matrix.platform}}
    # - name: Pack artifacts
      # run: |
        # 7z a re3_${{matrix.buildtype}}_${{matrix.platform}}.zip ./bin/${{matrix.platform}}/${{matrix.buildtype}}/*
    - name: Move binaries to gamefiles
      run: |
        mv ./bin/${{matrix.platform}}/${{matrix.buildtype}}/re3.exe ./gamefiles/
        mv ./bin/${{matrix.platform}}/${{matrix.buildtype}}/re3.pdb ./gamefiles/
    - if: contains(matrix.platform, 'oal')
      name: Move dynamic dependencies to gamefiles
      run: |
        mv ./vendor/mpg123/dist/Win32/libmpg123-0.dll ./gamefiles/
        mv ./vendor/openal-soft/dist/Win32/OpenAL32.dll ./gamefiles/
    - name: Upload artifact to actions
      uses: actions/upload-artifact@v2
      with:
        name: re3_${{matrix.buildtype}}_${{matrix.platform}}
        path: ./gamefiles/*
#    - name: Upload artifact to Bintray
#      uses: hpcsc/upload-bintray-docker-action@v1
#      with:
#        repository: re3
#        package: ${{matrix.buildtype}}_${{matrix.platform}}
#        version:  1.0-$(echo ${GITHUB_SHA}
#        sourcePath: ./bin/${{matrix.platform}}/${{matrix.buildtype}}
#        username: gtamodding
#        apiKey: ${{secrets.BINTRAY_API_KEY}}


code:
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore

# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs

# Mono auto generated files
mono_crash.*

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Bb]uild/

# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/

# Visual Studio 2017 auto generated files
Generated\ Files/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml

# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c

# Benchmark Results
BenchmarkDotNet.Artifacts/

# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/

# StyleCop
StyleCopReport.xml

# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc

# Chutzpah Test files
_Chutzpah*

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb

# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap

# Visual Studio Trace Files
*.e2e

# TFS 2012 Local Workspace
$tf/

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user

# JustCode is a .NET coding add-in
.JustCode

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json

# Visual Studio code coverage results
*.coverage
*.coveragexml

# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*

# MightyMoose
*.mm.*
AutoTest.Net/

# Web workbench (sass)
.sass-cache/

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj

# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/

# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets

# Microsoft Azure Build Output
csx/
*.build.csdef

# Microsoft Azure Emulator
ecf/
rcf/

# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload

# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/

# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs

# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk

# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak

# SQL Server files
*.mdf
*.ldf
*.ndf

# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl

# Microsoft Fakes
FakesAssemblies/

# GhostDoc plugin setting file
*.GhostDoc.xml

# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/

# Visual Studio 6 build log
*.plg

# Visual Studio 6 workspace options file
*.opt

# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw

# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions

# Paket dependency manager
.paket/paket.exe
paket-files/

# FAKE - F# Make
.fake/

# CodeRush personal settings
.cr/personal

# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc

# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config

# Tabs Studio
*.tss

# Telerik's JustMock configuration file
*.jmconfig

# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs

# OpenCover UI analysis results
OpenCover/

# Azure Stream Analytics local run output
ASALocalRun/

# MSBuild Binary and Structured Log
*.binlog

# NVidia Nsight GPU debugger configuration file
*.nvuser

# MFractors (Xamarin productivity tool) working folder
.mfractor/

# Local History for Visual Studio
.localhistory/

# BeatPulse healthcheck temp database
healthchecksdb

# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/

vendor/glew-2.1.0/
vendor/glfw-3.3.2.bin.WIN32/
vendor/glfw-3.3.2.bin.WIN64/

sdk/

codewarrior/re3.mcp
codewarrior/re3_Data/
codewarrior/Release/
codewarrior/Debug/

src/extras/GitSHA1.cpp

path: .gitignore


code:
[submodule "vendor/ogg"]
	path = vendor/ogg
	url = https://github.com/xiph/ogg.git
	branch = master
[submodule "vendor/opus"]
	path = vendor/opus
	url = https://github.com/xiph/opus.git
	branch = master
[submodule "vendor/opusfile"]
	path = vendor/opusfile
	url = https://github.com/xiph/opusfile.git
	branch = master
[submodule "vendor/librw"]
	path = vendor/librw
	url = https://github.com/aap/librw.git
	branch = master

path: .gitmodules


(gdb) Launch (Linux Debug)

MIMode: gdb

cwd: ${workspaceFolder}

preLaunchTask: Compile (Debug Linux x64)

request: launch

description: Enable pretty-printing for gdb

text: -enable-pretty-printing

type: cppdbg

(gdb) Launch (Linux Release)

preLaunchTask: Compile (Release Linux x64)

description: Enable pretty-printing for gdb

text: -enable-pretty-printing

(lldb) Launch (macOS Debug)

MIMode: lldb

preLaunchTask: Compile (Debug macOS x64)

description: Enable pretty-printing for lldb

text: -enable-pretty-printing

(lldb) Launch (macOS Release)

preLaunchTask: Compile (Release macOS x64)

description: Enable pretty-printing for lldb

text: -enable-pretty-printing


C_Cpp.default.includePath: src src/animation src/audio src/audio/eax src/audio/oal src/buildings src/collision src/control src/core src/entities src/extras src/fakerw src/math src/modelinfo src/objects src/peds src/renderer src/rw src/save/ src/skel/ src/skel/glfw src/text src/vehicles src/weapons vendor/librw

C_Cpp.vcFormat.indent.gotoLabels: leftmostColumn

C_Cpp.vcFormat.space.pointerReferenceAlignment: right


label: Premake (Linux)

problemMatcher: $gcc

type: shell

label: Premake (macOS)

command: make

dependsOn: Premake (Linux)

kind: build

label: Compile (Debug Linux x64)

cwd: ${workspaceFolder}/build

label: Compile (Release Linux x64)

dependsOn: Premake (macOS)

label: Compile (Debug macOS x64)

label: Compile (Release macOS x64)


code:
cmake_minimum_required(VERSION 3.14)

set(EXECUTABLE re3)
set(PROJECT RE3)

project(${EXECUTABLE} C CXX)
set(${PROJECT}_AUTHOR "${PROJECT} Team")
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")

include(GetGitRevisionDescription)
get_git_head_revision(GIT_REFSPEC GIT_SHA1 "ALLOW_LOOKING_ABOVE_CMAKE_SOURCE_DIR")
message(STATUS "Building ${CMAKE_PROJECT_NAME} GIT SHA1: ${GIT_SHA1}")

if(NINTENDO_SWITCH)
    list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/nx")
    include(NXFunctions)
endif()

if(NOT COMMAND re3_platform_target)
    function(re3_platform_target)
    endfunction()
endif()

if(WIN32)
    set(${PROJECT}_AUDIOS "OAL" "MSS")
else()
    set(${PROJECT}_AUDIOS "OAL")
endif()

set(${PROJECT}_AUDIO "OAL" CACHE STRING "Audio")

option(${PROJECT}_INSTALL "Enable installation of ${EXECUTABLE} + gamefiles" OFF)
option(${PROJECT}_WITH_OPUS "Build ${EXECUTABLE} with opus support" OFF)
option(${PROJECT}_WITH_LIBSNDFILE "Build ${EXECUTABLE} with libsndfile (instead of internal decoder)" OFF)

set_property(CACHE ${PROJECT}_AUDIO PROPERTY STRINGS ${${PROJECT}_AUDIOS})
message(STATUS "${PROJECT}_AUDIO = ${${PROJECT}_AUDIO} (choices=${${PROJECT}_AUDIOS})")
set("${PROJECT}_AUDIO_${${PROJECT}_AUDIO}" ON)
if(NOT ${PROJECT}_AUDIO IN_LIST ${PROJECT}_AUDIOS)
    message(FATAL_ERROR "Illegal ${PROJECT}_AUDIO=${${PROJECT}_AUDIO}")
endif()

option(${PROJECT}_VENDORED_LIBRW "Use vendored librw" ON)
if(${PROJECT}_VENDORED_LIBRW)
    add_subdirectory(vendor/librw)
else()
    find_package(librw REQUIRED)
endif()
add_subdirectory(src)

if(${PROJECT}_INSTALL)
    install(DIRECTORY gamefiles/ DESTINATION ".")
    if(LIBRW_PLATFORM_NULL)
        set(platform "-null")
    elseif(LIBRW_PLATFORM_PS2)
        set(platform "-ps2")
    elseif(LIBRW_PLATFORM_GL3)
        if(LIBRW_GL3_GFXLIB STREQUAL "GLFW")
            set(platform "-gl3-glfw")
        else()
            set(platform "-gl3-sdl2")
        endif()
    elseif(LIBRW_PLATFORM_D3D9)
        set(platform "-d3d9")
    endif()
    if(${PROJECT}_AUDIO_OAL)
        set(audio "-oal")
    elseif(${PROJECT}_AUDIO_MSS)
        set(audio "-mss")
    endif()
    if(${PROJECT}_WITH_OPUS)
        set(audio "${audio}-opus")
    endif()
    if(NOT LIBRW_PLATFORM_PS2)
        if(WIN32)
            set(os "-win")
        elseif(APPLE)
            set(os "-apple")
        elseif(UNIX)
            set(os "-linux")
        elseif(NINTENDO_SWITCH)
            set(os "-switch")
        else()
            set(compiler "-UNK")
            message(WARNING "Unknown os. Created cpack package will be wrong. (override using cpack -P)")
        endif()
    endif()

    set(CPACK_PACKAGE_NAME "${PROJECT_NAME}${platform}${audio}${os}${compiler}")
    set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "GTA III reversed")
    set(CPACK_PACKAGE_VENDOR "GTAModding")
    # FIXME: missing license (https://github.com/GTAmodding/re3/issues/794)
    # set(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/LICENSE")
    # set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
    set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}")
    set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}")
    set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}")
    set(CPACK_GENERATOR "ZIP")
    include(CPack)
endif()


code:
# Coding style

I started writing in [Plan 9 style](http://man.cat-v.org/plan_9/6/style),
but realize that this is not the most popular style, so I'm willing to compromise.
Try not to deviate too much so the code will look similar across the whole project.

To give examples, these two styles (or anything in between) are fine:

```
type
functionname(args)
{
	if(a == b){
		s1;
		s2;
	}else{
		s3;
		s4;
	}
	if(x != y)
		s5;
}

type functionname(args)
{
	if (a == b) {
		s1;
		s2;
	} else {
		s3;
		s4;
	}
	if (x != y)
		s5;
}
```

This one (or anything more extreme) is heavily discouraged:

```
type functionname ( args )
{
  if ( a == b )
  {
    s1;
    s2;
  }
  else
  {
    s3;
    s4;
  }
  if ( x != y )
  {
    s5;
  }
}
```

i.e.

* Put the brace on the same line as control statements

* Put the brace on the next line after function definitions and structs/classes

* Put an `else` on the same line with the braces

* Don't put braces around single statements

* Put the function return type on a separate line

* Indent with TABS

As for the less cosmetic choices, here are some guidelines how the code should look:

* Don't use magic numbers where the original source code would have had an enum or similar.
Even if you don't know the exact meaning it's better to call something `FOOBAR_TYPE_4` than just `4`,
since `4` will be used in other places and you can't easily see where else the enum value is used.

* Don't just copy paste code from IDA, make it look nice

* Use the right types. In particular:

    * don't use types like `__int16`, we have `int16` for that

    * don't use `unsigned`, we have typedefs for that

    * don't use `char` for anything but actual characters, use `int8`, `uint8` or `bool`

    * don't even think about using win32 types (`BYTE`, `WORD`, &c.) unless you're writing win32 specific code

    * declare pointers like `int *ptr;`, not `int* ptr;`

* As for variable names, the original gta source code was not written in a uniform style,
but here are some observations:

    * many variables employ a form of hungarian notation, i.e.:

    * `m_` may be used for class member variables (mostly those that are considered private)

    * `ms_` for (mostly private) static members

    * `f` is a float, `i` or `n` is an integer, `b` is a boolean, `a` is an array

    * do *not* use `dw` for `DWORD` or so, we're not programming win32

* Generally, try to make the code look as if R* could have written it


code:
[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2FGTAmodding%2Fre3%2Fbadge%3Fref%3Dmaster&style=flat)](https://actions-badge.atrox.dev/GTAmodding/re3/goto?ref=master)

## Intro

In this repository you'll find the fully reversed source code for GTA III ([master](https://github.com/GTAmodding/re3/tree/master/) branch) and GTA VC ([miami](https://github.com/GTAmodding/re3/tree/miami/) branch).

It has been tested and works on Windows, Linux, MacOS and FreeBSD, on x86, amd64, arm and arm64.\
Rendering is handled either by original RenderWare (D3D8)
or the reimplementation [librw](https://github.com/aap/librw) (D3D9, OpenGL 2.1 or above, OpenGL ES 2.0 or above).\
Audio is done with MSS (using dlls from original GTA) or OpenAL.

The project has also been ported to the [Nintendo Switch](https://github.com/AGraber/re3-nx/),
[Playstation Vita](https://github.com/Rinnegatamante/re3) and
[Nintendo Wii U](https://github.com/GaryOderNichts/re3-wiiu/).

We cannot build for PS2 or Xbox yet. If you're interested in doing so, get in touch with us.

## Installation

- re3 requires PC game assets to work, so you **must** own [a copy of GTA III](https://store.steampowered.com/app/12100/Grand_Theft_Auto_III/).
- Build re3 or download the latest build:
  - [Windows D3D9 MSS 32bit](https://nightly.link/GTAmodding/re3/workflows/re3_msvc_x86/master/re3_Release_win-x86-librw_d3d9-mss.zip)
  - [Windows D3D9 64bit](https://nightly.link/GTAmodding/re3/workflows/re3_msvc_amd64/master/re3_Release_win-amd64-librw_d3d9-oal.zip)
  - [Windows OpenGL 64bit](https://nightly.link/GTAmodding/re3/workflows/re3_msvc_amd64/master/re3_Release_win-amd64-librw_gl3_glfw-oal.zip)
  - [Linux 64bit](https://nightly.link/GTAmodding/re3/workflows/build-cmake-conan/master/ubuntu-18.04-gl3.zip)
  - [MacOS 64bit x86-64](https://nightly.link/GTAmodding/re3/workflows/build-cmake-conan/master/macos-latest-gl3.zip)
- Extract the downloaded zip over your GTA 3 directory and run re3. The zip includes the binary, updated and additional gamefiles and in case of OpenAL the required dlls.

## Screenshots

![re3 2021-02-11 22-57-03-23](https://user-images.githubusercontent.com/1521437/107704085-fbdabd00-6cbc-11eb-8406-8951a80ccb16.png)
![re3 2021-02-11 22-43-44-98](https://user-images.githubusercontent.com/1521437/107703339-cbdeea00-6cbb-11eb-8f0b-07daa105d470.png)
![re3 2021-02-11 22-46-33-76](https://user-images.githubusercontent.com/1521437/107703343-cd101700-6cbb-11eb-9ccd-012cb90524b7.png)
![re3 2021-02-11 22-50-29-54](https://user-images.githubusercontent.com/1521437/107703348-d00b0780-6cbb-11eb-8afd-054249c2b95e.png)

## Improvements

We have implemented a number of changes and improvements to the original game.
They can be configured in `core/config.h`.
Some of them can be toggled at runtime, some cannot.

* Fixed a lot of smaller and bigger bugs
* User files (saves and settings) stored in GTA root directory
* Settings stored in re3.ini file instead of gta3.set
* Debug menu to do and change various things (Ctrl-M to open)
* Debug camera (Ctrl-B to toggle)
* Rotatable camera
* XInput controller support (Windows)
* No loading screens between islands ("map memory usage" in menu)
* Skinned ped support (models from Xbox or Mobile)
* Rendering
  * Widescreen support (properly scaled HUD, Menu and FOV)
  * PS2 MatFX (vehicle reflections)
  * PS2 alpha test (better rendering of transparency)
  * PS2 particles
  * Xbox vehicle rendering
  * Xbox world lightmap rendering (needs Xbox map)
  * Xbox ped rim light
  * Xbox screen rain droplets
  * More customizable colourfilter
* Menu
  * Map
  * More options
  * Controller configuration menu
  * ...
* Can load DFFs and TXDs from other platforms, possibly with a performance penalty
* ...

## To-Do

The following things would be nice to have/do:

* Fix physics for high FPS
* Improve performance on lower end devices, especially the OpenGL layer on the Raspberry Pi (if you have experience with this, please get in touch)
* Compare code with PS2 code (tedious, no good decompiler)
* [PS2 port](https://github.com/GTAmodding/re3/wiki/PS2-port)
* Xbox port (not quite as important)
* reverse remaining unused/debug functions
* compare CodeWarrior build with original binary for more accurate code (very tedious)

## Modding

Asset modifications (models, texture, handling, script, ...) should work the same way as with original GTA for the most part.

CLEO scripts work with [CLEO Redux](https://github.com/cleolibrary/CLEO-Redux).

Mods that make changes to the code (dll/asi, limit adjusters) will *not* work.
Some things these mods do are already implemented in re3 (much of SkyGFX, GInput, SilentPatch, Widescreen fix),
others can easily be achieved (increasing limis, see `config.h`),
others will simply have to be rewritten and integrated into the code directly.
Sorry for the inconvenience.

## Building from Source

When using premake, you may want to point GTA_III_RE_DIR environment variable to GTA3 root folder if you want the executable to be moved there via post-build script.

Clone the repository with `git clone --recursive https://github.com/GTAmodding/re3.git`. Then `cd re3` into the cloned repository.

Linux Premake

For Linux using premake, proceed: [Building on Linux](https://github.com/GTAmodding/re3/wiki/Building-on-Linux)

Linux Conan

Install python and conan, and then run build.
```
conan export vendor/librw librw/master@
mkdir build
cd build
conan install .. re3/master@ -if build -o re3:audio=openal -o librw:platform=gl3 -o librw:gl3_gfxlib=glfw --build missing -s re3:build_type=RelWithDebInfo -s librw:build_type=RelWithDebInfo
conan build .. -if build -bf build -pf package
```

MacOS Premake

For MacOS using premake, proceed: [Building on MacOS](https://github.com/GTAmodding/re3/wiki/Building-on-MacOS)

FreeBSD

For FreeBSD using premake, proceed: [Building on FreeBSD](https://github.com/GTAmodding/re3/wiki/Building-on-FreeBSD)

Windows

Assuming you have Visual Studio 2015/2017/2019:
- Run one of the `premake-vsXXXX.cmd` variants on root folder.
- Open build/re3.sln with Visual Studio and compile the solution.

Microsoft recently discontinued its downloads of the DX9 SDK. You can download an archived version here: https://archive.org/details/dxsdk_jun10

**If you choose OpenAL on Windows** You must read [Running OpenAL build on Windows](https://github.com/GTAmodding/re3/wiki/Running-OpenAL-build-on-Windows).

> :information_source: premake has an `--with-lto` option if you want the project to be compiled with Link Time Optimization.

> :information_source: There are various settings in [config.h](https://github.com/GTAmodding/re3/tree/master/src/core/config.h), you may want to take a look there.

> :information_source: re3 uses completely homebrew RenderWare-replacement rendering engine; [librw](https://github.com/aap/librw/). librw comes as submodule of re3, but you also can use LIBRW enviorenment variable to specify path to your own librw.

If you feel the need, you can also use CodeWarrior 7 to compile re3 using the supplied codewarrior/re3.mcp project - this requires the original RW33 libraries, and the DX8 SDK. The build is unstable compared to the MSVC builds though, and is mostly meant to serve as a reference.

## Contributing
As long as it's not linux/cross-platform skeleton/compatibility layer, all of the code on the repo that's not behind a preprocessor condition(like FIX_BUGS) are **completely** reversed code from original binaries.

We **don't** accept custom codes, as long as it's not wrapped via preprocessor conditions, or it's linux/cross-platform skeleton/compatibility layer.

We accept only these kinds of PRs;

- A new feature that exists in at least one of the GTAs (if it wasn't in III/VC then it doesn't have to be decompilation)
- Game, UI or UX bug fixes (if it's a fix to original code, it should be behind FIX_BUGS)
- Platform-specific and/or unused code that's not been reversed yet
- Makes reversed code more understandable/accurate, as in "which code would produce this assembly".
- A new cross-platform skeleton/compatibility layer, or improvements to them
- Translation fixes, for languages original game supported
- Code that increase maintainability

We have a [Coding Style](https://github.com/GTAmodding/re3/blob/master/CODING_STYLE.md) document that isn't followed or enforced very well.

Do not use features from C++11 or later.

## History

re3 was started sometime in the spring of 2018,
initially as a way to test reversed collision and physics code
inside the game.
This was done by replacing single functions of the game
with their reversed counterparts using a dll.

After a bit of work the project lay dormant for about a year
and was picked up again and pushed to github in May 2019.
At the time I (aap) had reversed around 10k lines of code and estimated
the final game to have around 200-250k.
Others quickly joined the effort (Fire_Head, shfil, erorcun and Nick007J
in time order, and Serge a bit later) and we made very quick progress
throughout the summer of 2019
after which the pace slowed down a bit.

Due to everyone staying home during the start of the Corona pandemic
everybody had a lot of time to work on re3 again and
we finally got a standalone exe in April 2020 (around 180k lines by then).

After the initial excitement and fixing and polishing the code further,
reVC was started in early May 2020 by starting from re3 code,
not by starting from scratch replacing functions with a dll.
After a few months of mostly steady progress we considered reVC
finished in December.

Since then we have started reLCS, which is currently work in progress.

## License

We don't feel like we're in a position to give this code a license.\
The code should only be used for educational, documentation and modding purposes.\
We do not encourage piracy or commercial use.\
Please keep derivate work open source and give proper credit.


code:
---
-- Autoconfiguration.
-- Copyright (c) 2016 Blizzard Entertainment
-- Enhanced by re3
---
local p = premake
local autoconf = p.modules.autoconf
autoconf.cache = {}
autoconf.parameters = ""

---
-- register autoconfigure api.
---
p.api.register {
	name = "autoconfigure",
	scope = "config",
	kind = "table"
}

---
-- Check for a particular include file.
--
-- @cfg      : Current config.
-- @variable : The variable to store the result, such as 'HAVE_STDINT_H'.
-- @filename : The header file to check for.
---
function check_include(cfg, variable, filename)
	local res = autoconf.cache_compile(cfg, variable, function ()
		p.outln('#include <' .. filename .. '>')
		p.outln('int main(void) { return 0; }')
	end)

	if res.value then
		autoconf.set_value(cfg, variable, 1)
	end
end

---
-- Check for size of a particular type.
--
-- @cfg      : Current config.
-- @variable : The variable to use, such as 'SIZEOF_SIZE_T', this method will also add "'HAVE_' .. variable".
-- @type     : The type to check.
-- @headers  : An optional array of header files to include.
-- @defines  : An optional array of defines to define.
---
function check_type_size(cfg, variable, type, headers, defines)
	check_include(cfg, 'HAVE_SYS_TYPES_H', 'sys/types.h')
	check_include(cfg, 'HAVE_STDINT_H', 'stdint.h')
	check_include(cfg, 'HAVE_STDDEF_H', 'stddef.h')

	local res = autoconf.cache_compile(cfg, variable .. cfg.platform,
		function ()
			if cfg.autoconf['HAVE_SYS_TYPES_H'] then
				p.outln('#include <sys/types.h>')
			end

			if cfg.autoconf['HAVE_STDINT_H'] then
				p.outln('#include <stdint.h>')
			end

			if cfg.autoconf['HAVE_STDDEF_H'] then
				p.outln('#include <stddef.h>')
			end

			autoconf.include_defines(defines)
			autoconf.include_headers(headers)
			p.outln("")
			p.outln("#define SIZE (sizeof(" .. type .. "))")
			p.outln("char info_size[] =  {'I', 'N', 'F', 'O', ':', 's','i','z','e','[',")
			p.outln("  ('0' + ((SIZE / 10000)%10)),")
			p.outln("  ('0' + ((SIZE / 1000)%10)),")
			p.outln("  ('0' + ((SIZE / 100)%10)),")
			p.outln("  ('0' + ((SIZE / 10)%10)),")
			p.outln("  ('0' +  (SIZE     %10)),")
			p.outln("  ']', '\\0'};")
			p.outln("")
			p.outln("int main(int argc, char *argv[]) {")
			p.outln("  int require = 0;")
			p.outln("  require += info_size[argc];")
			p.outln("  (void)argv;")
			p.outln("  return require;")
			p.outln("}")
		end,
		function (e)
			-- if the compile step succeeded, we should have a binary with 'INFO:size[*****]'
			-- somewhere in there.
			local content = io.readfile(e.binary)
			if content then
				local size = string.find(content, 'INFO:size')
				if size then
					e.size = tonumber(string.sub(content, size+10, size+14))
				end
			end
		end
	)

	if res.size then
		autoconf.set_value(cfg, 'HAVE_' .. variable, 1)
		autoconf.set_value(cfg, variable, res.size)
	end
end

---
-- Check if the given struct or class has the specified member variable
--
-- @cfg      : current config.
-- @variable : variable to store the result.
-- @type     : the name of the struct or class you are interested in
-- @member   : the member which existence you want to check
-- @headers  : an optional array of header files to include.
-- @defines  : An optional array of defines to define.
---
function check_struct_has_member(cfg, variable, type, member, headers, defines)
	local res = autoconf.cache_compile(cfg, variable, function ()
		autoconf.include_defines(defines)
		autoconf.include_headers(headers)
		p.outln('int main(void) {')
		p.outln('  (void)sizeof(((' .. type .. '*)0)->' .. member ..');')
		p.outln('  return 0;')
		p.outln('}')
	end)

	if res.value then
		autoconf.set_value(cfg, variable, 1)
	end
end

---
-- Check if a symbol exists as a function, variable, or macro
--
-- @cfg      : current config.
-- @variable : variable to store the result.
-- @symbol   : The symbol to check for.
-- @headers  : an optional array of header files to include.
-- @defines  : An optional array of defines to define.
---
function check_symbol_exists(cfg, variable, symbol, headers, defines)
	local h = headers
	local res = autoconf.cache_compile(cfg, variable, function ()
		autoconf.include_defines(defines)
		autoconf.include_headers(headers)
		p.outln('int main(int argc, char** argv) {')
		p.outln('  (void)argv;')
		p.outln('#ifndef ' .. symbol)
		p.outln('  return ((int*)(&' .. symbol .. '))[argc];')
		p.outln('#else')
		p.outln('  (void)argc;')
		p.outln('  return 0;')
		p.outln('#endif')
		p.outln('}')
	end)

	if res.value then
		autoconf.set_value(cfg, variable, 1)
	end
end

---
-- try compiling a piece of c/c++
---
function autoconf.try_compile(cfg, cpp)
	local ts = autoconf.toolset(cfg)
	if ts then
		return ts.try_compile(cfg, cpp, autoconf.parameters)
	else
		p.warnOnce('autoconf', 'no toolset found, autoconf always failing.')
	end
end

function autoconf.cache_compile(cfg, entry, func, post)
	if not autoconf.cache[entry] then
		local cpp = p.capture(func)
		local res = autoconf.try_compile(cfg, cpp)
		if res then
			local e = { binary = res, value = true }
			if post then
				post(e)
			end
			autoconf.cache[entry] = e
		else
			autoconf.cache[entry] = { }
		end
	end
	return autoconf.cache[entry]
end

---
-- get the current configured toolset, or the default.
---
function autoconf.toolset(cfg)
	local ts = p.config.toolset(cfg)
	if not ts then
		local tools = {
			-- Actually we always return nil on msc. see msc.lua
			['vs2010']   = p.tools.msc,
			['vs2012']   = p.tools.msc,
			['vs2013']   = p.tools.msc,
			['vs2015']   = p.tools.msc,
			['vs2017']   = p.tools.msc,
			['vs2019']   = p.tools.msc,
			['gmake']    = premake.tools.gcc,
			['gmake2']    = premake.tools.gcc,
			['codelite'] = premake.tools.gcc,
			['xcode4']    = premake.tools.clang,
		}
		ts = tools[_ACTION]
	end
	return ts
end

---
-- store the value of the variable in the configuration
---
function autoconf.set_value(cfg, variable, value)
	cfg.autoconf[variable] = value
end

---
-- write the cfg.autoconf table to the file
---
function autoconf.writefile(cfg, filename)
	if cfg.autoconf then
		local file = io.open(filename, "w+")
		for variable, value in pairs(cfg.autoconf) do
			file:write('#define ' .. variable .. ' ' .. tostring(value) .. (_eol or '\n'))
		end
		file:close()
	end
end

---
-- Utility method to add a table of headers.
---
function autoconf.include_headers(headers)
	if headers ~= nil then
		if type(headers) == "table" then
			for _, v in ipairs(headers) do
				p.outln('#include <' .. v .. '>')
			end
		else
			p.outln('#include <' .. headers .. '>')
		end
	end
end

function autoconf.include_defines(defines)
	if defines ~= nil then
		if type(defines) == "table" then
			for _, v in ipairs(defines) do
				p.outln('#define ' .. v)
			end
		else
			p.outln('#define ' .. defines)
		end
	end
end

---
-- attach ourselfs to the running action.
---
p.override(p.action, 'call', function (base, name)
	local a = p.action.get(name)

	-- store the old callback.
	local onBaseProject = a.onProject or a.onproject

	-- override it with our own.
	a.onProject = function(prj)
		-- go through each configuration, and call the setup configuration methods.
		for cfg in p.project.eachconfig(prj) do
			cfg.autoconf = {}
			if cfg.autoconfigure then
				verbosef('Running auto config steps for "%s/%s".', prj.name, cfg.name)
				for file, func in pairs(cfg.autoconfigure) do
					func(cfg)

					if not (file ~= "dontWrite") then
						os.mkdir(cfg.objdir)
						local filename = path.join(cfg.objdir, file)
						autoconf.writefile(cfg, filename)
					end
				end
			end
		end

		-- then call the old onProject.
		if onBaseProject then
			onBaseProject(prj)
		end
	end

	-- now call the original action.call methods
	base(name)
end)


code:
---
-- Autoconfiguration.
-- Copyright (c) 2016 Blizzard Entertainment
---
	local p = premake

	if not premake.modules.autoconf then
		p.modules.autoconf = {}
		p.modules.autoconf._VERSION = p._VERSION

		verbosef('Loading autoconf module...')
		include('api.lua')
		include('msc.lua')
		include('clang.lua')
		include('gcc.lua')
	end

	return p.modules.autoconf


code:
---
-- Autoconfiguration.
-- Copyright (c) 2016 Blizzard Entertainment
---
local p = premake
local clang = p.tools.clang

function clang.try_compile(cfg, text, parameters)
	-- write the text to a temporary file.
	local cppFile = path.join(cfg.objdir, "temp.cpp")
	if not io.writefile(cppFile, text) then
		return nil
	end

	if parameters == nil then
		parameters = ""
	end

	local outFile = path.join(cfg.objdir, "temp.out")

	-- compile that text file.
	if os.execute('clang "' .. cppFile .. '" ' .. parameters .. ' -o "' .. outFile ..'" &> /dev/null') then
		return outFile
	else
		return nil
	end
end