%.bin.o : %.bin
#---------------------------------------------------------------------------------
@echo $(notdir $<)
- @$(bin2o)
+ $(bin2o)
+
+# not the right way to do this
+#---------------------------------------------------------------------------------
+%.vsh.o : %.vsh
+#---------------------------------------------------------------------------------
+ @echo $(notdir $<)
+ @python $(AEMSTRO)/aemstro_as.py $< ../$(notdir $<).shbin
+ @bin2s ../$(notdir $<).shbin | arm-none-eabi-as -o $@
+ echo "extern const u8" `(echo $(notdir $<).shbin | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end[];" > `(echo $(notdir $<).shbin | tr . _)`.h
+ echo "extern const u8" `(echo $(notdir $<).shbin | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"[];" >> `(echo $(notdir $<).shbin | tr . _)`.h
+ echo "extern const u32" `(echo $(notdir $<).shbin | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size";" >> `(echo $(notdir $<).shbin | tr . _)`.h
+ @rm ../$(notdir $<).shbin
-include $(DEPENDS)
#include <string.h>
#include <3ds/3ds.h>
#include "math.h"
-#include "test_shbin.h"
+#include "test_vsh_shbin.h"
#include "test_png_bin.h"
#include "mdl.h"
memcpy(vertArray, mdlData, sizeof(mdlData));
tx=ty=0.0f; tz=-0.1f;
- shader=SHDR_ParseSHBIN((u32*)test_shbin,test_shbin_size);
+ shader=SHDR_ParseSHBIN((u32*)test_vsh_shbin,test_vsh_shbin_size);
GX_SetMemoryFill(gxCmdBuf, (u32*)gpuOut, 0x404040FF, (u32*)&gpuOut[0x2EE00], 0x201, (u32*)gpuDOut, 0x00000000, (u32*)&gpuDOut[0x2EE00], 0x201);
gfxSwapBuffersGpu();