More name changes + compilation fixes
This commit is contained in:
parent
aee656ea36
commit
d7ce4110bb
@ -1,37 +1,39 @@
|
||||
/****************************************************************************
|
||||
* apps/graphics/traveler/tools/libwld/Imakefile
|
||||
*
|
||||
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
#############################################################################
|
||||
# apps/graphics/traveler/tools/libwld/Imakefile
|
||||
#
|
||||
# Copyright (C) 2016 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name NuttX nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
TRAVELER = $(APPDIR)/graphics/traveler
|
||||
|
||||
BIN = libwld.a
|
||||
WLDSRCS = wld_createworld.c wld_deallocateworld.c
|
||||
@ -54,7 +56,7 @@ AR = ar -rcv
|
||||
|
||||
DEBUG_LEVEL = 0
|
||||
DEFINES = -DDEBUG_LEVEL=$(DEBUG_LEVEL)
|
||||
INCLUDES = -I. -I../inc -I../libini -I../xwld_ral
|
||||
INCLUDES = -I. -I$(APPDIR)/include -I$(TOPDIR)/include -I$(TRAVELER)/include
|
||||
WARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wno-trigraphs
|
||||
|
||||
ifneq ($(DEBUG_LEVEL),0)
|
||||
|
@ -39,7 +39,7 @@
|
||||
*************************************************************************/
|
||||
|
||||
#include "trv_types.h"
|
||||
#include "inifile.h"
|
||||
#include "fsutils/inifile.h"
|
||||
#include "wld_paltable.h"
|
||||
#include "wld_world.h"
|
||||
#include "wld_inifile.h"
|
||||
@ -115,13 +115,15 @@ static const char worldImagesName[] = WORLD_IMAGES;
|
||||
|
||||
uint8_t wld_create_world(char *wldFile)
|
||||
{
|
||||
INIHANDLE handle;
|
||||
uint8_t result;
|
||||
|
||||
/* Open the INI file which contains all of the information that we
|
||||
* need to construct the world
|
||||
*/
|
||||
|
||||
if (!init_inifile(wldFile))
|
||||
handle = inifile_initialize(wldFile);
|
||||
if (handle == NULL)
|
||||
{
|
||||
fprintf(stderr, "Error: Could not open INI file=\"%s\"\n", wldFile);
|
||||
return WORLD_FILE_OPEN_ERROR;
|
||||
@ -133,7 +135,7 @@ uint8_t wld_create_world(char *wldFile)
|
||||
|
||||
/* Close the INI file and return */
|
||||
|
||||
uninit_inifile();
|
||||
inifile_uninitialize(handle);
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -210,7 +212,7 @@ static uint8_t wld_ManageWorldFile(void)
|
||||
result = wld_load_planefile(fileName);
|
||||
if (result != 0) return result;
|
||||
|
||||
free_ini_string(fileName);
|
||||
inifile_free_string(fileName);
|
||||
|
||||
/* Get the name of the file containing the palette table which is used
|
||||
* to adjust the lighting with distance.
|
||||
@ -225,7 +227,7 @@ static uint8_t wld_ManageWorldFile(void)
|
||||
result = wld_load_paltable(fileName);
|
||||
if (result != 0) return result;
|
||||
|
||||
free_ini_string(fileName);
|
||||
inifile_free_string(fileName);
|
||||
|
||||
/* Get the name of the file containing the texture data */
|
||||
|
||||
@ -239,7 +241,7 @@ static uint8_t wld_ManageWorldFile(void)
|
||||
if (result != 0) return result;
|
||||
|
||||
result = wld_load_bitmapfile(fileName);
|
||||
free_ini_string(fileName);
|
||||
inifile_free_string(fileName);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -69,15 +69,15 @@ typedef struct pcxHeaderType
|
||||
char version;
|
||||
char encoding;
|
||||
char bits_per_pixel;
|
||||
sint16 x, y;
|
||||
sint16 width, height;
|
||||
sint16 horz_res;
|
||||
sint16 vert_res;
|
||||
int16_t x, y;
|
||||
int16_t width, height;
|
||||
int16_t horz_res;
|
||||
int16_t vert_res;
|
||||
char ega_palette[48];
|
||||
char reserved;
|
||||
char num_color_planes;
|
||||
sint16 bytes_per_line;
|
||||
sint16 palette_type;
|
||||
int16_t bytes_per_line;
|
||||
int16_t palette_type;
|
||||
char padding[58];
|
||||
} pcxHeader, *pcxHeaderPtr;
|
||||
|
||||
|
@ -82,7 +82,7 @@ enum {
|
||||
typedef struct {
|
||||
|
||||
coord_t x, y, z; /* Camera position */
|
||||
sint16 yaw, pitch; /* Camera orientation */
|
||||
int16_t yaw, pitch; /* Camera orientation */
|
||||
|
||||
} cameraType;
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
/* Here's how to build a Makefile from this Imakefile:
|
||||
* Either: xmkmf, or
|
||||
* Either: xmkmf, or
|
||||
* imake -DUseInstalled -I/usr/lib/X11/config
|
||||
*/
|
||||
|
||||
@ -62,14 +62,14 @@ endif
|
||||
|
||||
/* Define the path to the various files. */
|
||||
|
||||
APPS = /home/patacongo/projects/nuttx/master/apps
|
||||
HOME = $(APPS)/graphics/
|
||||
APPDIR = /home/patacongo/projects/nuttx/master/apps
|
||||
HOME = $(APPDIR)/graphics/
|
||||
TRAVELER = $(HOME)/traveler
|
||||
TOOLS = $(TRAVELER)/tools
|
||||
LIBWLD = $(TOOLS)/libwld
|
||||
|
||||
NUTTX = /home/patacongo/projects/nuttx/master/nuttx
|
||||
NUTTXINC = $(NUTTX)/include
|
||||
TOPDIR = /home/patacongo/projects/nuttx/master/nuttx
|
||||
NUTTXINC = $(TOPDIR)/include
|
||||
INC_PATH = -I$(TRAVELER)/include -I$(TOOLS)/tcledit -I$(LIBWLD) -isystem $(NUTTXINC)
|
||||
|
||||
VPATH = $(TOOLS)/tcledit
|
||||
|
@ -4,16 +4,20 @@ Build instuctions:
|
||||
in the NuttX directory. This is because the build will depend on certain
|
||||
configurations (such as color format).
|
||||
|
||||
1. cd nuttx/tools
|
||||
./configure.sh sim/traveler (for example)
|
||||
2. cd ..
|
||||
tools/sethost.sh -w or -l
|
||||
make context
|
||||
1. cd nuttx/tools
|
||||
./configure.sh sim/traveler (for example)
|
||||
2. cd ..
|
||||
tools/sethost.sh -w or -l
|
||||
make context
|
||||
|
||||
Then you can use xmfmk to create the Makefile and build the tool:
|
||||
|
||||
3. cd apps/graphics/traveler/tools/tcledit
|
||||
4. xmfmk
|
||||
5. make
|
||||
3. cd apps/graphics/traveler/tools/tcledit
|
||||
4. Review Imakefile. You will probabaly to to change the APPDIR and TOPDIR paths
|
||||
a minimum. These are the paths to where you have clones the apps/ repository
|
||||
and the nuttx/ repositories, respectively.
|
||||
5. xmfmk
|
||||
6. make
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user