📄 navwriter.cc
字号:
//// Copyright (c) 2003 by Istv醤 V醨adi//// This file is part of dxr3Player, a DVD player written specifically // for the DXR3 (aka Hollywood+) decoder card.// This program is free software; you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation; either version 2 of the License, or// (at your option) any later version.//// This program is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the// GNU General Public License for more details.//// You should have received a copy of the GNU General Public License// along with this program; if not, write to the Free Software// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA//------------------------------------------------------------------------------#include "NAVWriter.h"#include <cassert>//------------------------------------------------------------------------------using ifodump::NAVWriter;//------------------------------------------------------------------------------// Hidden methods (for GCC <3.0)//------------------------------------------------------------------------------inline void NAVWriter::write(uint16_t x){ FileWriter::write(x);}inline void NAVWriter::write(uint32_t x){ FileWriter::write(x);}inline void NAVWriter::write(uint64_t x){ FileWriter::write(x);}inline void NAVWriter::write(const void* buffer, size_t length){ FileWriter::write(buffer, length);}inline void NAVWriter::write(const vm_cmd_t& cmd){ Writer<NAVWriter>::write(cmd);}inline void NAVWriter::write(const user_ops_t& userOperations){ Writer<NAVWriter>::write(userOperations);}//------------------------------------------------------------------------------void NAVWriter::write(const pci_gi_t& pciGeneral){ write(pciGeneral.nv_pck_lbn); write(pciGeneral.vobu_uop_ctl); write(pciGeneral.vobu_s_ptm); write(pciGeneral.vobu_e_ptm);}//------------------------------------------------------------------------------void NAVWriter::write(const nsml_agli_t& pciAngle){ writeFixedArray(sizeof(pciAngle.nsml_agl_dsta), pciAngle.nsml_agl_dsta);}//------------------------------------------------------------------------------void NAVWriter::write(const hl_gi_t& pciHighlightGeneral){ write(pciHighlightGeneral.hli_ss); write(pciHighlightGeneral.fosl_btnn); write(pciHighlightGeneral.btn_ofn); write(pciHighlightGeneral.btn_ns); write(reinterpret_cast<const unsigned char*>(&pciHighlightGeneral) + 14, 2);} //------------------------------------------------------------------------------void NAVWriter::write(const btn_colit_t& pciButtonColor){ for(size_t i = 0; i<3; ++i) { write(pciButtonColor.btn_coli[i][0]); }} //------------------------------------------------------------------------------void NAVWriter::write(const btni_t& pciButton){ write(&pciButton, 10); write(pciButton.cmd);}//------------------------------------------------------------------------------void NAVWriter::write(const hli_t& pciHighlight){ write(pciHighlight.hl_gi); write(pciHighlight.btn_colit); size_t numButtonGroups = pciHighlight.hl_gi.btngr_ns; if (numButtonGroups>0) { size_t buttonGroupSize = sizeof(pciHighlight.btnit)/sizeof(pciHighlight.btnit[0]) / numButtonGroups; for(size_t i = 0; i<numButtonGroups; ++i) { writeFixedArray(pciHighlight.hl_gi.btn_ns * sizeof(btni_t), pciHighlight.btnit + buttonGroupSize * i); } }}//------------------------------------------------------------------------------void NAVWriter::write(const dsi_gi_t& dsiGeneral){ write(dsiGeneral.nv_pck_lbn); write(dsiGeneral.vobu_ea); write(dsiGeneral.vobu_1stref_ea); write(dsiGeneral.vobu_2ndref_ea); write(dsiGeneral.vobu_3rdref_ea);} //------------------------------------------------------------------------------void NAVWriter::write(const vobu_sri_t& dsiVOBUSearch){ write(dsiVOBUSearch.next_vobu); write(dsiVOBUSearch.prev_vobu);} //------------------------------------------------------------------------------void NAVWriter::write(const sml_agl_data_t& dsiAngleData){ write(dsiAngleData.address);}//------------------------------------------------------------------------------void NAVWriter::write(const sml_agli_t& dsiAngle){ writeFixedArray(sizeof(dsiAngle.data), dsiAngle.data);}//------------------------------------------------------------------------------NAVWriter::NAVWriter(FILE* file) : Writer<NAVWriter>(file){}//------------------------------------------------------------------------------void NAVWriter::write(const pci_t& pci){ write(pci.pci_gi); write(pci.nsml_agli); write(pci.hli);}//------------------------------------------------------------------------------void NAVWriter::write(const dsi_t& dsi){ write(dsi.dsi_gi); write(dsi.vobu_sri); write(dsi.sml_agli);}//------------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -