ManaPlus
Static Public Member Functions | Data Fields
anonymous_namespace{rescaledloader.cpp}::RescaledLoader Struct Reference

Static Public Member Functions

static Resourceload (const void *const v)
 

Data Fields

const Image *const image
 
const int width
 
const int height
 

Detailed Description

Definition at line 37 of file rescaledloader.cpp.

Member Function Documentation

◆ load()

static Resource* anonymous_namespace{rescaledloader.cpp}::RescaledLoader::load ( const void *const  v)
inlinestatic

Definition at line 44 of file rescaledloader.cpp.

45  {
46  if (v == nullptr)
47  return nullptr;
48  const RescaledLoader *const rl
49  = static_cast<const RescaledLoader *>(v);
50  if (rl->image == nullptr)
51  return nullptr;
52  Image *const rescaled = rl->image->SDLgetScaledImage(
53  rl->width, rl->height);
54  if (rescaled == nullptr)
55  {
56  reportAlways("Rescale image failed: %s",
57  rl->image->mIdPath.c_str())
58  return nullptr;
59  }
60  return rescaled;
61  }
#define reportAlways(...)
Definition: checkutils.h:253

References height, image, reportAlways, and width.

Field Documentation

◆ height

const int anonymous_namespace{rescaledloader.cpp}::RescaledLoader::height

Definition at line 43 of file rescaledloader.cpp.

Referenced by load().

◆ image

const Image* const anonymous_namespace{rescaledloader.cpp}::RescaledLoader::image

Definition at line 41 of file rescaledloader.cpp.

Referenced by load().

◆ width

const int anonymous_namespace{rescaledloader.cpp}::RescaledLoader::width

Definition at line 42 of file rescaledloader.cpp.

Referenced by load().


The documentation for this struct was generated from the following file: