Code formating

This commit is contained in:
alexeevdv
2015-02-14 14:38:14 +03:00
parent fc7d3e31ac
commit db90d25ea6
20 changed files with 890 additions and 727 deletions
+15 -10
View File
@@ -1,7 +1,6 @@
#include "stdafx.h"
#include "FalloutScript.h"
// CFalloutScript
void CFalloutScript::Dump(CArchive& ar)
{
ar.WriteString("============== Procedures table ==================\n");
@@ -67,16 +66,20 @@ void CFalloutScript::Dump(CArchive& ar)
ar.WriteString("============== Exported variables ==================\n");
if (m_ExportedVarValue.IsEmpty()) {
if (m_ExportedVarValue.IsEmpty())
{
ar.WriteString("Not found\n");
}
else {
for(INT_PTR i = 0; i < m_ExportedVarValue.GetSize(); i += 2) {
else
{
for(INT_PTR i = 0; i < m_ExportedVarValue.GetSize(); i += 2)
{
wOperator = m_ExportedVarValue.at(i).GetOperator();
ulArgument = m_ExportedVarValue.at(i).GetArgument();
ULONG ulNameArgument = m_ExportedVarValue.at(i + 1).GetArgument();
switch(wOperator) {
switch(wOperator)
{
case COpcode::O_STRINGOP:
strOutLine.Format("%s := \"%s\"\n",
m_Namespace[ulNameArgument].c_str(),
@@ -107,19 +110,21 @@ void CFalloutScript::Dump(CArchive& ar)
ar.WriteString("============== Procedures ==================\n");
ar.WriteString("\n");
for(INT_PTR nIndexOfProc = 0; nIndexOfProc < m_ProcTable.GetSize(); nIndexOfProc++) {
for(INT_PTR nIndexOfProc = 0; nIndexOfProc < m_ProcTable.GetSize(); nIndexOfProc++)
{
strOutLine.Format("%d: %s (0x%08x)\n", nIndexOfProc,
m_Namespace[m_ProcTable[nIndexOfProc].m_ulNameOffset].c_str(),
m_ProcTable[nIndexOfProc].m_ulBodyOffset
);
m_ProcTable[nIndexOfProc].m_ulBodyOffset);
ar.WriteString(strOutLine);
ar.WriteString("===============================\n");
for(INT_PTR i = 0; i < m_ProcBodies.at(nIndexOfProc).GetSize(); i++) {
for(INT_PTR i = 0; i < m_ProcBodies.at(nIndexOfProc).GetSize(); i++)
{
wOperator = m_ProcBodies.at(nIndexOfProc).at(i).m_Opcode.GetOperator();
ulArgument = m_ProcBodies.at(nIndexOfProc).at(i).m_Opcode.GetArgument();
switch(wOperator) {
switch(wOperator)
{
case COpcode::O_STRINGOP:
case COpcode::O_INTOP:
strOutLine.Format("0x%08X: 0x%04X 0x%08x - %s(0x%08x) // %u (%d)\n",