Author Topic: Really simple, incomplete FRM viewer  (Read 6027 times)

Offline Ganado

  • Moderator
  • Dishonest Abe
Really simple, incomplete FRM viewer
« on: July 17, 2014, 05:01:14 pm »
Hey, would anyone like to test this FRM viewer I made yesterday? (I realize things like this have already been made probably multiple times, but it was good practice for me.) I think the coloring might be slightly off (a bit darker than it should be?, I'm using color.pal).

Updated 23 July 2014
Spoiler: Show images

Features:
  • Loading Fallout 1/2 FRMs, see Directions
  • Drag and drop the images once loaded
  • Press Delete to erase all loaded images (can't delete single sprites yet, sorry)
  • Config file in data folder to adjust some values
  • Soon: Ad-hoc script to automate loading
Most prominent item on the todo list is to be able to adjust the layers at which it draws each sprite.

Download:
(Windows) https://www.sendspace.com/file/3xhk1g (Wednesday, July 23, 2014)
src: https://github.com/Primagen/Fallout-FRM-Viewer

Directions:
After the main window opens and is active, press L, and you will be prompted at the console to type in the name of the .FRM you want to load. Type in the name of the file, not including the art directory or .frm extension. I know, the UI, or lack thereof, sucks :) Alt-tab between the two...

All FRMs should be in [directory of FRM_Viewer.exe]/art/ (I don't have anything fancy like loading from the master or critter.dat, it's just hardcoded to load from ./art ).
« Last Edit: July 24, 2014, 04:42:19 am by Ganado »
Error while opening cfg file: spawnnpc.cfg
Shit! Damn admins! Always ruining my fun! I guess I'll talk to them. WITH MY FISTS!!!! No seriously, I will write them a nice email or make a thread on the forums or something. Thanks!

Offline L33TMaster

  • Heretic
Re: Really simple, incomplete FRM viewer
« Reply #1 on: July 17, 2014, 08:37:33 pm »
I like it if you combined it with the frm2 programs it would be quite the program

Offline JovankaB

  • Rotator
  • JovankaB
Re: Really simple, incomplete FRM viewer
« Reply #2 on: July 17, 2014, 09:39:49 pm »
Nice but why no source code? That's the most interesting part! ;D

You didn't add the animated colors to the palette.
In Fallout they are hardcoded, you can get the values from here:
http://falloutmods.wikia.com/wiki/Pal_animations

These colors are cycled to create simple animations like fire or water.
It's some old school technique that doesn't make sense anymore I guess.
« Last Edit: July 17, 2014, 10:08:40 pm by JovankaB »

Offline Ganado

  • Moderator
  • Dishonest Abe
Re: Really simple, incomplete FRM viewer
« Reply #3 on: July 23, 2014, 06:17:31 am »
Updated some stuff. See original post.

Here's the ugly source, Jovanka :) Still no animation though.
https://github.com/Primagen/Fallout-FRM-Viewer

Edit: Have implemented some support for animation, in ImageManager.cpp. Right now it basically sets the first time frame as the pixel for the texture, ex Slime is 229-232, so it sets the corresponding color (229 -> (0, 108, 0), but doesn't actually animate.

Currently working on a way to automate the loading process so that you can call a sort-of "script" file that does it all at once
ex:
Code: [Select]
open box07
open box08
open rock01
open rock02
open rock03
open rock04
open rock05
open rock06
end
Now do that N times as N approaches a large number
« Last Edit: July 24, 2014, 05:49:48 am by Ganado »
Error while opening cfg file: spawnnpc.cfg
Shit! Damn admins! Always ruining my fun! I guess I'll talk to them. WITH MY FISTS!!!! No seriously, I will write them a nice email or make a thread on the forums or something. Thanks!

Offline JovankaB

  • Rotator
  • JovankaB
Re: Really simple, incomplete FRM viewer
« Reply #4 on: July 24, 2014, 12:52:10 pm »
Nice. It looks like stage one for a map viewer, am I correct? :)
« Last Edit: July 24, 2014, 12:54:13 pm by JovankaB »

Offline Ganado

  • Moderator
  • Dishonest Abe
Re: Really simple, incomplete FRM viewer
« Reply #5 on: July 31, 2014, 08:46:56 pm »
Yep you're right. Right now though the mapper program's having some frame rate problems (99% sure it's the draw calls), but I kinda did things really quickly just to get it to compile, so I'm sure there's places that can be improved upon... I hope... it's not even drawing map objects yet since I'd have to make it read the proto files then, also I forgot to offset the roofs but that's easy enough. I should learn how to use a profiler and decipher its cryptic messages.

Reinventing the wheel to the extreme.
« Last Edit: July 31, 2014, 09:02:27 pm by Ganado »
Error while opening cfg file: spawnnpc.cfg
Shit! Damn admins! Always ruining my fun! I guess I'll talk to them. WITH MY FISTS!!!! No seriously, I will write them a nice email or make a thread on the forums or something. Thanks!