From eaaf24e59e7c88226cce4b5233a8cbc76346d501 Mon Sep 17 00:00:00 2001 From: Benjamin Date: Mon, 1 Mar 2021 18:47:49 +0100 Subject: [PATCH] =?UTF-8?q?passage=20=C3=A0=20CMake?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 42 ++++ Makefile | 208 -------------------- assets-cg/{img => }/1.png | Bin assets-cg/{img => }/2.png | Bin assets-cg/{img => }/3.png | Bin assets-cg/fxconv-metadata.txt | 12 ++ assets-cg/{icon-cg-sel.png => icon-sel.png} | Bin assets-cg/{icon-cg-uns.png => icon-uns.png} | Bin assets-cg/img/10.png | Bin 656 -> 0 bytes assets-cg/img/11.png | Bin 621 -> 0 bytes assets-cg/img/4.png | Bin 473 -> 0 bytes assets-cg/img/5.png | Bin 225 -> 0 bytes assets-cg/img/6.png | Bin 374 -> 0 bytes assets-cg/img/7.png | Bin 426 -> 0 bytes assets-cg/img/8.png | Bin 439 -> 0 bytes assets-cg/{img/9.png => player.png} | Bin project.cfg | 88 --------- {include => src}/define.h | 0 src/drawiso.c | 6 +- {include => src}/drawiso.h | 0 src/player.c | 4 +- {include => src}/player.h | 0 22 files changed, 59 insertions(+), 301 deletions(-) create mode 100644 CMakeLists.txt delete mode 100644 Makefile rename assets-cg/{img => }/1.png (100%) rename assets-cg/{img => }/2.png (100%) rename assets-cg/{img => }/3.png (100%) create mode 100644 assets-cg/fxconv-metadata.txt rename assets-cg/{icon-cg-sel.png => icon-sel.png} (100%) rename assets-cg/{icon-cg-uns.png => icon-uns.png} (100%) delete mode 100644 assets-cg/img/10.png delete mode 100644 assets-cg/img/11.png delete mode 100644 assets-cg/img/4.png delete mode 100644 assets-cg/img/5.png delete mode 100644 assets-cg/img/6.png delete mode 100644 assets-cg/img/7.png delete mode 100644 assets-cg/img/8.png rename assets-cg/{img/9.png => player.png} (100%) delete mode 100644 project.cfg rename {include => src}/define.h (100%) rename {include => src}/drawiso.h (100%) rename {include => src}/player.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..e702e77 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,42 @@ +# Configure with [fxsdk build-fx] or [fxsdk build-cg], which provide the +# toolchain file and module path of the fxSDK + +cmake_minimum_required(VERSION 3.18) +project(MyAddin) + +include(GenerateG1A) +include(GenerateG3A) +include(Fxconv) +find_package(Gint 2.1 REQUIRED) + +set(SOURCES + src/main.c + src/player.c + src/drawiso.c + # ... +) +# Shared assets, fx-9860G-only assets and fx-CG-50-only assets +set(ASSETS + # ... +) +set(ASSETS_cg + assets-cg/1.png + assets-cg/2.png + assets-cg/3.png + assets-cg/player.png + # ... +) + +fxconv_declare_assets(${ASSETS} ${ASSETS_fx} ${ASSETS_cg} WITH_METADATA) + +add_executable(myaddin ${SOURCES} ${ASSETS} ${ASSETS_${FXSDK_PLATFORM}}) +target_compile_options(myaddin PRIVATE -Wall -Wextra -Os) +target_link_libraries(myaddin Gint::Gint) + +if("${FXSDK_PLATFORM_LONG}" STREQUAL fx9860G) + generate_g1a(TARGET myaddin OUTPUT "MyAddin.g1a" + NAME "MyAddin" ICON assets-fx/icon.png) +elseif("${FXSDK_PLATFORM_LONG}" STREQUAL fxCG50) + generate_g3a(TARGET myaddin OUTPUT "isometric.g3a" + NAME "isometri" ICONS assets-cg/icon-uns.png assets-cg/icon-sel.png) +endif() diff --git a/Makefile b/Makefile deleted file mode 100644 index 370dbbb..0000000 --- a/Makefile +++ /dev/null @@ -1,208 +0,0 @@ -#! /usr/bin/make -f -# Default Makefile for fxSDK add-ins. This file was probably copied there by -# the [fxsdk] program. -#--- - -# -# Configuration -# - -include project.cfg - -# Compiler flags -CFLAGSFX = $(CFLAGS) $(CFLAGS_FX) $(INCLUDE_FX) -CFLAGSCG = $(CFLAGS) $(CFLAGS_CG) $(INCLUDE_CG) - -# Linker flags -LDFLAGSFX := $(LDFLAGS) $(LDFLAGS_FX) -LDFLAGSCG := $(LDFLAGS) $(LDFLAGS_CG) - -# Dependency list generation flags -depflags = -MMD -MT $@ -MF $(@:.o=.d) -MP -# ELF to binary flags -BINFLAGS := -R .bss -R .gint_bss - -# G1A and G3A generation flags -NAME_G1A ?= $(NAME) -NAME_G3A ?= $(NAME) -G1AF := -i "$(ICON_FX)" -n "$(NAME_G1A)" --internal="$(INTERNAL)" -G3AF := -n basic:"$(NAME_G3A)" -i uns:"$(ICON_CG_UNS)" -i sel:"$(ICON_CG_SEL)" - -ifeq "$(TOOLCHAIN_FX)" "" -TOOLCHAIN_FX := sh3eb-elf -endif - -ifeq "$(TOOLCHAIN_CG)" "" -TOOLCHAIN_CG := sh4eb-elf -endif - -# fxconv flags -FXCONVFX := --fx --toolchain=$(TOOLCHAIN_FX) -FXCONVCG := --cg --toolchain=$(TOOLCHAIN_CG) - -# Determine the compiler install and include path -GCC_BASE_FX := $(shell $(TOOLCHAIN_FX)-gcc --print-search-dirs | grep install | sed 's/install: //') -GCC_BASE_CG := $(shell $(TOOLCHAIN_CG)-gcc --print-search-dirs | grep install | sed 's/install: //') -GCC_INCLUDE_FX := $(GCC_BASE_FX)/include -GCC_INCLUDE_CG := $(GCC_BASE_CG)/include - -# -# File listings -# - -NULL := -TARGET := $(subst $(NULL) $(NULL),-,$(NAME)) - -ifeq "$(TARGET_FX)" "" -TARGET_FX := $(TARGET).g1a -endif - -ifeq "$(TARGET_CG)" "" -TARGET_CG := $(TARGET).g3a -endif - -ELF_FX := build-fx/$(shell basename "$(TARGET_FX)" .g1a).elf -BIN_FX := $(ELF_FX:.elf=.bin) - -ELF_CG := build-cg/$(shell basename "$(TARGET_CG)" .g3a).elf -BIN_CG := $(ELF_CG:.elf=.bin) - -# Source files -src := $(wildcard src/*.[csS] \ - src/*/*.[csS] \ - src/*/*/*.[csS] \ - src/*/*/*/*.[csS]) -assets-fx := $(wildcard assets-fx/*/*) -assets-cg := $(wildcard assets-cg/*/*) - -# Object files -obj-fx := $(src:%=build-fx/%.o) \ - $(assets-fx:assets-fx/%=build-fx/assets/%.o) -obj-cg := $(src:%=build-cg/%.o) \ - $(assets-cg:assets-cg/%=build-cg/assets/%.o) - -# Additional dependencies -deps-fx := $(ICON_FX) -deps-cg := $(ICON_CG_UNS) $(ICON_CG_SEL) - -# All targets -all := -ifneq "$(wildcard build-fx)" "" -all += all-fx -endif -ifneq "$(wildcard build-cg)" "" -all += all-cg -endif - -# -# Build rules -# - -all: $(all) - -all-fx: $(TARGET_FX) -all-cg: $(TARGET_CG) - -$(TARGET_FX): $(obj-fx) $(deps-fx) - @ mkdir -p $(dir $@) - $(TOOLCHAIN_FX)-gcc -o $(ELF_FX) $(obj-fx) $(CFLAGSFX) $(LDFLAGSFX) - $(TOOLCHAIN_FX)-objcopy -O binary $(BINFLAGS) $(ELF_FX) $(BIN_FX) - fxg1a $(BIN_FX) -o $@ $(G1AF) - -$(TARGET_CG): $(obj-cg) $(deps-cg) - @ mkdir -p $(dir $@) - $(TOOLCHAIN_CG)-gcc -o $(ELF_CG) $(obj-cg) $(CFLAGSCG) $(LDFLAGSCG) - $(TOOLCHAIN_CG)-objcopy -O binary $(BINFLAGS) $(ELF_CG) $(BIN_CG) - mkg3a $(G3AF) $(BIN_CG) $@ - -# C sources -build-fx/%.c.o: %.c - @ mkdir -p $(dir $@) - $(TOOLCHAIN_FX)-gcc -c $< -o $@ $(CFLAGSFX) $(depflags) -build-cg/%.c.o: %.c - @ mkdir -p $(dir $@) - $(TOOLCHAIN_CG)-gcc -c $< -o $@ $(CFLAGSCG) $(depflags) - -# Assembler sources -build-fx/%.s.o: %.s - @ mkdir -p $(dir $@) - $(TOOLCHAIN_FX)-gcc -c $< -o $@ -build-cg/%.s.o: %.s - @ mkdir -p $(dir $@) - $(TOOLCHAIN_CG)-gcc -c $< -o $@ - -# Preprocessed assembler sources -build-fx/%.S.o: %.S - @ mkdir -p $(dir $@) - $(TOOLCHAIN_FX)-gcc -c $< -o $@ $(INCLUDE_FX) -build-cg/%.S.o: %.S - @ mkdir -p $(dir $@) - $(TOOLCHAIN_CG)-gcc -c $< -o $@ $(INCLUDE_CG) - -# Images -build-fx/assets/img/%.o: assets-fx/img/% - @ mkdir -p $(dir $@) - fxconv --bopti-image $< -o $@ $(FXCONVFX) name:img_$(basename $*) $(IMG.$*) -build-cg/assets/img/%.o: assets-cg/img/% - @ mkdir -p $(dir $@) - fxconv --bopti-image $< -o $@ $(FXCONVCG) name:img_$(basename $*) $(IMG.$*) - -# Fonts -build-fx/assets/fonts/%.o: assets-fx/fonts/% - @ mkdir -p $(dir $@) - fxconv -f $< -o $@ $(FXCONVFX) name:font_$(basename $*) $(FONT.$*) -build-cg/assets/fonts/%.o: assets-cg/fonts/% - @ mkdir -p $(dir $@) - fxconv -f $< -o $@ $(FXCONVCG) name:font_$(basename $*) $(FONT.$*) - -# Binaries -build-fx/assets/bin/%.o: assets-fx/bin/% - @ mkdir -p $(dir $@) - fxconv -b $< -o $@ $(FXCONVFX) name:bin_$(basename $*) $(BIN.$*) -build-cg/assets/bin/%.o: assets-cg/bin/% - @ mkdir -p $(dir $@) - fxconv -b $< -o $@ $(FXCONVCG) name:bin_$(basename $*) $(BIN.$*) - -# Custom conversions -build-fx/assets/%.o: assets-fx/% - @ mkdir -p $(dir $@) - fxconv --custom $< -o $@ $(FXCONVFX) type:$(subst /,,$(dir $*)) name:$(subst /,_,$(basename $*)) -build-cg/assets/%.o: assets-cg/% - @ mkdir -p $(dir $@) - fxconv --custom $< -o $@ $(FXCONVCG) type:$(subst /,,$(dir $*)) name:$(subst /,_,$(basename $*)) - -# -# Cleaning and utilities -# - -# Dependency information --include $(shell find build* -name *.d 2> /dev/null) -build-fx/%.d: ; -build-cg/%.d: ; -.PRECIOUS: build-fx build-cg build-fx/%.d build-cg/%.d %/ - -clean-fx: - @ rm -rf build-fx/ -clean-cg: - @ rm -rf build-cg/ - -distclean-fx: clean-fx - @ rm -f $(TARGET_FX) -distclean-cg: clean-cg - @ rm -f $(TARGET_CG) - -clean: clean-fx clean-cg - -distclean: distclean-fx distclean-cg - -install-fx: $(TARGET_FX) - p7 send -f $< -install-cg: $(TARGET_CG) - @ while [[ ! -h /dev/Prizm1 ]]; do sleep 0.25; done - @ while ! mount /dev/Prizm1; do sleep 0.25; done - @ rm -f /mnt/prizm/$< - @ cp $< /mnt/prizm - @ umount /dev/Prizm1 - @- eject /dev/Prizm1 - -.PHONY: all all-fx all-cg clean distclean install-fx install-cg diff --git a/assets-cg/img/1.png b/assets-cg/1.png similarity index 100% rename from assets-cg/img/1.png rename to assets-cg/1.png diff --git a/assets-cg/img/2.png b/assets-cg/2.png similarity index 100% rename from assets-cg/img/2.png rename to assets-cg/2.png diff --git a/assets-cg/img/3.png b/assets-cg/3.png similarity index 100% rename from assets-cg/img/3.png rename to assets-cg/3.png diff --git a/assets-cg/fxconv-metadata.txt b/assets-cg/fxconv-metadata.txt new file mode 100644 index 0000000..a25f293 --- /dev/null +++ b/assets-cg/fxconv-metadata.txt @@ -0,0 +1,12 @@ +1.png: + type: bopti-image + name: img_1 +2.png: + type: bopti-image + name: img_2 +3.png: + type: bopti-image + name: img_3 +player.png: + type: bopti-image + name: img_player diff --git a/assets-cg/icon-cg-sel.png b/assets-cg/icon-sel.png similarity index 100% rename from assets-cg/icon-cg-sel.png rename to assets-cg/icon-sel.png diff --git a/assets-cg/icon-cg-uns.png b/assets-cg/icon-uns.png similarity index 100% rename from assets-cg/icon-cg-uns.png rename to assets-cg/icon-uns.png diff --git a/assets-cg/img/10.png b/assets-cg/img/10.png deleted file mode 100644 index 60c62042959caaab65c358d1495b293898df8777..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 656 zcmV;B0&o3^P)L_g8=HZS02`Iz2ns=rq6djYCGp46#CY&( zJoyKh@E36L;?cyv!Eo>@#;egpA)X964K9NSg0QV?*LD51)`PC0-5^~&c(9+_^L?ME z-{)=L_bEg~L_|bH{O`oNEm&PzZ~+8C@adYS0dV==ldhf_D!FCa;@!#zs#V#SGc+{F z{FON`4%^6)Nvlf>uBO!~Zf>*wZNt;IOB%ZA_;P!X#TgR?EW3$eT3nbp&6%lF2tw+} zW)59=`SiYPm?j&WKgbt$k?U5N4WZT>l&dP)ObRjG$Nb!Ra@k>SKYZ5FtE2e*@m;qp z)%a4_!FJ;8SCmlZrfE@;RSeViw2_Q}(3|Aejf*^Z^s3D-9u)G+i|+Q;cT7Vg5qH9y zTQ()B<}(M#W>QS%1}W|Dl3!kQgLQ2U0Q4jh^!2CFj3%?wX>wxUk>-}&^ zNJ<_1z_&h(;58J*;~nQgSA$45Eo{5V=VA#}^S_yXA<4|7=*53Mh=PqAj9 zeOh0xQB@6HH)vmvxl>IBqX$W6OD~h5y ze3tdVWvfT~##j=uu~=j>fyicnZ`~mqLX>Pavr=U?d~R`cd@_x{ee;rdOakESybgeAnsjexw;-8_vscW|)pQr{Dqs<%{Q{-^!qon7 zddA1obL_b@6-Cj}a8)b`2nJy=vVP8h*hAjgcErbHg<>IxupwYs)}sx64dHNP5p?2o0<3GBFi$dlXk)o&=hDkCJM-&AI*EH|x4~A3w zuNIM;koi?y%teT7I;UFIA85AKsr^q@@$bZV#n*j|eE9eQ`3w0SQ0Jo*00000NkvXX Hu0mjfal{yz diff --git a/assets-cg/img/4.png b/assets-cg/img/4.png deleted file mode 100644 index 1705f20b81b760ab02cc1e713472813c252b8956..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 473 zcmV;~0Ve*5P)g7;$Y%{i5nXsgfBw;8h!*u zcUNPW*p!4g@h1kNgQiY+4p0T!%UxT>{+1@ayzf2FbMGCbq@<*zB;ZPNbSZI=h`2p6 zaW-9mc!2i|^s-Q_LM1QB`u`C~(|(ba*Cay$#Sf@F3O;rJ6B9RP(>hDnCVs2x%m4&-xSUzxg>o931}U^T^!QEqJ!Y<{_9EbZ6ZL`SFBHUl<7^1zptfr zymYIbm8kgp22^dGQ|t#OjIcS_aF$sF(%9*dDCYp*=~mQ9pIVc8i)rH&uYCf*Ek7oT zO;Oc%>)3LHBS$y_*_r_`*(>4R`By45dfkmNxKRRNKH%7~>2EG|v6(i?cLe%wc9ediR?7gzl|Nm^}O&7;ns#>Put*ysOWW9bq!1Y~Ea+F*bPi1r^Iawkq z$0~(EVkAN$$2v5Lm^xM|)}u*e_l|X}5{c?~cg&kEvNe-KX5%pjaohX?;}F%ODp(v= P00000NkvXXu0mjf0qE1k diff --git a/assets-cg/img/5.png b/assets-cg/img/5.png deleted file mode 100644 index 2f10840c74cbc18d25b290ff84c50d3370b5653d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 225 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz&H|6fVg?4jBOuH;Rhv&5C^*^E z#W5tJ_3cz|u?7VW*F^m{^{#J@x|N>!!%(NT*V=e%xwWDYBT(Uk_XQ=3S1qg2QCe8O z(|qbd)i}Y=j{*xqQg)n>ej}RccaAOE)s8=$z29Zt!FLa)am?q_OI-9hzFt}B&oBAq zE}yJcggw)nc+2y}yo;eqd*c#bg#`+Fo0ojeUET5Aj^l2E?!*_p5^kZFbLPe@&U8AN Sy8bH2=?tE(elF{r5}E*>T2p=i diff --git a/assets-cg/img/6.png b/assets-cg/img/6.png deleted file mode 100644 index 548c751fba1eafee2770a3adebaebe7400eba974..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 374 zcmV-+0g3*JP) znANKU@WbVb;Kd242+<_>(YsxSm-9xmv}36gY6rNGSCF`@4!9yheB=yp5#$2zg1{F# zp-V~wiW2a%tvH3*1!T*D*jS$30g-^1*DmQbVh2J|%;7CLL~x(pg^){3D2bLt&;Idn z0pQOADohS=AxQ!NV7QjHup|woh~pS|Ub&kEgyuCpI*xM`R|#;1_=x#9`SWL1?!?ZC U16!k{mjD0&07*qoM6N<$f=ZL2u>b%7 diff --git a/assets-cg/img/7.png b/assets-cg/img/7.png deleted file mode 100644 index 552b28aa5839596fa259127221665db57d707ab0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 426 zcmV;b0agBqP)<@wTN8urA|4i z#ymtM)C%N`M&wpiASIE5#)RtcH{Xubh*H@(in4%k{A^yCt|!p7h&%&Q5`C=HS@4nq zYhZT*s$-ZYAO|<3#*DiwAR?eOmS&DvfoJlkNOR&Dvirn4$&nx*@LOqz*$#F!g7JLbTAc!fEj}-0i6i77P*4q7D?5{;ioVS!s_xqPgzB`(a zdo3q`t(y7+RC%5pyCbMScxzS%uz{Z?;H*go05G;&m1hwBK&cCq`t^L{cNTylflUs4 z8lVs&2SBmE7U-HG;RQq|&p$$Rjp&Y$cc5!Pbea+dKB=)u!@*Kz<@u?<`GJ{TU@g*Z zt-bSIsMLj`{>FlkcOW)s1Kg?|m_fvX3WiYp{C1Bc97Jy0T}#q}F(G~YXS*Cgx3%^( zAb?P1l}`(D+2#PE+t7;8BXb8*GK`ydfCV5OEXf{r2cETmzP5@l8Z3HFZY41YI|r^X z#b)810Xe?^QU7f&Ea-tvY&#GtWHJB%Q@KsdP(!Zq, replace spaces with dashes, -# and add .g1a (or .g3a). You can specify a different folder if you want. -TARGET_FX := -TARGET_CG := - -# fx-9860G icon location -ICON_FX = assets-fx/icon-fx.png -# fx-CG 50 icon locations -ICON_CG_UNS = assets-cg/icon-cg-uns.png -ICON_CG_SEL = assets-cg/icon-cg-sel.png - -#--- -# Toolchain selection -#--- - -# Toolchain for fx9860g. Please see also CFLAGS_FX below. -TOOLCHAIN_FX := sh-elf - -# Toolchain for fxcg50. Please see also CFLAGS_CG below. -TOOLCHAIN_CG := sh-elf - -#--- -# Compiler flags -#--- - -# Base compiler flags for the fxSDK, you usually want to keep these. -CFLAGS := -mb -ffreestanding -nostdlib -fstrict-volatile-bitfields - -# Platform-specific compiler flags. -# <> If you are using sh3eb-elf, use -m3. (You can do this on both FX and CG.) -# <> If you are using sh4eb-elf, use -m4-nofpu. (Not ideal on FX but works.) -# <> If you are using sh4eb-nofpu-elf, then your compiler will likely use the -# FPU and cause problems on the calculator. Consider another configuration. -# <> If you are using an sh-elf with several targets, specify whichever you -# support. I recommend -m3 on FX and -m4-nofpu on CG. -# Please see also TOOLCHAIN_FX and TOOLCHAIN_CG above. -CFLAGS_FX := -D FX9860G -m3 -CFLAGS_CG := -D FXCG50 -m4-nofpu - -# Additional compiler flags, change to your own taste! -CFLAGS += -Wall -Wextra -Wno-missing-field-initializers -Os - -# Include paths. Add one -I option for each folder from which you want to -# be able to include files with #include<>. The Makefile provides a variable -# GCC_INCLUDE_FX/GCC_INCLUDE_CG that represents the default include folder, -# which is useful for some libraries such as OpenLibm. -INCLUDE_FX = -I include -INCLUDE_CG = -I include - -# Libraries. Add one -l option for each library you are using, and also -# suitable -L options if you have library files in custom folders. To use -# fxlib, add libfx.a to the project directory and use "-L . -lfx". -LIBS_FX := -LIBS_CG := - -# Base linker flags for the fxSDK, you usually want to keep these. -LDFLAGS_FX := -T fx9860g.ld -lgint-fx $(LIBS_FX) -lgint-fx -lgcc -LDFLAGS_CG := -T fxcg50.ld -lgint-cg $(LIBS_CG) -lgint-cg -lgcc - -# Additional linker flags, if you need any. -LDFLAGS := - -# Additional platform-specific linker flags. -LDFLAGS_FX += -Wl,-Map=build-fx/map -LDFLAGS_CG += -Wl,-Map=build-cg/map - -#--- -# File conversion parameters -#--- - -# Here you can add fxconv options for each converted file, individually. -# The syntax is ".". For example, to specify the parameters for a -# font named "hexa.png", you might write: -# -# FONT.hexa.png = charset:print grid.size:3x5 grid.padding:1 diff --git a/include/define.h b/src/define.h similarity index 100% rename from include/define.h rename to src/define.h diff --git a/src/drawiso.c b/src/drawiso.c index 20b740d..fb24313 100644 --- a/src/drawiso.c +++ b/src/drawiso.c @@ -6,7 +6,7 @@ extern bopti_image_t img_1; extern bopti_image_t img_2; extern bopti_image_t img_3; -extern bopti_image_t img_9; +extern bopti_image_t img_3; void draw_map_at(int map[], int posx, int posy, int width) { int j = 0; @@ -23,7 +23,7 @@ void draw_map_at(int map[], int posx, int posy, int width) { draw_from_bottom(x,j,posx,posy,&img_3,16); break; case 9: - draw_iso(x,j,posx,posy,&img_9); + draw_iso(x,j,posx,posy,&img_3); break; } x++; @@ -97,7 +97,7 @@ void draw_map_player(int map[], int indx, int indy, int taillemap) { draw_from_bottom(x,y,150,60,&img_3,16); break; case 9: - draw_iso(x,y,150,60,&img_9); + draw_iso(x,y,150,60,&img_3); break; } x++; diff --git a/include/drawiso.h b/src/drawiso.h similarity index 100% rename from include/drawiso.h rename to src/drawiso.h diff --git a/src/player.c b/src/player.c index a6c2526..fdcd6b5 100644 --- a/src/player.c +++ b/src/player.c @@ -3,8 +3,8 @@ #include "drawiso.h" #include "define.h" -extern bopti_image_t img_9; +extern bopti_image_t img_player; void draw_player(int posx, int posy) { - draw_iso(posx,posy,150,60,&img_9); + draw_iso(posx,posy,150,60,&img_player); } diff --git a/include/player.h b/src/player.h similarity index 100% rename from include/player.h rename to src/player.h