OpenTTD Source 20250331-master-g3c15e0c889
newgrf_acta.cpp File Reference

NewGRF Action 0x0A handler. More...

#include "../stdafx.h"
#include "../debug.h"
#include "../spritecache.h"
#include "newgrf_bytereader.h"
#include "newgrf_internal.h"
#include "../table/sprites.h"
#include "../safeguards.h"

Go to the source code of this file.

Functions

static bool IsGRMReservedSprite (SpriteID first_sprite, uint16_t num_sprites)
 Check if a sprite ID range is within the GRM reversed range for the currently loading NewGRF.
 
static void SpriteReplace (ByteReader &buf)
 
static void SkipActA (ByteReader &buf)
 

Detailed Description

NewGRF Action 0x0A handler.

Definition in file newgrf_acta.cpp.

Function Documentation

◆ IsGRMReservedSprite()

static bool IsGRMReservedSprite ( SpriteID  first_sprite,
uint16_t  num_sprites 
)
static

Check if a sprite ID range is within the GRM reversed range for the currently loading NewGRF.

Parameters
first_spriteFirst sprite of range.
num_spritesNumber of sprites in the range.
Returns
True iff the NewGRF has reserved a range equal to or greater than the provided range.

Definition at line 26 of file newgrf_acta.cpp.

References GrfProcessingState::grffile.

◆ SkipActA()

static void SkipActA ( ByteReader buf)
static

Definition at line 83 of file newgrf_acta.cpp.

◆ SpriteReplace()

static void SpriteReplace ( ByteReader buf)
static

Definition at line 36 of file newgrf_acta.cpp.