I am trying to create a function called "DrawBG", which, when supplied
with an ID param, will load the specified bitmap with it's specified
drawing configurations, and then draw it as a full-screen image.
I've tried the following below:
DrawBG.c:
Code: Select all
#include "../res/Gfx/Planes.h"
#include "../inc/DrawBG.h"
#include <vdp.h>
void DrawBG(u8 Scrn)
{
if (Scrn==17)
{
plan=VDP_PLAN_B;
}
else
{
plan=VDP_PLAN_A;
}
VDP_drawBitmap(plan, &Screens[Scrn], 0,0);
}
Code: Select all
#include <Genesis.h>
#include <bmp.h>
#include "../res/Gfx/Planes.h"
u16 plan;
const Bitmap* Screens [] =
{
S1, S2, S3, S4, S5, S6, S7, S8, S9, S10
M1, M2, M3,
FMV_BG, FMV_Text, FMV_Ani
};
Code: Select all
#include "Genesis.h"
#include "bmp.h"
#ifndef _PLANES_H_
#define _PLANES_H_
extern const Bitmap S1;
extern const Bitmap S2;
extern const Bitmap S3;
extern const Bitmap S4;
extern const Bitmap S5;
extern const Bitmap S6;
extern const Bitmap S7;
extern const Bitmap S8;
extern const Bitmap S9;
extern const Bitmap S10;
extern const Bitmap M1;
extern const Bitmap M2;
extern const Bitmap M3;
extern const Bitmap FMV_BG;
extern const Bitmap FMV_Text;
extern const Bitmap FMV_Ani;
#endif // _PLANES_H_
Code: Select all
||=== Build: default in Ultra Air Hockey (Retro) (compiler: SGDK) ===|
..\Ultra Air Hockey\inc\DrawBG.h|8|error: invalid type argument of `unary *'|
..\Ultra Air Hockey\inc\DrawBG.h|8|error: initializer element is not constant|
..\Ultra Air Hockey\inc\DrawBG.h|8|error: (near initialization for `Screens[0]')|
..\Ultra Air Hockey\inc\DrawBG.h|8|error: initializer element is not constant|
..\Ultra Air Hockey\inc\DrawBG.h|8|error: (near initialization for `Screens[1]')|
..\Ultra Air Hockey\inc\DrawBG.h|8|error: initializer element is not constant|
Any help?