// DO NOT EDIT: generated by whoa-autocode
#include "db/rec/SoundEntriesAdvancedRec.hpp"
#include "util/Locale.hpp"
#include "util/SFile.hpp"

const char* SoundEntriesAdvancedRec::GetFilename() {
    return "DBFilesClient\\SoundEntriesAdvanced.dbc";
}

uint32_t SoundEntriesAdvancedRec::GetNumColumns() {
    return 24;
}

uint32_t SoundEntriesAdvancedRec::GetRowSize() {
    return 96;
}

bool SoundEntriesAdvancedRec::NeedIDAssigned() {
    return false;
}

int32_t SoundEntriesAdvancedRec::GetID() {
    return this->m_ID;
}

void SoundEntriesAdvancedRec::SetID(int32_t id) {
    this->m_ID = id;
}

bool SoundEntriesAdvancedRec::Read(SFile* f, const char* stringBuffer) {
    uint32_t nameOfs;

    if (
        !SFile::Read(f, &this->m_ID, sizeof(this->m_ID), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_soundEntryID, sizeof(this->m_soundEntryID), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_innerRadius2d, sizeof(this->m_innerRadius2d), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_timeA, sizeof(this->m_timeA), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_timeB, sizeof(this->m_timeB), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_timeC, sizeof(this->m_timeC), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_timeD, sizeof(this->m_timeD), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_randomOffsetRange, sizeof(this->m_randomOffsetRange), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_usage, sizeof(this->m_usage), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_timeIntervalMin, sizeof(this->m_timeIntervalMin), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_timeIntervalMax, sizeof(this->m_timeIntervalMax), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_volumeSliderCategory, sizeof(this->m_volumeSliderCategory), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_duckToSfx, sizeof(this->m_duckToSfx), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_duckToMusic, sizeof(this->m_duckToMusic), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_duckToAmbience, sizeof(this->m_duckToAmbience), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_innerRadiusOfInfluence, sizeof(this->m_innerRadiusOfInfluence), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_outerRadiusOfInfluence, sizeof(this->m_outerRadiusOfInfluence), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_timeToDuck, sizeof(this->m_timeToDuck), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_timeToUnduck, sizeof(this->m_timeToUnduck), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_insideAngle, sizeof(this->m_insideAngle), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_outsideAngle, sizeof(this->m_outsideAngle), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_outsideVolume, sizeof(this->m_outsideVolume), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_outerRadius2d, sizeof(this->m_outerRadius2d), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameOfs, sizeof(uint32_t), nullptr, nullptr, nullptr)
    ) {
        return false;
    }

    if (stringBuffer) {
        this->m_name = &stringBuffer[nameOfs];
    } else {
        this->m_name = "";
    }

    return true;
}
