Skip to content

Commit

Permalink
v3.5
Browse files Browse the repository at this point in the history
v3.5
  • Loading branch information
DanielSant0s authored Feb 22, 2025
2 parents 1428754 + f79715c commit 1c6e28d
Show file tree
Hide file tree
Showing 43 changed files with 5,387 additions and 2,654 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ embed/
bin/brew_data.json

.*

!.github
!.gitignore
!.gitattributes
!.github
!modules/mmceman/mmceman.irx

26 changes: 15 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,20 +69,21 @@ EE_VCLPP = vclpp
JS_CORE = quickjs/cutils.o quickjs/libbf.o quickjs/libregexp.o quickjs/libunicode.o \
quickjs/realpath.o quickjs/quickjs.o quickjs/quickjs-libc.o

VU1_MPGS = draw_3D_pvc.o draw_3D_pvc_notex.o \
draw_3D_colors.o draw_3D_colors_notex.o \
draw_3D_lights.o draw_3D_lights_notex.o \
draw_3D_spec.o draw_3D_spec_notex.o
VU1_MPGS = draw_3D_pvc.o \
draw_3D_colors.o draw_3D_colors_scissor.o \
draw_3D_lights.o draw_3D_lights_scissor.o \
draw_3D_spec.o draw_3D_spec_scissor.o

APP_CORE = main.o bootlogo.o vif.o athena_math.o memory.o ee_tools.o module_system.o taskman.o pad.o system.o strUtils.o
APP_CORE = main.o bootlogo.o vif.o athena_math.o memory.o ee_tools.o module_system.o taskman.o pad.o system.o strUtils.o

INI_READER = readini/src/readini.o

ATHENA_MODULES = ath_env.o ath_physics.o ath_vector.o ath_pads.o ath_system.o ath_archive.o ath_timer.o ath_task.o

IOP_MODULES = iomanx.o filexio.o sio2man.o mcman.o mcserv.o padman.o \
mtapman.o usbd.o bdm.o bdmfs_fatfs.o usbmass_bd.o cdfs.o \
ps2hdd.o ps2fs.o ps2dev9.o ps2atad.o poweroff.o freeram.o
usbd.o bdm.o bdmfs_fatfs.o usbmass_bd.o cdfs.o \
freeram.o ps2dev9.o mtapman.o poweroff.o ata_bd.o \
ps2hdd.o ps2fs.o mmceman.o

EMBEDDED_ASSETS = quicksand_regular.o owl_indices.o owl_palette.o

Expand All @@ -93,6 +94,7 @@ ifeq ($(GRAPHICS),1)
EE_INCS += -I$(PS2DEV)/gsKit/include -I$(PS2SDK)/ports/include/freetype2
EE_CFLAGS += -DATHENA_GRAPHICS
APP_CORE += graphics.o atlas.o fntsys.o render.o camera.o calc_3d.o fast_obj/fast_obj.o

ATHENA_MODULES += ath_color.o ath_font.o ath_render.o ath_lights.o ath_3dcamera.o ath_screen.o ath_image.o ath_imagelist.o ath_shape.o
EE_OBJS += $(VU1_MPGS)
endif
Expand All @@ -110,6 +112,7 @@ ifeq ($(AUDIO),1)
APP_CORE += sound.o audsrv.o
ATHENA_MODULES += ath_sound.o
IOP_MODULES += libsd.o

EE_LIBS += -laudsrv -lvorbisfile -lvorbis -logg
endif

Expand All @@ -125,13 +128,15 @@ ifeq ($(KEYBOARD),1)
EE_CFLAGS += -DATHENA_KEYBOARD
ATHENA_MODULES += ath_keyboard.o
IOP_MODULES += ps2kbd.o

EE_LIBS += -lkbd
endif

ifeq ($(MOUSE),1)
EE_CFLAGS += -DATHENA_MOUSE
ATHENA_MODULES += ath_mouse.o
IOP_MODULES += ps2mouse.o

EE_LIBS += -lmouse
endif

Expand Down Expand Up @@ -167,13 +172,12 @@ all: $(EXT_LIBS) $(EE_BIN) $(EE_EMBED_DIR) $(EE_OBJS_DIR)
echo "Building $(EE_BIN)..."
$(EE_STRIP) $(EE_BIN)

# echo "Compressing $(EE_BIN_PKD)...\n"
# ps2-packer $(EE_BIN) $(EE_BIN_PKD) > /dev/null
ps2-packer $(EE_BIN) $(EE_BIN_PKD) > /dev/null

mv $(EE_BIN) bin/
# mv $(EE_BIN_PKD) bin/
mv $(EE_BIN_PKD) bin/

# mpgs: src/draw_3D_pvc.vsm src/draw_3D_pvc_notex.vsm src/draw_3D_colors.vsm src/draw_3D_colors_notex.vsm src/draw_3D_lights.vsm src/draw_3D_lights_notex.vsm src/draw_3D_spec.vsm src/draw_3D_spec_notex.vsm
# mpgs: src/draw_3D_pvc.vsm src/draw_3D_colors.vsm src/draw_3D_colors_scissor.vsm src/draw_3D_lights.vsm src/draw_3D_lights_scissor.vsm src/draw_3D_spec.vsm src/draw_3D_spec_scissor.vsm

