OpenTTD Source 20250331-master-g3c15e0c889
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()

static 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(), GrfProcessingState::grffile, ORIGINAL_SAMPLE_COUNT, and ByteReader::ReadByte().