Building Powder DS(107)

support for the ARM toolchain
Post Reply
Adjective1196
Posts: 1
Joined: Tue Sep 02, 2008 7:54 pm

Building Powder DS(107)

Post by Adjective1196 » Wed Sep 03, 2008 7:14 pm

Source is found at: http://www.zincland.com/powder/index.ph ... me=release

The build.txt has you compile and use programs in the support folder(bmp2c, txt2c, etc) to create everything needed to compile. When compiling everything goes fine(in regard to the rest of the program), but I get the following errors when processing the map file (allrooms.cpp) which was created with bash scripts and the program map2c built with VS8(to convert the .map files to .cpp). I get the following error at this step in the compile

Code: Select all

$ make
allrooms.cpp
arm-eabi-g++ -MMD -MP -MF /c/powder107_src/port/ds/../../rooms/allrooms.d -g -Wall -O1 -march=armv5te -mtune=arm946e-s -fomit-frame-pointer -ffast-math -fno-short-enums -mthumb -mthumb-interwork -I/c/devkitPro/libnds/include -I/c/powder107_src/port/ds -DARM9 -DUSING_DS -fno-rtti -fno-exceptions -c ../../rooms/allrooms.cpp -o ../../rooms/allrooms.o
In file included from ../../rooms/allrooms.cpp:6:
../../rooms/belweir.cpp:391: error: invalid conversion from 'int' to 'const PT2*'
And it follows for every map file that is included.

Attached are 2 of the files involved that are invoking const PT2, map.h, and each of the maps' .cpp's(made with map2c)

Code: Select all

// Auto-generated .map file
// DO NOT HAND EDIT
// Generated from circ *	The MAP structure.  This defines one levels information.  It
 *	contains all the items that are on the floor and all the mobs
 *	that are in the level.
 */

#ifndef __map_h__
#define __map_h__

#include "assert.h"
#include "glbdef.h"
#include "gfxengine.h"
#include "smokestack.h"
#include "itemstack.h"
#include "signpost.h"

class MAP;
class MOB;
class ITEM;
class SRAMSTREAM;
class INTRINSIC_COUNTER;

extern MAP		*glbCurLevel;

struct PT2
{
    int x, y;
    int data;
};

struct ROOM_DEF
{
    PT2 size;
    const SQUARE_NAMES *squarelist;
    
    // Per square lists
    const PT2 *squareflaglist;
    const PT2 *itemlist;
    const PT2 *moblist;
    const PT2 *itemtypelist;
    const PT2 *moblevellist;
    const PT2 *intrinsiclist;
    const PT2 *signpostlist;

    // Global defines
    int		minlevel, maxlevel;
    u8		rarity;
    u8		mandatory;
    u8		onlyonce;
    u8		allowstairs;
    u8		allowgeneration;
    u8		allowdig;
    u8		allowitems;
    u8		allowtel;
    int		x, y;
    s8		quest;
    const char	*name;		// Specific room name from file name.
};

struct ROOM
{
    PT2			 l, h;
    const ROOM_DEF	*definition;
    int			 rotation;
};

le2.map

#include "../map.h"
#include "../glbdef.h"

const SQUARE_NAMES glb_circle2_squarelist[] =
{
SQUARE_EMPTY,	SQUARE_WALL,	SQUARE_WALL,	SQUARE_DOOR,	
SQUARE_WALL,	SQUARE_WALL,	SQUARE_EMPTY,	SQUARE_WALL,	
SQUARE_WALL,	SQUARE_FLOOR,	SQUARE_FLOOR,	SQUARE_FLOOR,	
SQUARE_WALL,	SQUARE_WALL,	SQUARE_WALL,	SQUARE_FLOOR,	
SQUARE_FLOOR,	SQUARE_FLOOR,	SQUARE_FLOOR,	SQUARE_FLOOR,	
SQUARE_DOOR,	SQUARE_WALL,	SQUARE_FLOOR,	SQUARE_FLOOR,	
SQUARE_FLOOR,	SQUARE_FLOOR,	SQUARE_FLOOR,	SQUARE_WALL,	
SQUARE_DOOR,	SQUARE_FLOOR,	SQUARE_FLOOR,	SQUARE_FLOOR,	
SQUARE_FLOOR,	SQUARE_FLOOR,	SQUARE_WALL,	SQUARE_WALL,	
SQUARE_WALL,	SQUARE_FLOOR,	SQUARE_FLOOR,	SQUARE_FLOOR,	
SQUARE_WALL,	SQUARE_WALL,	SQUARE_EMPTY,	SQUARE_WALL,	
SQUARE_WALL,	SQUARE_DOOR,	SQUARE_WALL,	SQUARE_WALL,	
SQUARE_EMPTY
};

and map.h

Code: Select all

/*
 * PROPRIETARY INFORMATION.  This software is proprietary to POWDER
 * Development, and is not to be reproduced, transmitted, or disclosed
 * in any way without written permission.
 *
 * Produced by:	Jeff Lait
 *
 *      	POWDER Development
 *
 * NAME:        map.h ( POWDER Library, C++ )
 *
 * COMMENTS:
 *	The MAP structure.  This defines one levels information.  It
 *	contains all the items that are on the floor and all the mobs
 *	that are in the level.
 */

#ifndef __map_h__
#define __map_h__

#include "assert.h"
#include "glbdef.h"
#include "gfxengine.h"
#include "smokestack.h"
#include "itemstack.h"
#include "signpost.h"

class MAP;
class MOB;
class ITEM;
class SRAMSTREAM;
class INTRINSIC_COUNTER;

extern MAP		*glbCurLevel;

struct PT2
{
    int x, y;
    int data;
};

struct ROOM_DEF
{
    PT2 size;
    const SQUARE_NAMES *squarelist;
    
    // Per square lists
    const PT2 *squareflaglist;
    const PT2 *itemlist;
    const PT2 *moblist;
    const PT2 *itemtypelist;
    const PT2 *moblevellist;
    const PT2 *intrinsiclist;
    const PT2 *signpostlist;

    // Global defines
    int		minlevel, maxlevel;
    u8		rarity;
    u8		mandatory;
    u8		onlyonce;
    u8		allowstairs;
    u8		allowgeneration;
    u8		allowdig;
    u8		allowitems;
    u8		allowtel;
    int		x, y;
    s8		quest;
    const char	*name;		// Specific room name from file name.
};

struct ROOM
{
    PT2			 l, h;
    const ROOM_DEF	*definition;
    int			 rotation;
};

#define ROOM_FLIP_X 1
#define ROOM_FLIP_Y 2
#define ROOM_FLOP 4

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests