Pure Resource Catcher - code generator (beta)

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Pure Resource Catcher - code generator (beta)

Post by eddy »

This tool generates code to catch all your resources. (images, icons, sounds, modules, texts)
It will help you to include your media files.
I was tired to code this part each time that's why I coded this tool :wink:

generated code sections
  • plugin (if necessary)
  • define resource IDs
  • catch resources
  • free resources
  • include binary
:arrow: Download File : HERE

:arrow: How to install:
- unzip this file
- menu > tools > configure tools > add new tool ...
Image

:arrow: How to use :
- click menu > tools > Pure Resource Catcher
- select your resource files
- it will generate code
- select and copy the code
- click OK to close the tool
- paste the code
Image

sample code generated :

Code: Select all

;// Code For PureBasic 4.30
InitSound()
UseOGGImageDecoder()
UsePNGImageDecoder()

;// ID resources
Enumeration #PB_Compiler_EnumerationValue
#MEDIA_LEVEL_GAMEOVER_OGG
#MEDIA_INTRO_STORY_FONT_PNG
#MEDIA_INTRO_STORY_IMAGES_PNG
EndEnumeration
;// Catch resources
CatchSound(#MEDIA_LEVEL_GAMEOVER_OGG, ?MEDIA_LEVEL_GAMEOVER_OGG, ?MEDIA_LEVEL_GAMEOVER_OGG_END-?MEDIA_LEVEL_GAMEOVER_OGG)
CatchImage(#MEDIA_INTRO_STORY_FONT_PNG, ?MEDIA_INTRO_STORY_FONT_PNG, ?MEDIA_INTRO_STORY_FONT_PNG_END-?MEDIA_INTRO_STORY_FONT_PNG)
CatchImage(#MEDIA_INTRO_STORY_IMAGES_PNG, ?MEDIA_INTRO_STORY_IMAGES_PNG, ?MEDIA_INTRO_STORY_IMAGES_PNG_END-?MEDIA_INTRO_STORY_IMAGES_PNG)

;// Free resources
FreeSound(#MEDIA_LEVEL_GAMEOVER_OGG)
FreeImage(#MEDIA_INTRO_STORY_FONT_PNG)
FreeImage(#MEDIA_INTRO_STORY_IMAGES_PNG)

;// Include resources
DataSection
MEDIA_LEVEL_GAMEOVER_OGG:
IncludeBinary "media\level_gameover.ogg"
MEDIA_LEVEL_GAMEOVER_OGG_END:
MEDIA_INTRO_STORY_FONT_PNG:
IncludeBinary "media\intro_story_font.png"
MEDIA_INTRO_STORY_FONT_PNG_END:
MEDIA_INTRO_STORY_IMAGES_PNG:
IncludeBinary "media\intro_story_images.png"
MEDIA_INTRO_STORY_IMAGES_PNG_END:
EndDataSection
Last edited by eddy on Wed Sep 24, 2008 2:05 pm, edited 36 times in total.
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

A bit more info before i install anything, please :wink:
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

I hope it's clear.
For the moment, there's only a menu shortcut.

TODO:
- I'll add an toolbar icon later.
- I'll improve the ID formater.
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
yrreti
Enthusiast
Enthusiast
Posts: 546
Joined: Tue Oct 31, 2006 4:34 am

Post by yrreti »

Sorry to bother you eddy, but the link gives 404 ?
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

I have some problems with my file hosting services. :roll:
fixed... You can retry.
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
yrreti
Enthusiast
Enthusiast
Posts: 546
Joined: Tue Oct 31, 2006 4:34 am

Post by yrreti »

Thank you eddy,
Just to let you know, that the link works now.
Post Reply