OpenTTD Source 20260208-master-g43af8e94d0
newgrf_act0_sounds.cpp File Reference

NewGRF Action 0x00 handler for sounds. More...

#include "../stdafx.h"
#include "../debug.h"
#include "../newgrf_sound.h"
#include "newgrf_bytereader.h"
#include "newgrf_internal.h"
#include "../safeguards.h"

Go to the source code of this file.

Functions

static ChangeInfoResult SoundEffectChangeInfo (uint first, uint last, int prop, ByteReader &buf)
 Define properties for sound effects.

Detailed Description

NewGRF Action 0x00 handler for sounds.

Definition in file newgrf_act0_sounds.cpp.

Function Documentation

◆ SoundEffectChangeInfo()

ChangeInfoResult SoundEffectChangeInfo ( uint first,
uint last,
int prop,
ByteReader & buf )
static

Define properties for sound effects.

Parameters
firstLocal ID of the first sound.
lastLocal ID of the last sound.
propThe property to change.
bufThe property value.
Returns
ChangeInfoResult.

Definition at line 26 of file newgrf_act0_sounds.cpp.

References CIR_INVALID_ID, CIR_SUCCESS, CIR_UNKNOWN, Clamp(), ORIGINAL_SAMPLE_COUNT, and ByteReader::ReadByte().