Skip to content

Commit

Permalink
Split iIMDShape, separate game state data from display data
Browse files Browse the repository at this point in the history
iIMDBaseShape is the base data that can be safely used for game state calculations, and is always derived from the base model data.

It contains a pointer to the *display* iIMDShape data (used for display purposes only), which may be loaded from a (future) graphics override mod.
  • Loading branch information
past-due committed Sep 7, 2023
1 parent 57154e4 commit def808c
Show file tree
Hide file tree
Showing 32 changed files with 568 additions and 421 deletions.
7 changes: 4 additions & 3 deletions lib/ivis_opengl/imd.h
Expand Up @@ -24,6 +24,7 @@
#include <functional>

struct iIMDShape;
struct iIMDBaseShape;

#define PIE_NAME "PIE" // Pumpkin image export data file
#define PIE_VER 2
Expand Down Expand Up @@ -56,12 +57,12 @@ struct iIMDShape;
void modelShutdown();

// Enumerate over loaded models
void enumerateLoadedModels(const std::function<void (const std::string& modelName, iIMDShape& model)>& func);
void enumerateLoadedModels(const std::function<void (const std::string& modelName, iIMDBaseShape& model)>& func);

/// Get filename of model pointer. This is really slow, so do not abuse for logging
/// purposes, for example.
const WzString &modelName(iIMDShape *model);
const WzString &modelName(const iIMDShape *model);

iIMDShape *modelGet(const WzString &filename);
iIMDBaseShape *modelGet(const WzString &filename);

#endif

0 comments on commit def808c

Please sign in to comment.