Giter Club home page Giter Club logo

3dcam-headers's Introduction

Hi there ๐Ÿ‘‹

Anurag's GitHub stats

3dcam-headers's People

Contributors

abelliqueux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

3dcam-headers's Issues

Counter 't' is not incremented in drawPoly()

t is not incremented, thus always 0.
This means that only the first mesh type is checked, and the following meshes are assumed to have the same type.
It works because the test mesh only has tris or quads, but won't work with mixed meshes.

void drawPoly(MESH * mesh, long * Flag, int atime, int * camMode, char ** nextpri, u_long * ot, char * db, DRAWENV * draw) {
long nclip, t = 0;
// mesh is POLY_GT3 ( triangle )
if (mesh->index[t].code == 4) {
drawTri(mesh, Flag, atime, camMode, nextpri, ot, db, draw);
}
// If mesh is quad
if (mesh->index[t].code == 8) {
drawQuad(mesh, Flag, atime, camMode, nextpri, ot, db, draw);
}
};

example level compiles correctly but crashes in emulator.

After compiling out of the box, the example level seems not to load correctly.
Can't really figure out what's wrong here, posting two screenshots.

immagine

immagine

The gouraud cube seems to render fine but there's apparently some problem with texture loading, can't really figure out what's happening here.

EDIT: the real problem was just the crashing, the textures should be correct. Anyway switching to level 1 caused all kinds of graphical glitches before crashing.

pressing jump causes crash

Pressing jump in level 0 does not have any effect, in level 1 it cause an unaligned address error and crashes the application.
First appearance of the bug is in d850180

Sample level0 does not work on real HW

When trying to load level0 on real HW, black screen, but level1 works.

Could be :

  • Dependency on a pointer that's not honored by the content of the level file (physics ?).
  • Something to do with the temporary use of a hardcoded mesh in the LEVEL struc : Removed with 8469e7a
    MESH * meshPlan; // This one is temporary

Proper level system / loader

Right now, we're using switch case to cycle through hardcoded level names.
Figure a way out for something more pretty.

Color displays as black if Horizon color is too low

If Far color / Horizon color is < 100 (0.10 in blender), the corresponding channel color will display as black.

Example level0.c file :

CVECTOR level0_BGc = { 100, 218, 216, 0 };

results in :
2021-06-24-211924_682x505_scrot

CVECTOR level0_BGc = { 0, 218, 216, 0 };

2021-06-24-211901_685x506_scrot

Might be an error in the linear to RGB conversion function.

Also could be due to psyq dpq calculation. See LibRef47.pdf, p.450 and LibOver47.pdf, p.133, "Light Source Calculation" :

LLM == Local Light Matrix
LLV  == Local light vector
LC    == Local Color
BK   == Back Color
FC   == Far Color
p     == interpolation coefficient

LLV = LLM * v0
LC = BK + LCM * LLV
v2 = (1 - p) * v1 * LC + p * FC

v0 -> vx, vy, vz
vl -> r, g, b
p
NormalColorDpq(): v2 -> r, g, b

Prism/Transparency effect does not work with pre-calculated backgrounds

With pre-rendered background, we could just set the tpage to bpp, x, y of the image in vram : 8bpp, 320, 0 by default for now.

if (fixed_BGs){
     ( (POLY_GT3 *) poly )->tpage = getTPage( 0, 0, 320, 0 );
}

But how do we now fixed BGs are used ?
We could use curLvl.camPtr->BGtim to determine the existence of the data, and even use prect to know x,y coords in vram,

if (curLvl.camPtr->BGtim){
     ( (POLY_GT3 *) poly )->tpage = getTPage( curLvl.camPtr->BGtim&0x3, 0, 
                                              curLvl.camPtr->BGtim->prect->x,
                                              curLvl.camPtr->BGtim->prect->y );
}

but do we want to add a function argument just for that ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.