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

Static Public Member Functions

static Resourceload (const void *const v)
 

Data Fields

Image *const parent
 
const int x
 
const int y
 
const int width
 
const int height
 

Detailed Description

Definition at line 37 of file subimageloader.cpp.

Member Function Documentation

◆ load()

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

Definition at line 46 of file subimageloader.cpp.

47  {
48  if (v == nullptr)
49  return nullptr;
50 
51  const SubImageLoader *const
52  rl = static_cast<const SubImageLoader *>(v);
53  if (rl->parent == nullptr)
54  return nullptr;
55 
56  Image *const res = rl->parent->getSubImage(rl->x, rl->y,
57  rl->width, rl->height);
58  if (res == nullptr)
59  {
60  reportAlways("SubImage loading error: %s",
61  rl->parent->mSource.c_str())
62  }
63  return res;
64  }
#define reportAlways(...)
Definition: checkutils.h:253

References height, parent, reportAlways, width, x, and y.

Field Documentation

◆ height

const int anonymous_namespace{subimageloader.cpp}::SubImageLoader::height

Definition at line 45 of file subimageloader.cpp.

Referenced by load().

◆ parent

Image* const anonymous_namespace{subimageloader.cpp}::SubImageLoader::parent

Definition at line 41 of file subimageloader.cpp.

Referenced by load().

◆ width

const int anonymous_namespace{subimageloader.cpp}::SubImageLoader::width

Definition at line 44 of file subimageloader.cpp.

Referenced by load().

◆ x

const int anonymous_namespace{subimageloader.cpp}::SubImageLoader::x

Definition at line 42 of file subimageloader.cpp.

Referenced by load().

◆ y

const int anonymous_namespace{subimageloader.cpp}::SubImageLoader::y

Definition at line 43 of file subimageloader.cpp.

Referenced by load().


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