debug: $(EXT_LIBS) $(EE_BIN)
echo "Building $(EE_BIN) with debug symbols..."
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -428,14 +428,9 @@ Methods:
* setTexture(id, texture) - Changes or sets the nth texture on models.
* getPipeline() - Returns the current rendering pipeline loaded for the model.
* setPipeline(pipeline) - Sets the current pipeline for the model. Available pipelines:
• Render.PL_NO_LIGHTS_COLORS - Colors and lights disabled.
• Render.PL_NO_LIGHTS_COLORS_TEX - Colors, lights and textures disabled.
• Render.PL_NO_LIGHTS - Lights disabled, colors still working.
• Render.PL_NO_LIGHTS_TEX - Textures and lights disabled, colors still working.
• Render.PL_SPECULAR - Diffuse and specular lights and colors enabled.
• Render.PL_SPECULAR_NO_TEX - Diffuse and specular lights and colors enabled, textures disabled.
• Render.PL_DEFAULT - Default for textured models. Lights and colors enabled.
• Render.PL_DEFAULT_NO_TEX - Default for non-textured models. Lights and colors enabled.

Properties:

Expand All @@ -448,6 +443,11 @@ Properties:
* material_indices - Render.materialIndex array.
* size - Vertex quantity.
* bounds - Mesh bounding box.

* accurate_clipping - Toggle accurate clipping.
* backface_culling - Toggle backface culling. (Not implemented yet)
* texture_mapping - Toggle texture mapping. (it can be used to disable texturing on a whole textured model)
* shade_model - Flat = 0, Gouraud = 1.

**Camera**
* Camera.type(type) - Change camera function types.
Expand Down
15 changes: 10 additions & 5 deletions bin/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,10 @@

const pipelines = [
"NO_LIGHTS",
"NO_LIGHTS_TEX",
"DEFAULT",
"DEFAULT_NO_TEX",
"SPECULAR",
"SPECULAR_NO_TEX",

"PVC",
"PVC_NO_TEX",
];

const font = new Font("default");
Expand All @@ -26,7 +22,7 @@ canvas.psmz = Z16S;

Screen.setMode(canvas);

Render.setView(70.0, 2.0, 200.0);
Render.setView(60.0, 5.0, 4000.0);

// Change your root folder to "render" so we can work with file path magic :p
os.chdir("render");
Expand Down Expand Up @@ -186,6 +182,15 @@ while(true) {
bbox ^= 1;
}

if(pad.justPressed(Pads.CIRCLE)) {
model[modeltodisplay].texture_mapping ^= 1;
}

if(pad.justPressed(Pads.CROSS)) {
model[modeltodisplay].accurate_clipping ^= 1;
}


model[modeltodisplay].draw(0.0f, 0.0f, 0.0f, savedly, savedlx, 0.0f);

if(bbox) {
Expand Down
9 changes: 6 additions & 3 deletions embed.make
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ $(EE_EMBED_DIR)bdmfs_fatfs.c: $(PS2SDK)/iop/irx/bdmfs_fatfs.irx | $(EE_EMBED_DIR

$(EE_EMBED_DIR)usbmass_bd.c: $(PS2SDK)/iop/irx/usbmass_bd.irx | $(EE_EMBED_DIR)
$(BIN2S) $< $@ usbmass_bd_irx

$(EE_EMBED_DIR)ps2dev9.c: $(PS2SDK)/iop/irx/ps2dev9.irx | $(EE_EMBED_DIR)
$(BIN2S) $< $@ ps2dev9_irx

$(EE_EMBED_DIR)ps2atad.c: $(PS2SDK)/iop/irx/ps2atad.irx | $(EE_EMBED_DIR)
$(BIN2S) $< $@ ps2atad_irx
$(EE_EMBED_DIR)ata_bd.c: $(PS2SDK)/iop/irx/ata_bd.irx | $(EE_EMBED_DIR)
$(BIN2S) $< $@ ata_bd_irx

$(EE_EMBED_DIR)ps2hdd.c: $(PS2SDK)/iop/irx/ps2hdd.irx | $(EE_EMBED_DIR)
$(BIN2S) $< $@ ps2hdd_irx
Expand All @@ -56,6 +56,9 @@ $(EE_EMBED_DIR)cdfs.c: $(PS2SDK)/iop/irx/cdfs.irx | $(EE_EMBED_DIR)
$(EE_EMBED_DIR)poweroff.c: $(PS2SDK)/iop/irx/poweroff.irx | $(EE_EMBED_DIR)
$(BIN2S) $< $@ poweroff_irx

$(EE_EMBED_DIR)mmceman.c: modules/mmceman/mmceman.irx | $(EE_EMBED_DIR)
$(BIN2S) $< $@ mmceman_irx

modules/ds34bt/ee/libds34bt.a: modules/ds34bt/ee
$(MAKE) -C $<

Expand Down
Binary file added modules/mmceman/mmceman.irx
Binary file not shown.
Loading

0 comments on commit 1c6e28d

Please sign in to comment.