Merge remote-tracking branch 'upstream/master'
zero
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
.vscode/
|
||||
bin/**
|
||||
fonts/**
|
||||
@@ -1,53 +1,22 @@
|
||||
EE_BIN = ari.elf
|
||||
|
||||
TYRA_DIR = ./../../engine
|
||||
|
||||
EE_OBJS = \
|
||||
../../engine/models/math/matrix.o \
|
||||
../../engine/models/math/plane.o \
|
||||
../../engine/models/math/point.o \
|
||||
../../engine/models/math/vector3.o \
|
||||
../../engine/models/mesh_frame.o \
|
||||
../../engine/models/mesh_material.o \
|
||||
../../engine/models/mesh.o \
|
||||
../../engine/models/mesh_texture.o \
|
||||
../../engine/modules/audio.o \
|
||||
../../engine/modules/camera_base.o \
|
||||
../../engine/modules/file_service.o \
|
||||
../../engine/modules/gif_sender.o \
|
||||
../../engine/modules/light.o \
|
||||
../../engine/modules/pad.o \
|
||||
../../engine/modules/renderer.o \
|
||||
../../engine/modules/texture_repository.o \
|
||||
../../engine/modules/timer.o \
|
||||
../../engine/modules/vif_sender.o \
|
||||
../../engine/utils/math.o \
|
||||
../../engine/utils/string.o \
|
||||
../../engine/loaders/bmp_loader.o \
|
||||
../../engine/loaders/dff_loader.o \
|
||||
../../engine/loaders/md2_loader.o \
|
||||
../../engine/loaders/obj_loader.o \
|
||||
../../engine/vu1_progs/draw3D.o \
|
||||
../../engine/engine.o \
|
||||
camera.o \
|
||||
objects/player.o \
|
||||
ari.o \
|
||||
main.o
|
||||
|
||||
EE_LIBS = -ldraw -lgraph -lmath3d -lpacket -ldma -lpacket2 -lpad -laudsrv -lc -lstdc++
|
||||
EE_INCS := -I./../../engine/include $(EE_INCS)
|
||||
EE_DVP = dvp-as
|
||||
EE_VCL = vcl
|
||||
EE_LIBS = -ltyra
|
||||
|
||||
all: $(EE_BIN)
|
||||
$(EE_STRIP) --strip-all $(EE_BIN)
|
||||
mv $(EE_BIN) bin/$(EE_BIN)
|
||||
rm $(EE_OBJS)
|
||||
|
||||
# https://github.com/microsoft/wsl/issues/2468#issuecomment-374904520
|
||||
#%.vsm: %.vcl # sudo service binfmt-support start
|
||||
# $(EE_VCL) $< >> $@
|
||||
|
||||
%.o: %.vsm
|
||||
$(EE_DVP) $< -o $@
|
||||
rebuild-engine:
|
||||
cd $(TYRA_DIR) && make clean && make
|
||||
|
||||
clean:
|
||||
rm -f $(EE_OBJS)
|
||||
@@ -61,5 +30,4 @@ run: $(EE_BIN)
|
||||
rm $(EE_OBJS)
|
||||
cd bin/ && ps2client execee host:$(EE_BIN)
|
||||
|
||||
include $(PS2SDK)/samples/Makefile.pref
|
||||
include $(PS2SDK)/samples/Makefile.eeglobal
|
||||
include $(TYRA_DIR)/Makefile.pref
|
||||
|
||||
+11
-7
@@ -48,6 +48,10 @@ void Ari::onInit()
|
||||
island.shouldBeBackfaceCulled = true;
|
||||
island.shouldBeFrustumCulled = false;
|
||||
|
||||
fist.size.set(100.0F, 100.0F);
|
||||
Texture *fistTex = texRepo->add("2d/", "fist", PNG);
|
||||
fistTex->addLink(fist.getId());
|
||||
|
||||
islandAddons.loadDff("sunnyisl/", "sunnyisl3", 0.1F, false);
|
||||
islandAddons.shouldBeBackfaceCulled = true;
|
||||
islandAddons.rotation.x = -1.6F;
|
||||
@@ -58,7 +62,7 @@ void Ari::onInit()
|
||||
|
||||
waterFloors[0].loadObj("water/", "water", 5.0F, false);
|
||||
waterFloors[0].position.set(0.0F, 8.0F, 0.0F);
|
||||
texRepo->addByMesh("water/", waterFloors[0]);
|
||||
texRepo->addByMesh("water/", waterFloors[0], BMP);
|
||||
for (u8 i = 0; i < WATER_TILES_COUNT; i++)
|
||||
{
|
||||
spirals[i].x = 1.0F;
|
||||
@@ -74,11 +78,11 @@ void Ari::onInit()
|
||||
->addLink(waterFloors[i].getId(), waterFloors[i].getMaterial(0).getId());
|
||||
}
|
||||
|
||||
texRepo->addByMesh("sunnyisl/", island);
|
||||
texRepo->addByMesh("sunnyisl/", islandAddons);
|
||||
texRepo->addByMesh("skybox/", skybox);
|
||||
texRepo->addByMesh("ari/", player.mesh);
|
||||
engine->audio.playSong();
|
||||
texRepo->addByMesh("sunnyisl/", island, BMP);
|
||||
texRepo->addByMesh("sunnyisl/", islandAddons, BMP);
|
||||
texRepo->addByMesh("skybox/", skybox, BMP);
|
||||
texRepo->addByMesh("ari/", player.mesh, BMP);
|
||||
// engine->audio.playSong();
|
||||
}
|
||||
|
||||
void Ari::initBulb()
|
||||
@@ -98,8 +102,8 @@ void Ari::onUpdate()
|
||||
if (engine->pad.isCircleClicked)
|
||||
engine->audio.playADPCM(adpcm2);
|
||||
camera.update(engine->pad, player.mesh);
|
||||
engine->renderer->drawRectangle();
|
||||
engine->renderer->draw(skybox);
|
||||
engine->renderer->draw(fist);
|
||||
engine->renderer->draw(island);
|
||||
engine->renderer->draw(islandAddons);
|
||||
engine->renderer->draw(player.mesh);
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <engine.hpp>
|
||||
#include "objects/player.hpp"
|
||||
#include <models/light_bulb.hpp>
|
||||
#include <models/sprite.hpp>
|
||||
#include <modules/texture_repository.hpp>
|
||||
#include "./camera.hpp"
|
||||
|
||||
@@ -39,6 +40,7 @@ private:
|
||||
Player player;
|
||||
Mesh island, islandAddons, skybox;
|
||||
Mesh *waterFloors;
|
||||
Sprite fist;
|
||||
audsrv_adpcm_t *adpcm1, *adpcm2;
|
||||
Point *spirals;
|
||||
Camera camera;
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
.vscode/
|
||||
bin/**
|
||||
fonts/**
|
||||
@@ -1,32 +1,8 @@
|
||||
EE_BIN = floors.elf
|
||||
|
||||
TYRA_DIR = ./../../engine
|
||||
|
||||
EE_OBJS = \
|
||||
../../engine/models/math/matrix.o \
|
||||
../../engine/models/math/plane.o \
|
||||
../../engine/models/math/point.o \
|
||||
../../engine/models/math/vector3.o \
|
||||
../../engine/models/mesh_frame.o \
|
||||
../../engine/models/mesh_material.o \
|
||||
../../engine/models/mesh.o \
|
||||
../../engine/models/mesh_texture.o \
|
||||
../../engine/modules/audio.o \
|
||||
../../engine/modules/camera_base.o \
|
||||
../../engine/modules/file_service.o \
|
||||
../../engine/modules/gif_sender.o \
|
||||
../../engine/modules/light.o \
|
||||
../../engine/modules/pad.o \
|
||||
../../engine/modules/renderer.o \
|
||||
../../engine/modules/texture_repository.o \
|
||||
../../engine/modules/timer.o \
|
||||
../../engine/modules/vif_sender.o \
|
||||
../../engine/utils/math.o \
|
||||
../../engine/utils/string.o \
|
||||
../../engine/loaders/bmp_loader.o \
|
||||
../../engine/loaders/dff_loader.o \
|
||||
../../engine/loaders/md2_loader.o \
|
||||
../../engine/loaders/obj_loader.o \
|
||||
../../engine/vu1_progs/draw3D.o \
|
||||
../../engine/engine.o \
|
||||
managers/light_manager.o \
|
||||
managers/floor_manager.o \
|
||||
camera.o \
|
||||
@@ -36,24 +12,18 @@ EE_OBJS = \
|
||||
floors.o \
|
||||
main.o
|
||||
|
||||
EE_LIBS = -ldraw -lgraph -lmath3d -lpacket -ldma -lpad -lpacket2 -laudsrv -lc -lstdc++
|
||||
EE_INCS := -I./../../engine/include $(EE_INCS)
|
||||
EE_DVP = dvp-as
|
||||
EE_VCL = openvcl
|
||||
EE_LIBS = -ltyra
|
||||
|
||||
all: $(EE_BIN)
|
||||
$(EE_STRIP) --strip-all $(EE_BIN)
|
||||
mv $(EE_BIN) bin/$(EE_BIN)
|
||||
rm $(EE_OBJS)
|
||||
|
||||
%.vsm: %.vcl
|
||||
$(EE_VCL) $< >> $@
|
||||
|
||||
%.o: %.vsm
|
||||
$(EE_DVP) $< -o $@
|
||||
rebuild-engine:
|
||||
cd $(TYRA_DIR) && make clean && make
|
||||
|
||||
clean:
|
||||
rm -f $(EE_BIN) $(EE_OBJS)
|
||||
rm -f $(EE_OBJS)
|
||||
|
||||
run: $(EE_BIN)
|
||||
killall -v ps2client || true
|
||||
@@ -64,5 +34,4 @@ run: $(EE_BIN)
|
||||
rm $(EE_OBJS)
|
||||
cd bin/ && ps2client execee host:$(EE_BIN)
|
||||
|
||||
include $(PS2SDK)/samples/Makefile.pref
|
||||
include $(PS2SDK)/samples/Makefile.eeglobal
|
||||
include $(TYRA_DIR)/Makefile.pref
|
||||
|
||||
@@ -36,8 +36,8 @@ void Floors::onInit()
|
||||
engine->audio.setSongVolume(100);
|
||||
engine->audio.playSong();
|
||||
texRepo = engine->renderer->getTextureRepository();
|
||||
texRepo->addByMesh("warrior/", player.mesh);
|
||||
texRepo->addByMesh("floor/", floorManager.floors[0].mesh);
|
||||
texRepo->addByMesh("warrior/", player.mesh, BMP);
|
||||
texRepo->addByMesh("floor/", floorManager.floors[0].mesh, BMP);
|
||||
for (u32 i = 1; i < floorManager.floorAmount; i++)
|
||||
texRepo->getByMesh(floorManager.floors[0].mesh.getId(), floorManager.floors[0].mesh.getMaterial(0).getId())
|
||||
->addLink(floorManager.floors[i].mesh.getId(), floorManager.floors[i].mesh.getMaterial(0).getId());
|
||||
|
||||
Reference in New Issue
Block a user