changeset 360:d5a90ba09dc4

Fix to match with resource management changes.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 16 Oct 2012 21:28:56 +0300
parents 59045853853d
children bf60f60cafba
files dmq3d.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/dmq3d.c	Tue Oct 16 21:25:46 2012 +0300
+++ b/dmq3d.c	Tue Oct 16 21:28:56 2012 +0300
@@ -1,3 +1,4 @@
+#include "dmlib.h"
 #include "dmq3d.h"
 #include "dmimage.h"
 
@@ -283,7 +284,7 @@
     return TRUE;
 }
 
-static BOOL dmReadBitmap(char *line, DM3DVectorSpriteModel *model)
+static BOOL dmReadBitmap(char *line, DM3DVectorSpriteModel *model, DMResourceLib *lib)
 {
     DM3DBitmap bmp, *rbmp;
     int index;
@@ -298,7 +299,7 @@
     rbmp = &(model->bitmaps[index]);
     if (rbmp->img == NULL)
     {
-        DMResource *res = dmf_open(rbmp->name);
+        DMResource *res = dmf_open(lib, rbmp->name);
         if (res == NULL)
         {
             dmError("Could not open resource file '%s'.\n", rbmp->name);
@@ -348,7 +349,7 @@
                 return DMERR_OK;
 
             case 'B':
-                if (!dmReadBitmap(start, model))
+                if (!dmReadBitmap(start, model, f->lib))
                     return DMERR_INVALID_DATA;
                 break;