mirror of
https://github.com/luksamuk/engine-psx.git
synced 2025-04-28 21:38:02 +03:00
Code cleanup, attempt at semitransparent shield
This commit is contained in:
parent
014d3245dc
commit
1036c63bca
3 changed files with 4 additions and 4 deletions
|
@ -66,20 +66,17 @@ load_object_table(const char *filename, ObjectTable *tbl)
|
||||||
entry->num_animations = get_short_be(bytes, &b);
|
entry->num_animations = get_short_be(bytes, &b);
|
||||||
|
|
||||||
if(entry->num_animations > 0) {
|
if(entry->num_animations > 0) {
|
||||||
printf("Start reading animations...\n");
|
|
||||||
entry->animations = alloc_arena_malloc(
|
entry->animations = alloc_arena_malloc(
|
||||||
&_level_arena,
|
&_level_arena,
|
||||||
sizeof(ObjectAnim) * entry->num_animations);
|
sizeof(ObjectAnim) * entry->num_animations);
|
||||||
|
|
||||||
for(uint16_t j = 0; j < entry->num_animations; j++) {
|
for(uint16_t j = 0; j < entry->num_animations; j++) {
|
||||||
printf("Reading animation %d.\n", j);
|
|
||||||
ObjectAnim *animation = &entry->animations[j];
|
ObjectAnim *animation = &entry->animations[j];
|
||||||
_load_animation(animation, bytes, &b);
|
_load_animation(animation, bytes, &b);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(has_fragment) {
|
if(has_fragment) {
|
||||||
printf("Start reading fragment...\n");
|
|
||||||
ObjectFrag *fragment = alloc_arena_malloc(
|
ObjectFrag *fragment = alloc_arena_malloc(
|
||||||
&_level_arena,
|
&_level_arena,
|
||||||
sizeof(ObjectFrag));
|
sizeof(ObjectFrag));
|
||||||
|
@ -93,7 +90,6 @@ load_object_table(const char *filename, ObjectTable *tbl)
|
||||||
sizeof(ObjectAnim) * fragment->num_animations);
|
sizeof(ObjectAnim) * fragment->num_animations);
|
||||||
|
|
||||||
for(uint16_t j = 0; j < fragment->num_animations; j++) {
|
for(uint16_t j = 0; j < fragment->num_animations; j++) {
|
||||||
printf("Reading fragment animation %d.\n", j);
|
|
||||||
ObjectAnim *animation = &fragment->animations[j];
|
ObjectAnim *animation = &fragment->animations[j];
|
||||||
_load_animation(animation, bytes, &b);
|
_load_animation(animation, bytes, &b);
|
||||||
}
|
}
|
||||||
|
|
|
@ -275,6 +275,8 @@ begin_render_routine:
|
||||||
poly->tpage = getTPage(1, 0, 576, 0);
|
poly->tpage = getTPage(1, 0, 576, 0);
|
||||||
poly->clut = getClut(0, 481);
|
poly->clut = getClut(0, 481);
|
||||||
|
|
||||||
|
setSemiTrans(poly, state->id == OBJ_SHIELD ? 1 : 0);
|
||||||
|
|
||||||
sort_prim(poly,
|
sort_prim(poly,
|
||||||
((state->id == OBJ_RING) || (state->id == OBJ_SHIELD))
|
((state->id == OBJ_RING) || (state->id == OBJ_SHIELD))
|
||||||
? OTZ_LAYER_OBJECTS
|
? OTZ_LAYER_OBJECTS
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
#include "timer.h"
|
||||||
|
|
||||||
extern int debug_mode;
|
extern int debug_mode;
|
||||||
|
|
||||||
|
@ -124,6 +125,7 @@ static const char *creditstxt[] = {
|
||||||
"The Spriters Resource",
|
"The Spriters Resource",
|
||||||
"Schnappy",
|
"Schnappy",
|
||||||
"Lameguy64",
|
"Lameguy64",
|
||||||
|
"spicyjpeg",
|
||||||
"\r",
|
"\r",
|
||||||
|
|
||||||
"Thanks for Playing",
|
"Thanks for Playing",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue