- Got rid of the prefix header in favour of directly including it in every file that needs it (though some files still need the include yet apparently work fine; perhaps a clean build would catch that)

- Replaced all occurrences of FillCRect with the new tileImage, to get away from 'ppat' resources.
- Fixed a minor error in the character editor where part of a text string was off the window.
- With the prefix header gone, libticpp.dylib has been removed; TinyXML++ is now compiled right into the program.
- The scenario editor splash screen is now loaded from a file.
- The pc editor title has its transparency problem fixed.
- Added an overload of tileImage that takes a RgnHandle instead of a Rect in order to replace the single occurrence of FillCRgn.
- Removed an unused function in boe.graphics.cpp
- Changed loading of patterns. Instead of loading each pattern individually from a resource, a single file containing all of them is loading. The arrays that formerly contained the actual patterns now contain the source rects of the patterns.
- Fixed the cursor hotspots (the coordinates were reversed)
- Removed the useless flip_pict that was written when I didn't know what I was doing.
- Fixed error in tileImage in which vrep and hrep were switched.
- Added code to tileImage to ensure that the pattern will line up with anything already onscreen, regardless of the rect to fill.
- Two images were altered: pcedtitle.png to fix the transparenct problem, and pixpats.png to add one pattern that had been missed (and also rearrange the smaller patterns a little)

git-svn-id: http://openexile.googlecode.com/svn/trunk@91 4ebdad44-0ea0-11de-aab3-ff745001d230
This commit is contained in:
2009-06-10 04:01:15 +00:00
parent 78cd213972
commit 7cd4a618b4
45 changed files with 318 additions and 338 deletions

View File

@@ -6,6 +6,7 @@
*
*/
#include <Carbon/Carbon.h>
#include <vector>
#include <map>
#include <stdexcept>
@@ -13,6 +14,10 @@
#include "dialog.h"
#include "graphtool.h"
#include <cmath>
extern GWorldPtr bg_gworld;
void cButton::attachFocusHandler(focus_callback_t f __attribute__((unused))) throw(xHandlerNotSupported){
throw xHandlerNotSupported(true);
}
@@ -63,7 +68,7 @@ void cButton::draw(){
ForeColor(blackColor);
if(key.spec && key.k == key_enter) drawFrame(2,0); // frame default button, to provide a visual cue that it's the default
}else{
FillCRect(&frame,bg[parent->bg]);
tileImage(frame,bg_gworld,bg[parent->bg]);
}
SetPort(old_port);
@@ -227,7 +232,7 @@ void cLed::draw(){
// String location should be shifted right 20 pixels (or possibly 18)
ForeColor(blackColor);
}else{
FillCRect(&frame,bg[parent->bg]);
tileImage(frame,bg_gworld,bg[parent->bg]);
}
SetPort(old_port);

View File

@@ -6,6 +6,7 @@
*
*/
#include <Carbon/Carbon.h>
#include <sstream>
#include "dialog.h"
#include "soundtool.h"

View File

@@ -9,6 +9,7 @@
#define MOUSE_REGION 0L
#define IN_FRONT (WindowPtr)-1L
#include <Carbon/Carbon.h>
#include <cmath>
#include <stdexcept>
#include <boost/type_traits/is_pointer.hpp>
@@ -18,6 +19,7 @@
using namespace std;
using namespace ticpp;
extern GWorldPtr bg_gworld;
extern bool play_sounds;
const short cDialog::BG_DARK = 5, cDialog::BG_LIGHT = 16;
@@ -979,7 +981,7 @@ void cDialog::draw(){
GrafPtr old_port;
GetPort(&old_port);
SetPortWindowPort(win);
FillCRect(&winRect,::bg[bg]);
tileImage(winRect,bg_gworld,::bg[bg]);
ctrlIter iter = controls.begin();
while(iter != controls.end()){

View File

@@ -7,6 +7,7 @@
*/
#define BTNS_DEFINED
#include <Carbon/Carbon.h>
#include <sstream>
#include <algorithm>

View File

@@ -6,6 +6,7 @@
*
*/
#include <Carbon/Carbon.h>
#include <sstream>
#include "dialog.h"

View File

@@ -6,10 +6,13 @@
*
*/
#include <Carbon/Carbon.h>
#include "graphtool.h"
#include "mathutil.h"
#include "dialog.h"
extern GWorldPtr bg_gworld;
void cTextMsg::attachClickHandler(click_callback_t f) throw(){
onClick = f;
}
@@ -102,7 +105,7 @@ void cTextMsg::draw(){
GetPort(&old_port);
SetPortWindowPort(parent->win);
FillCRect(&frame,bg[parent->bg]);
tileImage(frame,bg_gworld,bg[parent->bg]);
if(visible){
TextFont(font_nums[textFont]);

View File

@@ -6,6 +6,7 @@
*
*/
#include <Carbon/Carbon.h>
#include <vector>
#include <map>
#include <stdexcept>
@@ -13,6 +14,8 @@
#include "graphtool.h"
#include "dialog.h"
extern GWorldPtr bg_gworld;
void cPict::init(){
// TODO: Load or otherwise acquire the various GWorlds.
teranim = dlog = talk = scen = largeScen = item = tinyItem = pc = field = boom = missile = save = header = map = NULL;
@@ -506,7 +509,7 @@ void cPict::draw(){
if(!visible){ // Erase it
InsetRect(&rect, -3, -3);
FillCRect(&rect,bg[parent->bg]);
tileImage(rect,bg_gworld,bg[parent->bg]);
return;
}
if(picNum < 0) { // Just fill with black