- 2,273
- Posts
- 19
- Years
- Age 33
- Maybe rivendell i have heard its nice there
- Seen Apr 11, 2010
ok thanks [Noleafclover0987] its a bit of a bummer but thanks at least i no that now.
Avatar said:@Neo-Dragon, you can get it from Blizzy's Starter Kit.
font is not a scene, it's a text drawing method for class Bitmap.OverTheBelow said:@Link2005 Ah, Thanks anyway, I found it out. It was in the Font* scene. Just pretty hard to find the matching colour :P
def draw_text(arguments)
this is an anoying bug. please delete all resolution scripts and add these:[NoLeAfCloVeR0987] said:theres really no good answer....its beause your using the starter kit and the resoulution script messes that up....all you have to do is make you map either longer of wider depending one where you want to teleport(liek what direction, if you want down make it longer, if you want left/right then make it wider) like if you map is 20x20 but when you teleport from a map to the right side of the map and you dont see your self for like 5 steps, make the map bigger by 7 steps so that theres stuff behind you, like the map wount start with your sprite....if thats confusing ill try and put it in different words
#==============================================================================
# ■ Win32API
#------------------------------------------------------------------------------
# by Squall [email protected]
# Change the window size
# I must thank cybersam for his mouse and keyboard scripts. they were very
# useful finding some winapi function.
#
# !! this script MUST be on top of all other or the game will crash,
# if you use scripts to enlarge maps!
#==============================================================================
class Win32API
#--------------------------------------------------------------------------
# - define constant
#--------------------------------------------------------------------------
GAME_INI_FILE = ".\\Game.ini" # define "Game.ini" file
HWND_TOPMOST = 0 # window always active
HWND_TOP = -1 # window active when used only
SWP_NOMOVE = 0 # window pos and sizes can be changed
#--------------------------------------------------------------------------
# - Win32API.GetPrivateProfileString // check your game title in Game.ini
#--------------------------------------------------------------------------
def Win32API.GetPrivateProfileString(section, key)
val = "\0"*256
gps = Win32API.new('kernel32', 'GetPrivateProfileString',%w(p p p p l p), 'l')
gps.call(section, key, "", val, 256, GAME_INI_FILE)
val.delete!("\0")
return val
end
#--------------------------------------------------------------------------
# - Win32API.FindWindow // find the RGSS window
#--------------------------------------------------------------------------
def Win32API.FindWindow(class_name, title)
fw = Win32API.new('user32', 'FindWindow', %(p, p), 'i')
hWnd = fw.call(class_name, title)
return hWnd
end
#--------------------------------------------------------------------------
# - Win32API.SetWindowPos // change window positions and sizes
#--------------------------------------------------------------------------
def Win32API.SetWindowPos(w, h)
title = Win32API.GetPrivateProfileString("Game", "Title")
hWnd = Win32API.FindWindow("RGSS Player", title)
swp = Win32API.new('user32', 'SetWindowPos', %(l, l, i, i, i, i, i), 'i')
win = swp.call(hWnd, HWND_TOP, 240, 240, w + 6, h + 32, 0)
#the line below makes the window on top of all others
#win = swp.call(hWnd, HWND_TOPMOST, 0, 0, w + 6, h + 32, SWP_NOMOVE)
return win
end
#--------------------------------------------------------------------------
# - Win32API.client_size // check the window width and height
#--------------------------------------------------------------------------
def Win32API.client_size
title = Win32API.GetPrivateProfileString("Game", "Title")
hWnd = Win32API.FindWindow("RGSS Player", title)
rect = [0, 0, 0, 0].pack('l4')
Win32API.new('user32', 'GetClientRect', %w(l p), 'i').call(hWnd, rect)
width, height = rect.unpack('l4')[2..3]
return width, height
end
end
#============================================================================
# ** Resolution
# By: Near Fantastica
# Date: 16.09.05
# Version: 2
#
# NOTE :: Add the following in the Main after begin
# Resolution.maximize
#
#============================================================================
class Resolution
#--------------------------------------------------------------------------
# * define constant
#--------------------------------------------------------------------------
GAME_INI_FILE = ".\\Game.ini" # define "Game.ini" file
HWND_TOPMOST = 0 # window always active
HWND_TOP = -1 # window active when used only
SWP_NOMOVE = 0 # window pos and sizes can be changed
SW_MAXIMIZE = 3
#--------------------------------------------------------------------------
# * Resolution.GetPrivateProfileString // check your game title in Game.ini
#--------------------------------------------------------------------------
def Resolution.GetPrivateProfileString(section, key)
val = "\0"*256
gps = Win32API.new('kernel32', 'GetPrivateProfileString',%w(p p p p l p), 'l')
gps.call(section, key, "", val, 256, GAME_INI_FILE)
val.delete!("\0")
return val
end
#--------------------------------------------------------------------------
# * Resolution.client_size // check the window width and height
#--------------------------------------------------------------------------
def Resolution.client_size
title = Resolution.GetPrivateProfileString("Game", "Title")
findwindow = Win32API.new('user32', 'FindWindow', %w(p p), 'l')
hwnd = findwindow.call("RGSS Player", title)
rect = [0, 0, 0, 0].pack('l4')
Win32API.new('user32', 'GetClientRect', %w(l p), 'i').call(hwnd, rect)
width, height = rect.unpack('l4')[2..3]
return width, height
end
#--------------------------------------------------------------------------
# * Resolution.client_grid // check the window width and height as grid
#--------------------------------------------------------------------------
def Resolution.client_grid
width, height = Resolution.client_size
width /= 32
height /= 32
return width, height
end
#--------------------------------------------------------------------------
# * Resolution.maximize // Maximize Window
#--------------------------------------------------------------------------
def Resolution.maximize
# Setup
findwindow = Win32API.new('user32', 'FindWindow', %w(p p), 'l')
max = Win32API.new('user32', 'ShowWindow', 'LL', 'L')
title = Resolution.GetPrivateProfileString("Game", "Title")
hwnd = findwindow.call("RGSS Player", title)
max.call(hwnd, SW_MAXIMIZE)
end
#--------------------------------------------------------------------------
# * Resolution.setwindowsize
#--------------------------------------------------------------------------
def Resolution.setwindowsize(w, h)
findwindow = Win32API.new('user32', 'FindWindow', %w(p p), 'l')
title = Resolution.GetPrivateProfileString("Game", "Title")
hwnd = findwindow.call("RGSS Player", title)
swp = Win32API.new('user32', 'SetWindowPos', %(l, l, i, i, i, i, i), 'i')
x = ((1024 / 2) - (w / 2))
y = ((768 / 2) - (h / 2))
swp.call(hwnd, HWND_TOP, x, y, w + 6, h + 32, 0)
end
end
$width, $height = 480, 320
Resolution.setwindowsize($width, $height)
#============================================================================
# ** Game_Map
#============================================================================
class Game_Map
#--------------------------------------------------------------------------
def scroll_down(distance)
width, height = Resolution.client_grid
@display_y = [@display_y + distance, (self.height - height) * 128].min
end
#--------------------------------------------------------------------------
def scroll_right(distance)
width, height = Resolution.client_grid
@display_x = [@display_x + distance, (self.width - width) * 128].min
end
end
#============================================================================
# ** Game_Player
#============================================================================
class Game_Player
CENTER_X = ($width/2 - 16) * 4 # X coordinate in the center of the screen
CENTER_Y = ($height/2 - 16) * 4 # Y coordinate in the center of the screen
#--------------------------------------------------------------------------
def center(x, y)
width, height = Resolution.client_grid
max_x = ($game_map.width - width) * 128
max_y = ($game_map.height - height) * 128
$game_map.display_x = [0, [x * 128 - CENTER_X, max_x].min].max
$game_map.display_y = [0, [y * 128 - CENTER_Y, max_y].min].max
end
end
class Spriteset_Map
#--------------------------------------------------------------------------
def initialize
width, height = Resolution.client_size
@viewport1 = Viewport.new(0, 0, width, height)
@viewport2 = Viewport.new(0, 0, width, height)
@viewport3 = Viewport.new(0, 0, width, height)
@viewport2.z = 200
@viewport3.z = 5000
@tilemap = Tilemap.new(@viewport1)
@tilemap.tileset = RPG::Cache.tileset($game_map.tileset_name)
for i in 0..6
autotile_name = $game_map.autotile_names[i]
@tilemap.autotiles[i] = RPG::Cache.autotile(autotile_name)
end
@tilemap.map_data = $game_map.data
@tilemap.priorities = $game_map.priorities
@panorama = Plane.new(@viewport1)
@panorama.z = -1000
@fog = Plane.new(@viewport1)
@fog.z = 3000
@character_sprites = []
for i in $game_map.events.keys.sort
sprite = Sprite_Character.new(@viewport1, $game_map.events[i])
@character_sprites.push(sprite)
end
@character_sprites.push(Sprite_Character.new(@viewport1, $game_player))
@weather = RPG::Weather.new(@viewport1)
@picture_sprites = []
for i in 1..50
@picture_sprites.push(Sprite_Picture.new(@viewport2,
$game_screen.pictures[i]))
end
@timer_sprite = Sprite_Timer.new
update
end
end
Blizzy said:font is not a scene, it's a text drawing method for class Bitmap.
as far as i know only 1 color is availlable in the starterkit.
you can fix it by making an extra argument in the definition:
i've already fixed that prob in my "game".Code:def draw_text(arguments)
this is an anoying bug. please delete all resolution scripts and add these
i forgot to add spriteset_map.[NoLeAfCloVeR0987] said:hey when i do that i get this error
i dont know exactly what it means but i know it has to do with the Map zoom i dont know how to fix it tho.....
GymLeaderLance99 said:Does anyone have a FR/LG Cave Chipset with a Waterfall for RM2K/3?