Commit Graph
11 Commits
Author SHA1 Message Date
Nunuhara Cabbage 81455baeb4 Implement more DrawGraph/SACT2 functions
5 functions:

    SACT2.SP_SetDrawMethod
    DrawGraph.CopyStretch
    DrawGraph.CopyStretchAmap
    DrawGraph.CopyReduce
    DrawGraph.CopyReduceAmap

SP_SetDrawMethod is not pixel-perfect to System40.exe, but its pretty
close.

I'm not sure what the difference between the Stretch/Reduce functions is
supposed to be. They seem to do the same thing.

Also, the ugly macros in sdl_draw.c are replaced by higher-order
functions.

With this commit, Sengoku Rance runs up to the menu without exiting due
to unimplemented HLL functions.
2019-12-01 19:50:47 -08:00
Nunuhara Cabbage 4eb5a256fd Refactor graphics code
Sprites are now rendered directly, rather than being blitted to a master
surface which is then copied to a texture. Every sprite now carries an
SDL_Texture in addition to an SDL_Surface (we need both, since
SDL_Texture doesn't give read-access to the pixel data).

All of the image-manipulation code is now in sdl_draw.c, and the
DrawGraph_* functions are now wrappers. Some games (Daibanchou at least)
use an API other than SACT2/DrawGraph, so these operations should be
generic to avoid duplication.
2019-11-29 23:16:40 -08:00
Nunuhara Cabbage ae6b558813 Enumerate effects
and print the name of the unimplemented effect when SACT.Effect is
called.
2019-11-28 16:24:09 -08:00
Nunuhara Cabbage becda2c61d Implement SACT2.CG_GetMetrics 2019-11-26 19:22:13 -08:00
Nunuhara Cabbage 6517e9d8d8 Implement SACT2.SP_CreatePixelOnly 2019-11-26 17:20:47 -08:00
Nunuhara Cabbage 4a7f703af1 Implement more SACT2 text functions 2019-11-26 16:32:24 -08:00
Nunuhara Cabbage 36111e069c Implement simple DrawGraph.Fill* functions
DrawGraph.Fill - fill solid color
DrawGraph.FillAlphaColor - blend solid color
DrawGraph.FillAMap - fill alpha channel
2019-11-25 20:10:44 -08:00
Nunuhara Cabbage 766f93407b Implement the DrawGraph.Copy* family of functions
Implement all of the simple copy functions, with the exception of
DrawGraph.CopyColorReverse, which is undocumented and appears to be dead
code (at least in the version of SACT2 that shipped with the SDK).
2019-11-25 12:19:14 -08:00
Nunuhara Cabbage 3542352cf6 Implement SACT2 text rendering functions
Also a lot of bug fixes included here.
2019-11-24 11:48:53 -08:00
Nunuhara Cabbage b63a28e5ad Fix bug in sact_get_sprite 2019-11-21 21:51:04 -08:00
Nunuhara Cabbage ee0f72ae2e Refactor SACT2 and fix input
Pull graphics code into sact_graphics.c.
Implement Key_ClearFlag so that SACT2's own input handling code works
properly.
2019-11-21 19:57:24 -08:00